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

New theme #186

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1f0b75e
Revert "Minimale Style-Änderungen für die Übersichtlichkeit"
thelegy Jul 9, 2023
55ece84
Remove unneeded html, head and body tags
thelegy Mar 19, 2023
5deab2b
Remove broken feed link
thelegy Mar 19, 2023
aaf1412
Unify similar layouts
thelegy Mar 19, 2023
0f44b75
Add quirk to fix livereload
thelegy Mar 19, 2023
676dc8b
Rework the theme to use grid and center the page
thelegy Mar 20, 2023
b3b360f
Simplify header and improve mobile design
thelegy Mar 20, 2023
b41fac0
Improve header for other screen sizes
thelegy Mar 20, 2023
74b4f3f
Ensure the footer is bottom aligned
thelegy Mar 20, 2023
d32dd0b
Embed the svgs in the header more densely packed
thelegy Mar 21, 2023
a2cffcc
Clean up the header and improve alignment
thelegy Mar 21, 2023
4672464
Convert header subtitle to h2
thelegy Mar 21, 2023
5490663
Remove obsolete variables
thelegy Mar 21, 2023
c87056c
Redefine em to match the line thicknesses
thelegy Mar 21, 2023
fc02b64
Switch footer to using flexboxes
thelegy Mar 22, 2023
eb7c329
Restructure the footer and include more information
thelegy Mar 23, 2023
ec0e686
Improve the header
thelegy Mar 23, 2023
71bd309
Add github svg pulled via ssi from shields.io
thelegy Mar 26, 2023
7cb835b
Modify next_koma block to grab info via ssi from the wiki
thelegy Mar 26, 2023
813f803
Improve html code layout
thelegy Mar 26, 2023
89707da
Include footer earlier to behave better with malformed content
thelegy Mar 27, 2023
ef8612d
Define colors on the body and reuse them later
thelegy Mar 27, 2023
c96a7fd
Revert "Modify next_koma block to grab info via ssi from the wiki"
thelegy Apr 30, 2023
9198b3e
Switch to a static github.svg image
thelegy Apr 30, 2023
9b93131
Reintroduce explicit html tag to add lang attribute to canonical place
thelegy May 27, 2023
59aeda5
Use KoMaPedia redirect only when necessary
thelegy May 27, 2023
e51850a
Simplify navbar generation greatly
thelegy May 27, 2023
e669fe7
Simplify nav css
thelegy May 27, 2023
f4f2bf3
Improve theme for mobile usage
thelegy Jul 9, 2023
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
5 changes: 3 additions & 2 deletions KoMaPedia/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
title: KoMaPedia
menutitle: KoMaPedia
menuurl: https://www.komapedia.org
order: 99
---

Sie werden weitergeleitet
<a href="{{ page.menuurl }}">Klicken Sie hier, falls sie nicht weitergeleitet werden.</a>

<script language="javascript"><!--
window.location.href="https://www.komapedia.org";
window.location.href="{{ page.menuurl }}";
// --></script>
3 changes: 3 additions & 0 deletions _includes/arrowhead.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 32 additions & 11 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
<div class="footer">
<a href="/impressum/">Impressum</a>
&middot;
<a href="/datenschutz/">Datenschutz</a>
&middot;
<a href="/ueber_diese_seite/">Über diese Seite</a>

<a class="sponsoring" href="https://www.hetzner.com/cloud" target="blank">
<img src="/core/image/hosted-by-hetzner-201.png" alt="hosted by HETZNER" />
</a>
</div>
<footer>

<div>
<a href="/kommunikation/koma-buero/"><h1>KoMa-Büro</h1></a>
<pre>
KoMa Büro c/o Fachschaft Mathematik
Endenicher Allee 60
D-53115 Bonn

E-Mail: [email protected]
</pre>
</div>

<div>
<a href="/foerderverein/"><h1>KoMa e.V.</h1></a>
<p>IBAN: <code>DE38 4726 0121 8917 0136 00</code></p>
</div>

<div>
<h1>KoMa Admins</h1>
<a target="_blank" href="https://github.com/Die-KoMa/die-koma.org">
<img alt="GitHub" src="/core/image/github.svg">
</a>
<p>E-Mail: <a href="mailto:[email protected]">[email protected]</a></p>
<a href="/impressum/">Impressum</a>
<a href="/datenschutz/">Datenschutz</a>
<a class="sponsoring" href="https://www.hetzner.com/cloud" target="blank">
<img src="/core/image/hosted-by-hetzner-201.png" alt="hosted by HETZNER" />
</a>
</div>

</footer>
21 changes: 11 additions & 10 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% if site.livereload %}<head>{% endif -%}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">

<link rel="stylesheet" href="{{ "/core/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<!-- <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}"> -->
<link rel="shortcut icon" href="/static/favicon.ico" />
<link rel="stylesheet" href="{{ "/core/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="shortcut icon" href="/static/favicon.ico" />
{%- if site.livereload %}
</head>
{%- endif -%}
11 changes: 7 additions & 4 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<header class="site-header">
<a href="/">
<div class="logo">
<img class="svg" src="/icon-koma.svg">
<span href="/">die-koma.org</span>
{% capture koma_logo %}{% include koma.svg %}{% endcapture -%}
{{ koma_logo | normalize_whitespace | replace: "> <", "><" }}
</div>
<h1>die-koma.org</h1>
<div class="arrow">
{% capture arrowhead %}{% include arrowhead.svg %}{% endcapture -%}
{{ arrowhead | normalize_whitespace | replace: "> <", "><" }}
</div>
<img class="arrowhead" src="/arrowhead.svg">
<div class="subtitle">
<span>Konferenz der deutschsprachigen Mathematikfachschaften</span>
<h2>Konferenz der deutschsprachigen Mathematikfachschaften</h2>
</div>
</a>
</header>
{{- '' -}}
3 changes: 3 additions & 0 deletions _includes/koma.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 4 additions & 27 deletions _includes/navroot.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,11 @@
{%- assign navigation = navigation | push: p -%}
{%- endif -%}
{%- endif -%}

{%- endfor -%}
{%- assign navigation = navigation | sort: 'path' -%}
{%- assign menudepth = navigation | group_by_exp: 'item', 'item.url | remove_first: "/" | split: "/" | size' -%}
<div class="site-nav-wrapper">
<nav class="site-nav">
{%- comment -%}
<pre>
{%- for p in navigation -%}
{{ p.dir }}
{{ p.path }}
{%- endfor -%}
</pre>
<pre>
{%- for m in menudepth -%}
{{ m }}
{%- for p in m.items -%}
{{ p.url }}
{%- endfor -%}
{%- endfor -%}
</pre>
<pre>
{%- assign wtf = navigation -%}
{%- for w in wtf -%}
{{ w.dir }}
{%- endfor -%}
</pre>
{%- endcomment -%}
{%- include navtree.html treeprefix="menu-0" active=include.active depth=1 parent_path="/" -%}

<a id="navlink" href="#nav">⮩ Springe zum Menü</a>
<nav id="nav">
{%- include navtree.html depth=1 parent_path="/" %}
</nav>
</div>
78 changes: 17 additions & 61 deletions _includes/navtree.html
Original file line number Diff line number Diff line change
@@ -1,66 +1,22 @@
{%- assign depth_entries = menudepth | where: 'name', include.depth -%}
{%- assign rawentries = "" | split: "" -%}
{%- for ihateliquid in depth_entries -%}
{%- assign rawentries = ihateliquid.items -%}
{%- endfor -%}
{%- assign entries = "" | split: "" -%}
{%- assign parent_path_size = include.parent_path.size -%}
{%- for e in rawentries -%}
{%- assign entrytext = e.url | slice: 0,parent_path_size -%}
{%- if entrytext contains include.parent_path -%}
{%- assign entries = entries | push: e -%}
{%- endif -%}
{%- for e in depth_entries.first.items -%}
{%- assign entrytext = e.url | slice: 0, include.parent_path.size -%}
{%- if entrytext contains include.parent_path -%}
{%- assign entries = entries | push: e -%}
{%- endif -%}
{%- endfor -%}
{%- assign entries = entries | where_exp: 'item', 'item.menuentry == true' -%}
{%- if entries.size >= 1 -%}
<input type="checkbox" name="{{ include.treeprefix }}" id="{{ include.treeprefix }}" hidden="hidden"/>
<ul>
{%- assign ordered_entries = entries | sort: 'order' -%}
{%- for entry in ordered_entries -%}
{%- assign treeprefix = include.treeprefix | append: "-" | append: forloop.index -%}
{%- assign nextdepth = include.depth | plus: 1 -%}
{%- assign nextdepth_entries = menudepth | where: 'name', nextdepth -%}
{%- if nextdepth_entries.size == 1 -%}
{%- assign nextrawentries = "" | split: "" -%}
{%- for nextihateliquid in nextdepth_entries -%}
{%- assign nextrawentries = nextihateliquid.items -%}
{%- endfor -%}
{%- assign nextentries = "" | split: "" -%}
{%- assign nextparent_path_size = entry.dir.size -%}
{%- for e in nextrawentries -%}
{%- assign entrytext = e.url | slice: 0,nextparent_path_size -%}
{%- if entrytext contains entry.dir -%}
{%- assign nextentries = nextentries | push: e -%}
{%- endif -%}
{%- endfor -%}
{%- assign nextentries = nextentries | where_exp: 'item', 'item.menuentry == true' -%}
{%- if nextentries.size > 0 -%}{%- assign has_children = true -%}{%- else -%}{%- assign has_children = false -%}{%- endif -%}
{%- else -%}{%- assign has_children = false -%}{%- endif -%}
{%- assign is_active = false -%}
{%- if include.active -%}
{%- assign entry_url_active = entry.url | slice: 0,include.active.size -%}
{%- if include.active == entry.url -%}
{%- assign is_active = true -%}
{%- endif -%}
{%- endif -%}
<li>
<input type="radio" name="{{ include.treeprefix }}" id="{{ treeprefix }}" hidden="hidden"/>
<label for="{{ treeprefix }}" class="menuitem{% if include.active contains entry.url %} active{% endif %}{% if has_children %} more{% endif %}{% if is_active %} isactive{% endif %}">
<a href="{% if entry.menuurl %}{{ entry.menuurl }}{% else %}{{ entry.url}}{% endif %}">
{%- if entry.menutitle and entry.menuentitle %}<span lang="de">{{ entry.menutitle }}</span><span lang="en">{{ entry.menuentitle }}</span>{% else %}<span>{{ entry.menutitle | default: entry.menuentitle | default: "XXX" }}</span>{% endif -%}
</a>
</label>
{%- if has_children and entry.submenu == true -%}
{%- if include.active contains entry.url -%}
{%- include navtree.html treeprefix=treeprefix parent_path=entry.dir depth=nextdepth active=include.active foo=include.foo -%}
{%- else -%}
{%- include navtree.html treeprefix=treeprefix parent_path=entry.dir depth=nextdepth foo=include.foo -%}
{%- comment -%}{%- if nextdepth<3 -%}
{%- include navtree.html treeprefix=treeprefix parent_path=entry.dir depth=nextdepth -%}
{%- endif -%}{%- endcomment -%}
{%- endif -%}
{%- endif -%}
</li>
{%- endfor -%}
</ul>

{%- if entries.size >= 1 %}
<ul>
{%- assign ordered_entries = entries | sort: 'order' -%}
{%- for entry in ordered_entries -%}
{%- assign nextdepth = include.depth | plus: 1 -%}
{%- assign url = entry.menuurl | default: entry.url %}
<li><a href="{{ url }}">{{ entry.menutitle }}</a>
{%- include navtree.html parent_path=entry.dir depth=nextdepth -%}
</li>
{%- endfor %}
</ul>
{%- endif -%}
2 changes: 1 addition & 1 deletion _includes/next_koma.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="next-koma">
<h1>Nächste KoMata</h1>
<span>Folgende KoMata in der Übersicht:</span>
<span>Geplante KoMata in der Übersicht:</span>
<ul>
<li>
<span class="name"><a href="https://komapedia.org/wiki/KoMa_89">KoMa in Darmstadt</a></span>
Expand Down
32 changes: 11 additions & 21 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
<!DOCTYPE html>
<html xml:lang="de" lang="de" xmlns="http://www.w3.org/1999/xhtml">
<html lang="de">
{% include head.html %}

{% include head.html %}
{% include header.html %}

<body><div class="koma">
{% include navroot.html %}

{% include header.html %}
{% include footer.html %}

<div class="site-content">
<main>

{% include navroot.html active=page.url %}
{% if page.show_next_koma %}
{% include next_koma.html %}
{% endif %}

<div class="content">

<div class="page-content2">
<div class="wrapper2">
{{ content }}
</div>
</div>

</div>

</div>

{% include footer.html %}

</div></body>
{{ content }}

</main>
</html>
32 changes: 0 additions & 32 deletions _layouts/startpage.html

This file was deleted.

38 changes: 28 additions & 10 deletions _sass/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
.footer {
footer {
grid-area: footer;
background-color: #dcdcf2;
padding: 10px;
font-weight: bold;
display: flex;
flex-flow: column;
justify-content: space-between;
gap: 1em;
font-size: 1rem;
padding: 2em;

.sponsoring {
float: right;
position: relative;
top: -.2em;

img {
height: 1.5em;
> div {
display: flex;
flex-flow: column;
> * {
padding-top: .6em;
}
}

h1 {
font-size: 1.2em;
font-weight: bold;
padding-bottom: .4em;
}

.sponsoring img {
height: 2.5em;
}

@media (min-width: 800px) {
flex-flow: row wrap;
}
}

Loading