Skip to content

Commit

Permalink
Begin Defining Mainframe Template
Browse files Browse the repository at this point in the history
  • Loading branch information
lordiii committed Mar 5, 2024
1 parent 79eb7a2 commit 989a652
Show file tree
Hide file tree
Showing 20 changed files with 369 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/public
/.idea
20 changes: 17 additions & 3 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# The URL the site will be built for
base_url = "https://ktt-ol.de"

title = "Kreativität trifft Technik"
title = "Kreativität trifft Technik e.V."
description = ""
author = "KTT Webmaster"
default_language = "de"

# Compilation settings
compile_sass = true
minify_html = true
build_search_index = true
generate_feed = true
Expand All @@ -31,6 +30,21 @@ include_path = true
include_content = true
index_format = "elasticlunr_javascript"

[translations]

[languages.en]
build_search_index = true
generate_feed = true

[languages.en.search]
include_title = true
include_description = true
include_path = true
include_content = true
index_format = "elasticlunr_javascript"

[languages.en.translations]

[markdown]
highlight_code = true
render_emoji = false
Expand All @@ -40,4 +54,4 @@ external_links_no_referrer = true
smart_punctuation = true
lazy_async_image = true

[extra]
[extra]
Empty file removed public/.gitkeep
Empty file.
1 change: 0 additions & 1 deletion public/search_index.en.js

This file was deleted.

Empty file removed static/.gitkeep
Empty file.
6 changes: 6 additions & 0 deletions static/css/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions static/css/bootstrap.min.css.map

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions static/css/site.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
body {
font-size: 16px;
padding: 0;
margin: 0;
height: 100vh;
}
7 changes: 7 additions & 0 deletions static/js/bootstrap.bundle.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions static/js/bootstrap.bundle.min.js.map

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions static/js/site.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Use correct header image and set correct color

switch (location.hostname)
{
case "mainframe.io":
document.getElementById("img-logo-ktt").style.display = "none";
document.getElementById("img-icon-lang").src = "/media/img/lang/icon.dark.svg";
document.getElementsByTagName("html")[0].dataset["bsTheme"] = "dark";
break;
default:
document.getElementById("img-logo-mainframe").style.display = "none";
document.getElementById("img-icon-lang").src = "/media/img/lang/icon.light.svg";
document.getElementsByTagName("html")[0].dataset["bsTheme"] = "light";
break;
}
2 changes: 2 additions & 0 deletions static/media/img/lang/icon.dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions static/media/img/lang/icon.light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/media/img/logo-ktt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions static/media/img/logo-mainframe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions templates/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<footer class="mt-auto">
<p style="text-align: center;">
© 2024 <a href="{{config.base_url}}">Kreativität trifft Technik</a> | License: <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA 4.0</a> | <a href="/impressum.dark.html">Impressum</a>
</p>
</footer>
48 changes: 48 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="{{lang}}" data-bs-theme="dark">
<head>
{% block head %}

<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{{config.description}}">
<meta name="author" content="{{config.author}}">

{% block title %}
{% if section.title %}
<title>{{ section.title }} | {{ config.title }}</title>
{% else %}
<title>{{ config.title }}</title>
{% endif %}
{% endblock title %}
{% endblock head %}

{% block css %}
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/site.css">
{% endblock css %}
</head>
<body>
<div class="container" style="padding-top: 10px;">
{% block navbar %}
{% include "navbar.html" %}
{% endblock navbar %}

{% block content %}
<div id="content">
{{section.content}}
</div>
{% endblock content %}

{% block footer %}
{% include "footer.html" %}
{% endblock footer %}
</div>

{% block javascript %}
<script src="/js/bootstrap.bundle.min.js" integrity="sha384-{{ get_hash(path="static/js/bootstrap.bundle.min.js", sha_type=384, base64=true) | safe }}"></script>
<script src="/js/site.js" integrity="sha384-{{ get_hash(path="static/js/site.js", sha_type=384, base64=true) | safe }}"></script>
{% endblock javascript %}
</body>
</html>
Loading

0 comments on commit 989a652

Please sign in to comment.