add Whatsapp Button, overview of pages in sections with extra template, metadata for facebook

This commit is contained in:
Sven Jorns
2023-03-09 02:51:21 +03:00
parent 872090805f
commit 130b3edeb7
12 changed files with 135 additions and 55 deletions
+1
View File
@@ -2,3 +2,4 @@
title = 'We Help Power Millions Of Businesses in 100+ Countries'
description = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s."
+++
+1 -1
View File
@@ -44,7 +44,7 @@ body {
}
}
.hero {
padding-top: 110px;
padding-top: 40px;
.section-cont {
display: flex;
justify-content: center;
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

+49 -49
View File
@@ -10,31 +10,31 @@
<div class="nav-links">
<div class="mobile-nav">
<select class="lang" onchange="window.location.href=this.value; value=this.value">
{% if section %}
{% if section -%}
<!-- SECTION MODE -->
{% for t in section.translations %}
{% if t.lang != config.default_language %}
{% for t in section.translations -%}
{% if t.lang != config.default_language -%}
<option class="languages" value="{{config.base_url | safe }}/{{t.lang}}{{section.path | safe}}"
{% else %}
{% else -%}
<option class="languages" value="{{config.base_url | safe }}/{{section.path | safe}}"
{% endif %}
{% endif -%}
{% if t.lang == lang %}
selected="selected"
{% endif %}
{% endif -%}
>{{t.lang}}
</option>
{% endfor %}
{% elif page %}
{% endfor -%}
{% elif page -%}
<!-- PAGE MODE -->
{% for t in page.translations %}
{% for t in page.translations -%}
<option class="languages" value="{{section.slug | as_str}}"
{% if t.lang == lang %}
{% if t.lang == lang -%}
selected="selected"
{% endif %}
{% endif -%}
>{{t.lang}}</option>
{% endfor %}
{% endif %}
{% endfor -%}
{% endif -%}
</select>
@@ -48,66 +48,66 @@
<!-- NAVIGATION MENUS -->
<div class="menu">
{% if section.subsections %}
{% for subsection in section.subsections %}
{% set subsection_item = get_section(path=subsection) %}
{% for t in subsection_item.translations %}
{% if lang == t.lang %}
{% if section.subsections -%}
{% for subsection in section.subsections -%}
{% set subsection_item = get_section(path=subsection) -%}
{% for t in subsection_item.translations -%}
{% if lang == t.lang -%}
<div class="menublock">
<div class="services">
<a href="{{subsection_item.path}}">{{t.title}}</a>
</div>
{% for key in subsection_item.pages %}
{% for t in key.translations %}
{%if lang == t.lang %}
{% for key in subsection_item.pages -%}
{% for t in key.translations -%}
{% if lang == t.lang -%}
<div class="submenu">
<div class="submenurow">˫&nbsp;<a href="{{subsection_item.path | as_str}}{{key.slug | as_str}}">{{t.title}}</a></div>
</div>
{%endif%}
{%endfor%}
{% endif -%}
{% endfor -%}
{% endfor %}
</div>
{%endif%}
{% endfor %}
{% endfor %}
{% elif section.pages %}
{% for key in section.pages %}
{% for t in key.translations %}
{% if lang == t.lang %}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% elif section.pages -%}
{% for key in section.pages -%}
{% for t in key.translations -%}
{% if lang == t.lang -%}
<div class="services">
<a href="{{key.slug | as_str}}">{{t.title}} C</a>
</div>
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endif -%}
<div class="remove_on_mobile">
<select class="lang" onchange="window.location.href=this.value; value=this.value">
{% if section %}
{% for t in section.translations %}
{% if t.lang != config.default_language %}
{% if section -%}
{% for t in section.translations -%}
{% if t.lang != config.default_language -%}
<option class="languages" value="{{config.base_url | safe}}/{{t.lang}}{{section.path | safe}}"
{% else %}
{% else -%}
<option class="languages" value="{{config.base_url | safe}}/{{section.path | safe}}"
{% endif %}
{% if t.lang == lang %}
{% endif -%}
{% if t.lang == lang -%}
selected="selected"
{% endif %}
{% endif -%}
>{{ trans(key=t.lang, lang=lang) }} ({{t.lang}})
</option>
{% endfor %}
{% elif page %}
{% endfor -%}
{% elif page -%}
<!-- PAGE Language -->
{% for t in page.translations %}
{% for t in page.translations -%}
<option class="languages" value="{{section.slug | as_str}}"
{% if t.lang == lang %}
{% if t.lang == lang -%}
selected="selected"
{% endif %}
{% endif -%}
>{{ trans(key=t.lang, lang=lang) }} ({{t.lang}})</option>
{% endfor %}
{% endif %}
{% endfor -%}
{% endif -%}
</select>
<div class="darktoggle">
@@ -120,4 +120,4 @@
</div>
</dev>
{% endmacro render_header %}
{% endmacro render_header -%}
+9
View File
@@ -0,0 +1,9 @@
{% macro metaOgpLangs() -%}
{% for t in page.translations -%}
{% if t.lang == lang -%}
<meta property="og:locale" content="{{t.lang}}_{{t.lang | upper}}" />
{% else -%}
<meta property="og:locale:alternate" content="{{t.lang}}_{{t.lang | upper}}" />
{% endif -%}
{% endfor -%}
{% endmacro metaOgpLangs -%}
+10
View File
@@ -6,3 +6,13 @@
</dvi>
{% endfor %}
{% endmacro render_2ndlayer %}
{% macro metaOgpLangs() -%}
{% for t in section.translations -%}
{% if t.lang == lang -%}
<meta property="og:locale" content="{{t.lang}}_{{t.lang | upper}}" />
{% else -%}
<meta property="og:locale:alternate" content="{{t.lang}}_{{t.lang | upper}}" />
{% endif -%}
{% endfor -%}
{% endmacro metaOgpLangs -%}
+1 -2
View File
@@ -5,8 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="{{get_url(path='home.css')}}" />
<script src="/js/serinty-theme.js">
</script>
<script src="/js/serinty-theme.js"></script>
{% block head %}{% endblock %}
</head>
<body>
+1
View File
@@ -3,6 +3,7 @@
{% block head %}
<link rel="stylesheet" href="{{get_url(path='navbar.css')}}" />
<title>{{ section.title }}</title>
{{ super() }}
{% endblock %}
{% block header %}
{{ macros::render_header() }}
+12
View File
@@ -1,7 +1,19 @@
{% extends "base.html"%}
{% import "_macros.html" as macros %}
{% import "_page_macros.html" as pmacros -%}
{% block head %}
<link rel="stylesheet" href="{{get_url(path='navbar.css')}}" />
<title>{{ page.title }}</title>
<meta property="og:title" content="{{ page.title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ current_url }}" />
{% if section.description -%}
<meta property="og:description" content="{{ page.description }}" />
{% endif -%}
<meta property="og:determiner" content="the" />
{{ pmacros::metaOgpLangs() }}
<meta property="og:site_name" content="{{ config.title }}" />
{{ super() }}
{% endblock %}
{% block header %}
{{ macros::render_header() }}
+16 -3
View File
@@ -1,4 +1,17 @@
{% extends "index.html"%}
{% block content %}
{% extends "index.html" -%}
{% import "_section_macros.html" as smacros -%}
{% block head -%}
<meta property="og:title" content="{{ section.title }}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ current_url }}" />
{% if section.description -%}
<meta property="og:description" content="{{ section.description }}" />
{% endif -%}
<meta property="og:determiner" content="the" />
{{ smacros::metaOgpLangs() }}
<meta property="og:site_name" content="{{ config.title }}" />
{{ super() }}
{% endblock -%}
{% block content -%}
{{ section.content | safe }}
{% endblock %}
{% endblock -%}
+31
View File
@@ -0,0 +1,31 @@
{% extends "section.html" -%}
{% block content -%}
<!-- section_summary -->
{{ super() }}
<div class="pagesummary">
{% for childpage in section.pages -%}
<div class="pagesummarytitle"><a href="{{ childpage.permalink }}">{{ childpage.title }}</a></div>
<div class="pagesummarydescription">{{ childpage.description }}</div>
{% for asset in childpage.assets -%}
{% if asset is matching("[.](jpg|png|svg)$") -%}
{% set image = resize_image(path=asset, width=240, height=180) -%}
<div>
<a href="{{ get_url(path=asset) }}" target="_blank"><img src="{{ image.url }}" /></a>
</div>
{#only first pcture- > break#}
{%- break -%}
{% endif -%}
{% endfor -%}
{% if childpage.toc -%}
<div class="pagesummaryheaderlist">
{% for tocheader in childpage.toc -%}
<div class="pagesummaryheaderitem">{{ tocheader.title }}</div>
{% endfor -%}
</div>
{% endif -%}
{% endfor -%}
</div> <!-- end pagesummary -->
{% endblock -%}
+3
View File
@@ -0,0 +1,3 @@
{% if phonenumber -%}
<a aria-label="Chat on WhatsApp" target="_blank" href="https://wa.me/{{ phonenumber }}"> <img alt="Chat on WhatsApp" src="/images/WhatsAppButtonGreenSmall.svg" /> </a>
{% endif -%}