(div ("id" "toast_zone")) ; templates (template ("id" "loading_skeleton") (div ("class" "flex flex-col gap-2") ("ui_ident" "loading_skel") (div ("class" "card lowered green flex items-center gap-2") (div ("class" "loader") (icon (text "loader-circle"))) (span (str (text "general:label.loading")))) (div ("class" "card secondary flex gap-2") (div ("class" "skel avatar")) (div ("class" "flex flex-col gap-2 w-full") (div ("class" "skel") ("style" "width: 25%; height: 25px;")) (div ("class" "skel") ("style" "width: 100%; height: 150px")))))) (template ("id" "carp_canvas") (div ("class" "flex flex-col gap-2") (div ("ui_ident" "canvas_loc")) (div ("class" "flex justify-between gap-2") (div ("class" "flex gap-2") (input ("type" "color") ("style" "width: 5rem") ("ui_ident" "color_picker")) (input ("type" "range") ("min" "1") ("max" "25") ("step" "1") ("value" "2") ("ui_ident" "stroke_range"))) (div ("class" "flex gap-2") (button ("title" "Undo") ("ui_ident" "undo") ("type" "button") (icon (text "undo"))) (button ("title" "Redo") ("ui_ident" "redo") ("type" "button") (icon (text "redo"))))))) ; random js (text "") (text "{% if user -%} {%- endif %}") ; dialogs (dialog ("id" "link_filter") (div ("class" "inner flex flex-col gap-2") ; warning stuff (p (text "Pressing continue will bring you to the following URL:")) (pre (code ("id" "link_filter_url"))) (p (text "Are sure you want to go there?")) (hr ("class" "margin")) (div ("class" "flex gap-2") (a ("class" "button primary") ("id" "link_filter_continue") ("rel" "noopener noreferrer") ("target" "_blank") ("onclick", "document.getElementById('link_filter').close()") (icon (text "external-link")) (str (text "dialog:action.continue"))) (button ("class" "secondary") ("type" "button") ("onclick", "document.getElementById('link_filter').close()") (icon (text "x")) (str (text "dialog:action.cancel")))))) (dialog ("id" "web_api_prompt") (div ("class" "inner flex flex-col gap-2") (form ("class" "flex gap-2 flex-col") ("onsubmit" "event.preventDefault()") (label ("for" "prompt") ("id" "web_api_prompt:msg")) (input ("id" "prompt") ("name" "prompt")) (div ("class" "flex justify-between") (div null?) (div ("class" "flex gap-2") (button ("class" "primary bold circle") ("onclick", "globalThis.web_api_prompt_submit(document.getElementById('prompt').value); document.getElementById('prompt').value = ''") ("type" "button") (icon (text "check")) (str (text "dialog:action.okay"))) (button ("class" "bold red camo") ("onclick", "globalThis.web_api_prompt_submit('')") ("type" "button") (icon (text "x")) (str (text "dialog:action.cancel")))))))) (dialog ("id" "web_api_prompt_long") (div ("class" "inner flex flex-col gap-2") (form ("class" "flex gap-2 flex-col") ("onsubmit" "event.preventDefault()") (label ("for" "prompt_long") ("id" "web_api_prompt_long:msg")) (input ("id" "prompt_long") ("name" "prompt_long")) (div ("class" "flex justify-between") (div null?) (div ("class" "flex gap-2") (button ("class" "primary bold circle") ("onclick", "globalThis.web_api_prompt_long_submit(document.getElementById('prompt_long').value); document.getElementById('prompt_long').value = ''") ("type" "button") (icon (text "check")) (str (text "dialog:action.okay"))) (button ("class" "bold red camo") ("onclick", "globalThis.web_api_prompt_long_submit('')") ("type" "button") (icon (text "x")) (str (text "dialog:action.cancel")))))))) (dialog ("id" "web_api_confirm") (div ("class" "inner flex flex-col gap-2") (form ("class" "flex gap-2 flex-col") ("onsubmit" "event.preventDefault()") (span ("id" "web_api_confirm:msg")) (div ("class" "flex justify-between") (div null?) (div ("class" "flex gap-2") (button ("class" "primary bold circle") ("onclick", "globalThis.web_api_confirm_submit(true)") ("type" "button") (icon (text "check")) (str (text "dialog:action.yes"))) (button ("class" "bold red camo") ("onclick", "globalThis.web_api_confirm_submit(false)") ("type" "button") (icon (text "x")) (str (text "dialog:action.no")))))))) (div ("class" "lightbox hidden") ("id" "lightbox") (button ("class" "lightbox_exit small square lowered red") ("onclick" "trigger('ui::lightbox_close')") (icon (text "x"))) (a ("href" "") ("id" "lightbox_img_a") ("target" "_blank") (img ("id" "lightbox_img") ("loading" "lazy")))) ; tokens dialog (text "{% if user -%}") (dialog ("id" "tokens_dialog") (div ("class" "inner flex flex-col gap-2") (form ("class" "flex gap-2 flex-col") ("onsubmit" "event.preventDefault()") (div ("id" "tokens") ("style" "display: contents")) (div ("class" "flex justify-between") (a ("href" "/auth/login") ("class" "button") ("data-turbo", "false") (icon (text "plus")) (span (str (text "general:action.add_account")))) (button ("class" "lowered") ("onclick" "document.getElementById('tokens_dialog').close()") ("type" "button") (icon (text "check"))))))) ; user scripts (text "{%- endif %} {% if user and use_user_theme -%} {{ components::theme(user=user, theme_preference=user.settings.theme_preference) }} {%- endif %} {% if user and user.connections.Spotify and config.connections.spotify_client_id and user.connections.Spotify[0].data.token and user.connections.Spotify[0].data.refresh_token %} {% elif user and user.connections.LastFm and config.connections.last_fm_key and user.connections.LastFm[0].data.session_token %} {%- endif %}")