used to make the spacing more good */
+ .interactions__dummy {
+ flex-grow: 5;
+ }
+
+ .interactions__like-icon {
+ cursor: pointer;
+ &.liked, &:hover {
+ filter: invert(20%) sepia(97%) saturate(4383%) hue-rotate(321deg) brightness(101%) contrast(95%);
+ }
+ }
+
+ /* Make the buttons slightly smaller */
+ .button {
+ margin: 0;
+ font-size: 0.8em;
+ }
}
-.users-list-preview {
- padding: 0.5em 1em;
- border-color: var(--color-twitter-off-white-dark);
- border-bottom-style: solid;
- border-width: 1px;
-}
-.users-list-preview .list-info-container{
- display: flex;
- align-items: center;
- font-size: 1.5em;
- cursor: pointer;
-}
-.users-list-preview .list-info-container span.num-users {
- margin-left: 1em;
- color: var(--color-twitter-text-gray);
-}
-.users-list-preview .list-info-container .first-N-profile-images {
- display: flex;
- align-items: flex-end;
- margin-left: 1.5em;
-}
-.users-list-preview .list-info-container .first-N-profile-images a {
- margin-right: -1.2em;
- line-height: 0; /* TODO: This is duplicated from `.author-info a` and possibly others */
+/******************************************************
+ * Conversation thread / tweet detail
+ ******************************************************/
+
+.tweet-detail {
+ & :first-child > .tweet {
+ /* The tweet at the top of a thread should have some top-padding */
+ padding-top: 1em;
+ }
}
-.users-list-preview .list-info-container .first-N-profile-images .ellipsis {
- margin-left: 1.5em;
+/**
+ * Focused tweets
+ */
+.focused-tweet {
+ & > .tweet {
+ border-bottom: 1px solid var(--color-twitter-off-white-dark);
+ padding-bottom: 0.5em;
+ }
+
+ /* Make font bigger in focused tweets, unless it's in a quoted tweet */
+ .text {
+ font-size: 1.4em;
+ }
+ .tweet__quoted-tweet .text {
+ font-size: unset;
+ }
}
-.users-list-container {
- display: flex;
- flex-direction: column;
- border-color: var(--color-twitter-off-white-dark);
- border-top-style: double;
- border-width: 4px;
+.reply-chain > :last-child > .tweet {
+ /* Last tweet in a reply chain should have bottom-padding */
+ padding-bottom: 1em;
+ border-bottom: 1px solid var(--color-twitter-off-white-dark);
}
-.users-list-container .author-info .profile-image {
- width: 4em;
- height: 4em;
+
+/**
+ * Threaded conversation string (visual thread indicator) module
+ */
+.string-box {
+ width: 3em;
+ margin-right: 0.5em;
+ flex-grow: 0;
+ flex-shrink: 0;
+
+ /* Make the .string take up 100% of vertical space */
+ flex-direction: column;
+ align-self: stretch;
+
+ /* Only show it in parent threads and reply chains */
+ display: none;
+ .thread-parent-tweet &, .reply-chain & {
+ /* Not if it's in a quoted tweet */
+ &:not(.tweet__quoted-tweet &) {
+ display: flex; /* Show it */
+ }
+ }
+
+ .string {
+ width: 2px;
+ flex-grow: 1;
+ margin: auto;
+ background-color: var(--color-twitter-off-white-dark);
+
+ /* All parent tweets, and all but the last reply */
+ display: none;
+ .thread-parent-tweet &, .reply-chain > :not(:last-child) & {
+ display: revert;
+ }
+ }
}
-.users-list-container .user {
- border-color: var(--color-twitter-off-white-dark);
- border-bottom-style: solid;
- border-width: 1px;
- padding: 1em;
+
+
+/******************************************************
+ * Timeline
+ ******************************************************/
+
+/**
+ * Timeline module
+ */
+.timeline {
+ .timeline__bottom {
+ text-align: center;
+ font-size: 1.2em;
+ padding: 1em 0;
+ }
+ .timeline__eof-label {
+ color: var(--color-twitter-text-gray);
+ }
+ .timeline__show-more-button {
+ padding: 0em 0.8em;
+ display: inline-block;
+ border: 2px solid var(--color-twitter-blue);
+ color: var(--color-twitter-text-gray);
+ font-size: 0.9em;
+
+ &:not(:hover):not(:active) {
+ /* TODO: maybe this should be a reusable button style */
+ background-color: var(--color-twitter-blue-extra-light);
+ }
+ }
}
-.users-list-container .user p.bio {
- margin: 0 5.3em;
- font-size: 0.9em;
- color: var(--color-twitter-text-gray);
+
+/******************************************************
+ * Navigation and base page
+ ******************************************************/
+
+/**
+ * Nav-sidebar module
+ */
+.nav-sidebar {
+ .nav-sidebar__buttons {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ padding: 0 2em;
+ }
+
+ #logged-in-user-info {
+ font-size: 0.8em;
+ margin-top: 1em;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ }
+
+ .button .author-info {
+ pointer-events: none;
+ }
+}
+
+/**
+ * Search bar module
+ */
+.search-bar {
+ .search-bar__back-button {
+ flex-grow: 0;
+ border-radius: 50%;
+ border: 2px solid black;
+ width: 2em;
+ position: relative;
+ height: 2em;
+ box-sizing: border-box;
+ cursor: pointer;
+
+ & img {
+ color: rgb(239, 243, 244);
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ }
+ }
+ .search-bar__form {
+ margin-left: 1em;
+ flex-grow: 1;
+ display: flex;
+ }
+ .search-bar__input {
+ flex-grow: 1;
+ }
+}
+
+/******************************************************
+ * User feeds
+ ******************************************************/
+
+/**
+ * User-feed header module
+ */
+.user-header {
+ border-bottom: 1px solid var(--color-outline-gray);
+
+ .user-header__profile-banner-image {
+ width: 100%;
+ }
+
+ .user-header__info-container {
+ padding: 2em;
+ }
+
+ .user-header__bio {
+ margin: 1.5em 0;
+ }
+
+ /* Special settings for profile images in user headers */
+ .author-info {
+ font-size: 1.3em;
+ padding: 1em;
+ }
+ .profile-image__image {
+ width: 8em;
+ height: 8em;
+ }
+}
+
+/**
+ * Followers + followees module
+ */
+.followers-followees {
+ margin-top: 1em;
+ gap: 4em;
+
+ .followers-followees__count {
+ font-weight: bold;
+ }
+ & label {
+ color: var(--color-twitter-text-gray);
+ cursor: unset;
+ }
+ .spacer {
+ flex-grow: 1;
+ }
+}
+
+/**
+ * Pinned tweet mini-module
+ */
+.pinned-tweet__pin-container {
+ margin: 0.5em 0em -1em 3em;
+ z-index: 1; /* Otherwise it disappears behind the tweet background color on mouse-over */
+ position: relative; /* z-index is ignored if `position` is "static" */
+
+ .pinned-tweet__pin-icon {
+ filter: invert(43%) saturate(30%);
+ width: 1em;
+ height: auto;
+ }
+}
+
+/******************************************************
+ * Search page
+ ******************************************************/
+
+/**
+ * Search page sort-order module
+ */
+.sort-order {
+ padding: 1em 1em 1em 3em;
+ border-bottom: 1px solid var(--color-outline-gray);
+ .sort-order__label {
+ font-weight: bold;
+ }
+ .sort-order__dropdown {
+ text-transform: capitalize;
+ margin: 0 1em;
+ }
+}
+
+/******************************************************
+ * Login page
+ ******************************************************/
+
+/**
+ * Login form module
+ */
+.login-form {
+ .login-form__field-container {
+ padding: 0.5em 0;
+ }
+ .login-form__submit-container {
+ text-align: right;
+ }
+ .login-form__error-label {
+ color: #C0392B;
+ font-weight: bold;
+
+ & + input {
+ border-color: #C0392B;
+ border-width: 2px;
+ }
+ }
+ .login-form__input {
+ width: 100%;
+ border-radius: 0.5em;
+ padding: 0.5em 0.6em;
+ flex-grow:;
+ }
+ & input[type="submit"] {
+ padding: 1em;
+ }
+}
+.choose-session {
+ margin-top: 2em;
+
+ .choose-session__form-contents {
+ padding-top: 1em;
+ gap: 3em;
+
+ }
+ .choose-session__dropdown {
+ flex-grow: 1;
+ }
+}
+
+/******************************************************
+ * Lists pages
+ ******************************************************/
+
+.list-of-lists {
+ border-color: var(--color-twitter-off-white-dark);
+ border-top-style: double;
+ border-width: 4px;
+}
+
+/**
+ * List preview module
+ */
+.list-preview {
+ padding: 0.5em 1em;
+ border-color: var(--color-twitter-off-white-dark);
+ border-bottom-style: solid;
+ border-width: 1px;
+
+ .list-preview__info-container{
+ display: flex;
+ align-items: center;
+ font-size: 1.5em;
+ cursor: pointer;
+ }
+ .list-preview__num-users {
+ margin-left: 1em;
+ color: var(--color-twitter-text-gray);
+ }
+ .list-preview__first-N-profile-images {
+ display: flex;
+ align-items: flex-end;
+ margin-left: 1.5em;
+
+ .profile-image {
+ /* Make profile images in the list preview stack up on each other */
+ margin-right: -1.2em;
+ }
+ .ellipsis {
+ /* Counteract the above; the ellipsis should be spaced normally */
+ margin-left: 1.5em;
+ }
+ }
}
.add-users-container {
- padding: 1em;
- text-align: center;
+ padding: 1em;
+ text-align: center;
}
-.sort-order-container {
- padding: 1em 1em 1em 3em;
- margin-bottom: -0.5em;
- border-bottom: 1px solid var(--color-outline-gray);
-}
-.sort-order-container select {
- text-transform: capitalize;
- margin: 0 1em;
-}
-.sort-order-container .sort-order-label {
- font-weight: bold;
+/******************************************************
+ * DMs / Messages
+ ******************************************************/
+
+/**
+ * Chat list entry module
+ */
+.chat-list-entry {
+ border-bottom: 1px solid var(--color-outline-gray);
+ padding: 1em 1em 0 1em;
+ box-sizing: border-box;
+ cursor: pointer;
+
+ &.chat-list-entry--active-chat {
+ color: var(--color-twitter-blue);
+ border-left: 0.2em solid var(--color-twitter-blue);
+ background-color: var(--color-twitter-off-white);
+
+ .profile-image__image {
+ box-shadow: 0 0 1em 0em var(--color-twitter-blue);
+ }
+ }
+ .chat-list-entry__header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ }
+ .chat-list-entry__groupchat-profile-image {
+ display: flex;
+ }
+ .chat-list-entry__groupchat-profile-image .display-name {
+ padding: 0.6em;
+ font-style: italic;
+ font-weight: bold; /* TODO: redundancy check `.author-info__display-name` */
+ white-space: nowrap;
+ cursor: default; /* TODO: redundancy check `.author-info` */
+ }
+ .chat-list-entry__message-preview {
+ font-size: 0.9em;
+ color: var(--color-twitter-text-gray);
+ padding: 0 1em;
+ border-left: 1px solid var(--color-outline-gray);
+ }
+
+ .posted-at__text {
+ margin: 0;
+ }
}
-.chats-container {
- display: flex;
- flex-direction: row;
+/**
+ * DM message module
+ */
+.dm-message {
+ display: flex;
+ flex-direction: column;
+ margin: 1em 0;
+ /**
+ * Compact mode:
+ * margin: 0.5em 0;
+ */
- /** Setup to allow the two panes to scroll independently **/
- height: 100vh;
- padding-top: 4em;
- margin-top: -4em;
- box-sizing: border-box;
+ .dm-message__row {
+ align-items: stretch;
+
+ .our-message & {
+ flex-direction: row-reverse;
+ }
+ }
+ .dm-message__sender-profile-img {
+ display: flex;
+ align-items: flex-end;
+ }
+ .dm-message__sender-profile-img a {
+ line-height: 0; /* TODO: This is redundant with ".author-info a" rule above */
+ }
+ .dm-message__contents {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ max-width: 80%;
+ margin: 0 0.5em;
+
+ .our-message & {
+ align-items: flex-end;
+ }
+ }
+ .dm-message__replying-to {
+ background-color: #f0f0f0f0;
+ border-radius: 1em 1em 1em 0em;
+ padding: 0.5em 1.2em 2em 1.2em;
+ margin: 0 0 -2em 0.2em;
+ font-size: 0.9em;
+
+ .our-message & {
+ border-radius: 1em 1em 0em 1em;
+ margin: 0 0.2em -2em;
+ }
+ }
+ .dm-message__replying-to-label {
+ font-size: 0.8em;
+ color: var(--color-twitter-text-gray);
+
+ & img.svg-icon {
+ width: 1em;
+ }
+ }
+ .dm-message__tweet-preview {
+ border-radius: 1em;
+ overflow: hidden; /* TODO: redundancy check-- why is this necessary? check .rounded-gray-outline */
+ border: 1px solid var(--color-outline-gray);
+ max-width: 100%;
+ }
+ .dm-message__embedded-image, .dm-message__embedded-video {
+ max-width: 100%;
+ height: auto; /* preserve aspect ratio */
+ }
+ .dm-message__text-content {
+ display: inline-block;
+ padding: 1em;
+ background-color: #ddd;
+ border-radius: 1em;
+ margin: 0;
+
+ /**
+ * Compact mode:
+ *
+ display: inline-block;
+ padding: 0.5em 1em;
+ background-color: #ddd;
+ border-radius: 1em;
+ margin: auto;
+ min-height: 2em;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ */
+ .our-message & {
+ background-color: var(--color-twitter-blue-light);
+ }
+ }
+
+ .sent-at {
+ flex-grow: 1;
+ min-width: 5em;
+ width: fit-content;
+
+ .sent-at__text {
+ float: right;
+ color: var(--color-twitter-text-gray);
+ font-size: 0.875em;
+ white-space: nowrap;
+ }
+ }
+ .sent-at__text {
+ margin: 0 4.5em;
+ }
+ .dm-message__reactions {
+ display: flex;
+ padding: 0 4em;
+ cursor: default;
+
+ .our-message & {
+ flex-direction: row-reverse;
+ }
+ }
+
+ &.our-message {
+ align-items: flex-end;
+ }
}
-.chats-container .chat-list {
- flex-basis: 0;
- flex-grow: 4;
- display: flex;
- flex-direction: column;
- overflow-y: scroll;
-}
-.chats-container .chat-list .chat {
- border-bottom: 1px solid var(--color-outline-gray);
- padding: 1em 1em 0 1em;
- box-sizing: border-box;
- cursor: pointer;
-}
-.chats-container .chat-list .chat.active-chat {
- color: var(--color-twitter-blue);
- border-left: 0.2em solid var(--color-twitter-blue);
- background-color: var(--color-twitter-off-white);
-}
-.chats-container .chat-list .chat.active-chat .profile-image{
- box-shadow: 0 0 1em 0em var(--color-twitter-blue);
-}
-.chats-container .chat-list .chat .chat-preview-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
-}
-.chats-container .chat-list .chat .chat-preview-header .posted-at {
- margin: 0;
-}
-.chats-container .chat-list .chat .groupchat-profile-image-container {
- display: flex;
-}
-.chats-container .chat-list .chat .groupchat-profile-image-container .display-name {
- padding: 0.6em;
- font-style: italic;
-}
-.chats-container .chat-list .chat .chat-preview {
- font-size: 0.9em;
- color: var(--color-twitter-text-gray);
- padding: 0 1em;
- border-left: 1px solid var(--color-outline-gray);
-}
-.chats-container #chat-view {
- flex-basis: 0;
- flex-grow: 7;
- border-left: 1px solid var(--color-outline-gray);
- padding: 0.5em;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
-}
-.chats-container #chat-view .chat-messages {
- flex-grow: 1;
- overflow-y: auto;
-}
-.chats-container #chat-view .our-message {
- align-items: flex-end;
-}
-.dm-message-and-reacts-container {
- display: flex;
- flex-direction: column;
- margin: 1em 0;
-}
-.dm-message-text-container {
- display: inline-block;
- padding: 1em;
- background-color: #ddd;
- border-radius: 1em;
- margin: 0;
-}
-.our-message .dm-message-text-container {
- background-color: var(--color-twitter-blue-light);
-}
-.sender-profile-image-container {
- display: flex;
- align-items: flex-end;
-}
-.sender-profile-image-container a {
- line-height: 0; /* TODO: This is redundant with ".author-info a" rule above */
-}
-.dm-message-container {
- display: flex;
- align-items: stretch;
- gap: 0.5em;
-}
-.our-message .dm-message-container {
- flex-direction: row-reverse;
-}
-.dm-message-reactions {
- display: flex;
- padding: 0 4em;
- cursor: default;
-}
-.our-message .dm-message-reactions {
- flex-direction: row-reverse;
-}
-.dm-message-and-reacts-container p.posted-at {
- margin: 0 4.5em;
-}
-.dm-message-content-container {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- max-width: 80%;
-}
-.our-message .dm-message-content-container {
- align-items: flex-end;
-}
-.dm-message-content-container .tweet-preview {
- border-radius: 1em;
- border: 1px solid var(--color-outline-gray);
- max-width: 100%;
-}
-.dm-message-content-container .replying-to-container {
- background-color: #f0f0f0f0;
- border-radius: 1em 1em 1em 0em;
- padding: 0.5em 1.2em 2em 1.2em;
- margin: 0 0 -2em 0.2em;
- font-size: 0.9em;
-}
-.our-message .dm-message-content-container .replying-to-container {
- border-radius: 1em 1em 0em 1em;
- margin: 0 0.2em -2em;
-}
-.dm-message-content-container .replying-to-label {
- font-size: 0.8em;
- display: flex;
- gap: 0.2em;
-}
-.dm-message-content-container .replying-to-label img.svg-icon {
- width: 1em;
-}
-.dm-embedded-image {
- max-width: 100%;
- height: auto; /* preserve aspect ratio */
-}
-.dm-composer-container {
- padding-top: 0.5em;
- border-top: 1px solid var(--color-outline-gray);
-/* position: absolute;
- bottom: 1em;
- right: 0.5em;
- left: 0.5em;*/
-}
-.dm-composer-container form {
- display: flex;
-}
-#composer {
- flex-grow: 1;
- border: 1px solid #ccc;
- font-family: inherit;
- font-size: inherit;
- padding: 1px 6px;
- max-height: 10em;
- overflow-y: auto; /* scrollbar only if needed */
+
+/**
+ * Messages page DM composer module
+ */
+.dm-composer {
+ padding-top: 0.5em;
+ border-top: 1px solid var(--color-outline-gray);
+
+ & form {
+ display: flex;
+ gap: 1em;
+ padding: 0.5em 1em;
+ align-items: center;
+ }
+ [role="textbox"] {
+ flex-grow: 1;
+ border: 1px solid #ccc;
+ font-family: inherit;
+ font-size: inherit;
+ padding: 1px 6px;
+ max-height: 10em;
+ min-height: 3em;
+ overflow-y: auto; /* scrollbar only if needed */
+ border: 2px solid var(--color-outline-gray);
+ border-radius: 0.5em;
+ }
+ & input[type="submit"] {
+ flex-shrink: 0;
+ flex-grow: 0;
+ height: 3em;
+ width: 6em;
+ }
}
diff --git a/internal/webserver/tpl/http_500.tpl b/internal/webserver/tpl/http_500.tpl
index acfb5e3..ff9dd4a 100644
--- a/internal/webserver/tpl/http_500.tpl
+++ b/internal/webserver/tpl/http_500.tpl
@@ -1,8 +1,6 @@
{{define "error-toast"}}
-
-
- {{.ErrorMsg}}
-
-
-
+
{{end}}
diff --git a/internal/webserver/tpl/includes/author_info.tpl b/internal/webserver/tpl/includes/author_info.tpl
index b3c22a8..1c794e7 100644
--- a/internal/webserver/tpl/includes/author_info.tpl
+++ b/internal/webserver/tpl/includes/author_info.tpl
@@ -1,25 +1,16 @@
{{define "author-info"}}
-
-
-
-
-
+ {{template "circle-profile-img" .}}
+
+
{{.DisplayName}}
{{if .IsPrivate}}
-

+
{{end}}
- @{{.Handle}}
+ @{{.Handle}}
{{end}}
diff --git a/internal/webserver/tpl/includes/base.tpl b/internal/webserver/tpl/includes/base.tpl
index 90410d4..9ba3fac 100644
--- a/internal/webserver/tpl/includes/base.tpl
+++ b/internal/webserver/tpl/includes/base.tpl
@@ -24,11 +24,11 @@
-
+
-