1
0
Fork 0
mirror of https://github.com/netz39/www.netz39.de.git synced 2025-05-28 23:37:54 +02:00

Merge remote-tracking branch 'sylhare/Type-on-Strap'

This commit is contained in:
MG-5 2024-03-27 04:13:48 +01:00 committed by MG-5
parent abb4d6b8e3
commit a8c4c41aaf
91 changed files with 9399 additions and 16125 deletions

View file

@ -0,0 +1,56 @@
{% assign color = include.color %}
{% assign img = include.img %}
{% capture _post_footer %}
<!-- To change color of links in the page -->
<style>
header#main {
background-size: cover;
background-repeat: no-repeat;
}
{% if color != nil %}
.post-content a { color: {{ color }} !important; }
.share-buttons a { color: {{ color }} !important; }
.tag-list a:not(:hover) { color: {{ color }} !important; }
div#post-nav a { color: {{ color }} !important; }
footer a { color: {{ color }} !important; }
.site-header nav a:hover { color: {{ color }} !important; }
a.button:hover {
background: {{ color }} !important;
border: 1px solid {{ color }} !important;
color: white;
text-decoration: none;
filter: none;
}
header#main {
background-color: {{ color }} !important;
background-image: url('{{ site.color_image | relative_url }}');
}
{% endif %}
{% if img != nil %}
header#main { background-image: url('{{ img | relative_url }}'); }
{% endif %}
</style>
<!-- Post navigation -->
{% if site.post_navigation or site.theme_settings.post_navigation %}
{% include blog/post_nav.liquid %}
{% endif %}
<!--Utterances-->
{% if site.comments.utterances.repo and site.comments.utterances.issue-term %}
{% include social/utterances.liquid %}
{% endif %}
<!-- Cusdis -->
{% if site.comments.cusdis_app_id or site.cusdis_app_id %}
{% include social/cusdis.liquid %}
{% endif %}
<!-- Disqus -->
{% if site.comments.disqus_shortname or site.theme_settings.disqus_shortname or site.disqus_shortname %}
{% include social/disqus.liquid %}
{% endif %}
{% endcapture %}
{{ _post_footer | split: " " | join: " " }}

View file

@ -3,17 +3,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=5">
<!-- Theme Mode-->
{% if site.color_theme == 'auto' %}
<script>
const isAutoTheme = true;
document.documentElement.setAttribute('data-theme', sessionStorage.getItem('theme'))
const darkBtn = "{{ site.data.language.str_dark | default: "Dark" }}";
const lightBtn = "{{ site.data.language.str_light | default: "Light" }}";
const isAutoTheme = {% if site.color_theme == 'auto' %}true{% else %}false{% endif %};
const preferredTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
if (isAutoTheme) {
document.documentElement.setAttribute('data-theme', sessionStorage.getItem('theme') ?? preferredTheme);
} else {
document.documentElement.setAttribute('data-theme', "{{ site.color_theme | default: 'light' }}");
}
</script>
{% else %}
<script>
const isAutoTheme = false;
document.documentElement.setAttribute('data-theme', "{{ site.color_theme | default: 'light' }}")
</script>
{% endif %}
<!-- Main JS (navbar.js, katex_init.js and masonry_init.js)-->
<script defer src="{{ '/assets/js/main.min.js' | relative_url }}"></script>
@ -35,18 +35,15 @@
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
{% endif %}
<!-- KaTeX 0.15.2 -->
<!-- KaTeX 0.16.9 -->
{% if site.katex or site.theme_settings.katex %}
<script defer src="{{ '/assets/js/vendor/katex.min.js' | relative_url }}"></script>
<script defer src="{{ '/assets/js/vendor/auto-render.min.js' | relative_url }}" onload="renderMathInElement(document.body);"></script>
<script defer src="{{ '/assets/js/vendor/katex.auto-render.min.js' | relative_url }}" onload="renderMathInElement(document.body);"></script>
{% endif %}
<!-- Mermaid 9.1.1 -->
<!-- Mermaid 10.8.0 -->
{% if site.mermaid %}
<script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}" onload="mermaid.initialize({
startOnLoad:true,
theme: '{{ site.mermaid }}',
});"></script>
<script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}"></script>
{% endif %}
<!-- Simple Jekyll Search 1.10.0 -->

View file

@ -21,18 +21,20 @@
<!-- Menu -->
<ul class="hide">
{% assign name_page = "" %}
{% for page in site.pages %}
{% unless page.title == null or page.hide or name_page contains page.title %}
{% assign emptyArray = '' | split: '' %}
{% assign menus = site.data.menu | default: emptyArray %}
{% assign pages = site.pages | concat: menus | sort: 'position' %}
{% for page in pages %}
{% unless page.title == null or page.hide or name_page contains page.title %}
<li class="separator"> | </li>
<li>
<a class="clear" aria-label="{{ page.title }}" title="{{ page.title }}" href="{{ page.url | relative_url }}">
{% if page.icon %} <i class="fas {{ page.icon }}" aria-hidden="true"></i>
{% else %} {{ page.title }} {% endif%}
{% if page.icon %} <i class="navbar-icon fas {{ page.icon }}" aria-hidden="true"></i>{% endif %}
<span class="navbar-label {% if page.icon %}navbar-label-with-icon{% endif%}">{{ page.title }}</span>
</a>
</li>
{% endunless %}
{% assign name_page = page.title | append: name_page %}
{% endunless %}
{% assign name_page = page.title | append: name_page %}
{% endfor %}
{% if site.color_theme == 'auto' %}

View file

@ -0,0 +1,51 @@
{% assign dateFormat = site.data.language.str_date_format | default: '%B %-d, %Y' %}
[
{% for post in site.posts %}
{
{% unless post.excluded %}
"title" : "{{ post.title | strip_newlines | escape }}",
"category" : "{{ post.category }}",
"tags" : "{{ post.tags | join: ', ' | prepend: " " }}",
"url" : "{{ post.url | relative_url }}",
"date" : "{{ post.date | date: dateFormat }}",
"excerpt" : {{ post.content | strip_html | strip_newlines | strip | escape | truncate: '250' | escape | jsonify }},
"content" : {{ post.content | strip_html | strip_newlines | strip | escape | jsonify }}
{% endunless %}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
{% if site.pages.size > 0 %},{% endif %}
{% for page in site.pages %}
{
{% unless page.excluded or page.title == nil %}
"title" : "{{ page.title | strip_newlines | escape }}",
"category" : "{{ page.category }}",
"tags" : "{{ page.tags | join: ', ' | prepend: " " }}",
"url" : "{{ page.url | relative_url }}",
"date" : "{{ page.date | date: dateFormat | default: "N/A" }}",
"excerpt" : {{ page.content | strip_html | strip_newlines | strip | escape | truncate: '250' | escape | jsonify }},
"content" : {{ page.content | strip_html | strip_newlines | strip | escape | jsonify }}
{% endunless %}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
{% if site.collections.size > 1 %},{% endif %}
{% for collection in site.collections %}
{% unless collection.label == 'posts' or site[collection.label].size == 0 %}
{% for page in site[collection.label] %}
{
{% if page.excluded or page.title != nil %}
"title" : "{{ page.title | strip_newlines | escape }}",
"category" : "{{ page.category }}",
"tags" : "{{ page.tags | join: ', ' | prepend: " " }}",
"url" : "{{ page.url | relative_url }}",
"date" : "{{ page.date | date: dateFormat | default: "N/A" }}",
"excerpt" : {{ page.content | strip_html | strip_newlines | strip | escape | truncate: '250' | jsonify }},
"content" : {{ page.content | strip_html | strip_newlines | strip | escape | jsonify }}
{% endif %}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
{% else %}
{}
{% endunless %}
{% unless forloop.last %},{% endunless %}
{% endfor %}
]

View file

@ -2,7 +2,7 @@
data-host="https://cusdis.com"
data-app-id="{% if site.comments.cusdis_app_id %}{{ site.comments.cusdis_app_id }}{% else %}{{ site.cusdis_app_id }}{% endif %}"
data-page-id="{{ page.relative_path }}"
data-page-url="{{ page.url }}"
data-page-url="{{ page.url | absolute_url }}"
data-page-title="{{ page.title }}"
data-theme="{{ site.color_theme }}"
></div>