add: reclaims, tetratto_handler_account_username, entry owners
This commit is contained in:
parent
105d01b45d
commit
f215d038b3
7 changed files with 177 additions and 6 deletions
|
@ -264,12 +264,19 @@ video {
|
|||
display: flex;
|
||||
}
|
||||
|
||||
.dropdown .inner .button {
|
||||
.dropdown .inner .button,
|
||||
.dropdown .inner .title {
|
||||
padding: var(--pad-3) var(--pad-4);
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dropdown .inner .title {
|
||||
font-weight: 500;
|
||||
border-top: solid 1px var(--color-super-lowered);
|
||||
margin-top: var(--pad-2);
|
||||
}
|
||||
|
||||
.dropdown:has(.inner.open) .button:nth-child(1):not(.inner *) {
|
||||
background: var(--color-raised);
|
||||
}
|
||||
|
@ -517,6 +524,18 @@ img {
|
|||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.img_sizer img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
--size: 18px;
|
||||
width: var(--size);
|
||||
height: var(--size);
|
||||
aspect-ratio: 1 / 1;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding-left: 1rem;
|
||||
border-left: solid 5px var(--color-green);
|
||||
|
|
39
app/templates_src/claim.lisp
Normal file
39
app/templates_src/claim.lisp
Normal file
|
@ -0,0 +1,39 @@
|
|||
(text "{% extends \"root.lisp\" %} {% block head %}")
|
||||
(title
|
||||
(text "Create reclaim for \"{{ entry.slug }}\" - {{ name }}"))
|
||||
(link ("rel" "icon") ("href" "/public/favicon.svg"))
|
||||
(text "{% endblock %} {% block body %}")
|
||||
(div
|
||||
("class" "card container")
|
||||
(h1 (text "{{ entry.slug }}"))
|
||||
(p (text "Custom slug reclaims are handled through ") (b (text "{{ tetratto }}")) (text ". You'll need to have an account there to submit a claim request."))
|
||||
(p (text "Please note that you are unlikely to receive a response unless your claim is accepted. Please do not submit additional requests for the same slug."))
|
||||
|
||||
(text "{% if metadata.tetratto_owner_username -%}")
|
||||
; contact owner text
|
||||
(p (text "Since this entry is connected to a user, it is encouraged that you directly contact the owner of the entry instead. If that doesn't work, you can create a regular request."))
|
||||
(text "{%- endif %}")
|
||||
|
||||
(p (text "Once you're ready, you can submit a claim using the button below."))
|
||||
(hr)
|
||||
(ul
|
||||
(li (b (text "Requsted slug: ")) (text "{{ entry.slug }}"))
|
||||
(li (b (text "Last updated: ")) (text "{{ entry.edited / 1000|int|date(format=\"%Y-%m-%d %H:%M\", timezone=\"Etc/UTC\") }} UTC")))
|
||||
(hr)
|
||||
(text "{% if claimable -%}")
|
||||
(text "{% if metadata.tetratto_owner_username -%}")
|
||||
; contact owner button
|
||||
(a
|
||||
("href" "{{ tetratto }}/mail/compose?receivers={{ tetratto_owner_username }}&subject=Reclaim%20for%20%22{{ entry.slug }}%22")
|
||||
("class" "button surface no_fill")
|
||||
(text "{{ icon \"external-link\" }} Contact owner"))
|
||||
(text "{%- endif %}")
|
||||
|
||||
(a
|
||||
("href" "{{ tetratto }}/mail/compose?receivers={{ tetratto_handler_account_username }}&subject=Reclaim%20for%20%22{{ entry.slug }}%22")
|
||||
("class" "button surface no_fill")
|
||||
(text "{{ icon \"external-link\" }} Submit request"))
|
||||
(text "{% else %}")
|
||||
(span (text "This slug is currently not claimable as it was edited too recently. ") (a ("href" "/{{ entry.slug }}") ("class" "red") (text "Go back")))
|
||||
(text "{%- endif %}"))
|
||||
(text "{% endblock %}")
|
|
@ -45,7 +45,8 @@
|
|||
(a
|
||||
("class" "button")
|
||||
("href" "https://trisua.com/t/fluffle")
|
||||
(text "source"))))
|
||||
(text "source"))
|
||||
(text "{% block dropdown %}{% endblock %}")))
|
||||
|
||||
(a
|
||||
("class" "button camo fade")
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
(text "{% if metadata.page_icon|length == 0 -%}")
|
||||
(link ("rel" "icon") ("href" "/public/favicon.svg"))
|
||||
(text "{%- endif %}")
|
||||
|
||||
(text "{% endblock %} {% block body %}")
|
||||
(div
|
||||
("class" "flex flex_col gap_2")
|
||||
|
@ -40,6 +39,20 @@
|
|||
(script ("defer" "true") (text "setTimeout(() => { temporary_set_theme('{{ metadata.access_recommended_theme }}') }, 150);"))
|
||||
(text "{%- endif %}")
|
||||
|
||||
; owner
|
||||
(text "{% if metadata.tetratto_owner_username|length > 0 -%}")
|
||||
(span
|
||||
("class" "flex items_center gap_2")
|
||||
(text "Owner:")
|
||||
(a
|
||||
("class" "flex items_center gap_2")
|
||||
("href" "{{ tetratto }}/@{{ metadata.tetratto_owner_username }}")
|
||||
(img
|
||||
("class" "avatar")
|
||||
("src" "{{ tetratto }}/api/v1/auth/user/{{ metadata.tetratto_owner_username }}/avatar?selector_type=username"))
|
||||
(text "{{ metadata.tetratto_owner_username }}")))
|
||||
(text "{%- endif %}")
|
||||
|
||||
; views
|
||||
(text "{% if not metadata.option_disable_views -%}")
|
||||
(span (text "Views: {{ views }}"))
|
||||
|
@ -55,7 +68,6 @@
|
|||
(link ("rel" "stylesheet") ("href" "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css"))
|
||||
(script ("src" "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"))
|
||||
(script (text "hljs.highlightAll();"))
|
||||
|
||||
(text "{% endblock %}")
|
||||
(text "{% block nav_extras %}")
|
||||
(button
|
||||
|
@ -72,3 +84,11 @@
|
|||
}, 150);"))
|
||||
(text "{%- endif %}")
|
||||
(text "{% endblock %}")
|
||||
|
||||
(text "{% block dropdown %}")
|
||||
(hr)
|
||||
(a
|
||||
("class" "button")
|
||||
("href" "/{{ entry.slug }}/claim")
|
||||
(text "claim"))
|
||||
(text "{%- endblock %}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue