filesafe/views/_layout.njk

79 lines
3.3 KiB
Plaintext
Raw Normal View History

{%- import '_globals.njk' as globals -%}
Updated Updated some dev dependencies. --- Gulp will now build CSS/JS files during development into dist-dev directory, to prevent IDE's Git from unnecessarily building diff's. Added dist-dev to ignore files. --- The entire config fille will now be passed to Nunjuck templates for ease of access of config values. Root domain for use in Nunjuck templates will now be parsed from config. Better page titles. Updated help message for "Uploads history order" option in homepage's config tab. Added "Load images for preview" option to homepage's config tab. Setting this to false will now prevent image uploads from loading themselves for previews. Uploads' original names in homepage's uploads history are now selectable. Min/max length for user/pass are now enforced in auth's front-end. Improved performance of album public pages. Their generated HTML pages will now be cached into memory. Unfortunately, No-JS version of their pages will be cached separately, so each album may take up to double the memory space. File names in thumbnails no longer have their full URLs as tooltips. I saw no point in that behavior. Added video icons. Homepage's uploads history will now display video icons for videos. "View thumbnail" button in Dashboard is now renamed to "Show preview". Their icons will also be changed depending on their file types. Added max length for albums' title & description. These will be enforced both in front-end and back-end. Existing albums that have surpassed the limits will not be enforced. A few other small improvements.
2019-09-17 04:13:41 +00:00
{# Set root domain here to inherit values from config file #}
{%- set root = config.homeDomain or config.domain -%}
{%- set title -%}
{%- if metaTitle -%}
{{ metaTitle + ' | ' + globals.name }}
{%- else -%}
{{ globals.name + ' ' + globals.motto }}
{%- endif %}
{%- endset -%}
{%- set url = root + (metaUrl or '') -%}
Updated Updated some dev dependencies. --- Gulp will now build CSS/JS files during development into dist-dev directory, to prevent IDE's Git from unnecessarily building diff's. Added dist-dev to ignore files. --- The entire config fille will now be passed to Nunjuck templates for ease of access of config values. Root domain for use in Nunjuck templates will now be parsed from config. Better page titles. Updated help message for "Uploads history order" option in homepage's config tab. Added "Load images for preview" option to homepage's config tab. Setting this to false will now prevent image uploads from loading themselves for previews. Uploads' original names in homepage's uploads history are now selectable. Min/max length for user/pass are now enforced in auth's front-end. Improved performance of album public pages. Their generated HTML pages will now be cached into memory. Unfortunately, No-JS version of their pages will be cached separately, so each album may take up to double the memory space. File names in thumbnails no longer have their full URLs as tooltips. I saw no point in that behavior. Added video icons. Homepage's uploads history will now display video icons for videos. "View thumbnail" button in Dashboard is now renamed to "Show preview". Their icons will also be changed depending on their file types. Added max length for albums' title & description. These will be enforced both in front-end and back-end. Existing albums that have surpassed the limits will not be enforced. A few other small improvements.
2019-09-17 04:13:41 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="description" content="{{ metaDesc or globals.description }}">
<meta name="keywords" content="upload,{{ globals.name }},file,images,hosting">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ title }}</title>
{% block stylesheets %}
<!-- Stylesheets -->
<link rel="stylesheet" href="css/style.css{{ versions[1] }}">
{% endblock %}
{% block opengraph %}
<!-- Open Graph tags -->
<meta property="og:url" content="{{ url }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ title }}" />
<meta property="og:description" content="{{ metaDesc or globals.description }}" />
{%- if metaImage %}
<meta property="og:image" content="{{ metaImage }}" />
{%- endif %}
<meta property="og:image" content="{{ root }}/icons/600px.png{{ versions[2] }}" />
<meta property="og:image:width" content="600" />
<meta property="og:image:height" content="600" />
<meta property="og:image" content="{{ root }}/images/fb_share.png{{ versions[2] }}" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:locale" content="en_US" />
<!-- Twitter Card tags -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ title }}">
<meta name="twitter:description" content="{{ metaDesc or globals.description }}">
{%- if metaImage %}
<meta name="twitter:image" content="{{ metaImage }}">
{% else %}
<meta name="twitter:image" content="{{ root }}/icons/600px.png{{ versions[2] }}">
{%- endif %}
{% endblock %}
<!-- Icons, configs, etcetera -->
<link rel="icon" href="{{ root }}/icons/32pxr.png{{ versions[2] }}" sizes="32x32">
<link rel="icon" href="{{ root }}/icons/96pxr.png{{ versions[2] }}" sizes="96x96">
<link rel="apple-touch-icon" href="{{ root }}/icons/120px.png{{ versions[2] }}" sizes="120x120">
<link rel="apple-touch-icon" href="{{ root }}/icons/152px.png{{ versions[2] }}" sizes="152x152">
<link rel="apple-touch-icon" href="{{ root }}/icons/167px.png{{ versions[2] }}" sizes="167x167">
<link rel="apple-touch-icon" href="{{ root }}/icons/180px.png{{ versions[2] }}" sizes="180x180">
<link rel="manifest" href="{{ root }}/icons/manifest.json{{ versions[2] }}">
<meta name="apple-mobile-web-app-title" content="{{ globals.name }}">
<meta name="application-name" content="{{ globals.name }}">
<meta name="msapplication-config" content="{{ root }}/icons/browserconfig.xml{{ versions[2] }}">
2020-11-27 09:07:49 +00:00
<meta name="theme-color" content="#209cee">
{% block endmeta %}{% endblock %}
</head>
<body>
{% block content %}{% endblock %}
{% block scripts %}{% endblock %}
</body>
</html>