add: rewrite macros.html
This commit is contained in:
parent
bf27c51ad3
commit
e9846016e6
4 changed files with 224 additions and 246 deletions
|
@ -40,7 +40,7 @@ pub const STREAMS_JS: &str = include_str!("./public/js/streams.js");
|
||||||
|
|
||||||
// html
|
// html
|
||||||
pub const ROOT: &str = include_str!("./public/html/root.lisp");
|
pub const ROOT: &str = include_str!("./public/html/root.lisp");
|
||||||
pub const MACROS: &str = include_str!("./public/html/macros.html");
|
pub const MACROS: &str = include_str!("./public/html/macros.lisp");
|
||||||
pub const COMPONENTS: &str = include_str!("./public/html/components.html");
|
pub const COMPONENTS: &str = include_str!("./public/html/components.html");
|
||||||
|
|
||||||
pub const MISC_ERROR: &str = include_str!("./public/html/misc/error.lisp");
|
pub const MISC_ERROR: &str = include_str!("./public/html/misc/error.lisp");
|
||||||
|
@ -239,7 +239,6 @@ pub(crate) async fn replace_in_html(
|
||||||
|
|
||||||
for cap in icon_without_class.captures_iter(&input.clone()) {
|
for cap in icon_without_class.captures_iter(&input.clone()) {
|
||||||
let icon = &cap.get(3).unwrap().as_str().replace("\"", "");
|
let icon = &cap.get(3).unwrap().as_str().replace("\"", "");
|
||||||
|
|
||||||
pull_icon(icon, &config.dirs.icons).await;
|
pull_icon(icon, &config.dirs.icons).await;
|
||||||
|
|
||||||
let reader = ICONS.read().await;
|
let reader = ICONS.read().await;
|
||||||
|
@ -261,14 +260,14 @@ pub(crate) fn lisp_plugins() -> HashMap<String, Box<dyn FnMut(Element) -> Elemen
|
||||||
|
|
||||||
plugins.insert(
|
plugins.insert(
|
||||||
"icon".to_string(),
|
"icon".to_string(),
|
||||||
Box::new(|e: Element| text!(format!("{{{{ icon \"{}\" }}}}", read_param!(e, 0)))) as _,
|
Box::new(|e: Element| text!(format!("\n{{{{ icon \"{}\" }}}}\n", read_param!(e, 0)))) as _,
|
||||||
);
|
);
|
||||||
|
|
||||||
plugins.insert(
|
plugins.insert(
|
||||||
"icon_class".to_string(),
|
"icon_class".to_string(),
|
||||||
Box::new(|e: Element| {
|
Box::new(|e: Element| {
|
||||||
text!(format!(
|
text!(format!(
|
||||||
"{{{{ icon \"{}\" c({}) }}}}",
|
"\n{{{{ icon \"{}\" c({}) }}}}\n",
|
||||||
read_param!(e, 0),
|
read_param!(e, 0),
|
||||||
read_param!(e, 1)
|
read_param!(e, 1)
|
||||||
))
|
))
|
||||||
|
@ -293,7 +292,7 @@ pub(crate) async fn write_assets(config: &Config) -> PathBufD {
|
||||||
let html_path = PathBufD::current().join(&config.dirs.templates);
|
let html_path = PathBufD::current().join(&config.dirs.templates);
|
||||||
|
|
||||||
write_template!(html_path->"root.html"(crate::assets::ROOT) --config=config --lisp plugins);
|
write_template!(html_path->"root.html"(crate::assets::ROOT) --config=config --lisp plugins);
|
||||||
write_template!(html_path->"macros.html"(crate::assets::MACROS) --config=config);
|
write_template!(html_path->"macros.html"(crate::assets::MACROS) --config=config --lisp plugins);
|
||||||
write_template!(html_path->"components.html"(crate::assets::COMPONENTS) --config=config);
|
write_template!(html_path->"components.html"(crate::assets::COMPONENTS) --config=config);
|
||||||
|
|
||||||
write_template!(html_path->"misc/error.html"(crate::assets::MISC_ERROR) -d "misc" --config=config --lisp plugins);
|
write_template!(html_path->"misc/error.html"(crate::assets::MISC_ERROR) -d "misc" --config=config --lisp plugins);
|
||||||
|
|
|
@ -1,238 +0,0 @@
|
||||||
{% macro nav(selected="", show_lhs=true, hide_user_menu=false) -%}
|
|
||||||
<nav>
|
|
||||||
<div class="content_container">
|
|
||||||
<div class="flex nav_side">
|
|
||||||
<a href="/" class="button desktop title">
|
|
||||||
<b>{{ config.name }}</b>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
{% if show_lhs -%}
|
|
||||||
<a
|
|
||||||
href="{{ home }}"
|
|
||||||
class="button {% if selected == 'home' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ icon "house" }}
|
|
||||||
<span class="desktop">{{ text "general:link.home" }}</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
{% if user -%}
|
|
||||||
<a
|
|
||||||
href="/communities"
|
|
||||||
class="button {% if selected == 'communities' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ icon "book-heart" }}
|
|
||||||
<span class="desktop"
|
|
||||||
>{{ text "general:link.communities" }}</span
|
|
||||||
>
|
|
||||||
</a>
|
|
||||||
{%- endif %} {%- endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex nav_side">
|
|
||||||
{% if user -%}
|
|
||||||
<a
|
|
||||||
href="/communities/intents/post"
|
|
||||||
class="button"
|
|
||||||
title="Create post"
|
|
||||||
>
|
|
||||||
{{ icon "square-pen" }}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="/chats/0/0"
|
|
||||||
class="button {% if selected == 'chats' -%}active{%- endif %}"
|
|
||||||
title="Chats"
|
|
||||||
>
|
|
||||||
{{ icon "message-circle" }}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="/requests"
|
|
||||||
class="button {% if selected == 'requests' -%}active{%- endif %}"
|
|
||||||
title="Requests"
|
|
||||||
>
|
|
||||||
{{ icon "inbox" }}
|
|
||||||
<span
|
|
||||||
class="notification tr {% if user.request_count <= 0 -%}hidden{%- endif %}"
|
|
||||||
id="requests_span"
|
|
||||||
>{{ user.request_count }}</span
|
|
||||||
>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="/notifs"
|
|
||||||
class="button {% if selected == 'notifications' -%}active{%- endif %}"
|
|
||||||
title="Notifications"
|
|
||||||
>
|
|
||||||
{{ icon "bell" }}
|
|
||||||
<span
|
|
||||||
class="notification tr {% if user.notification_count <= 0 -%}hidden{%- endif %}"
|
|
||||||
id="notifications_span"
|
|
||||||
>{{ user.notification_count }}</span
|
|
||||||
>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
{% if not hide_user_menu -%}
|
|
||||||
<div class="dropdown">
|
|
||||||
<button
|
|
||||||
class="flex-row title"
|
|
||||||
onclick="trigger('atto::hooks::dropdown', [event])"
|
|
||||||
exclude="dropdown"
|
|
||||||
style="gap: 0.25rem !important"
|
|
||||||
>
|
|
||||||
{{ components::avatar(username=user.username, size="24px")
|
|
||||||
}} {{ icon "chevron-down" c(dropdown-arrow) }}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
{{ components::user_menu() }}
|
|
||||||
</div>
|
|
||||||
{%- endif %} {% else %}
|
|
||||||
<div class="dropdown">
|
|
||||||
<button
|
|
||||||
class="title"
|
|
||||||
onclick="trigger('atto::hooks::dropdown', [event])"
|
|
||||||
exclude="dropdown"
|
|
||||||
>
|
|
||||||
{{ icon "chevron-down" c(dropdown-arrow) }}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div class="inner">
|
|
||||||
<a href="/auth/login" class="button">
|
|
||||||
{{ icon "log-in" }}
|
|
||||||
<span>{{ text "auth:action.login" }}</span>
|
|
||||||
</a>
|
|
||||||
<a href="/auth/register" class="button">
|
|
||||||
{{ icon "user-plus" }}
|
|
||||||
<span>{{ text "auth:action.register" }}</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<div class="title"></div>
|
|
||||||
<a href="https://trisua.com/t/tetratto">
|
|
||||||
{{ icon "code" }}
|
|
||||||
<span>View source</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{%- endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
{%- endmacro %} {% macro timelines_nav(selected="") -%}
|
|
||||||
<div class="pillmenu {% if user -%}rows{% endif %} w-full">
|
|
||||||
<div class="row">
|
|
||||||
{% if user -%}
|
|
||||||
<a href="/" class="{% if selected == 'home' -%}active{%- endif %}">
|
|
||||||
{{ icon "newspaper" }}
|
|
||||||
<span>{{ text "general:link.home" }}</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="/stacks"
|
|
||||||
class="{% if selected == 'stacks' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ icon "layers" }}
|
|
||||||
<span>{{ text "stacks:link.stacks" }}</span>
|
|
||||||
</a>
|
|
||||||
{% else %}
|
|
||||||
<a href="/" class="{% if selected == 'all' -%}active{%- endif %}">
|
|
||||||
{{ icon "earth" }}
|
|
||||||
<span>{{ text "general:link.all" }}</span>
|
|
||||||
</a>
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="/popular"
|
|
||||||
class="{% if selected == 'popular' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ icon "trending-up" }}
|
|
||||||
<span>{{ text "general:link.popular" }}</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
{% if user -%}
|
|
||||||
<a
|
|
||||||
href="/following"
|
|
||||||
class="{% if selected == 'following' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ icon "rss" }}
|
|
||||||
<span>{{ text "general:link.following" }}</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="/search"
|
|
||||||
class="{% if selected == 'search' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ icon "search" }}
|
|
||||||
<span>{{ text "general:link.search" }}</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a href="/all" class="{% if selected == 'all' -%}active{%- endif %}">
|
|
||||||
{{ icon "earth" }}
|
|
||||||
<span>{{ text "general:link.all" }}</span>
|
|
||||||
</a>
|
|
||||||
{%- endif %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{%- endmacro %} {% macro timelines_secondary_nav(posts="", questions="",
|
|
||||||
selected="posts") -%} {% if user -%}
|
|
||||||
<div class="pillmenu w-full">
|
|
||||||
<a
|
|
||||||
href="{{ posts }}"
|
|
||||||
class="{% if selected == 'posts' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ icon "newspaper" }}
|
|
||||||
<span>{{ text "communities:label.posts" }}</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="{{ questions }}"
|
|
||||||
class="{% if selected == 'questions' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ icon "message-circle-heart" }}
|
|
||||||
<span>{{ text "communities:label.questions" }}</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{%- endif %} {%- endmacro %} {% macro community_nav(community, selected="") -%}
|
|
||||||
{% if community.context.enable_questions -%}
|
|
||||||
<div class="pillmenu">
|
|
||||||
<a
|
|
||||||
href="/community/{{ community.title }}"
|
|
||||||
class="{% if selected == 'posts' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ icon "newspaper" }}
|
|
||||||
<span>{{ text "communities:tab.posts" }}</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="/community/{{ community.title }}/questions"
|
|
||||||
class="{% if selected == 'questions' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ icon "message-circle-heart" }}
|
|
||||||
<span>{{ text "communities:tab.questions" }}</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{%- endif %} {%- endmacro %} {% macro profile_nav(selected="") -%}
|
|
||||||
<div class="pillmenu">
|
|
||||||
<a
|
|
||||||
href="/@{{ profile.username }}"
|
|
||||||
class="{% if selected == 'posts' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ text "auth:label.posts" }}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="/@{{ profile.username }}/replies"
|
|
||||||
class="{% if selected == 'replies' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ text "auth:label.replies" }}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a
|
|
||||||
href="/@{{ profile.username }}/media"
|
|
||||||
class="{% if selected == 'media' -%}active{%- endif %}"
|
|
||||||
>
|
|
||||||
{{ text "auth:label.media" }}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{%- endmacro %}
|
|
216
crates/app/src/public/html/macros.lisp
Normal file
216
crates/app/src/public/html/macros.lisp
Normal file
|
@ -0,0 +1,216 @@
|
||||||
|
(text "{% macro nav(selected=\"\", show_lhs=true, hide_user_menu=false) -%}")
|
||||||
|
(nav
|
||||||
|
(div
|
||||||
|
("class" "content_container")
|
||||||
|
(div
|
||||||
|
("class" "flex nav_side")
|
||||||
|
(a
|
||||||
|
("href" "/")
|
||||||
|
("class" "button desktop title")
|
||||||
|
(b (text "{{ config.name }}")))
|
||||||
|
|
||||||
|
(text "{% if show_lhs -%}")
|
||||||
|
(a
|
||||||
|
("href" "{{ home }}")
|
||||||
|
("class" "button {% if selected == 'home' -%}active{%- endif %}")
|
||||||
|
("title" "Home")
|
||||||
|
(icon (text "house"))
|
||||||
|
(span
|
||||||
|
("class" "desktop")
|
||||||
|
(str (text "general:link.home"))))
|
||||||
|
|
||||||
|
(text "{% if user -%}")
|
||||||
|
(a
|
||||||
|
("href" "/communities")
|
||||||
|
("class" "button {% if selected == 'communities' -%}active{%- endif %}")
|
||||||
|
(icon (text "book-heart"))
|
||||||
|
(span
|
||||||
|
("class" "desktop")
|
||||||
|
(str (text "general:link.communities"))))
|
||||||
|
|
||||||
|
(text "{%- endif %} {%- endif %}"))
|
||||||
|
|
||||||
|
(div
|
||||||
|
("class" "flex nav_side")
|
||||||
|
(text "{% if user -%}")
|
||||||
|
(a
|
||||||
|
("href" "/communities/intents/post")
|
||||||
|
("class" "button")
|
||||||
|
("title" "Create post")
|
||||||
|
(icon (text "square-pen")))
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/chats/0/0")
|
||||||
|
("class" "button {% if selected == 'chats' -%}active{%- endif %}")
|
||||||
|
("title" "Chats")
|
||||||
|
(icon (text "message-circle")))
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/requests")
|
||||||
|
("class" "button {% if selected == 'requests' -%}active{%- endif %}")
|
||||||
|
("title" "Chats")
|
||||||
|
(icon (text "inbox"))
|
||||||
|
(span
|
||||||
|
("class" "notification tr {% if user.request_count <= 0 -%}hidden{%- endif %}")
|
||||||
|
("id" "requests_span")
|
||||||
|
(text "{{ user.request_count }}")))
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/notifs")
|
||||||
|
("class" "button {% if selected == 'notifications' -%}active{%- endif %}")
|
||||||
|
("title" "Chats")
|
||||||
|
(icon (text "bell"))
|
||||||
|
(span
|
||||||
|
("class" "notification tr {% if user.notification_count <= 0 -%}hidden{%- endif %}")
|
||||||
|
("id" "notifications_span")
|
||||||
|
(text "{{ user.notification_count }}")))
|
||||||
|
|
||||||
|
(text "{% if not hide_user_menu -%}")
|
||||||
|
(div
|
||||||
|
("class" "dropdown")
|
||||||
|
(button
|
||||||
|
("class" "flex-row title")
|
||||||
|
("onclick" "trigger('atto::hooks::dropdown', [event])")
|
||||||
|
("exlude" "dropdown")
|
||||||
|
("style" "gap: 0.25rem !important")
|
||||||
|
(text "{{ components::avatar(username=user.username, size=\"24px\") }}")
|
||||||
|
(icon_class (text "chevron-down") (text "dropdown-arrow")))
|
||||||
|
|
||||||
|
(text "{{ components::user_menu() }}"))
|
||||||
|
(text "{%- endif %} {% else %}")
|
||||||
|
(div
|
||||||
|
("class" "dropdown")
|
||||||
|
(button
|
||||||
|
("class" "title")
|
||||||
|
("onclick" "trigger('atto:hooks::dropdown', [evnet])")
|
||||||
|
("exclude" "dropdown")
|
||||||
|
(icon_class (text "chevron-down") (text "dropdown-arrow")))
|
||||||
|
|
||||||
|
(div
|
||||||
|
("class" "inner")
|
||||||
|
(a
|
||||||
|
("href" "/auth/login")
|
||||||
|
("class" "button")
|
||||||
|
(icon (text "log-in"))
|
||||||
|
(str (text "auth:action.login")))
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/auth/register")
|
||||||
|
("class" "button")
|
||||||
|
(icon (text "user-plus"))
|
||||||
|
(str (text "auth:action.register")))
|
||||||
|
|
||||||
|
(div ("class" "title"))
|
||||||
|
(a
|
||||||
|
("href" "https://trisua.com/t/tetratto")
|
||||||
|
("class" "button")
|
||||||
|
(icon (text "code"))
|
||||||
|
(text "View source")))))
|
||||||
|
(text "{%- endif %}")))
|
||||||
|
(text "{%- endmacro %}")
|
||||||
|
|
||||||
|
(text "{% macro timelines_nav(selected=\"\") -%}")
|
||||||
|
(div
|
||||||
|
("class" "pillmenu {% if user -%}rows{% endif %} w-full")
|
||||||
|
(div
|
||||||
|
("class" "row")
|
||||||
|
(text "{% if user -%}")
|
||||||
|
(a
|
||||||
|
("href" "/")
|
||||||
|
("class" "{% if selected == 'home' -%}active{%- endif %}")
|
||||||
|
(icon (text "newspaper"))
|
||||||
|
(str (text "general:link.home")))
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/stacks")
|
||||||
|
("class" "{% if selected == 'stacks' -%}active{%- endif %}")
|
||||||
|
(icon (text "layers"))
|
||||||
|
(str (text "stacks:link.stacks")))
|
||||||
|
(text "{% else %}")
|
||||||
|
(a
|
||||||
|
("href" "/")
|
||||||
|
("class" "{% if selected == 'all' -%}active{%- endif %}")
|
||||||
|
(icon (text "earch"))
|
||||||
|
(str (text "general:link.all")))
|
||||||
|
(text "{%- endif %}")
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/popular")
|
||||||
|
("class" "{% if selected == 'popular' -%}active{%- endif %}")
|
||||||
|
(icon (text "layers"))
|
||||||
|
(str (text "general:link.popular"))))
|
||||||
|
|
||||||
|
(div
|
||||||
|
("class" "row")
|
||||||
|
(text "{% if user -%}")
|
||||||
|
(a
|
||||||
|
("href" "/following")
|
||||||
|
("class" "{% if selected == 'following' -%}active{%- endif %}")
|
||||||
|
(icon (text "rss"))
|
||||||
|
(str (text "general:link.following")))
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/search")
|
||||||
|
("class" "{% if selected == 'search' -%}active{%- endif %}")
|
||||||
|
(icon (text "search"))
|
||||||
|
(str (text "general:link.search")))
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/all")
|
||||||
|
("class" "{% if selected == 'all' -%}active{%- endif %}")
|
||||||
|
(icon (text "earth"))
|
||||||
|
(str (text "general:link.all")))
|
||||||
|
(text "{%- endif %}")))
|
||||||
|
(text "{%- endmacro %}")
|
||||||
|
|
||||||
|
(text "{% macro timelines_secondary_nav(posts=\"\", questions=\"\", selected=\"posts\") -%} {% if user -%}")
|
||||||
|
(div
|
||||||
|
("class" "pillmenu w-full")
|
||||||
|
(a
|
||||||
|
("href" "{{ posts }}")
|
||||||
|
("class" "{% if selected == 'posts' -%}active{%- endif %}")
|
||||||
|
(icon (text "newspaper"))
|
||||||
|
(str (text "communities:label.posts")))
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "{{ questions }}")
|
||||||
|
("class" "{% if selected == 'questions' -%}active{%- endif %}")
|
||||||
|
(icon (text "message-circle-heart"))
|
||||||
|
(str (text "communities:label.questions"))))
|
||||||
|
(text "{%- endif %} {%- endmacro %}")
|
||||||
|
|
||||||
|
(text "{% macro community_nav(community, selected=\"\") -%} {% if community.context.enable_questions -%}")
|
||||||
|
(div
|
||||||
|
("class" "pillmenu")
|
||||||
|
(a
|
||||||
|
("href" "/community/{{ community.title }}")
|
||||||
|
("class" "{% if selected == 'posts' -%}active{%- endif %}")
|
||||||
|
(icon (text "newspaper"))
|
||||||
|
(str (text "communities:tab.posts")))
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/community/{{ community.title }}/questions")
|
||||||
|
("class" "{% if selected == 'questions' -%}active{%- endif %}")
|
||||||
|
(icon (text "message-circle-heart"))
|
||||||
|
(str (text "communities:tab.questions"))))
|
||||||
|
(text "{%- endif %} {%- endmacro %}")
|
||||||
|
|
||||||
|
(text "{% macro profile_nav(selected=\"\") -%}")
|
||||||
|
(div
|
||||||
|
("class" "pillmenu")
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/@{{ profile.username }}")
|
||||||
|
("class" "{% if selected == 'posts' -%}active{%- endif %}")
|
||||||
|
(str (text "auth:label.posts")))
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/@{{ profile.username }}/replies")
|
||||||
|
("class" "{% if selected == 'replies' -%}active{%- endif %}")
|
||||||
|
(str (text "auth:label.replies")))
|
||||||
|
|
||||||
|
(a
|
||||||
|
("href" "/@{{ profile.username }}/media")
|
||||||
|
("class" "{% if selected == 'media' -%}active{%- endif %}")
|
||||||
|
(str (text "auth:label.media"))))
|
||||||
|
(text "{%- endmacro %}")
|
|
@ -10,7 +10,7 @@
|
||||||
(meta ("http-equiv" "content-security-policy") ("content" "default-src 'self' blob: *.spotify.com musicbrainz.org; img-src * data:; media-src *; font-src *; style-src 'unsafe-inline' 'self' blob: *; script-src 'self' 'unsafe-inline' blob: *; object-src 'self' blob: *; upgrade-insecure-requests; connect-src * localhost; frame-src 'self' blob: data: *"))
|
(meta ("http-equiv" "content-security-policy") ("content" "default-src 'self' blob: *.spotify.com musicbrainz.org; img-src * data:; media-src *; font-src *; style-src 'unsafe-inline' 'self' blob: *; script-src 'self' 'unsafe-inline' blob: *; object-src 'self' blob: *; upgrade-insecure-requests; connect-src * localhost; frame-src 'self' blob: data: *"))
|
||||||
|
|
||||||
(link ("rel" "icon") ("href" "/public/favicon.svg"))
|
(link ("rel" "icon") ("href" "/public/favicon.svg"))
|
||||||
(link ("rel" "stylesheet") ("href" "/css/style.css"))
|
(link ("rel" "stylesheet") ("href" "/css/style.css"))f
|
||||||
|
|
||||||
(text "{% if user -%}
|
(text "{% if user -%}
|
||||||
<script>
|
<script>
|
||||||
|
@ -257,7 +257,8 @@
|
||||||
(a
|
(a
|
||||||
("href" "")
|
("href" "")
|
||||||
("id" "lightbox_img_a")
|
("id" "lightbox_img_a")
|
||||||
("target" "_blank")))
|
("target" "_blank")
|
||||||
|
(img ("id" "lightbox_img") ("loading" "lazy"))))
|
||||||
|
|
||||||
; tokens dialog
|
; tokens dialog
|
||||||
(text "{% if user -%}")
|
(text "{% if user -%}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue