Created theme
This commit is contained in:
commit
424eeef545
14 changed files with 453 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
result
|
||||||
|
*.pdf
|
||||||
82
flake.lock
generated
Normal file
82
flake.lock
generated
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1749285348,
|
||||||
|
"narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"typix": "typix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"typix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1749285967,
|
||||||
|
"narHash": "sha256-YSV7TTCUAQcBJ3RUmQHbn7fDMTY4TjFGd20yzDQfZPk=",
|
||||||
|
"owner": "loqusion",
|
||||||
|
"repo": "typix",
|
||||||
|
"rev": "a586455f69a0c80a8f31ddb8fc34e3380b4477b2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "loqusion",
|
||||||
|
"repo": "typix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
155
flake.nix
Normal file
155
flake.nix
Normal file
|
|
@ -0,0 +1,155 @@
|
||||||
|
{
|
||||||
|
description = "A Typst project";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
typix = {
|
||||||
|
url = "github:loqusion/typix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
|
# Example of downloading icons from a non-flake source
|
||||||
|
# font-awesome = {
|
||||||
|
# url = "github:FortAwesome/Font-Awesome";
|
||||||
|
# flake = false;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = inputs @ {
|
||||||
|
nixpkgs,
|
||||||
|
typix,
|
||||||
|
flake-utils,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
typixLib = typix.lib.${system};
|
||||||
|
|
||||||
|
src = typixLib.cleanTypstSource ./.;
|
||||||
|
commonArgs = {
|
||||||
|
typstSource = "main.typ";
|
||||||
|
|
||||||
|
fontPaths = [
|
||||||
|
# Add paths to fonts here
|
||||||
|
# "${pkgs.roboto}/share/fonts/truetype"
|
||||||
|
"./template/resources"
|
||||||
|
];
|
||||||
|
|
||||||
|
virtualPaths = [
|
||||||
|
# Add paths that must be locally accessible to typst here
|
||||||
|
# {
|
||||||
|
# dest = "icons";
|
||||||
|
# src = "${inputs.font-awesome}/svgs/regular";
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# dest = "./graphics/";
|
||||||
|
# src = ./graphics;
|
||||||
|
# }
|
||||||
|
#{
|
||||||
|
# dest = "./bibliography.bib";
|
||||||
|
# src = ./bibliography.bib;
|
||||||
|
#}
|
||||||
|
{
|
||||||
|
dest = "./template/";
|
||||||
|
src = ./template;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
unstable_typstPackages = [
|
||||||
|
{
|
||||||
|
name = "touying";
|
||||||
|
version = "0.6.1";
|
||||||
|
hash = "sha256-bTDc32MU4GPbUbW5p4cRSxsl9ODR6qXinvQGeHu2psU=";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "cetz-plot";
|
||||||
|
version = "0.1.1";
|
||||||
|
hash= "sha256-w5n7gCT6gDtxMvYjDhrwrPjT0b2M69whEUDByjTYDtQ=";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "cetz";
|
||||||
|
version = "0.3.4";
|
||||||
|
hash = "sha256-5w3UYRUSdi4hCvAjrp9HslzrUw7BhgDdeCiDRHGvqd4=";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "cetz";
|
||||||
|
version = "0.3.2";
|
||||||
|
hash = "sha256-3Abz+31Y61rZUnnKlXayqIsEYEOaD47BQPUMwm0i0xA=";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "oxifmt";
|
||||||
|
version = "0.2.1";
|
||||||
|
hash = "sha256-8PNPa9TGFybMZ1uuJwb5ET0WGIInmIgg8h24BmdfxlU=";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "codly";
|
||||||
|
version = "1.3.0";
|
||||||
|
hash = "sha256-WcqvySmSYpWW+TmZT7TgPFtbEHA+bP5ggKPll0B8fHk=";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "codly-languages";
|
||||||
|
version = "0.1.1";
|
||||||
|
hash= "sha256-TSp3unFhn3NSaWhWYZb/i3rD4OolbNZNTdQeBxJ4Jfs=";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "fletcher";
|
||||||
|
version = "0.5.8";
|
||||||
|
hash = "sha256-kKVp5WN/EbHEz2GCTkr8i8DRiAdqlr4R7EW6drElgWk=";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Compile a Typst project, *without* copying the result
|
||||||
|
# to the current directory
|
||||||
|
build-drv = typixLib.buildTypstProject (commonArgs
|
||||||
|
// {
|
||||||
|
inherit src unstable_typstPackages;
|
||||||
|
});
|
||||||
|
|
||||||
|
# Compile a Typst project, and then copy the result
|
||||||
|
# to the current directory
|
||||||
|
build-script = typixLib.buildTypstProjectLocal (commonArgs
|
||||||
|
// {
|
||||||
|
inherit src unstable_typstPackages;
|
||||||
|
});
|
||||||
|
|
||||||
|
# Watch a project and recompile on changes
|
||||||
|
watch-script = typixLib.watchTypstProject commonArgs;
|
||||||
|
in {
|
||||||
|
checks = {
|
||||||
|
inherit build-drv build-script watch-script;
|
||||||
|
};
|
||||||
|
|
||||||
|
packages.default = build-drv;
|
||||||
|
|
||||||
|
apps = rec {
|
||||||
|
default = watch;
|
||||||
|
build = flake-utils.lib.mkApp {
|
||||||
|
drv = build-script;
|
||||||
|
};
|
||||||
|
watch = flake-utils.lib.mkApp {
|
||||||
|
drv = watch-script;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.default = typixLib.devShell {
|
||||||
|
inherit (commonArgs) fontPaths virtualPaths;
|
||||||
|
packages = [
|
||||||
|
# WARNING: Don't run `typst-build` directly, instead use `nix run .#build`
|
||||||
|
# See https://github.com/loqusion/typix/issues/2
|
||||||
|
# build-script
|
||||||
|
watch-script
|
||||||
|
# More packages can be added here, like typstfmt
|
||||||
|
# pkgs.typstfmt
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
30
main.typ
Normal file
30
main.typ
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
#import "@preview/touying:0.6.1": *
|
||||||
|
#import "./template/conf.typ": *
|
||||||
|
|
||||||
|
#show: tum-slides.with(
|
||||||
|
aspect-ratio: "16-9",
|
||||||
|
//language: "de",
|
||||||
|
config-info(
|
||||||
|
title: [Presentation Title],
|
||||||
|
// Author to be shown in the title slide
|
||||||
|
author: [Author],
|
||||||
|
// Author to be shown in the footer
|
||||||
|
footer-author: [Author],
|
||||||
|
date: datetime.today(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
= Section
|
||||||
|
|
||||||
|
== First Slide
|
||||||
|
|
||||||
|
- Content on the first slide
|
||||||
|
|
||||||
|
== Second Slide
|
||||||
|
|
||||||
|
- Content on the second slide
|
||||||
|
|
||||||
|
= Second Section
|
||||||
|
|
||||||
|
== Last slide
|
||||||
178
template/conf.typ
Normal file
178
template/conf.typ
Normal file
|
|
@ -0,0 +1,178 @@
|
||||||
|
#import "@preview/touying:0.6.1": *
|
||||||
|
|
||||||
|
#let slide(title: auto, ..args) = touying-slide-wrapper(self => {
|
||||||
|
let info = self.info + args.named()
|
||||||
|
if title != auto {
|
||||||
|
self.store.title = title
|
||||||
|
}
|
||||||
|
let header(self) = {
|
||||||
|
set align(top)
|
||||||
|
set text(fill: rgb("0065BD"), size: 25pt, weight: "bold")
|
||||||
|
place(top + right,
|
||||||
|
dx: -1em,
|
||||||
|
dy: 1em,
|
||||||
|
image("./resources/TUM_Logo_blau.svg", width: 7%)
|
||||||
|
)
|
||||||
|
v(1.5em)
|
||||||
|
h(1em)
|
||||||
|
utils.display-current-heading(level: 1)
|
||||||
|
v(-1.6em)
|
||||||
|
linebreak()
|
||||||
|
h(1em)
|
||||||
|
set text(fill: rgb("005293"), size: 20pt)
|
||||||
|
if self.store.title != none {
|
||||||
|
utils.call-or-display(self, self.store.title)
|
||||||
|
} else {
|
||||||
|
utils.display-current-heading(level: 2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let footer(self) = {
|
||||||
|
set align(bottom)
|
||||||
|
show: pad.with(.4em)
|
||||||
|
set text(size: 14pt)
|
||||||
|
h(1em)
|
||||||
|
h(1fr)
|
||||||
|
grid(
|
||||||
|
columns: (1fr, 4fr, 1fr, 1fr),
|
||||||
|
align: center,
|
||||||
|
grid.cell(align: left)[
|
||||||
|
#h(1em)
|
||||||
|
#info.footer-author],
|
||||||
|
info.title,
|
||||||
|
utils.display-info-date(self),
|
||||||
|
grid.cell(align: right)[
|
||||||
|
#context [#utils.slide-counter.display()/#utils.last-slide-number] #h(1em)]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
self = utils.merge-dicts(
|
||||||
|
self,
|
||||||
|
config-page(
|
||||||
|
header: header,
|
||||||
|
footer: footer,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
touying-slide(self: self, ..args)
|
||||||
|
})
|
||||||
|
|
||||||
|
#let title-slide(..args) = touying-slide-wrapper(self => {
|
||||||
|
let info = self.info + args.named()
|
||||||
|
let header = {
|
||||||
|
set text(fill: rgb("0065BD"), size: 25pt, weight: "bold")
|
||||||
|
place(top + right,
|
||||||
|
dx: -1em,
|
||||||
|
dy: 1em,
|
||||||
|
image("./resources/TUM_Logo_blau.svg", width: 7%)
|
||||||
|
)
|
||||||
|
place(top + left,
|
||||||
|
dy: 3em,
|
||||||
|
dx: 0.9em,
|
||||||
|
grid(
|
||||||
|
columns: (3fr, 1fr),
|
||||||
|
[
|
||||||
|
#set text(fill: rgb("0065BD"), size: 32pt, weight: "bold")
|
||||||
|
#info.title
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
let body = {
|
||||||
|
set text(weight: "bold")
|
||||||
|
v(5em)
|
||||||
|
info.author
|
||||||
|
|
||||||
|
v(2em)
|
||||||
|
set text(weight: "regular")
|
||||||
|
utils.display-info-date(self)
|
||||||
|
|
||||||
|
place(bottom + right,
|
||||||
|
dx: 2em,
|
||||||
|
dy: 2em,
|
||||||
|
image("./resources/TUM_Tower.png", width: 50%)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
self = utils.merge-dicts(
|
||||||
|
self,
|
||||||
|
config-page(
|
||||||
|
header: header,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
touying-slide(self: self, body)
|
||||||
|
})
|
||||||
|
|
||||||
|
#let outline-slide(..args) = touying-slide-wrapper(self => {
|
||||||
|
let header = {
|
||||||
|
set text(fill: rgb("0065BD"), size: 25pt, weight: "bold")
|
||||||
|
place(top + right,
|
||||||
|
dx: -1em,
|
||||||
|
dy: 1em,
|
||||||
|
image("./resources/TUM_Logo_blau.svg", width: 7%)
|
||||||
|
)
|
||||||
|
place(top + left,
|
||||||
|
dy: 3em,
|
||||||
|
dx: 0.9em,
|
||||||
|
grid(
|
||||||
|
columns: (3fr, 1fr),
|
||||||
|
[
|
||||||
|
#set text(fill: rgb("0065BD"), size: 25pt, weight: "bold")
|
||||||
|
Outline
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
let body = {
|
||||||
|
|
||||||
|
show outline.entry: it => link(
|
||||||
|
it.element.location(),
|
||||||
|
[
|
||||||
|
#it.body() #linebreak() #v(1em)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
align(horizon)[
|
||||||
|
#outline(title: none, depth: 1)
|
||||||
|
//#utils.slide-counter.update(0)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
self = utils.merge-dicts(
|
||||||
|
self,
|
||||||
|
config-page(
|
||||||
|
header: header,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
touying-slide(self: self, body)
|
||||||
|
})
|
||||||
|
|
||||||
|
#let tum-slides(
|
||||||
|
aspect-ratio: "16-9",
|
||||||
|
footer: none,
|
||||||
|
..args,
|
||||||
|
language: "en",
|
||||||
|
body,
|
||||||
|
) = {
|
||||||
|
set text(size: 20pt, font: "TUM Neue Helvetica", lang: language)
|
||||||
|
set par(spacing: 0.6em)
|
||||||
|
|
||||||
|
show: touying-slides.with(
|
||||||
|
config-page(
|
||||||
|
paper: "presentation-" + aspect-ratio,
|
||||||
|
margin: (top: 5.5em, left: 1.2em),
|
||||||
|
),
|
||||||
|
config-common(
|
||||||
|
slide-fn: slide,
|
||||||
|
datetime-format: "[day].[month].[year]"
|
||||||
|
),
|
||||||
|
config-store(
|
||||||
|
title: none,
|
||||||
|
footer: footer,
|
||||||
|
),
|
||||||
|
..args,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
title-slide()
|
||||||
|
|
||||||
|
outline-slide()
|
||||||
|
|
||||||
|
body
|
||||||
|
}
|
||||||
|
|
||||||
BIN
template/resources/TUMNeueHelvetica-Bold.ttf
Executable file
BIN
template/resources/TUMNeueHelvetica-Bold.ttf
Executable file
Binary file not shown.
BIN
template/resources/TUMNeueHelvetica-BoldItalic.ttf
Executable file
BIN
template/resources/TUMNeueHelvetica-BoldItalic.ttf
Executable file
Binary file not shown.
BIN
template/resources/TUMNeueHelvetica-Italic.ttf
Executable file
BIN
template/resources/TUMNeueHelvetica-Italic.ttf
Executable file
Binary file not shown.
BIN
template/resources/TUMNeueHelvetica-Regular.ttf
Executable file
BIN
template/resources/TUMNeueHelvetica-Regular.ttf
Executable file
Binary file not shown.
BIN
template/resources/TUM_Flags_169.png
Normal file
BIN
template/resources/TUM_Flags_169.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 430 KiB |
BIN
template/resources/TUM_Flags_43.png
Normal file
BIN
template/resources/TUM_Flags_43.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 399 KiB |
6
template/resources/TUM_Logo_blau.svg
Normal file
6
template/resources/TUM_Logo_blau.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" id="Ebene_1" x="0px" y="0px" width="408.16" height="212.46684" viewBox="-16.014 -31 408.16 212.46684" enable-background="new -16.014 -31 149 114" xml:space="preserve" sodipodi:docname="TUM_Web_Logo_blau.svg" inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"><metadata id="metadata13"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title>TUM_Web_Logo_blau</dc:title></cc:Work></rdf:RDF></metadata><defs id="defs11"/><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1920" inkscape:window-height="986" id="namedview9" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:zoom="1.754386" inkscape:cx="124.61021" inkscape:cy="115.2546" inkscape:window-x="-11" inkscape:window-y="-11" inkscape:window-maximized="1" inkscape:current-layer="Ebene_1"/>
|
||||||
|
<title id="title2">TUM_Web_Logo_blau</title>
|
||||||
|
<desc id="desc4">TUM</desc>
|
||||||
|
<path fill="#3070b3" d="m 140.54052,-31 v 173.32822 h 44.72985 V -31 H 392.146 V 181.46685 H 353.00738 V 8.138629 H 308.2775 V 181.46685 H 269.13887 V 8.138629 H 224.40902 V 181.46685 H 101.4019 V 8.138629 H 62.26327 V 181.46685 H 23.12462 V 8.138629 H -16.014 V -31 Z" id="path6" style="stroke-width:5.59123"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
BIN
template/resources/TUM_Tower.png
Normal file
BIN
template/resources/TUM_Tower.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 240 KiB |
BIN
template/resources/TUM_Tower_white.png
Normal file
BIN
template/resources/TUM_Tower_white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
Loading…
Add table
Add a link
Reference in a new issue