Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "Type-on-Strap" theme to 2.4.9 #125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions .gitpod.yml

This file was deleted.

1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ source "https://rubygems.org"
gemspec
gem 'icalendar'
gem 'redcarpet'
gem 'webrick'
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ color_image: /assets/img/lineart.png # A bit transparent for
# For layout customization, go to the "_sass > base" folder, and check "_variables.scss"
katex: true # Enable if using math markup
mermaid: default # Enable mermaid-js for diagrams, use theme: base, forest, dark, default, neutral
google_analytics: # Tracking ID, e.g. "UA-000000-01"
google_analytics: # Measurement ID, e.g. "G-00000"
cookie_consent: false # To respect the usage of cookies
color_theme: auto # auto, dark or light

# Comments
# Comments options
comments:
disqus_shortname: # Your discus shortname for comments
cusdis_app_id: # Your cusdis data-app-id
Expand Down
File renamed without changes.
5 changes: 4 additions & 1 deletion _data/language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ str_no_result_found: "No result found"
str_cookie_approve: "Approve"
str_cookie_disclaimer: "We would like to use third party cookies and scripts to improve the functionality of this website."
str_months: [Januar, Februar, März, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember]
str_dark: 'Dark'
str_light: 'Light'
str_date_format: '%B %-d, %Y'
str_more_blog_entries: "Mehr Blogeinträge..."

# Localization settings
# Localization settings
cusdis_lang: # zh-cn, es, tr, pt-BR
5 changes: 5 additions & 0 deletions _data/menu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# To add links to the navigation bar.
- type-on-strap:
title: "Wiki"
url: https://wiki.netz39.de
position: 5
56 changes: 56 additions & 0 deletions _includes/blog/post_footer.liquid
Original file line number Diff line number Diff line change
@@ -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: " " }}
29 changes: 13 additions & 16 deletions _includes/default/head.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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 -->
Expand Down
16 changes: 9 additions & 7 deletions _includes/default/navbar.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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' %}
Expand Down
51 changes: 51 additions & 0 deletions _includes/default/search_input.liquid
Original file line number Diff line number Diff line change
@@ -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 %}
]
2 changes: 1 addition & 1 deletion _includes/social/cusdis.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
33 changes: 33 additions & 0 deletions _layouts/archive.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
layout: page
---

<div class="home">
<div id="archive">
{% assign postsByYear = site.posts | group_by_exp:"post", "post.date | date: '%Y'" %}
<ul class="archive-clouds">
{% for year in postsByYear %}
<a href="#archive-{{ year.name | cgi_escape }}" class="archive-anchor">
<li>
{{ year.name | cgi_escape }} ({{year.items.size}})
</li>
</a>
{% endfor %}
</ul>
{% for year in postsByYear %}
<div class="archive-group">
<h4 id="archive-{{year.name}}" class="title">{{ year.name }} ({{year.items.size}})</h4>
<div class="items">
{% for post in year.items %}
<a href="{{ post.url | relative_url }}" class="archive-post-link">
<div class="item">
<p class="meta">{{ post.date | date: site.data.language.str_date_format | default: '%B %-d, %Y' }}</p>
<p class="title">{{ post.title }}</p>
</div>
</a>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
2 changes: 1 addition & 1 deletion _layouts/categories.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ layout: page
{% for post in site.categories[group] %}
<a href="{{ post.url | relative_url }}" class="category-post-link">
<div class="item">
<p class="meta">{{ post.date | date: "%B %-d, %Y" }}</p>
<p class="meta">{{ post.date | date: site.data.language.str_date_format | default: '%B %-d, %Y' }}</p>
<p class="title">{{ post.title }}</p>
</div>
</a>
Expand Down
11 changes: 7 additions & 4 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<!DOCTYPE html>
<!--
Type on Strap jekyll theme v2.4.6
Type on Strap jekyll theme v2.4.9
Theme free for personal and commercial use under the MIT license
https://github.com/sylhare/Type-on-Strap/blob/master/LICENSE
-->
<html lang="en">
{% include default/head.liquid %}
{% capture _head %}{% include default/head.liquid %}{% endcapture %}
{{ _head | split: " " | join: " "}}
<body>
{% include default/navbar.liquid %}
{% capture _navbar %}{% include default/navbar.liquid %}{% endcapture %}
{{ _navbar | split: " " | join: " "}}
<div class="content">
{{ content }}
</div>
{% include default/footer.liquid %}
{% capture _footer %}{% include default/footer.liquid %}{% endcapture %}
{{ _footer | split: " " | join: " "}}
</body>
</html>
5 changes: 3 additions & 2 deletions _layouts/home.liquid
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
---

<div class="home">
<style scoped>
{% assign image = site.header_feature_image | relative_url | split: '.' %}
Expand Down Expand Up @@ -35,6 +34,8 @@ layout: default

<div class="blog-links">
<center><h2>Neuste Blogeinträge:</h2></center>
{% include blog/small_blog.liquid %}
{% capture _blog %}{% include blog/small_blog.liquid %}{% endcapture %}
{{ _blog | split: " " | join: " "}}
</div>

</div>
Loading