Move base layout template to global folder

This commit is contained in:
Helen Chong 2024-04-19 06:51:53 +08:00
parent 54237f1632
commit 134aad4423
2 changed files with 37 additions and 35 deletions

View File

@ -0,0 +1,36 @@
{%- set pageTitle %}{{ title + " | " if title }}{{ sitemeta.siteName }}{% endset -%}
<!DOCTYPE html>
<html lang="en" dir="ltr" id="page-top">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{# Meta data #}
<meta property="og:title" content="{{ title if title else sitemeta.siteName }}">
{% include "global/metagen.njk" %}
{# CSS #}
<link rel="stylesheet" href="{{'/assets/css/main.css' | url | safe}}">
{# Fonts #}
<link rel="stylesheet" href="{{'/assets/fonts/noto-sans/noto-sans.css' | url | safe}}">
{# Favicon #}
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
<link rel="manifest" href="/assets/favicon/site.webmanifest">
<title>{{ pageTitle }}</title>
</head>
<body>
{% include "main/hero.njk" %}
{% include "main/navbar.njk" %}
<main>
{{ content | safe }}
</main>
{% include "main/footer.njk" %}
{% include "global/top-btn.njk" %}
</body>
</html>

View File

@ -1,35 +1 @@
<!DOCTYPE html>
<html lang="en" dir="ltr" id="page-top">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{# Meta data #}
<meta property="og:title" content="{% if title %}{{ title }}{% else %}{{ sitemeta.siteName }}{% endif %}">
{% include "global/metagen.njk" %}
{# CSS #}
<link rel="stylesheet" href="{{'/assets/css/main.css' | url | safe}}">
{# Fonts #}
<link rel="stylesheet" href="{{'/assets/fonts/noto-sans/noto-sans.css' | url | safe}}">
{# Favicon #}
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
<link rel="manifest" href="/assets/favicon/site.webmanifest">
<title>{% if title %} {{ title }} | {% endif %} {{ sitemeta.siteName }}</title>
</head>
<body>
{% include "main/hero.njk" %}
{% include "main/navbar.njk" %}
<main>
{{ content | safe }}
</main>
{% include "main/footer.njk" %}
{% include "global/top-btn.njk" %}
</body>
</html>
{% extends "global/baselayout.njk" %}