philomena/lib/philomena_web/templates/layout/app.html.slime
2024-07-03 21:32:27 +02:00

42 lines
1.9 KiB
Text

doctype html
html lang="en"
head
meta http-equiv="X-UA-Compatible" content="IE=edge"
= viewport_meta_tag(@conn)
title
= if assigns[:title] do
=> assigns[:title]
' -
=< site_name()
- else
=<> site_name()
link rel="preconnect" href="https://#{cdn_host()}"
link rel="stylesheet" href=~p"/css/application.css"
link#js-theme-stylesheet rel="stylesheet" href=stylesheet_path(@conn, @current_user)
= if is_nil(@current_user) do
link#js-theme-stylesheet rel="stylesheet" href=light_stylesheet_path(@conn) media="(prefers-color-scheme: light)"
link rel="icon" href=~p"/favicon.ico" type="image/x-icon"
link rel="icon" href=~p"/favicon.svg" type="image/svg+xml"
link rel="search" type="application/opensearchdescription+xml" title="Derpibooru" href="/opensearch.xml"
meta name="generator" content="philomena"
meta name="theme-color" content="#618fc3"
meta name="format-detection" content="telephone=no"
= csrf_meta_tag()
= vite_hmr? do
script type="module" src="http://#{@conn.host}:5173/@vite/client"
script type="module" src="http://#{@conn.host}:5173/js/app.ts"
- else
script type="text/javascript" src=~p"/js/app.js" async="async"
= render PhilomenaWeb.LayoutView, "_opengraph.html", assigns
body data-theme=theme_name(@current_user) data-vite-reload=to_string(vite_reload?())
= render PhilomenaWeb.LayoutView, "_burger.html", assigns
#container class=container_class(@current_user)
= render PhilomenaWeb.LayoutView, "_header.html", assigns
= render PhilomenaWeb.LayoutView, "_flash_warnings.html", assigns
main#content class=layout_class(@conn)
= @inner_content
= render PhilomenaWeb.LayoutView, "_footer.html", assigns
form.hidden: input.js-interaction-cache type="hidden" value="{}"
= clientside_data(@conn)