Skip to content
Snippets Groups Projects
Unverified Commit abff1964 authored by Lukas Kluft's avatar Lukas Kluft
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Showing
with 265 additions and 0 deletions
.DS_Store
/public
/.quarto/
variables:
QUARTO_VERSION: 1.4.551
workflow:
# these rules ensure that whenever there's a merge request, a "merge request pipeline" is run,
# but otherwise a classical branch-pipeline is run. This enables the use of merge-request specific
# environment variables within CI.
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
when: never
- if: '$CI_COMMIT_BRANCH'
before_script:
- python -V # Print out python version for debugging
.build: &build
stage: build
tags:
- conda
variables:
QUARTODEB: quarto_cache/quarto-${QUARTO_VERSION}.deb
cache:
- key: cache-default
paths:
- .jupyter_cache
- quarto_cache
before_script:
- mkdir -p quarto_cache
- if [ ! -f ${QUARTODEB} ] ; then wget "https://github.com/quarto-dev/quarto-cli/releases/download/v${QUARTO_VERSION}/quarto-${QUARTO_VERSION}-linux-amd64.deb" -O ${QUARTODEB} ; fi
- dpkg -i ${QUARTODEB}
- python3 -m pip install -r requirements.txt
- quarto check install
- quarto check jupyter
script:
- quarto render
artifacts:
paths:
- public
expire_in: 20min
preview:
extends: .build
variables:
DEPLOY_URL: https://$CI_PROJECT_NAMESPACE.$CI_PAGES_DOMAIN/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public
environment:
name: review/$CI_COMMIT_REF_NAME
url: $DEPLOY_URL/index.html
rules:
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
pages:
extends: .build
variables:
DEPLOY_URL: https://$CI_PROJECT_NAMESPACE.$CI_PAGES_DOMAIN/$CI_PROJECT_NAME
environment:
name: production
url: $DEPLOY_URL
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# km-scale simulations at MPI-M
[Presentation](https://lkluft.gitlab-pages.dkrz.de/ringberg/slides.html) for CPH retreate 2024 at Ringberg.
_extensions/mpim/MPG_Minerva_mpg-green.png

42.5 KiB

_extensions/mpim/MPI_M_Logo_green_ex.png

39 KiB

title: MPIM layouts for quarto
author: Tobias Kölling
version: 1.0.0
quarto-required: ">=1.3.0"
contributes:
formats:
revealjs:
theme: [slides.scss]
css: _extensions/mpim/fonts/fonts.css
transition: slide
slide-number: c
code-background: true
logo: MPG_Minerva_mpg-green.png
chalkboard:
buttons: true
navigation-mode: vertical
auto-stretch: true
center: true
resources:
- MPI_M_Logo_green_ex.png
- MPG_Minerva_mpg-green.png
- slide_separators/dots.png
- slide_separators/dots_alt.png
- slide_separators/sep01.png
- slide_separators/sep02.png
- slide_separators/sep03.png
- slide_separators/sep04.png
- slide_separators/sep05.png
- slide_separators/sep06.png
- slide_separators/sep07.png
- slide_separators/sep08.png
- slide_separators/sep09.png
- slide_separators/sep10.png
- slide_separators/sep11.png
- slide_separators/sep12.png
- titles/blue.png
- titles/darkgreen.png
- titles/gray.png
- titles/green.png
- titles/lightgreen.png
- titles/white.png
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xFIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xLIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xMIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xIIzIXKMny.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xGIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xHIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xEIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.woff2
- fonts/woff/nunito/v26/XRXK3I6Li01BKofIMPyPbj8d7IEAGXNirXAHgqbcf2z4e9z5MV0.woff
- fonts/woff2/nunito/v26/XRXV3I6Li01BKofINeaBTMnFcQ.woff2
- fonts/woff/nunito/v26/XRXK3I6Li01BKofIMPyPbj8d7IEAGXNirXAHg6bcf2z4e9z5MV0.woff
- fonts/woff/nunito/v26/XRXK3I6Li01BKofIMPyPbj8d7IEAGXNirXAHgKbcf2z4e9z5MV0.woff
- fonts/woff/nunito/v26/XRXK3I6Li01BKofIMPyPbj8d7IEAGXNirXAHiabcf2z4e9z5MV0.woff
- fonts/woff/nunito/v26/XRXK3I6Li01BKofIMPyPbj8d7IEAGXNirXAHjabcf2z4e9z5.woff
- fonts/woff2/nunito/v26/XRXV3I6Li01BKofIO-aBTMnFcQIG.woff2
- fonts/woff2/nunito/v26/XRXV3I6Li01BKofIMeaBTMnFcQIG.woff2
- fonts/woff2/nunito/v26/XRXV3I6Li01BKofIOuaBTMnFcQIG.woff2
- fonts/woff2/nunito/v26/XRXV3I6Li01BKofIOOaBTMnFcQIG.woff2
- fonts/woff2/titilliumweb/v17/NaPAcZTIAOhVxoMyOr9n_E7fdMbWAaxWTL6RsVo_.woff2
- fonts/woff2/titilliumweb/v17/NaPDcZTIAOhVxoMyOr9n_E7ffGjEGItzY5abuWI.woff2
- fonts/woff2/titilliumweb/v17/NaPecZTIAOhVxoMyOr9n_E7fdMPmDaZRbrw.woff2
- fonts/woff2/titilliumweb/v17/NaPDcZTIAOhVxoMyOr9n_E7ffGjEGIVzY5abuWIGxA.woff2
- fonts/woff2/titilliumweb/v17/NaPAcZTIAOhVxoMyOr9n_E7fdMbWD6xWTL6RsQ.woff2
- fonts/woff2/titilliumweb/v17/NaPDcZTIAOhVxoMyOr9n_E7ffHjDGItzY5abuWI.woff2
- fonts/woff2/titilliumweb/v17/NaPecZTIAOhVxoMyOr9n_E7fdM3mDaZRbryhsA.woff2
- fonts/woff2/titilliumweb/v17/NaPDcZTIAOhVxoMyOr9n_E7ffHjDGIVzY5abuWIGxA.woff2
- fonts/otf/Orkney-Bold.otf
- fonts/fonts.css
html:
toc: false
theme: [poster.scss]
css: _extensions/mpim/fonts/fonts.css
page-layout: custom
resources:
- MPI_M_Logo_green_ex.png
- MPG_Minerva_mpg-green.png
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xFIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xLIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfCBc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xMIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xIIzIXKMny.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fCRc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xGIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfBxc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fBxc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xHIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfABc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fABc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu7WxKKTU1Kvnz.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fChc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfCRc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fBBc4AMP6lQ.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu5mxKKTU1Kvnz.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fCBc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu7GxKKTU1Kvnz.woff2
- fonts/woff2/roboto/v30/KFOkCnqEu92Fr1Mu51xEIzIXKMnyrYk.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu7mxKKTU1Kvnz.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfChc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmSU5fCxc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOlCnqEu92Fr1MmWUlfCxc4AMP6lbBP.woff2
- fonts/woff2/roboto/v30/KFOmCnqEu92Fr1Mu4WxKKTU1Kvnz.woff2
- fonts/woff/nunito/v26/XRXK3I6Li01BKofIMPyPbj8d7IEAGXNirXAHgqbcf2z4e9z5MV0.woff
- fonts/woff2/nunito/v26/XRXV3I6Li01BKofINeaBTMnFcQ.woff2
- fonts/woff/nunito/v26/XRXK3I6Li01BKofIMPyPbj8d7IEAGXNirXAHg6bcf2z4e9z5MV0.woff
- fonts/woff/nunito/v26/XRXK3I6Li01BKofIMPyPbj8d7IEAGXNirXAHgKbcf2z4e9z5MV0.woff
- fonts/woff/nunito/v26/XRXK3I6Li01BKofIMPyPbj8d7IEAGXNirXAHiabcf2z4e9z5MV0.woff
- fonts/woff/nunito/v26/XRXK3I6Li01BKofIMPyPbj8d7IEAGXNirXAHjabcf2z4e9z5.woff
- fonts/woff2/nunito/v26/XRXV3I6Li01BKofIO-aBTMnFcQIG.woff2
- fonts/woff2/nunito/v26/XRXV3I6Li01BKofIMeaBTMnFcQIG.woff2
- fonts/woff2/nunito/v26/XRXV3I6Li01BKofIOuaBTMnFcQIG.woff2
- fonts/woff2/nunito/v26/XRXV3I6Li01BKofIOOaBTMnFcQIG.woff2
- fonts/woff2/titilliumweb/v17/NaPAcZTIAOhVxoMyOr9n_E7fdMbWAaxWTL6RsVo_.woff2
- fonts/woff2/titilliumweb/v17/NaPDcZTIAOhVxoMyOr9n_E7ffGjEGItzY5abuWI.woff2
- fonts/woff2/titilliumweb/v17/NaPecZTIAOhVxoMyOr9n_E7fdMPmDaZRbrw.woff2
- fonts/woff2/titilliumweb/v17/NaPDcZTIAOhVxoMyOr9n_E7ffGjEGIVzY5abuWIGxA.woff2
- fonts/woff2/titilliumweb/v17/NaPAcZTIAOhVxoMyOr9n_E7fdMbWD6xWTL6RsQ.woff2
- fonts/woff2/titilliumweb/v17/NaPDcZTIAOhVxoMyOr9n_E7ffHjDGItzY5abuWI.woff2
- fonts/woff2/titilliumweb/v17/NaPecZTIAOhVxoMyOr9n_E7fdM3mDaZRbryhsA.woff2
- fonts/woff2/titilliumweb/v17/NaPDcZTIAOhVxoMyOr9n_E7ffHjDGIVzY5abuWIGxA.woff2
- fonts/otf/Orkney-Bold.otf
- fonts/fonts.css
template-partials:
- title-block.html
filters:
- mpim-title-filter.lua
filters:
- mpim-title-filter.lua
This diff is collapsed.
import re
from pathlib import Path
import requests
import tqdm
import yaml
URL_RE = re.compile(r"url\(([^\)]+)\)")
HEADERS = {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6.1 Safari/605.1.15"
}
def get_fonts(family, target_folder):
res = requests.get(f"https://fonts.googleapis.com/css", params={"family": family}, headers=HEADERS)
res.raise_for_status()
css = res.content.decode("utf-8")
urls = set(URL_RE.findall(css))
resources = []
for url in tqdm.tqdm(urls):
local_path = "/".join([url.split(".")[-1]] + url.split("/")[-3:])
local_url = local_path
resources.append("fonts/" + local_path)
local_path = target_folder / local_path
local_path.parent.mkdir(parents=True, exist_ok=True)
res2 = requests.get(url, headers=HEADERS)
res2.raise_for_status()
content = res2.content
with open(local_path, "wb") as outfile:
outfile.write(content)
css = css.replace(url, local_url)
with open(target_folder / "fonts.css", "a") as outfile:
outfile.write(css)
print(yaml.dump(resources))
def main():
get_fonts("Roboto:light,regular,italic,bold", Path("."))
get_fonts("Nunito:light,regular,italic,bold", Path("."))
get_fonts("Titillium Web:light,regular,italic,bold", Path("."))
if __name__ == "__main__":
exit(main())
File added
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment