Initial
This commit is contained in:
commit
7d93dffaed
27 changed files with 7735 additions and 0 deletions
54
app/templates_src/warning.lisp
Normal file
54
app/templates_src/warning.lisp
Normal file
|
@ -0,0 +1,54 @@
|
|||
(text "{% extends \"root.lisp\" %} {% block head %}")
|
||||
(text "{% if not metadata.page_title -%}")
|
||||
(title
|
||||
(text "{{ entry.slug }}"))
|
||||
(text "{%- endif %} {{ metadata_head|safe }}")
|
||||
|
||||
(text "{% if not metadata.share_title -%}")
|
||||
(meta ("property" "og:title") ("content" "{{ entry.slug }}"))
|
||||
(meta ("property" "twitter:title") ("content" "{{ entry.slug }}"))
|
||||
(text "{%- endif %}")
|
||||
|
||||
(text "{% if metadata.page_icon|length == 0 -%}")
|
||||
(link ("rel" "icon") ("href" "/public/favicon.svg"))
|
||||
(text "{%- endif %}")
|
||||
|
||||
(text "{% endblock %} {% block body %}")
|
||||
(div
|
||||
("class" "card container flex flex_col gap-1")
|
||||
("id" "content_rect")
|
||||
(p ("class" "fade") (text "Content warning:"))
|
||||
(div (text "{{ metadata.safety_content_warning|markdown|safe }}"))
|
||||
(hr)
|
||||
(div
|
||||
("class" "flex flex_col gap_4")
|
||||
(label
|
||||
("class" "flex flex-row gap_2 items_center")
|
||||
("for" "open_in_high_contrast")
|
||||
(input
|
||||
("type" "checkbox")
|
||||
("id" "open_in_high_contrast")
|
||||
("name" "open_in_high_contrast"))
|
||||
(span (text "Open in high contrast")))
|
||||
(div
|
||||
("class" "flex gap_2")
|
||||
(button
|
||||
("class" "button surface green")
|
||||
("onclick" "accept()")
|
||||
(text "Continue"))
|
||||
(button
|
||||
("class" "button surface red")
|
||||
("onclick" "window.history.back()")
|
||||
(text "Cancel")))))
|
||||
|
||||
(script
|
||||
(text "const QFLAGS = [\"AcceptWarning\"];
|
||||
function accept() {
|
||||
if (document.getElementById(\"open_in_high_contrast\").checked) {
|
||||
QFLAGS.push(\"EntryHighContrast\");
|
||||
}
|
||||
|
||||
document.cookie = `Atto-QFlags=\"${JSON.stringify(QFLAGS)}\"; path=/`;
|
||||
window.location.reload();
|
||||
}"))
|
||||
(text "{% endblock %}")
|
Loading…
Add table
Add a link
Reference in a new issue