Compare commits
No commits in common. "main" and "v0.6.0" have entirely different histories.
|
@ -12,44 +12,27 @@ jobs:
|
||||||
env:
|
env:
|
||||||
USERNAME: servostar
|
USERNAME: servostar
|
||||||
EMAIL: sven.vogel123@web.de
|
EMAIL: sven.vogel123@web.de
|
||||||
GIT_AUTH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
||||||
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: 'main'
|
ref: 'main'
|
||||||
token: ${{ secrets.RELEASE_TOKEN }}
|
token: ${{ secrets.RELEASE_TOKEN }}
|
||||||
- name: Install dependencies for Nix setup action
|
- name: Tag Release Commit
|
||||||
run: |
|
env:
|
||||||
apt update -y
|
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
||||||
apt install sudo -y
|
GIT_AUTH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
- name: Setup Nix
|
|
||||||
uses: cachix/install-nix-action@v27
|
|
||||||
with:
|
|
||||||
nix_path: nixpkgs=channel:nixos-unstable
|
|
||||||
- name: Setup Git
|
|
||||||
run: |
|
|
||||||
git config --global user.name "${USERNAME}"
|
|
||||||
git config --global user.email "${EMAIL}"
|
|
||||||
- name: Update Typst.toml
|
|
||||||
run: |
|
run: |
|
||||||
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
|
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
|
||||||
|
git config --global user.name "${USERNAME}"
|
||||||
|
git config --global user.email "${EMAIL}"
|
||||||
|
echo "==> Update typst.toml version"
|
||||||
sed -i "/version/c\version = \"${VERSION#v}\"" typst.toml
|
sed -i "/version/c\version = \"${VERSION#v}\"" typst.toml
|
||||||
git add typst.toml
|
git add typst.toml
|
||||||
git commit -m "chore: bump release version to $VERSION" -m "Generated-By: ${{ gitea.actor }}"
|
git commit -m "chore: bump release version to $VERSION" -m "Generated-By: ${{ gitea.actor }}"
|
||||||
- name: Generate Example Document
|
|
||||||
run: nix-shell --run ./run-ci.sh
|
|
||||||
- name: Generate Assets
|
|
||||||
if: contains(github.event.head_commit.message, 'Generate-Assets')
|
|
||||||
run: |
|
|
||||||
./run-bake-assets.sh
|
|
||||||
git add assets/banner.png
|
|
||||||
git add assets/page-preview.png
|
|
||||||
git commit -m "chore: update assets" -m "Generated-By: ${{ gitea.actor }}"
|
|
||||||
- name: Tag and Push Changes
|
|
||||||
run: |
|
|
||||||
git push origin main
|
git push origin main
|
||||||
export VERSION=$(echo "${COMMIT_MESSAGE}" | grep -Po '(?<=Release-As: )v\d+\.\d+\.\d+')
|
echo "::endgroup::"
|
||||||
|
echo "::group::{Tag commit}"
|
||||||
git tag -m "Release" "${VERSION}"
|
git tag -m "Release" "${VERSION}"
|
||||||
git push origin "${VERSION}"
|
git push origin "${VERSION}"
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
*.pdf
|
*.pdf
|
||||||
*.log
|
*.log
|
||||||
images/
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 2.8 MiB |
Binary file not shown.
Before Width: | Height: | Size: 9.0 MiB After Width: | Height: | Size: 2.2 MiB |
|
@ -1,59 +0,0 @@
|
||||||
#import "@preview/shadowed:0.1.2": shadowed
|
|
||||||
|
|
||||||
#let LE = 10cm
|
|
||||||
#let shadow = 0.25cm
|
|
||||||
|
|
||||||
#set page(margin: 0pt, width: 2 * LE, height: LE, fill: rgb(0, 0, 0, 0))
|
|
||||||
|
|
||||||
#place(
|
|
||||||
dx: 3cm,
|
|
||||||
dy: 1.1cm,
|
|
||||||
rotate(
|
|
||||||
-9deg,
|
|
||||||
shadowed(
|
|
||||||
radius: 0pt,
|
|
||||||
inset: 0pt,
|
|
||||||
blur: shadow,
|
|
||||||
image("./images/21.svg", height: LE * 0.6))))
|
|
||||||
|
|
||||||
#place(
|
|
||||||
dx: 1cm,
|
|
||||||
dy: 3.25cm,
|
|
||||||
rotate(
|
|
||||||
-20deg,
|
|
||||||
shadowed(
|
|
||||||
radius: 0pt,
|
|
||||||
inset: 0pt,
|
|
||||||
blur: shadow,
|
|
||||||
image("./images/51.svg", height: LE * 0.55))))
|
|
||||||
|
|
||||||
#place(
|
|
||||||
dx: 14cm,
|
|
||||||
dy: 1.5cm,
|
|
||||||
rotate(
|
|
||||||
6deg,
|
|
||||||
shadowed(
|
|
||||||
radius: 0pt,
|
|
||||||
inset: 0pt,
|
|
||||||
blur: shadow,
|
|
||||||
image("./images/41.svg", height: LE * 0.65))))
|
|
||||||
|
|
||||||
#place(
|
|
||||||
dx: 11cm,
|
|
||||||
dy: 2cm,
|
|
||||||
rotate(
|
|
||||||
25deg,
|
|
||||||
shadowed(
|
|
||||||
radius: 0pt,
|
|
||||||
inset: 0pt,
|
|
||||||
blur: shadow,
|
|
||||||
image("./images/31.svg", height: LE * 0.6))))
|
|
||||||
|
|
||||||
#place(
|
|
||||||
dx: 7cm,
|
|
||||||
dy: 0.75cm,
|
|
||||||
shadowed(
|
|
||||||
radius: 0pt,
|
|
||||||
inset: 0pt,
|
|
||||||
blur: shadow,
|
|
||||||
image("./images/11.svg", height: LE * 0.75)))
|
|
|
@ -1,34 +0,0 @@
|
||||||
|
|
||||||
#let gap = 0.5cm
|
|
||||||
|
|
||||||
#set page(margin: 0pt, width: 210mm * 3 + 2 * gap, height: 297mm * 2 + gap, fill: rgb(0, 0, 0, 0))
|
|
||||||
|
|
||||||
#place(
|
|
||||||
dx: 0mm,
|
|
||||||
dy: 0mm,
|
|
||||||
image("./images/11.svg", height: 297mm))
|
|
||||||
|
|
||||||
#place(
|
|
||||||
dx: 210mm + gap,
|
|
||||||
dy: 0mm,
|
|
||||||
image("./images/21.svg", height: 297mm))
|
|
||||||
|
|
||||||
#place(
|
|
||||||
dx: (210mm + gap) * 2,
|
|
||||||
dy: 0mm,
|
|
||||||
image("./images/31.svg", height: 297mm))
|
|
||||||
|
|
||||||
#place(
|
|
||||||
dx: 210mm * 0,
|
|
||||||
dy: 297mm + gap,
|
|
||||||
image("./images/71.svg", height: 297mm))
|
|
||||||
|
|
||||||
#place(
|
|
||||||
dx: (210mm + gap) * 1,
|
|
||||||
dy: 297mm + gap,
|
|
||||||
image("./images/41.svg", height: 297mm))
|
|
||||||
|
|
||||||
#place(
|
|
||||||
dx: (210mm + gap) * 2,
|
|
||||||
dy: 297mm + gap,
|
|
||||||
image("./images/51.svg", height: 297mm))
|
|
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
echo "==> generate images"
|
|
||||||
mkdir images || true
|
|
||||||
|
|
||||||
# extract images from document created by action
|
|
||||||
mutool convert -o images/1.svg "$1" 1
|
|
||||||
mutool convert -o images/2.svg "$1" 2
|
|
||||||
mutool convert -o images/2.svg "$1" 2
|
|
||||||
mutool convert -o images/3.svg "$1" 5
|
|
||||||
mutool convert -o images/7.svg "$1" 7
|
|
||||||
mutool convert -o images/4.svg "$1" 15
|
|
||||||
mutool convert -o images/5.svg "$1" 16
|
|
||||||
|
|
||||||
echo "==> generate banner"
|
|
||||||
typst compile banner.typ --ppi 360 ../assets/banner.png
|
|
||||||
echo "==> generate preview"
|
|
||||||
typst compile preview.typ --ppi 360 ../assets/page-preview.png
|
|
|
@ -1,14 +0,0 @@
|
||||||
let
|
|
||||||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable";
|
|
||||||
pkgs = import nixpkgs { config = {}; overlays = []; };
|
|
||||||
in
|
|
||||||
|
|
||||||
pkgs.mkShellNoCC {
|
|
||||||
packages = with pkgs; [
|
|
||||||
python312
|
|
||||||
python312Packages.pyyaml
|
|
||||||
typst
|
|
||||||
typstyle
|
|
||||||
mupdf-headless
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cd baker
|
|
||||||
|
|
||||||
echo "==> generate assets"
|
|
||||||
nix-shell --run "./run-bake-banner.sh ../example.pdf"
|
|
12
run-fmt.sh
12
run-fmt.sh
|
@ -17,7 +17,7 @@ function format() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local imports=$(rg "#import \"([a-z0-9/\-.]+\.typ)\"" -Nor '$1' "$1")
|
local imports=$(rg "#import \"([a-z0-9/\-]+\.typ)\"" -Nor '$1' "$1")
|
||||||
|
|
||||||
# format all included files
|
# format all included files
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
|
@ -26,16 +26,6 @@ function format() {
|
||||||
fi
|
fi
|
||||||
format "$wd/$line" "$2"
|
format "$wd/$line" "$2"
|
||||||
done <<< "$imports"
|
done <<< "$imports"
|
||||||
|
|
||||||
local includes=$(rg "#import \"([a-z0-9/\-.]+\.typ)\"" -Nor '$1' "$1")
|
|
||||||
|
|
||||||
# format all included files
|
|
||||||
while IFS= read -r line; do
|
|
||||||
if [ -z "$line" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
format "$wd/$line" "$2"
|
|
||||||
done <<< "$includes"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable";
|
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.11";
|
||||||
pkgs = import nixpkgs { config = {}; overlays = []; };
|
pkgs = import nixpkgs { config = {}; overlays = []; };
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
31
src/conf.typ
31
src/conf.typ
|
@ -22,7 +22,7 @@
|
||||||
program: "Informationtechnology",
|
program: "Informationtechnology",
|
||||||
faculty: "Technik",
|
faculty: "Technik",
|
||||||
name: "dualen Hochschule Baden-Württemberg",
|
name: "dualen Hochschule Baden-Württemberg",
|
||||||
campus: "Eppelheim",
|
campus: "Eppelheim"
|
||||||
),
|
),
|
||||||
supervisor-signature: false,
|
supervisor-signature: false,
|
||||||
authors: ((),()),
|
authors: ((),()),
|
||||||
|
@ -38,48 +38,37 @@
|
||||||
abstract: none,
|
abstract: none,
|
||||||
preface: none,
|
preface: none,
|
||||||
keywords: ( "IT", "other stuff" ),
|
keywords: ( "IT", "other stuff" ),
|
||||||
bibliography: none, /* bibliography("refs.bib") */
|
bibliography: none /* bibliography("refs.bib") */,
|
||||||
glossary: none,
|
glossary: none,
|
||||||
appendices: none,
|
appendices: none),
|
||||||
),
|
|
||||||
style: (
|
style: (
|
||||||
header: (
|
header: (
|
||||||
content-padding: 1.5em,
|
content-padding: 1.5em,
|
||||||
underline-top-padding: 0pt,
|
underline-top-padding: 0pt,
|
||||||
logo-height: 5em,
|
logo-height: 5em,
|
||||||
logo-image: "res/ABB.svg",
|
logo-image: "res/ABB.svg"),
|
||||||
),
|
|
||||||
footer: (
|
footer: (
|
||||||
content-padding: 1.5em,
|
content-padding: 1.5em),
|
||||||
),
|
|
||||||
page: (
|
page: (
|
||||||
format: "a4",
|
format: "a4",
|
||||||
margin: (
|
margin: (
|
||||||
left: 3cm,
|
left: 3cm,
|
||||||
right: 2.5cm,
|
right: 2.5cm,
|
||||||
top: 2.5cm,
|
top: 2.5cm,
|
||||||
bottom: 2.5cm,
|
bottom: 2.5cm)),
|
||||||
),
|
|
||||||
),
|
|
||||||
text: (
|
text: (
|
||||||
size: 12pt,
|
size: 12pt,
|
||||||
font: "Fira Sans",
|
font: "Fira Sans"),
|
||||||
),
|
|
||||||
heading: (
|
heading: (
|
||||||
font: "Fira Sans",
|
font: "Fira Sans"),
|
||||||
),
|
|
||||||
code: (
|
code: (
|
||||||
theme: "res/abb.tmTheme",
|
theme: "res/abb.tmTheme",
|
||||||
font: "FiraCode Nerd Font",
|
font: "FiraCode Nerd Font",
|
||||||
lines: false,
|
lines: false,
|
||||||
size: 10pt,
|
size: 10pt,
|
||||||
tab-size: 4,
|
tab-size: 4),
|
||||||
),
|
|
||||||
link: (
|
link: (
|
||||||
color: ABB-GRAY-02,
|
color: ABB-GRAY-02)))
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
// Insert a dictionary `update` into `base` but only the entries of update that also exist in base
|
// Insert a dictionary `update` into `base` but only the entries of update that also exist in base
|
||||||
// Runs recursively on all sub dictionaries
|
// Runs recursively on all sub dictionaries
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
// License: MIT
|
// License: MIT
|
||||||
|
|
||||||
#let glossary(entries, config) = {
|
#let glossary(entries, config) = {
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
type(entries) == dictionary,
|
type(entries) == dictionary,
|
||||||
message: "The glossary is not a dictionary",
|
message: "The glossary is not a dictionary",
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#let new_abstract(config) = (
|
#let new_abstract(config) = (
|
||||||
context {
|
context {
|
||||||
|
|
||||||
set align(center + horizon)
|
set align(center + horizon)
|
||||||
|
|
||||||
// only include summary when a language other than english is used
|
// only include summary when a language other than english is used
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#let new_confidentiality_statement_page(config) = (
|
#let new_confidentiality_statement_page(config) = (
|
||||||
context {
|
context {
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
let thesis = config.thesis
|
let thesis = config.thesis
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#let new_declaration_of_authorship(config) = (
|
#let new_declaration_of_authorship(config) = (
|
||||||
context {
|
context {
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
let thesis = config.thesis
|
let thesis = config.thesis
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
// NOTE: will not render in case the listing is empty
|
// NOTE: will not render in case the listing is empty
|
||||||
#let render_filtered_outline(title: str, kind: selector) = (
|
#let render_filtered_outline(title: str, kind: selector) = (
|
||||||
context {
|
context {
|
||||||
|
|
||||||
let elems = query(figure.where(kind: kind))
|
let elems = query(figure.where(kind: kind))
|
||||||
let count = elems.len()
|
let count = elems.len()
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#let new_prerelease_note(config) = (
|
#let new_prerelease_note(config) = (
|
||||||
context {
|
context {
|
||||||
|
|
||||||
pagebreak(weak: true)
|
pagebreak(weak: true)
|
||||||
|
|
||||||
let thesis = config.thesis
|
let thesis = config.thesis
|
||||||
|
|
|
@ -107,21 +107,17 @@
|
||||||
grid(columns: cols, column-gutter: 1.5em, ..config
|
grid(columns: cols, column-gutter: 1.5em, ..config
|
||||||
.authors
|
.authors
|
||||||
.slice(i * 3, i * 3 + cols)
|
.slice(i * 3, i * 3 + cols)
|
||||||
.map(author => par([
|
.map(author => grid(
|
||||||
#if author.at("name", default: none) != none {
|
columns: 1,
|
||||||
text(size: 1.25em, author.name)
|
row-gutter: 1em,
|
||||||
linebreak()
|
text(size: 1.25em, author.name),
|
||||||
}
|
text(size: 1em, author.company),
|
||||||
#if author.at("company", default: none) != none {
|
text(size: 1em, author.contact),
|
||||||
text(size: 1em, author.company)
|
[
|
||||||
linebreak()
|
#str(author.matriculation-number),
|
||||||
}
|
#author.course
|
||||||
#if author.at("contact", default: none) != none {
|
],
|
||||||
text(size: 1em, author.contact)
|
)))
|
||||||
linebreak()
|
|
||||||
}
|
|
||||||
#str(author.matriculation-number), #author.course
|
|
||||||
])))
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,6 @@
|
||||||
set page(
|
set page(
|
||||||
paper: style.page.format,
|
paper: style.page.format,
|
||||||
foreground: watermark(config),
|
foreground: watermark(config),
|
||||||
background: [#rect(width: 100%, height: 100%, fill: white)],
|
|
||||||
header-ascent: style.header.content-padding,
|
header-ascent: style.header.content-padding,
|
||||||
footer-descent: style.header.content-padding,
|
footer-descent: style.header.content-padding,
|
||||||
margin: (
|
margin: (
|
||||||
|
@ -296,6 +295,7 @@
|
||||||
|
|
||||||
if current-page == 1 {
|
if current-page == 1 {
|
||||||
// logo moved to content
|
// logo moved to content
|
||||||
|
|
||||||
} else if query(<end-of-content>)
|
} else if query(<end-of-content>)
|
||||||
.first()
|
.first()
|
||||||
.location()
|
.location()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dhbw-abb-typst-template"
|
name = "dhbw-abb-typst-template"
|
||||||
version = "0.6.3"
|
version = "0.6.0"
|
||||||
entrypoint = "src/template.typ"
|
entrypoint = "src/template.typ"
|
||||||
authors = ["Sven Vogel <sven.vogel1@de.abb.com>"]
|
authors = ["Sven Vogel <sven.vogel1@de.abb.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
Loading…
Reference in New Issue