pict-rs-proxy/templates/layout.rs.html
asonix b68ee94f38
All checks were successful
continuous-integration/drone/push Build is passing
Remove dependency on once_cell
2024-02-01 17:22:19 -06:00

43 lines
1.3 KiB
HTML

@use super::statics::{layout_css, favicon_ico};
@use crate::config;
@(title: &str, description: Option<&str>, head: Content, body: Content)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>@title</title>
<meta property="twitter:title" content="@title" />
<meta property="og:title" content="@title" />
<meta property="og:site_name" content="pict-rs" />
@if let Some(desc) = description {
<meta property="description" content="@desc" />
<meta property="og:description" content="@desc" />
<meta property="twitter:description" content="@desc" />
} else {
<meta property="description" content="Upload and share image files" />
<meta property="og:description" content="Upload and share image files" />
<meta property="twitter:description" content="Upload and share image files" />
}
@if let Some(domain) = config().domain() {
<meta property="twitter:domain" content="@domain" />
}
<link rel="stylesheet" href="@crate::statics(layout_css.name)" type="text/css" />
<link rel="shortcut icon" type="image/png" href="@crate::statics(favicon_ico.name)">
@:head()
</head>
<body>
<div class="title">
<h1>pict-rs</h1>
</div>
@:body()
</body>
</html>