diff --git a/crates/app/src/public/css/style.css b/crates/app/src/public/css/style.css index 26960fb..f4aeaad 100644 --- a/crates/app/src/public/css/style.css +++ b/crates/app/src/public/css/style.css @@ -189,7 +189,7 @@ table ol { color: var(--color-text); } -.card.tertiary { +.card.lowered { background: var(--color-lowered); } @@ -308,25 +308,25 @@ button.secondary:hover, background: var(--color-secondary-lowered); } -button.tertiary, -.button.tertiary { +button.raised, +.button.raised { background: var(--color-raised); color: var(--color-text-raised); } -button.tertiary:hover, -.button.tertiary:hover { +button.raised:hover, +.button.raised:hover { background: var(--color-super-raised); } -button.quaternary, -.button.quaternary { +button.lowered, +.button.lowered { background: var(--color-lowered); color: var(--color-text-lowered); } -button.quaternary:hover, -.button.quaternary:hover { +button.lowered:hover, +.button.lowered:hover { background: var(--color-super-lowered); } @@ -520,6 +520,11 @@ select:focus { .pillmenu.rows .row:last-of-type a:last-child { border-radius: 0; } + + .pillmenu:is(.dropdown .inner *), + .pillmenu:is(.dropdown .inner *).rows { + display: contents; + } } /* notification */ @@ -627,7 +632,7 @@ nav .button:not(.title):not(.active):hover { } #page { - padding-bottom: 72px; + padding-bottom: 12dvh; } nav button:not(.dropdown *), @@ -669,6 +674,43 @@ nav .button:not(.title):not(.active):hover { } } +.mobile_nav { + width: 100dvw; + border-bottom: solid 1px var(--color-super-lowered); + background-color: var(--color-lowered); + padding: var(--pad-2) var(--pad-4); + display: flex; + gap: var(--pad-2); + align-items: center; + justify-content: space-between; +} + +/* mobile nav chip nav */ +.mobile_nav .pillmenu { + flex-direction: row !important; + width: max-content !important; +} + +.mobile_nav .pillmenu a { + border-radius: 0; + padding: var(--pad-1) var(--pad-3); +} + +.mobile_nav .pillmenu a span { + /* show icons only */ + display: none; +} + +.mobile_nav .pillmenu a:first-of-type { + border-top-left-radius: var(--radius) !important; + border-bottom-left-radius: var(--radius) !important; +} + +.mobile_nav .pillmenu a:last-of-type { + border-top-right-radius: var(--radius) !important; + border-bottom-right-radius: var(--radius) !important; +} + /* dialog */ dialog { padding: 0; @@ -795,7 +837,8 @@ dialog::backdrop { } .dropdown .inner a:hover, -.dropdown .inner button:hover { +.dropdown .inner button:hover, +.dropdown .inner .active { background-color: var(--color-lowered); } @@ -804,8 +847,19 @@ dialog::backdrop { outline: none; } +.dropdown .inner .active::after { + top: 0; + left: 0; + width: 5px; + content: ""; + height: 100%; + position: absolute; + background: var(--color-primary); + border-radius: var(--radius); +} + .dropdown:not(nav *):has(.inner.open) button:not(.inner button) { - color: var(--color-text) !important; + color: var(--color-text-lowered) !important; background: var(--color-lowered) !important; } @@ -814,6 +868,11 @@ dialog::backdrop { background: var(--color-primary-lowered) !important; } +.dropdown:not(nav *):has(.inner.open) button.raised:not(.inner button) { + color: var(--color-text-raised) !important; + background: var(--color-raised) !important; +} + .dropdown button .icon { transition: transform 0.15s; } diff --git a/crates/app/src/public/html/body.lisp b/crates/app/src/public/html/body.lisp index e4e15c5..3b51c42 100644 --- a/crates/app/src/public/html/body.lisp +++ b/crates/app/src/public/html/body.lisp @@ -178,7 +178,7 @@ ("class" "lightbox hidden") ("id" "lightbox") (button - ("class" "lightbox_exit small square quaternary red") + ("class" "lightbox_exit small square lowered red") ("onclick" "trigger('ui::lightbox_close')") (icon (text "x"))) @@ -209,7 +209,7 @@ (span (str (text "general:action.add_account")))) (button - ("class" "quaternary") + ("class" "lowered") ("onclick" "document.getElementById('tokens_dialog').close()") ("type" "button") (icon (text "check"))))))) diff --git a/crates/app/src/public/html/chats/app.lisp b/crates/app/src/public/html/chats/app.lisp index ddee672..97bb440 100644 --- a/crates/app/src/public/html/chats/app.lisp +++ b/crates/app/src/public/html/chats/app.lisp @@ -25,13 +25,13 @@ ("style" "width: var(--list-bar-width)") (a ("href" "/chats/0/0") - ("class" "button quaternary channel_icon {% if selected_community == 0 -%}selected{%- endif %}") + ("class" "button lowered channel_icon {% if selected_community == 0 -%}selected{%- endif %}") ("data-turbo" "false") (text "{{ icon \"message-circle\" }}")) (text "{% for community in communities %} {% if community.id != 0 -%}") (a ("href" "/chats/{{ community.id }}/0") - ("class" "button quaternary channel_icon {% if selected_community == community.id -%}selected{%- endif %}") + ("class" "button lowered channel_icon {% if selected_community == community.id -%}selected{%- endif %}") ("data-turbo" "false") (text "{{ components::community_avatar(id=community.id, community=community, size=\"48px\") }}")) (text "{%- endif %} {% endfor %}")) @@ -74,7 +74,7 @@ (text "{%- endif %}")) (text "{% if can_manage_channels -%}") (a - ("class" "button w-full justify-start quaternary") + ("class" "button w-full justify-start lowered") ("href" "/community/{{ selected_community }}/manage#/channels") (text "{{ icon \"plus\" }}") (span diff --git a/crates/app/src/public/html/chats/channels.lisp b/crates/app/src/public/html/chats/channels.lisp index 433d0a9..e8498b2 100644 --- a/crates/app/src/public/html/chats/channels.lisp +++ b/crates/app/src/public/html/chats/channels.lisp @@ -7,7 +7,7 @@ (div ("class" "flex flex-row gap-1") (a - ("class" "w-full justify-start button {% if selected_channel == channel.id -%}quaternary{% else %}camo{%- endif %}") + ("class" "w-full justify-start button {% if selected_channel == channel.id -%}lowered{% else %}camo{%- endif %}") ("href" "/chats/{{ selected_community }}/{{ channel.id }}") ("data-turbo" "{{ selected_community == '0' }}") (text "{{ icon \"rss\" }}") @@ -17,7 +17,7 @@ (div ("class" "dropdown") (button - ("class" "big_icon {% if selected_channel == channel.id -%}quaternary{% else %}camo{%- endif %}") + ("class" "big_icon {% if selected_channel == channel.id -%}lowered{% else %}camo{%- endif %}") ("onclick" "trigger('atto::hooks::dropdown', [event])") ("exclude" "dropdown") ("style" "width: 32px") @@ -26,14 +26,14 @@ ("class" "inner") (text "{% if user.id == channel.owner -%} {% if selected_community == 0 %}") (button - ("class" "quaternary small") + ("class" "lowered small") ("onclick" "add_member('{{ channel.id }}')") (text "{{ icon \"user-plus\" }}") (span (text "{{ text \"chats:action.add_someone\" }}"))) (text "{%- endif %}") (button - ("class" "quaternary small") + ("class" "lowered small") ("onclick" "update_channel_title('{{ channel.id }}')") (text "{{ icon \"pencil\" }}") (span diff --git a/crates/app/src/public/html/chats/stream.lisp b/crates/app/src/public/html/chats/stream.lisp index d019e0c..8a2243a 100644 --- a/crates/app/src/public/html/chats/stream.lisp +++ b/crates/app/src/public/html/chats/stream.lisp @@ -6,7 +6,7 @@ ("id" "stream_body") (text "{% if page != 0 -%}") (div - ("class" "card flex gap-2 small tertiary flex-wrap") + ("class" "card flex gap-2 small lowered flex-wrap") (b (text "{{ text \"chats:label.viewing_old_messages\" }}")) (a @@ -16,7 +16,7 @@ (text "{{ text \"chats:label.go_back\" }}"))) (text "{%- endif %} {% if message -%}") (div - ("class" "card flex gap-2 small tertiary flex-wrap") + ("class" "card flex gap-2 small lowered flex-wrap") (b (text "{{ text \"chats:label.viewing_single_message\" }}")) (a @@ -37,7 +37,7 @@ (text "{{ text \"chats:label.view_older\" }}"))) (text "{% if page != 0 -%}") (a - ("class" "button quaternary") + ("class" "button lowered") ("href" "/chats/{{ community }}/{{ channel }}/_stream?page={{ page - 1 }}") ("onclick" "window.CURRENT_PAGE -= 1") (text "{{ icon \"rewind\" }}") diff --git a/crates/app/src/public/html/communities/create_post.lisp b/crates/app/src/public/html/communities/create_post.lisp index c21799a..51b7ebf 100644 --- a/crates/app/src/public/html/communities/create_post.lisp +++ b/crates/app/src/public/html/communities/create_post.lisp @@ -34,12 +34,12 @@ (text "{{ text \"communities:label.create_post\" }}"))) (button ("onclick" "cancel_create_post()") - ("class" "quaternary small red") + ("class" "lowered small red") (text "{{ icon \"x\" }}") (span (text "{{ text \"dialog:action.cancel\" }}")))) (div - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") (text "{% if draft -%}") (div ("class" "card secondary w-full flex items-center justify-between gap-2 small") @@ -54,12 +54,12 @@ ("class" "flex gap-2") (a ("href" "?") - ("class" "button quaternary small") + ("class" "button lowered small") (text "{{ icon \"x\" }}") (span (text "{{ text \"dialog:action.cancel\" }}"))) (button - ("class" "button quaternary red small") + ("class" "button lowered red small") ("onclick" "remove_draft('{{ draft.id }}')") (text "{{ icon \"trash\" }}") (span @@ -75,7 +75,7 @@ (text "{{ quoting[0].username }}'s post"))) (a ("href" "?") - ("class" "button quaternary small") + ("class" "button lowered small") (text "{{ icon \"x\" }}") (span (text "{{ text \"dialog:action.cancel\" }}")))) @@ -335,7 +335,7 @@ (text "{%- endif %}"))) (text "{% if drafts|length > 0 -%}") (div - ("class" "card-nest tertiary hidden") + ("class" "card-nest lowered hidden") ("data-tab" "drafts") (div ("class" "card small flex items-center gap-2") @@ -364,7 +364,7 @@ (span (text "{{ text \"communities:label.load\" }}"))) (button - ("class" "button quaternary red small") + ("class" "button lowered red small") ("onclick" "remove_draft('{{ draft.id }}')") (text "{{ icon \"trash\" }}") (span diff --git a/crates/app/src/public/html/communities/list.lisp b/crates/app/src/public/html/communities/list.lisp index bc4b16b..58a50e2 100644 --- a/crates/app/src/public/html/communities/list.lisp +++ b/crates/app/src/public/html/communities/list.lisp @@ -46,14 +46,14 @@ ("class" "flex items-center gap-2") (a ("href" "/forges") - ("class" "button quaternary small") + ("class" "button lowered small") (text "{{ icon \"anvil\" }}") (span ("class" "desktop") (text "{{ text \"forge:label.my_forges\" }}"))) (a ("href" "/communities/search") - ("class" "button quaternary small") + ("class" "button lowered small") (text "{{ icon \"search\" }}") (span ("class" "desktop") diff --git a/crates/app/src/public/html/communities/members.lisp b/crates/app/src/public/html/communities/members.lisp index 18576f0..ad9b766 100644 --- a/crates/app/src/public/html/communities/members.lisp +++ b/crates/app/src/public/html/communities/members.lisp @@ -33,7 +33,7 @@ (text "{% if can_manage_roles -%}") (a ("href" "/community/{{ community.id }}/manage?uid={{ item[1].id }}#/members") - ("class" "button small quaternary") + ("class" "button small lowered") (text "{{ icon \"pencil\" }}") (span (text "{{ text \"general:action.manage\" }}"))) diff --git a/crates/app/src/public/html/communities/settings.lisp b/crates/app/src/public/html/communities/settings.lisp index c40f6e7..3027aee 100644 --- a/crates/app/src/public/html/communities/settings.lisp +++ b/crates/app/src/public/html/communities/settings.lisp @@ -46,7 +46,7 @@ ("data-tab" "general") (div ("id" "manage_fields") - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") (div ("class" "card-nest") ("ui_ident" "read_access") @@ -150,7 +150,7 @@ (div ("class" "card flex flex-wrap gap-2") (button - ("class" "red quaternary") + ("class" "red lowered") ("onclick" "delete_community()") (text "{{ icon \"trash\" }}") (span @@ -169,7 +169,7 @@ (span (text "{{ text \"general:action.back\" }}"))))) (div - ("class" "card tertiary w-full hidden flex flex-col gap-2") + ("class" "card lowered w-full hidden flex flex-col gap-2") ("data-tab" "images") (div ("class" "card-nest") @@ -219,7 +219,7 @@ ("class" "fade") (text "Use an image of 1100x350px for the best results."))))) (div - ("class" "card tertiary w-full hidden flex flex-col gap-2") + ("class" "card lowered w-full hidden flex flex-col gap-2") ("data-tab" "members") (div ("class" "card-nest") @@ -261,7 +261,7 @@ (span (text "{{ text \"mod_panel:label.permissions_level_builder\" }}"))) (button - ("class" "small quaternary") + ("class" "small lowered") ("onclick" "update_user_role(document.getElementById('uid').value, document.getElementById('role').value)") (text "{{ icon \"check\" }}") (span @@ -271,7 +271,7 @@ ("id" "permission_builder")))) (text "{% if can_manage_channels -%}") (div - ("class" "card tertiary w-full hidden flex flex-col gap-2") + ("class" "card lowered w-full hidden flex flex-col gap-2") ("data-tab" "channels") (div ("class" "card-nest") @@ -309,15 +309,15 @@ (div ("class" "card flex gap-2") (button - ("class" "red quaternary small") + ("class" "red lowered small") ("onclick" "delete_channel('{{ channel.id }}')") (text "{{ text \"general:action.delete\" }}")) (button - ("class" "quaternary small") + ("class" "lowered small") ("onclick" "update_channel_position('{{ channel.id }}')") (text "{{ text \"chats:action.move\" }}")) (button - ("class" "quaternary small") + ("class" "lowered small") ("onclick" "update_channel_title('{{ channel.id }}')") (text "{{ text \"chats:action.rename\" }}")))) (text "{% endfor %}")) @@ -428,7 +428,7 @@ }")) (text "{%- endif %} {% if can_manage_emojis -%}") (div - ("class" "card tertiary w-full hidden flex flex-col gap-2") + ("class" "card lowered w-full hidden flex flex-col gap-2") ("data-tab" "emojis") (text "{{ components::supporter_ad(body=\"Become a supporter to upload GIF animated emojis!\") }}") (div @@ -487,13 +487,13 @@ (div ("class" "flex gap-2") (button - ("class" "quaternary small") + ("class" "lowered small") ("onclick" "rename_emoji('{{ emoji.id }}')") (text "{{ icon \"pencil\" }}") (span (text "{{ text \"chats:action.rename\" }}"))) (button - ("class" "quaternary small red") + ("class" "lowered small red") ("onclick" "remove_emoji('{{ emoji.id }}')") (text "{{ icon \"x\" }}") (span @@ -701,10 +701,10 @@ // ... element.innerHTML = `
Open user profile - ${res.payload.role !== 33 ? `` : ``} - ${res.payload.role !== 65 ? `` : ``} - - + ${res.payload.role !== 33 ? `` : ``} + ${res.payload.role !== 65 ? `` : ``} + +
`; document.getElementById(\"permission_builder\").innerHTML = diff --git a/crates/app/src/public/html/components.lisp b/crates/app/src/public/html/components.lisp index d8f2256..8171c23 100644 --- a/crates/app/src/public/html/components.lisp +++ b/crates/app/src/public/html/components.lisp @@ -75,7 +75,7 @@ (text "{%- endmacro %} {% macro likes(id, asset_type, likes=0, dislikes=0, secondary=false) -%}") (button ("title" "Like") - ("class" "{% if secondary -%}quaternary{% else %}camo{%- endif %} small") + ("class" "{% if secondary -%}lowered{% else %}camo{%- endif %} small") ("hook_element" "reaction.like") ("onclick" "trigger('me::react', [event.target, '{{ id }}', '{{ asset_type }}', true])") (text "{{ icon \"heart\" }} {% if likes > 0 -%}") @@ -86,7 +86,7 @@ (text "{% if not user or not user.settings.hide_dislikes -%}") (button ("title" "Dislike") - ("class" "{% if secondary -%}quaternary{% else %}camo{%- endif %} small") + ("class" "{% if secondary -%}lowered{% else %}camo{%- endif %} small") ("hook_element" "reaction.dislike") ("onclick" "trigger('me::react', [event.target, '{{ id }}', '{{ asset_type }}', false])") (text "{{ icon \"heart-crack\" }} {% if dislikes > 0 -%}") @@ -215,7 +215,7 @@ ("hook" "long") (text "{{ post.title }}")) - (button ("class" "small quaternary") (icon (text "ellipsis")))) + (button ("class" "small lowered") (icon (text "ellipsis")))) (text "{% else %}") (text "{% if not post.context.content_warning -%}") (span @@ -232,14 +232,14 @@ ; content (text "{{ post.content|markdown|safe }} {% if expect_repost -%} {% if repost -%} {{ self::post(post=repost[1], owner=repost[0], secondary=not secondary, community=false, show_community=false, can_manage_post=false) }} {% else %}") (div - ("class" "card tertiary red flex items-center gap-2") + ("class" "card lowered red flex items-center gap-2") (text "{{ icon \"frown\" }}") (span (text "Could not find original post..."))) (text "{%- endif %} {%- endif %}")) (text "{{ self::post_media(upload_ids=post.uploads) }} {% else %}") (details - ("class" "card tiny tertiary w-full") + ("class" "card tiny lowered w-full") (summary ("class" "red w-full") (b @@ -259,7 +259,7 @@ ; content (text "{{ post.content|markdown|safe }} {% if expect_repost -%} {% if repost -%} {{ self::post(post=repost[1], owner=repost[0], secondary=not secondary, community=false, show_community=false, can_manage_post=false) }} {% else %}") (div - ("class" "card tertiary red flex items-center gap-2") + ("class" "card lowered red flex items-center gap-2") (text "{{ icon \"frown\" }}") (span (text "Could not find original post..."))) @@ -438,21 +438,21 @@ ("class" "card secondary w-full flex flex-wrap gap-2") (text "{% if notification.read -%}") (button - ("class" "tertiary") + ("class" "raised") ("onclick" "trigger('me::update_notification_read_status', ['{{ notification.id }}', false])") (text "{{ icon \"undo\" }}") (span (text "{{ text \"notifs:action.mark_as_unread\" }}"))) (text "{% else %}") (button - ("class" "green tertiary") + ("class" "green raised") ("onclick" "trigger('me::update_notification_read_status', ['{{ notification.id }}', true])") (text "{{ icon \"check\" }}") (span (text "{{ text \"notifs:action.mark_as_read\" }}"))) (text "{%- endif %}") (button - ("class" "red tertiary") + ("class" "red raised") ("onclick" "trigger('me::remove_notification', ['{{ notification.id }}'])") (text "{{ icon \"trash\" }}") (span @@ -480,7 +480,7 @@ ("class" "flex justify-between gap-2 w-full") (text "{% if page > 0 -%}") (a - ("class" "button quaternary") + ("class" "button lowered") ("href" "?page={{ page - 1 }}{{ key }}{{ value }}") (text "{{ icon \"arrow-left\" }}") (span @@ -489,7 +489,7 @@ (div) (text "{%- endif %} {% if items != 0 -%}") (a - ("class" "button quaternary") + ("class" "button lowered") ("href" "?page={{ page + 1 }}{{ key }}{{ value }}") (span (text "{{ text \"general:link.next\" }}")) @@ -676,7 +676,7 @@ ; this is only shown if the post author is anonymous AND we are a helper (text "{% if is_helper and owner.id == 0 %}") (details - ("class" "card tiny tertiary w-full") + ("class" "card tiny lowered w-full") (summary ("class" "w-full flex gap-2 flex-wrap items-center") (icon (text "shield")) @@ -1096,7 +1096,7 @@ (text "{%- endmacro %} {% macro emoji_picker(element_id, render_dialog=false) -%}") (button - ("class" "button small square quaternary") + ("class" "button small square lowered") ("onclick" "window.EMOJI_PICKER_TEXT_ID = '{{ element_id }}'; document.getElementById('emoji_dialog').showModal()") ("title" "Emojis") ("type" "button") @@ -1168,14 +1168,14 @@ (div ("class" "flex gap-2") (button - ("class" "bold red quaternary") + ("class" "bold red lowered") ("onclick" "document.getElementById('emoji_dialog').close()") ("type" "button") (text "{{ icon \"x\" }} {{ text \"dialog:action.close\" }}")))))) (text "{%- endif %} {%- endmacro %} {% macro file_picker(files_list_id) -%}") (button - ("class" "button small square quaternary") + ("class" "button small square lowered") ("onclick" "pick_file()") ("title" "Images") ("type" "button") @@ -1270,14 +1270,14 @@ (text "{{ components::emoji_picker(element_id=\"content\", render_dialog=true) }} {% if not quoting -%} {% if is_supporter -%} {{ components::file_picker(files_list_id=\"files_list\") }} {%- endif %} {%- endif %}") (button - ("class" "small square quaternary") + ("class" "small square lowered") ("title" "Add poll") ("onclick" "document.getElementById('poll_options_dialog').showModal()") ("type" "button") (text "{{ icon \"list-todo\" }}")) (button - ("class" "small square quaternary") + ("class" "small square lowered") ("title" "More options") ("onclick" "document.getElementById('post_options_dialog').showModal()") ("type" "button") @@ -1297,7 +1297,7 @@ (div ("class" "flex gap-2") (button - ("class" "bold red quaternary") + ("class" "bold red lowered") ("onclick" "document.getElementById('post_options_dialog').close()") ("type" "button") (text "{{ icon \"x\" }} {{ text \"dialog:action.close\" }}")))) @@ -1474,7 +1474,7 @@ (div ("class" "flex gap-2") (button - ("class" "bold red quaternary") + ("class" "bold red lowered") ("onclick" "document.getElementById('poll_options_dialog').close()") ("type" "button") (text "{{ icon \"x\" }} {{ text \"dialog:action.close\" }}")))))) @@ -1482,7 +1482,7 @@ (text "{%- endmacro %}") (text "{% macro poll(post, poll) -%}") (div - ("class" "card tertiary w-full flex flex-col gap-2") + ("class" "card lowered w-full flex flex-col gap-2") (text "{% set total = poll[0].votes_a + poll[0].votes_b + poll[0].votes_c + poll[0].votes_d %}") (text "{% if poll[1] or poll[2] or user and user.id == poll[0].owner -%}") @@ -1525,14 +1525,14 @@ ; option a (button - ("class" "hover_left_bar tertiary justify-start w-full poll_option") + ("class" "hover_left_bar raised justify-start w-full poll_option") ("onclick" "trigger('me::vote', ['{{ post.id }}', 'A'])") (icon (text "tally-1")) (text "{{ poll[0].option_a }}")) ; option b (button - ("class" "hover_left_bar tertiary justify-start w-full poll_option") + ("class" "hover_left_bar raised justify-start w-full poll_option") ("onclick" "trigger('me::vote', ['{{ post.id }}', 'B'])") (icon (text "tally-2")) (text "{{ poll[0].option_b }}")) @@ -1540,7 +1540,7 @@ ; option c (text "{% if poll[0].option_c -%}") (button - ("class" "hover_left_bar tertiary justify-start w-full poll_option") + ("class" "hover_left_bar raised justify-start w-full poll_option") ("onclick" "trigger('me::vote', ['{{ post.id }}', 'C'])") (icon (text "tally-3")) (text "{{ poll[0].option_c }}")) @@ -1549,7 +1549,7 @@ ; option d (text "{% if poll[0].option_d -%}") (button - ("class" "hover_left_bar tertiary justify-start w-full poll_option") + ("class" "hover_left_bar raised justify-start w-full poll_option") ("onclick" "trigger('me::vote', ['{{ post.id }}', 'D'])") (icon (text "tally-4")) (text "{{ poll[0].option_d }}")) @@ -1666,7 +1666,7 @@ };")) (text "{% else %}") (button - ("class" "quaternary red") + ("class" "lowered red") ("onclick" "cancel_request()") (text "{{ icon \"x\" }}") (span @@ -1701,21 +1701,21 @@ };")) (text "{%- endif %} {% else %}") (button - ("class" "quaternary red") + ("class" "lowered red") ("onclick" "leave_community()") (text "{{ icon \"circle-minus\" }}") (span (text "{{ text \"communities:action.leave\" }}"))) (a ("href" "/chats/{{ community.id }}/0") - ("class" "button quaternary") + ("class" "button lowered") (text "{{ icon \"message-circle\" }}") (span (text "{{ text \"communities:label.chats\" }}"))) (text "{% if user and can_post -%}") (a ("href" "/communities/intents/post?community={{ community.id }}") - ("class" "button quaternary") + ("class" "button lowered") ("data-turbo" "false") (text "{{ icon \"plus\" }}") (span @@ -1752,13 +1752,13 @@ (text "{%- endif %} {% else %}") (a ("href" "/chats/{{ community.id }}/0") - ("class" "button quaternary") + ("class" "button lowered") (text "{{ icon \"message-circle\" }}") (span (text "{{ text \"communities:label.chats\" }}"))) (a ("href" "/communities/intents/post?community={{ community.id }}") - ("class" "button quaternary") + ("class" "button lowered") ("data-turbo" "false") (text "{{ icon \"plus\" }}") (span diff --git a/crates/app/src/public/html/macros.lisp b/crates/app/src/public/html/macros.lisp index 70fcfdb..269f395 100644 --- a/crates/app/src/public/html/macros.lisp +++ b/crates/app/src/public/html/macros.lisp @@ -109,7 +109,38 @@ (text "{%- endif %}"))) (text "{%- endmacro %}") -(text "{% macro timelines_nav(selected=\"\") -%}") +(text "{% macro timelines_nav(selected=\"\", posts=\"\", questions=\"\", secondary_selected=\"posts\") -%}") +(div + ("class" "mobile_nav mobile") + ; primary nav + (div + ("class" "dropdown") + ("style" "width: max-content") + (button + ("class" "camo raised small") + ("onclick" "trigger('atto::hooks::dropdown', [event])") + ("exclude" "dropdown") + (icon (text "sliders-horizontal")) + (text "{{ selected }}")) + (div + ("class" "inner left") + (text "{{ macros::timelines_nav_options(selected=selected) }}"))) + + (text "{% if posts and questions -%}") + ; secondary nav + (text "{{ macros::timelines_secondary_nav(posts=posts, questions=questions, selected=secondary_selected) }}") + (text "{%- endif %}")) + +(div + ("class" "desktop flex flex-col gap-2") + ; primary nav desktop only + (text "{{ macros::timelines_nav_options(selected=selected) }}") + + ; secondary nav desktop only + (text "{{ macros::timelines_secondary_nav(posts=posts, questions=questions, selected=secondary_selected) }}")) +(text "{%- endmacro %}") + +(text "{% macro timelines_nav_options(selected=\"\") -%}") (div ("class" "pillmenu {% if user -%}rows{% endif %} w-full") (div @@ -170,13 +201,13 @@ ("href" "{{ posts }}") ("class" "{% if selected == 'posts' -%}active{%- endif %}") (icon (text "newspaper")) - (str (text "communities:label.posts"))) + (span (str (text "communities:label.posts")))) (a ("href" "{{ questions }}") ("class" "{% if selected == 'questions' -%}active{%- endif %}") (icon (text "message-circle-heart")) - (str (text "communities:label.questions")))) + (span (str (text "communities:label.questions"))))) (text "{%- endif %} {%- endmacro %}") (text "{% macro community_nav(community, selected=\"\") -%} {% if community.context.enable_questions -%}") diff --git a/crates/app/src/public/html/misc/notifications.lisp b/crates/app/src/public/html/misc/notifications.lisp index 210021b..6a0b40e 100644 --- a/crates/app/src/public/html/misc/notifications.lisp +++ b/crates/app/src/public/html/misc/notifications.lisp @@ -29,14 +29,14 @@ ("class" "flex gap-2") (button ("onclick" "trigger('me::clear_notifs')") - ("class" "small red quaternary") + ("class" "small red lowered") (text "{{ icon \"bomb\" }}") (span (text "{{ text \"notifs:action.clear\" }}"))) (div ("class" "dropdown") (button - ("class" "small quaternary") + ("class" "small lowered") ("onclick" "trigger('atto::hooks::dropdown', [event])") ("exclude" "dropdown") (text "{{ icon \"ellipsis\" }}")) @@ -53,7 +53,7 @@ (span (text "{{ text \"notifs:label.mark_all_as_unread\" }}"))))))) (div - ("class" "card tertiary flex flex-col gap-4") + ("class" "card lowered flex flex-col gap-4") (text "{% for notification in notifications %} {{ components::notification(notification=notification) }} {% endfor %}"))) (text "{{ components::pagination(page=page, items=notifications|length, key=\"&id=\", value=profile.id) }}")) diff --git a/crates/app/src/public/html/misc/requests.lisp b/crates/app/src/public/html/misc/requests.lisp index 422106b..5655e16 100644 --- a/crates/app/src/public/html/misc/requests.lisp +++ b/crates/app/src/public/html/misc/requests.lisp @@ -28,13 +28,13 @@ (text "{% if profile.id == user.id -%}") (button ("onclick" "clear_requests()") - ("class" "small red quaternary") + ("class" "small red lowered") (text "{{ icon \"bomb\" }}") (span (text "{{ text \"notifs:action.clear\" }}"))) (text "{% endif %}")) (div - ("class" "card tertiary flex flex-col gap-4") + ("class" "card lowered flex flex-col gap-4") (text "{% for request in requests %} {% if request.action_type == \"CommunityJoin\" %}") (div ("class" "card-nest") @@ -52,7 +52,7 @@ (span (text "{{ text \"requests:label.review\" }}"))) (button - ("class" "quaternary red") + ("class" "lowered red") ("onclick" "remove_request('{{ request.id }}', '{{ request.linked_asset }}')") (text "{{ icon \"trash\" }}") (span @@ -78,13 +78,13 @@ (span (text "{{ text \"requests:action.view_profile\" }}"))) (button - ("class" "quaternary green") + ("class" "lowered green") ("onclick" "accept_follow_request(event, '{{ request.id }}')") (text "{{ icon \"check\" }}") (span (text "{{ text \"general:action.accept\" }}"))) (button - ("class" "quaternary red") + ("class" "lowered red") ("onclick" "remove_request('{{ request.id }}', '{{ request.linked_asset }}')") (text "{{ icon \"trash\" }}") (span @@ -120,12 +120,12 @@ (text "{{ text \"requests:label.answer\" }}")) (button ("type" "button") - ("class" "red quaternary") + ("class" "red lowered") ("onclick" "trigger('me::remove_question', ['{{ question[0].id }}'])") (text "{{ text \"general:action.delete\" }}")) (button ("type" "button") - ("class" "red quaternary") + ("class" "red lowered") ("onclick" "trigger('me::ip_block_question', ['{{ question[0].id }}'])") (text "{{ text \"auth:action.ip_block\" }}"))))) (text "{% endfor %}"))) diff --git a/crates/app/src/public/html/mod/ip_bans.lisp b/crates/app/src/public/html/mod/ip_bans.lisp index 1f12ba7..b1fa5c3 100644 --- a/crates/app/src/public/html/mod/ip_bans.lisp +++ b/crates/app/src/public/html/mod/ip_bans.lisp @@ -16,7 +16,7 @@ (text "{{ text \"general:link.ip_bans\" }}"))) (button ("onclick" "prompt_ban_ip()") - ("class" "quaternary small") + ("class" "lowered small") (text "{{ icon \"plus\" }}") (span (text "{{ text \"communities:action.create\" }}")))) @@ -44,7 +44,7 @@ ("class" "card w-full flex flex-wrap gap-2") (button ("onclick" "remove_ipban('{{ item.ip }}')") - ("class" "red quaternary") + ("class" "red lowered") (text "{{ icon \"trash\" }}") (span (text "{{ text \"general:action.delete\" }}")))))) diff --git a/crates/app/src/public/html/mod/profile.lisp b/crates/app/src/public/html/mod/profile.lisp index c3bdd96..0fc252f 100644 --- a/crates/app/src/public/html/mod/profile.lisp +++ b/crates/app/src/public/html/mod/profile.lisp @@ -13,7 +13,7 @@ (span (text "{{ text \"mod_panel:label.manage_profile\" }}"))) (div - ("class" "card tertiary") + ("class" "card lowered") (div ("class" "flex flex-col gap-2") ("id" "mod_options") @@ -22,19 +22,19 @@ ("ui_ident" "actions") (a ("href" "/settings?username={{ profile.username }}") - ("class" "button quaternary") + ("class" "button lowered") (text "{{ icon \"settings\" }}") (span (text "View settings"))) (a ("href" "/mod_panel/profile/{{ profile.id }}/warnings") - ("class" "button quaternary") + ("class" "button lowered") (text "{{ icon \"shield-alert\" }}") (span (text "View warnings"))) (a ("href" "/notifs?id={{ profile.id }}") - ("class" "button quaternary") + ("class" "button lowered") (text "{{ icon \"bell\" }}") (span (text "Notifications")) @@ -43,7 +43,7 @@ (text "{{ profile.notification_count }}"))) (a ("href" "/requests?id={{ profile.id }}") - ("class" "button quaternary") + ("class" "button lowered") (text "{{ icon \"inbox\" }}") (span (text "Requests")) @@ -51,19 +51,19 @@ ("class" "notification") (text "{{ profile.request_count }}"))) (button - ("class" "red quaternary") + ("class" "red lowered") ("onclick" "delete_account(event)") (text "{{ icon \"trash\" }}") (span (text "{{ text \"settings:label.delete_account\" }}"))) (text "{% if profile.permissions != 131073 -%}") (button - ("class" "red quaternary") + ("class" "red lowered") ("onclick" "update_user_role(131073)") (text "Ban")) (text "{% else %}") (button - ("class" "quaternary") + ("class" "lowered") ("onclick" "update_user_role(1)") (text "Unban")) (text "{%- endif %}"))) @@ -198,7 +198,7 @@ (span (text "{{ text \"mod_panel:label.associations\" }}")))) (div - ("class" "card tertiary flex flex-wrap gap-2") + ("class" "card lowered flex flex-wrap gap-2") (text "{% for user in associations -%}") (text "{{ components::user_plate(user=user, show_menu=false) }}") (text "{%- endfor %}"))) @@ -212,13 +212,13 @@ (span (text "{{ text \"mod_panel:label.permissions_level_builder\" }}"))) (button - ("class" "small quaternary") + ("class" "small lowered") ("onclick" "update_user_role(Number.parseInt(document.getElementById('role').value))") (text "{{ icon \"check\" }}") (span (text "{{ text \"general:action.save\" }}")))) (div - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") ("id" "permission_builder"))) (script (text "setTimeout(() => { diff --git a/crates/app/src/public/html/mod/reports.lisp b/crates/app/src/public/html/mod/reports.lisp index 2ba8518..14910fa 100644 --- a/crates/app/src/public/html/mod/reports.lisp +++ b/crates/app/src/public/html/mod/reports.lisp @@ -40,7 +40,7 @@ (text "{{ text \"mod_panel:label.open_reported_content\" }}"))) (button ("onclick" "remove_report('{{ item.id }}')") - ("class" "red quaternary") + ("class" "red lowered") (text "{{ icon \"trash\" }}") (span (text "{{ text \"general:action.delete\" }}")))))) diff --git a/crates/app/src/public/html/mod/warnings.lisp b/crates/app/src/public/html/mod/warnings.lisp index 5d66ad3..35c384e 100644 --- a/crates/app/src/public/html/mod/warnings.lisp +++ b/crates/app/src/public/html/mod/warnings.lisp @@ -16,7 +16,7 @@ (text "{{ text \"mod_panel:label.create_warning\" }}"))) (a ("href" "/mod_panel/profile/{{ profile.id }}") - ("class" "button quaternary small red") + ("class" "button lowered small red") (text "{{ icon \"x\" }}") (span (text "{{ text \"dialog:action.cancel\" }}")))) @@ -66,7 +66,7 @@ ("class" "fade date") (text "{{ item.created }}"))) (button - ("class" "small quaternary red") + ("class" "small lowered red") ("onclick" "remove_warning('{{ item.id }}')") (text "{{ icon \"trash\" }}") (span diff --git a/crates/app/src/public/html/post/post.lisp b/crates/app/src/public/html/post/post.lisp index 2c9a113..705cec2 100644 --- a/crates/app/src/public/html/post/post.lisp +++ b/crates/app/src/public/html/post/post.lisp @@ -102,7 +102,7 @@ (span (text "{{ text \"communities:action.configure\" }}"))) (div - ("class" "card tertiary flex flex-col gap-4") + ("class" "card lowered flex flex-col gap-4") ("id" "post_context"))) (button ("onclick" "save_context()") diff --git a/crates/app/src/public/html/post/reposts.lisp b/crates/app/src/public/html/post/reposts.lisp index 128fade..510c800 100644 --- a/crates/app/src/public/html/post/reposts.lisp +++ b/crates/app/src/public/html/post/reposts.lisp @@ -79,7 +79,7 @@ ("class" "card flex items-center gap-2 flex-wrap secondary") (a ("href" "/post/{{ post[0].id }}") - ("class" "quaternary small button") + ("class" "lowered small button") (text "{{ icon \"external-link\" }}") (span (text "{{ text \"general:action.open\" }}"))))) diff --git a/crates/app/src/public/html/profile/banned.lisp b/crates/app/src/public/html/profile/banned.lisp index 60fd50c..7378c82 100644 --- a/crates/app/src/public/html/profile/banned.lisp +++ b/crates/app/src/public/html/profile/banned.lisp @@ -25,7 +25,7 @@ ("class" "card w-full secondary flex gap-2") (a ("href" "/") - ("class" "button red quaternary") + ("class" "button red lowered") (text "{{ icon \"x\" }}") (span (text "{{ text \"general:action.back\" }}"))))))) diff --git a/crates/app/src/public/html/profile/base.lisp b/crates/app/src/public/html/profile/base.lisp index 347001c..5e846ff 100644 --- a/crates/app/src/public/html/profile/base.lisp +++ b/crates/app/src/public/html/profile/base.lisp @@ -212,35 +212,35 @@ (text "{{ text \"auth:action.follow\" }}"))) (button ("onclick" "toggle_follow_user(event)") - ("class" "quaternary red{% if not is_following %} hidden{% endif %}") + ("class" "lowered red{% if not is_following %} hidden{% endif %}") ("atto_tag" "user.unfollow") (text "{{ icon \"user-minus\" }}") (span (text "{{ text \"auth:action.unfollow\" }}"))) (button ("onclick" "toggle_block_user()") - ("class" "quaternary red") + ("class" "lowered red") (text "{{ icon \"shield\" }}") (span (text "{{ text \"auth:action.block\" }}"))) (text "{% else %}") (button ("onclick" "toggle_block_user()") - ("class" "quaternary red") + ("class" "lowered red") (text "{{ icon \"shield-off\" }}") (span (text "{{ text \"auth:action.unblock\" }}"))) (text "{%- endif %} {% if not user.settings.private_chats or is_following_you %}") (button ("onclick" "create_group_chat()") - ("class" "quaternary") + ("class" "lowered") (text "{{ icon \"message-circle\" }}") (span (text "{{ text \"auth:action.message\" }}"))) (text "{%- endif %} {% if is_helper -%}") (a ("href" "/mod_panel/profile/{{ profile.id }}") - ("class" "button quaternary") + ("class" "button lowered") (text "{{ icon \"shield\" }}") (span (text "{{ text \"general:action.manage\" }}"))) diff --git a/crates/app/src/public/html/profile/blocked.lisp b/crates/app/src/public/html/profile/blocked.lisp index 3f3edd7..b1c59c1 100644 --- a/crates/app/src/public/html/profile/blocked.lisp +++ b/crates/app/src/public/html/profile/blocked.lisp @@ -26,14 +26,14 @@ (text "{% if user -%} {% if not is_blocking -%}") (button ("onclick" "toggle_block_user()") - ("class" "quaternary red") + ("class" "lowered red") (text "{{ icon \"shield\" }}") (span (text "{{ text \"auth:action.block\" }}"))) (text "{% else %}") (button ("onclick" "toggle_block_user()") - ("class" "quaternary red") + ("class" "lowered red") (text "{{ icon \"shield-off\" }}") (span (text "{{ text \"auth:action.unblock\" }}"))) @@ -62,7 +62,7 @@ (text "{%- endif %}") (a ("href" "/") - ("class" "button red quaternary") + ("class" "button red lowered") (text "{{ icon \"x\" }}") (span (text "{{ text \"general:action.back\" }}"))))))) diff --git a/crates/app/src/public/html/profile/media.lisp b/crates/app/src/public/html/profile/media.lisp index 7bdbb9d..a276c90 100644 --- a/crates/app/src/public/html/profile/media.lisp +++ b/crates/app/src/public/html/profile/media.lisp @@ -16,7 +16,7 @@ (text "{% if user -%}") (a ("href" "/search?profile={{ profile.id }}") - ("class" "button quaternary small") + ("class" "button lowered small") (text "{{ icon \"search\" }}") (span (text "{{ text \"general:link.search\" }}"))) diff --git a/crates/app/src/public/html/profile/outbox.lisp b/crates/app/src/public/html/profile/outbox.lisp index 98ac644..316aa62 100644 --- a/crates/app/src/public/html/profile/outbox.lisp +++ b/crates/app/src/public/html/profile/outbox.lisp @@ -34,7 +34,7 @@ ; show button to delete question (button - ("class" "quaternary small red") + ("class" "lowered small red") ("onclick" "trigger('me::remove_question', ['{{ question[0].id }}'])") (icon (text "trash")) (str (text "general:action.delete"))))) diff --git a/crates/app/src/public/html/profile/posts.lisp b/crates/app/src/public/html/profile/posts.lisp index 93d0f0c..325f3ac 100644 --- a/crates/app/src/public/html/profile/posts.lisp +++ b/crates/app/src/public/html/profile/posts.lisp @@ -34,7 +34,7 @@ (text "{% if user -%}") (a ("href" "/search?profile={{ profile.id }}") - ("class" "button quaternary small") + ("class" "button lowered small") (text "{{ icon \"search\" }}") (span (text "{{ text \"general:link.search\" }}"))) diff --git a/crates/app/src/public/html/profile/private.lisp b/crates/app/src/public/html/profile/private.lisp index 12c528d..f9963f6 100644 --- a/crates/app/src/public/html/profile/private.lisp +++ b/crates/app/src/public/html/profile/private.lisp @@ -33,7 +33,7 @@ (text "{{ text \"auth:action.request_to_follow\" }}"))) (button ("onclick" "cancel_follow_user(event)") - ("class" "quaternary red{% if not follow_requested -%} hidden{%- endif %}") + ("class" "lowered red{% if not follow_requested -%} hidden{%- endif %}") ("atto_tag" "user.cancel_request") (text "{{ icon \"user-minus\" }}") (span @@ -41,7 +41,7 @@ (text "{% else %}") (button ("onclick" "toggle_follow_user(event)") - ("class" "quaternary red") + ("class" "lowered red") ("atto_tag" "user.unfollow") (text "{{ icon \"user-minus\" }}") (span @@ -49,14 +49,14 @@ (text "{%- endif %} {% if not is_blocking -%}") (button ("onclick" "toggle_block_user()") - ("class" "quaternary red") + ("class" "lowered red") (text "{{ icon \"shield\" }}") (span (text "{{ text \"auth:action.block\" }}"))) (text "{% else %}") (button ("onclick" "toggle_block_user()") - ("class" "quaternary red") + ("class" "lowered red") (text "{{ icon \"shield-off\" }}") (span (text "{{ text \"auth:action.unblock\" }}"))) @@ -155,7 +155,7 @@ (text "{%- endif %}") (a ("href" "/") - ("class" "button red quaternary") + ("class" "button red lowered") (text "{{ icon \"x\" }}") (span (text "{{ text \"general:action.back\" }}"))))))) diff --git a/crates/app/src/public/html/profile/replies.lisp b/crates/app/src/public/html/profile/replies.lisp index 6bc6ba4..ff54816 100644 --- a/crates/app/src/public/html/profile/replies.lisp +++ b/crates/app/src/public/html/profile/replies.lisp @@ -16,7 +16,7 @@ (text "{% if user -%}") (a ("href" "/search?profile={{ profile.id }}") - ("class" "button quaternary small") + ("class" "button lowered small") (text "{{ icon \"search\" }}") (span (text "{{ text \"general:link.search\" }}"))) diff --git a/crates/app/src/public/html/profile/settings.lisp b/crates/app/src/public/html/profile/settings.lisp index 480a4f3..7eb48dd 100644 --- a/crates/app/src/public/html/profile/settings.lisp +++ b/crates/app/src/public/html/profile/settings.lisp @@ -49,7 +49,7 @@ ("class" "w-full flex flex-col gap-2") ("data-tab" "account") (div - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") ("id" "account_settings") (div ("class" "pillmenu") @@ -96,7 +96,7 @@ (div ("class" "card") (select - ("onchange" "set_setting_field('default_timeline', event.target.selectedOptions[0].value.startsWith('{') ? JSON.parse(event.target.selectedOptions[0].value) : event.target.selectedOptions[0].value)") + ("onchange" "window.SETTING_SET_FUNCTIONS[0]('default_timeline', event.target.selectedOptions[0].value.startsWith('{') ? JSON.parse(event.target.selectedOptions[0].value) : event.target.selectedOptions[0].value)") (option ("value" "MyCommunities") ("selected" "{% if home == '/' -%}true{% else %}false{%- endif %}") @@ -227,7 +227,7 @@ ("class" "w-full flex flex-col gap-2 hidden") ("data-tab" "account/security") (div - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") (a ("href" "#/account") ("class" "button secondary") @@ -272,7 +272,7 @@ (pre ("id" "totp_recovery_codes"))) (button - ("class" "quaternary green") + ("class" "lowered green") ("onclick" "enable_totp(event)") (text "Enable TOTP 2FA")) (text "{% else %}") @@ -282,11 +282,11 @@ (div ("class" "flex gap-2 flex-wrap") (button - ("class" "quaternary red") + ("class" "lowered red") ("onclick" "refresh_totp_codes(event)") (text "Refresh recovery codes")) (button - ("class" "quaternary red") + ("class" "lowered red") ("onclick" "disable_totp(event)") (text "Disable TOTP 2FA"))) (text "{%- endif %}"))) @@ -335,7 +335,7 @@ ("class" "w-full flex flex-col gap-2 hidden") ("data-tab" "account/following") (div - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") (a ("href" "#/account") ("class" "button secondary") @@ -360,14 +360,14 @@ (div ("class" "flex gap-2") (button - ("class" "quaternary red small") + ("class" "lowered red small") ("onclick" "toggle_follow_user('{{ user.id }}')") (text "{{ icon \"user-minus\" }}") (span (text "{{ text \"auth:action.unfollow\" }}"))) (a ("href" "/@{{ user.username }}") - ("class" "button quaternary small") + ("class" "button lowered small") (text "{{ icon \"external-link\" }}") (span (text "{{ text \"requests:action.view_profile\" }}"))))) @@ -391,7 +391,7 @@ ("class" "w-full flex flex-col gap-2 hidden") ("data-tab" "account/blocks") (div - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") (a ("href" "#/account") ("class" "button secondary") @@ -415,7 +415,7 @@ (text "{{ components::avatar(username=user.username) }} {{ components::full_username(user=user) }}")) (a ("href" "/@{{ user.username }}") - ("class" "button quaternary small") + ("class" "button lowered small") (text "{{ icon \"external-link\" }}") (span (text "{{ text \"requests:action.view_profile\" }}")))) @@ -424,7 +424,7 @@ ("class" "w-full flex flex-col gap-2 hidden") ("data-tab" "account/uploads") (div - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") (a ("href" "#/account") ("class" "button secondary") @@ -456,13 +456,13 @@ (div ("class" "flex gap-2") (button - ("class" "quaternary small") + ("class" "lowered small") ("onclick" "trigger('ui::lightbox_open', ['/api/v1/uploads/{{ upload.id }}'])") (text "{{ icon \"view\" }}") (span (text "{{ text \"general:action.view\" }}"))) (button - ("class" "quaternary small red") + ("class" "lowered small red") ("onclick" "remove_upload('{{ upload.id }}')") (text "{{ icon \"x\" }}") (span @@ -493,7 +493,7 @@ ("class" "w-full flex flex-col gap-2 hidden") ("data-tab" "account/billing") (div - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") (a ("href" "#/account") ("class" "button secondary") @@ -534,7 +534,7 @@ portal."))) (a ("href" "{{ config.stripe.billing_portal_url }}") - ("class" "button quaternary") + ("class" "button lowered") ("target" "_blank") (text "Manage billing")) (text "{% else %}") @@ -591,7 +591,7 @@ ("class" "w-full hidden flex flex-col gap-2") ("data-tab" "profile") (div - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") ("id" "profile_settings") (text "{{ components::supporter_ad(body=\"Become a supporter to upload GIF images!\") }}") (div @@ -655,7 +655,7 @@ (span (text "{{ text \"general:action.save\" }}")))) (div - ("class" "card w-full tertiary hidden flex flex-col gap-2") + ("class" "card w-full lowered hidden flex flex-col gap-2") ("data-tab" "sessions") (text "{% for token in profile.tokens %}") (div @@ -688,7 +688,7 @@ ("class" "fade date") (text "{{ token[2] }}"))) (button - ("class" "quaternary red") + ("class" "lowered red") ("onclick" "remove_token('{{ token[1] }}')") (text "{{ text \"general:action.delete\" }}"))) (text "{% endfor %}")) @@ -696,7 +696,7 @@ ("class" "w-full hidden flex flex-col gap-2") ("data-tab" "theme") (div - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") ("id" "theme_settings") (text "{% if failing_color_keys|length > 0 -%}") (div @@ -714,7 +714,7 @@ (ul (text "{% for key in failing_color_keys %}") (li - (text "{{ key[0] }}") + (text "{{ key[0] }} ") (b (text "{{ key[1] }} < 4.5"))) (text "{% endfor %}"))) @@ -745,7 +745,7 @@ (div ("class" "card") (select - ("onchange" "set_setting_field('theme_preference', event.target.selectedOptions[0].value)") + ("onchange" "window.SETTING_SET_FUNCTIONS[0]('theme_preference', event.target.selectedOptions[0].value)") (option ("value" "Auto") ("selected" "{% if user.settings.theme_preference == 'Auto' -%}true{% else %}false{%- endif %}") @@ -771,7 +771,7 @@ (div ("class" "card") (select - ("onchange" "set_setting_field('profile_theme', event.target.selectedOptions[0].value)") + ("onchange" "window.SETTING_SET_FUNCTIONS[0]('profile_theme', event.target.selectedOptions[0].value)") (option ("value" "Auto") ("selected" "{% if user.settings.profile_theme == 'Auto' -%}true{% else %}false{%- endif %}") @@ -795,20 +795,20 @@ (span (text "{{ text \"general:action.save\" }}")))) (div - ("class" "card w-full tertiary hidden flex flex-col gap-2") + ("class" "card w-full lowered hidden flex flex-col gap-2") ("data-tab" "connections") (div ("class" "card w-full flex flex-wrap gap-2") (text "{% if config.connections.spotify_client_id and not profile.connections.Spotify %}") (button - ("class" "quaternary") + ("class" "lowered") ("onclick" "trigger('spotify::create_connection', ['{{ config.connections.spotify_client_id }}'])") (text "{{ icon \"spotify\" }}") (span (text "Spotify"))) (text "{%- endif %} {% if config.connections.last_fm_key and not profile.connections.LastFm %}") (button - ("class" "quaternary") + ("class" "lowered") ("onclick" "trigger('last_fm::create_connection', ['{{ config.connections.last_fm_key }}'])") (text "{{ icon \"last_fm\" }}") (span @@ -839,7 +839,7 @@ (div ("class" "card flex flex-col gap-2") (button - ("class" "quaternary red small") + ("class" "lowered red small") ("onclick" "trigger('connections::delete', ['{{ key }}'])") (text "{{ text \"general:action.delete\" }}")) (label diff --git a/crates/app/src/public/html/profile/warning.lisp b/crates/app/src/public/html/profile/warning.lisp index 89d3824..a108d47 100644 --- a/crates/app/src/public/html/profile/warning.lisp +++ b/crates/app/src/public/html/profile/warning.lisp @@ -31,7 +31,7 @@ (text "{{ text \"dialog:action.continue\" }}"))) (a ("href" "/") - ("class" "button red quaternary") + ("class" "button red lowered") (text "{{ icon \"x\" }}") (span (text "{{ text \"general:action.back\" }}"))))))) diff --git a/crates/app/src/public/html/stacks/list.lisp b/crates/app/src/public/html/stacks/list.lisp index ab24928..6c63921 100644 --- a/crates/app/src/public/html/stacks/list.lisp +++ b/crates/app/src/public/html/stacks/list.lisp @@ -38,7 +38,7 @@ ("class" "card small flex items-center justify-between gap-2") (div ("class" "flex items-center gap-2") - (text "{{ icon \"award\" }}") + (text "{{ icon \"layers\" }}") (span (text "{{ text \"stacks:label.my_stacks\" }}")))) (div diff --git a/crates/app/src/public/html/stacks/manage.lisp b/crates/app/src/public/html/stacks/manage.lisp index 8891ec9..a05e680 100644 --- a/crates/app/src/public/html/stacks/manage.lisp +++ b/crates/app/src/public/html/stacks/manage.lisp @@ -25,7 +25,7 @@ ("data-tab" "general") (div ("id" "manage_fields") - ("class" "card tertiary flex flex-col gap-2") + ("class" "card lowered flex flex-col gap-2") (div ("class" "card-nest") ("ui_ident" "privacy") @@ -121,7 +121,7 @@ (div ("class" "card flex flex-wrap gap-2") (button - ("class" "red quaternary") + ("class" "red lowered") ("onclick" "delete_stack()") (text "{{ icon \"trash\" }}") (span @@ -141,7 +141,7 @@ ("class" "flex gap-2") (text "{{ components::avatar(username=user.username) }} {{ components::full_username(user=user) }}")) (button - ("class" "quaternary small red") + ("class" "lowered small red") ("onclick" "remove_user('{{ user.username }}')") (text "{{ icon \"x\" }}") (span diff --git a/crates/app/src/public/html/stacks/posts.lisp b/crates/app/src/public/html/stacks/posts.lisp index 38c3dd8..cddf9c7 100644 --- a/crates/app/src/public/html/stacks/posts.lisp +++ b/crates/app/src/public/html/stacks/posts.lisp @@ -18,7 +18,7 @@ (text "{% if user and user.id == stack.owner -%}") (a ("href" "/stacks/{{ stack.id }}/manage") - ("class" "button quaternary small") + ("class" "button lowered small") (text "{{ icon \"pencil\" }}") (span (text "{{ text \"general:action.manage\" }}"))) diff --git a/crates/app/src/public/html/timelines/all.lisp b/crates/app/src/public/html/timelines/all.lisp index fb36623..ab3e688 100644 --- a/crates/app/src/public/html/timelines/all.lisp +++ b/crates/app/src/public/html/timelines/all.lisp @@ -5,7 +5,7 @@ (text "{% endblock %} {% block body %} {{ macros::nav() }}") (main ("class" "flex flex-col gap-2") - (text "{{ macros::timelines_nav(selected=\"all\") }} {{ macros::timelines_secondary_nav(posts=\"/all\", questions=\"/all/questions\") }} {% if not user -%}") + (text "{{ macros::timelines_nav(selected=\"all\", posts=\"/all\", questions=\"/all/questions\") }} {% if not user -%}") (div ("class" "card-nest") (div diff --git a/crates/app/src/public/html/timelines/all_questions.lisp b/crates/app/src/public/html/timelines/all_questions.lisp index 4425f11..4d415f4 100644 --- a/crates/app/src/public/html/timelines/all_questions.lisp +++ b/crates/app/src/public/html/timelines/all_questions.lisp @@ -5,7 +5,7 @@ (text "{% endblock %} {% block body %} {{ macros::nav() }}") (main ("class" "flex flex-col gap-2") - (text "{{ macros::timelines_nav(selected=\"all\") }} {{ macros::timelines_secondary_nav(posts=\"/all\", questions=\"/all/questions\", selected=\"questions\") }}") + (text "{{ macros::timelines_nav(selected=\"all\", posts=\"/all\", questions=\"/all/questions\", secondary_selected=\"questions\") }}") (div ("class" "card w-full flex flex-col gap-2") (text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}"))) diff --git a/crates/app/src/public/html/timelines/following.lisp b/crates/app/src/public/html/timelines/following.lisp index abc41d1..fd31252 100644 --- a/crates/app/src/public/html/timelines/following.lisp +++ b/crates/app/src/public/html/timelines/following.lisp @@ -5,7 +5,7 @@ (text "{% endblock %} {% block body %} {{ macros::nav() }}") (main ("class" "flex flex-col gap-2") - (text "{{ macros::timelines_nav(selected=\"following\") }} {{ macros::timelines_secondary_nav(posts=\"/following\", questions=\"/following/questions\") }}") + (text "{{ macros::timelines_nav(selected=\"following\", posts=\"/following\", questions=\"/following/questions\") }} }}") (div ("class" "card w-full flex flex-col gap-2") (text "{% for post in list %} {% if post[2].read_access == \"Everybody\" -%} {% if post[0].context.repost and post[0].context.repost.reposting -%} {{ components::repost(repost=post[3], post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true) }} {% else %} {{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2], poll=post[5]) }} {%- endif %} {%- endif %} {% endfor %} {{ components::pagination(page=page, items=list|length) }}"))) diff --git a/crates/app/src/public/html/timelines/following_questions.lisp b/crates/app/src/public/html/timelines/following_questions.lisp index d2adf28..16dd725 100644 --- a/crates/app/src/public/html/timelines/following_questions.lisp +++ b/crates/app/src/public/html/timelines/following_questions.lisp @@ -5,7 +5,7 @@ (text "{% endblock %} {% block body %} {{ macros::nav() }}") (main ("class" "flex flex-col gap-2") - (text "{{ macros::timelines_nav(selected=\"following\") }} {{ macros::timelines_secondary_nav(posts=\"/following\", questions=\"/following/questions\", selected=\"questions\") }}") + (text "{{ macros::timelines_nav(selected=\"following\", posts=\"/following\", questions=\"/following/questions\", secondary_selected=\"questions\") }}") (div ("class" "card w-full flex flex-col gap-2") (text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}"))) diff --git a/crates/app/src/public/html/timelines/home.lisp b/crates/app/src/public/html/timelines/home.lisp index 09bdef3..4d1ce9d 100644 --- a/crates/app/src/public/html/timelines/home.lisp +++ b/crates/app/src/public/html/timelines/home.lisp @@ -5,7 +5,7 @@ (text "{% endblock %} {% block body %} {{ macros::nav(selected=\"home\") }}") (main ("class" "flex flex-col gap-2") - (text "{{ macros::timelines_nav(selected=\"home\") }} {{ macros::timelines_secondary_nav(posts=\"/\", questions=\"/questions\") }} {% if list|length == 0 and page == 0 -%}") + (text "{{ macros::timelines_nav(selected=\"home\", posts=\"/\", questions=\"/questions\") }} {% if list|length == 0 and page == 0 -%}") (div ("class" "card-nest") (div diff --git a/crates/app/src/public/html/timelines/home_questions.lisp b/crates/app/src/public/html/timelines/home_questions.lisp index 3406d22..a67c0bf 100644 --- a/crates/app/src/public/html/timelines/home_questions.lisp +++ b/crates/app/src/public/html/timelines/home_questions.lisp @@ -5,7 +5,7 @@ (text "{% endblock %} {% block body %} {{ macros::nav() }}") (main ("class" "flex flex-col gap-2") - (text "{{ macros::timelines_nav(selected=\"home\") }} {{ macros::timelines_secondary_nav(posts=\"/\", questions=\"/questions\", selected=\"questions\") }}") + (text "{{ macros::timelines_nav(selected=\"home\", posts=\"/\", questions=\"/questions\", secondary_selected=\"questions\") }}") (div ("class" "card w-full flex flex-col gap-2") (text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}"))) diff --git a/crates/app/src/public/html/timelines/popular.lisp b/crates/app/src/public/html/timelines/popular.lisp index 24a8c98..dfaef71 100644 --- a/crates/app/src/public/html/timelines/popular.lisp +++ b/crates/app/src/public/html/timelines/popular.lisp @@ -5,7 +5,7 @@ (text "{% endblock %} {% block body %} {{ macros::nav(selected=\"popular\") }}") (main ("class" "flex flex-col gap-2") - (text "{{ macros::timelines_nav(selected=\"popular\") }} {{ macros::timelines_secondary_nav(posts=\"/popular\", questions=\"/popular/questions\") }}") + (text "{{ macros::timelines_nav(selected=\"popular\", posts=\"/popular\", questions=\"/popular/questions\") }}") (div ("class" "card w-full flex flex-col gap-2") (text "{% for post in list %} {% if post[2].read_access == \"Everybody\" -%} {% if post[0].context.repost and post[0].context.repost.reposting -%} {{ components::repost(repost=post[3], post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true) }} {% else %} {{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2], poll=post[5]) }} {%- endif %} {%- endif %} {% endfor %} {{ components::pagination(page=page, items=list|length) }}"))) diff --git a/crates/app/src/public/html/timelines/popular_questions.lisp b/crates/app/src/public/html/timelines/popular_questions.lisp index 293ad85..69197d3 100644 --- a/crates/app/src/public/html/timelines/popular_questions.lisp +++ b/crates/app/src/public/html/timelines/popular_questions.lisp @@ -5,7 +5,7 @@ (text "{% endblock %} {% block body %} {{ macros::nav() }}") (main ("class" "flex flex-col gap-2") - (text "{{ macros::timelines_nav(selected=\"popular\") }} {{ macros::timelines_secondary_nav(posts=\"/popular\", questions=\"/popular/questions\", selected=\"questions\") }}") + (text "{{ macros::timelines_nav(selected=\"popular\", posts=\"/popular\", questions=\"/popular/questions\", secondary_selected=\"questions\") }}") (div ("class" "card w-full flex flex-col gap-2") (text "{% for question in list %} {{ components::global_question(question=question, can_manage_questions=false, secondary=true) }} {% endfor %} {{ components::pagination(page=page, items=list|length) }}"))) diff --git a/crates/app/src/public/js/atto.js b/crates/app/src/public/js/atto.js index 96fdf3d..095ba9b 100644 --- a/crates/app/src/public/js/atto.js +++ b/crates/app/src/public/js/atto.js @@ -537,7 +537,7 @@ media_theme_pref(); if (href.pathname.startsWith("/api/v1/auth/user/find_by_ip/")) { const ban_button = document.createElement("button"); ban_button.innerText = "Ban IP"; - ban_button.className = "quaternary red small"; + ban_button.className = "lowered red small"; anchor.parentElement.parentElement.appendChild(ban_button); ban_button.addEventListener("click", async (e) => { @@ -840,6 +840,7 @@ media_theme_pref(); // ui ns (() => { const self = reg_ns("ui"); + window.SETTING_SET_FUNCTIONS = []; self.define("refresh_container", (_, element, keep) => { if (keep.length === 0) { @@ -939,8 +940,8 @@ media_theme_pref(); ${option.input_element_type === "textarea" ? `${option.value}` : ""} ${(option.attributes || { embed_html: "" }).embed_html} - - `; + + `; }, ); @@ -977,6 +978,10 @@ ${option.input_element_type === "textarea" ? `${option.value}` : ""} console.log("update", key); }; + window.SETTING_SET_FUNCTIONS.push( + window[`set_setting_field${id_key}`], + ); + window.preview_color = (key, value) => { console.log("preview_color", key); const stylesheet = document.getElementById( @@ -1070,14 +1075,14 @@ ${option.input_element_type === "textarea" ? `${option.value}` : ""} for (const match of matching) { permissions_html += `
${match} ${permissions[match]} - +
`; } for (const match of not_matching) { permissions_html += `
${match} ${permissions[match]} - +
`; } diff --git a/crates/app/src/public/js/me.js b/crates/app/src/public/js/me.js index 0512160..1a91bcd 100644 --- a/crates/app/src/public/js/me.js +++ b/crates/app/src/public/js/me.js @@ -546,7 +546,7 @@ element.innerHTML = ""; for (const token of Object.entries($.LOGIN_ACCOUNT_TOKENS)) { element.innerHTML += `
- -
`;