first commit

This commit is contained in:
Stephan Hadan 2024-12-02 14:12:33 +01:00
commit 585a6927f6
19 changed files with 432 additions and 0 deletions

28
.github/workflow/ci.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: ci
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force

43
.gitignore vendored Normal file
View file

@ -0,0 +1,43 @@
# Dependencies
node_modules
__pycache__
venv
.venv
# Build files
build
site
# Distribution files
dist
mkdocs_material.egg-info
# Caches and logs
*.cpuprofile
*.log
*.tsbuildinfo
.cache
.eslintcache
__pycache__
# Examples
example
example.zip
# -----------------------------------------------------------------------------
# General
# -----------------------------------------------------------------------------
# Never ignore .gitkeep files
!**/.gitkeep
# macOS internals
.DS_Store
# Temporary files
TODO
tmp
# IDEs & Editors
.idea
*~

0
README.md Normal file
View file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
docs/assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

5
docs/blog/.authors.yml Normal file
View file

@ -0,0 +1,5 @@
authors:
stephan:
name: Stephan Hadan
description: Senior IT Operations Engineer
avatar: assets/logo.png

5
docs/blog/index.md Normal file
View file

@ -0,0 +1,5 @@
---
pdf: false
---
# Blog

10
docs/blog/posts/test.md Normal file
View file

@ -0,0 +1,10 @@
---
pdf: false
date: 2024-01-31
authors:
- stephan
---
# Hello world!
Hi ho!

0
docs/cv/index.md Normal file
View file

BIN
docs/images/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

17
docs/index.md Normal file
View file

@ -0,0 +1,17 @@
# Willkommen
For full documentation visit [mkdocs.org](https://www.mkdocs.org).
## Commands
* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start the live-reloading docs server.
* `mkdocs build` - Build the documentation site.
* `mkdocs -h` - Print help message and exit.
## Project layout
mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.

0
docs/projects/index.md Normal file
View file

2
docs/robots.txt Normal file
View file

@ -0,0 +1,2 @@
User-agent: *
Disallow: /

86
mkdocs.yml Normal file
View file

@ -0,0 +1,86 @@
site_name: Stephan Hadan
site_url: http://localhost:8000/
theme:
name: material
palette:
primary: black
accent: indigo
logo: assets/logo.png
favicon: images/favicon.png
language: de
features:
- navigation.instant
- navigation.instant.progress
- navigation.tracking
- navigation.tabs
- navigation.sections
- navigation.expand
- navigation.footer
- toc.follow
# - toc.integrate
- navigation.top
- search.suggest
- search.highlight
- search.share
copyright: Copyright © 2024 Stephan Hadan
plugins:
- search
- blog:
archive: false
# - social
- exporter:
formats:
pdf:
enabled: !ENV [MKDOCS_EXPORTER_PDF_ENABLED, true]
stylesheets:
- resources/stylesheets/pdf.scss
covers:
front: resources/templates/covers/front.html.j2
back: resources/templates/covers/back.html.j2
# browser:
# debug: false
aggregator:
enabled: !ENV [MKDOCS_EXPORTER_PDF_AGGREGATOR, true]
output: documentation.pdf
covers: front
buttons:
- title: Download as PDF
icon: material-file-download-outline
enabled: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.enabled
attributes: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.attributes
extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/stiebke
- icon: fontawesome/brands/bluesky
link: https://bsky.app/profile/stiebke.bsky.social
- icon: fontawesome/brands/mastodon
link: https://freiburg.social/@stiebke
markdown_extensions:
- abbr
- pymdownx.betterem
- pymdownx.blocks.caption
- pymdownx.caret
- pymdownx.mark
- pymdownx.tilde
- pymdownx.critic
- pymdownx.details
- pymdownx.highlight
- pymdownx.superfences
- pymdownx.keys
- pymdownx.smartsymbols
- pymdownx.tabbed
- pymdownx.tasklist
# Page tree
nav:
- Über mich: index.md
- Lebenslauf: cv/index.md
- Projekte: projects/index.md
- Blog:
- blog/index.md

View file

@ -0,0 +1,15 @@
<script>
/* Add custom analytics integration here, e.g. */
var property = "{{ config.extra.analytics.property }}"
/* Wait for page to load and application to mount */
document.addEventListener("DOMContentLoaded", function() {
location$.subscribe(function(url) {
/* Add custom page event tracking here */
})
})
</script>

14
requirements.txt Normal file
View file

@ -0,0 +1,14 @@
# Requirements for core
jinja2~=3.0
markdown~=3.2
mkdocs~=1.6
mkdocs-material-extensions~=1.3
pygments~=2.16
pymdown-extensions~=10.2
# Requirements for plugins
babel~=2.10
colorama~=0.4
paginate~=0.5
regex>=2022.4
requests~=2.26

View file

@ -0,0 +1,73 @@
:root {
--width: 21cm;
--margin: 1.20cm;
--height: 29.7cm;
--offset: calc(var(--margin) * 2);
}
@page {
size: A4;
margin: 1.20cm;
}
hr:has(+ div.md-source-file), .md-source-file {
display: none !important;
}
summary::after {
display: none;
}
.front-cover {
margin: var(--margin);
height: calc(var(--height) - var(--offset));
page-break-after: always;
border: 1px solid #fff;
position: relative;
img {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
image-rendering: optimizeQuality;
}
> section {
color: #fff;
padding: 0.635cm;
max-width: 10.25cm;
word-wrap: break-word;
margin-top: calc(var(--height) / 2 - var(--offset) - 2cm);
font-size: 13pt;
> .title {
font-size: 26pt;
font-weight: 500;
line-height: 1.1;
color: #fff;
}
}
}
h1, h2, h3 {
string-set: chapter content();
}
body {
print-color-adjust: exact;
text-rendering: geometricPrecision;
}
.md-main .md-main__inner {
margin: 0;
}
.md-content .md-content__inner {
margin: 0;
padding: 0;
&::before {
height: 0;
}
}

View file

@ -0,0 +1,43 @@
<style data-teleport="head">
.back-cover {
page: last;
height: 100%;
}
.back-cover img {
top: 0;
left: 0;
position: absolute;
}
.back-cover section {
.title {
color: #fff;
position: absolute;
top: 50%;
left: 0;
vertical-align: middle;
font-size: 24pt;
text-align: center;
width: 100%;
}
}
@page last {
margin: 0;
background: var(--md-primary-fg-color);
@top-center {
content: none;
}
@bottom-center {
content: none;
}
}
</style>
<div class="back-cover">
<section>
<div class="title">{{ config.site_name }}</div>
</section>
</div>

View file

@ -0,0 +1,91 @@
<style data-teleport="head">
.front-cover {
margin: var(--margin);
height: calc(var(--height) - var(--offset));
page-break-after: always;
border: 1px solid #fff;
position: relative;
img {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
image-rendering: optimizeQuality;
}
.logo {
position: absolute;
top: calc(2cm);
fill: white;
left: 50%;
transform: translateX(-50%);
> div {
width: 3cm;
text-align: center;
height: 3cm;
}
}
section {
color: #fff;
padding: 0.635cm;
max-width: 10.25cm;
word-wrap: break-word;
margin-top: calc(var(--height) / 2 - var(--offset) - 2cm);
font-size: 13pt;
> .title {
font-size: 32pt;
font-weight: 500;
line-height: 1.1;
margin-top: 1em;
color: #fff;
string-set: title content(text);
}
> .version {
line-height: 1;
font-size: 10pt;
font-family: monospace;
}
}
}
@page {
@top-center {
font-size: 9pt;
color: #7f7f7f;
content: '{{ config.site_name }}' ' — ' string(title);
}
}
@page :first {
margin: 0;
background: var(--md-primary-fg-color);
@top-center {
content: none;
}
@bottom-center {
content: none;
}
}
</style>
<div class="front-cover">
<img src="/assets/images/background.png">
<div class="logo">
<div>
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="m23 19-3-3v2h-4v2h4v2l3-3m-10 0c0-.3 0-.7.1-1H6v-2h7.8c.5-.8 1.1-1.5 1.9-2H6v-2h12v1.1c.3-.1.7-.1 1-.1s.7 0 1 .1V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h7.8c-.5-.9-.8-1.9-.8-3m0-15.5L18.5 9H13V3.5Z"></path>
</svg>
</div>
</div>
<section>
<div class="brand">{{ config.site_name }}</div>
<div class="version">{{ version }}</div>
<div class="title">{{ page.title }}</div>
</section>
</div>