chore: refactor templates

This commit is contained in:
Aravinth Manivannan 2022-10-30 14:04:10 +05:30
parent e18f6bc452
commit 707a9322aa
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88
5 changed files with 85 additions and 68 deletions

1
static/rss.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>

After

Width:  |  Height:  |  Size: 330 B

8
templates/footer.html Normal file
View file

@ -0,0 +1,8 @@
<footer>
<a href="/updates/atom.xml" target="_blank" rel="noopener" title="RSS">
<img
src="{{ get_url(path='/rss.svg', cachebust=true) }}"
alt="RSS feed icon"
/>
</a>
</footer>

52
templates/head.html Normal file
View file

@ -0,0 +1,52 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{% block title %}{{ title }} - {{ headline }} {% endblock title %}</title>
<meta property="og:title" content="{{ description }}" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="{{ description}}" />
<meta property="og:description" content="{{ description}}" />
<link rel="canonical" href="{{ config.base_url }}" />
<meta property="og:url" content="{{ config.base_url }}" />
<meta property="og:site_name" content="{{ title }}" />
<meta property="og:image" content="/logo.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:image" content="/logo.png" />
<meta property="twitter:title" content="{{ title }}" />
<script type="application/ld+json">
{
"description": "{{ description }}",
"url": "{{ config.base_url }}",
"@type": "WebSite",
"image": "/logo.png",
"headline": "{{ headline }}",
"name": "{{ title }}",
"@context": "https://schema.org"
}
</script>
<link rel="stylesheet" href="{{ get_url(path="main.css", trailing_slash=false)
}}">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png" />
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png" />
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png" />
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png" />
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png" />
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png" />
<link
rel="icon"
type="image/png"
sizes="192x192"
href="/android-icon-192x192.png"
/>
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/manifest.json" />
<meta name="msapplication-TileColor" content="#ffffff" />
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png" />
<meta name="theme-color" content="#ffffff" />
</head>

View file

@ -1,75 +1,9 @@
{% set title = "Open Letter to Gitea" %}
<!-- TODO set description and headline!!! -->
{% set description = "The Gitea Community is asking Gitea Owners to correct conflicts of interest and restore Community Trust." %} {% set description = "The Gitea Community is asking Gitea Owners to correct conflicts of interest and restore Community Trust." %}
{% set headline = "Restoring Trust in the Gitea Project" %} {% set headline = "Restoring Trust in the Gitea Project" %}
{% set title = "Open Letter to Gitea" %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{% if lang %}{{ lang }}{% else %}en{% endif %}"> <html lang="{% if lang %}{{ lang }}{% else %}en{% endif %}">
<head> {% include "head.html" %}
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{% block title %}{{ title }} - {{ headline }} {% endblock title %}</title>
<meta
property="og:title"
content="{{ description }}"
/>
<meta property="og:locale" content="en_US" />
<meta
name="description"
content="{{ description}}"
/>
<meta
property="og:description"
content="{{ description}}"
/>
<link rel="canonical" href="{{ config.base_url }}" />
<meta property="og:url" content="{{ config.base_url }}" />
<meta property="og:site_name" content="{{ title }}" />
<meta
property="og:image"
content="/logo.png"
/>
<meta name="twitter:card" content="summary_large_image" />
<meta
property="twitter:image"
content="/logo.png"
/>
<meta
property="twitter:title"
content="{{ title }}"
/>
<script type="application/ld+json">
{
"description": "{{ description }}",
"url": "{{ config.base_url }}",
"@type": "WebSite",
"image": "/logo.png",
"headline": "{{ headline }}",
"name": "{{ title }}",
"@context": "https://schema.org"
}
</script>
<link rel="stylesheet" href="{{ get_url(path="main.css", trailing_slash=false) }}">
<link rel="apple-touch-icon" sizes="57x57" href="/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body> <body>
<div class="container"> <div class="container">
@ -100,6 +34,11 @@
</main> </main>
</div> </div>
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="updates/atom.xml", trailing_slash=false) }}">
{% include "footer.html" %}
</body> </body>
<!-- realaravinth: theme stolen from https://github.com/zbrox/anpu-zola-theme (MIT) --> <!-- realaravinth: theme stolen from https://github.com/zbrox/anpu-zola-theme (MIT) -->
</html> </html>

17
templates/nav.html Normal file
View file

@ -0,0 +1,17 @@
<header>
<h1>
<a href="https:&#x2F;&#x2F;gitea-open-letter.coding.social&#x2F;"
>Open Letter to Gitea</a
>
</h1>
<div class="nav__spacer"></div>
<nav>
<a class="nav__link" href="&#x2F;updates">Updates</a>
<a
class="nav__link"
href="https:&#x2F;&#x2F;codeberg.org&#x2F;SocialCoding&#x2F;gitea-open-letter&#x2F;src&#x2F;branch&#x2F;main&#x2F;README.md"
>Sign this letter</a
>
</nav>
</header>