-
Notifications
You must be signed in to change notification settings - Fork 9
Presentation on rewriting git history #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /.quarto/ | ||
| output |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| title: Reveal.js quarto extension with corporate identity of the Flemish government | ||
| author: Thierry Onkelinx | ||
| version: 0.0.1 | ||
| contributes: | ||
| knitr: | ||
| opts_chunk: | ||
| echo: false | ||
| message: false | ||
| warning: false | ||
| fig-height: 5.7 | ||
| fig-width: 12 | ||
| formats: | ||
| revealjs: | ||
| theme: [default, slides.scss] | ||
| css: entity.css | ||
| transition: convex | ||
| width: 1244 | ||
| height: 700 | ||
| navigation-mode: vertical | ||
| controls-layout: bottom-right | ||
| controls-tutorial: true | ||
| slide-number: c/t | ||
| show-slide-number: all | ||
| slide-level: 2 | ||
| email-obfuscation: javascript | ||
| embed-resources: true | ||
| chalkboard: false | ||
| preview-links: true | ||
| output-file: index.html | ||
| df-print: kable | ||
| progress: true | ||
| csl: research-institute-for-nature-and-forest.csl | ||
| template: partials/template.html | ||
| template-partials: | ||
| - partials/title-slide.html | ||
| format-resources: | ||
| - research-institute-for-nature-and-forest.csl | ||
| - css/entity.css | ||
| - fonts/FlandersArtSans-Bold.ttf | ||
| - fonts/FlandersArtSans-Light.ttf | ||
| - fonts/FlandersArtSans-Medium.ttf | ||
| - fonts/FlandersArtSans-Regular.ttf | ||
| - fonts/Inconsolata-Bold.ttf | ||
| - fonts/Inconsolata-Light.ttf | ||
| - fonts/Inconsolata-Medium.ttf | ||
| - fonts/Inconsolata-Regular.ttf | ||
| - img/flanders-en-intermediate.png | ||
| - img/flanders-en-slide.png | ||
| - img/flanders-en-title.png | ||
| - img/flanders-nl-intermediate.jpg | ||
| - img/flanders-nl-slide.jpg | ||
| - img/flanders-nl-transparent.png | ||
| - img/flanders-nl-title.png | ||
| - img/inbo-en-black.jpg | ||
| - img/inbo-en-title.png | ||
| - img/inbo-en-white.png | ||
| - img/inbo-nl-black.png | ||
| - img/inbo-nl-title.png | ||
| - img/inbo-nl-white.png | ||
| filters: | ||
| - filters/translations.lua | ||
| - filters/url.lua |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| .trapezium { | ||
| background: var(--flandersqmd-level1-trapezium); | ||
| } | ||
|
|
||
| .reveal h1, .reveal h1 code { | ||
| color: var(--flandersqmd-level1-colour); | ||
| } | ||
|
|
||
| .reveal h2, .reveal h2 code { | ||
| color: var(--flandersqmd-level2-colour); | ||
| } | ||
|
|
||
| .reveal .title, .reveal .title code { | ||
| color: var(--flandersqmd-title-colour); | ||
| } | ||
|
|
||
| .sidebar { | ||
| background-color: var(--flandersqmd-sidebar-bg); | ||
| } | ||
|
|
||
| .sidebar-tussen { | ||
| background-color: var(--flandersqmd-level1-bg); | ||
| } | ||
|
|
||
| .sidebar-url { | ||
| color: var(--flandersqmd-sidebar-colour); | ||
| } | ||
|
|
||
| .sidebar-url-tussen { | ||
| color: var(--flandersqmd-sidebar-tussen-colour); | ||
| } | ||
|
|
||
| .title-entity { | ||
| color: var(--flandersqmd-title-border); | ||
| } | ||
|
|
||
| caption { | ||
| color: var(--flandersqmd-level2-colour); | ||
| } | ||
|
|
||
| figcaption { | ||
| color: var(--flandersqmd-level2-colour); | ||
| } | ||
|
|
||
| .reveal .slide aside, .reveal .slide div.aside { | ||
| color: var(--flandersqmd-footnote); | ||
| } | ||
|
|
||
| .panel-tabset [role=tablist] { | ||
| border-bottom-color: var(--flandersqmd-border); | ||
| } | ||
|
|
||
| .panel-tabset [role=tab] { | ||
| border-top-color: var(--flandersqmd-border); | ||
| border-left-color: var(--flandersqmd-border); | ||
| border-right-color: var(--flandersqmd-border); | ||
| } | ||
|
|
||
| .panel-tabset [role=tab][aria-selected=true] { | ||
| border-top-color: var(--flandersqmd-border); | ||
| border-left-color: var(--flandersqmd-border); | ||
| border-right-color: var(--flandersqmd-border); | ||
| } | ||
|
|
||
| .reveal div.callout.callout-note { | ||
| border-left-color: var(--flandersqmd-callout-note-border); | ||
| } | ||
|
|
||
| .reveal div.callout.callout-note.callout-style-default .callout-title{ | ||
| background-color: var(--flandersqmd-callout-note-bg); | ||
| } | ||
|
|
||
| .reveal div.callout.callout-tip { | ||
| border-left-color: var(--flandersqmd-callout-tip-border); | ||
| } | ||
|
|
||
| .reveal div.callout.callout-tip.callout-style-default .callout-title{ | ||
| background-color: var(--flandersqmd-callout-tip-bg); | ||
| } | ||
|
|
||
| .reveal div.callout.callout-caution { | ||
| border-left-color: var(--flandersqmd-callout-caution-border); | ||
| } | ||
|
|
||
| .reveal div.callout.callout-caution.callout-style-default .callout-title{ | ||
| background-color: var(--flandersqmd-callout-caution-bg); | ||
| } | ||
|
|
||
| .reveal div.callout.callout-warning { | ||
| border-left-color: var(--flandersqmd-callout-warning-border); | ||
| } | ||
|
|
||
| .reveal div.callout.callout-note.warning-style-default .callout-title{ | ||
| background-color: var(--flandersqmd-callout-warning-bg); | ||
| } | ||
|
|
||
| .reveal div.callout.callout-important { | ||
| border-left-color: var(--flandersqmd-callout-important-border); | ||
| } | ||
|
|
||
| .reveal div.callout.callout-important.callout-style-default .callout-title{ | ||
| background-color: var(--flandersqmd-callout-important-bg); | ||
| } | ||
|
|
||
| .photographer { | ||
| color: var(--flandersqmd-title-colour); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,225 @@ | ||
| function is_empty(s) | ||
| return s == nil or s == '' | ||
| end | ||
|
|
||
| function entity_en(entity, level) | ||
| local result | ||
| if (entity == "INBO") then | ||
| result = { | ||
| url = "https://www.vlaanderen.be/inbo/en", | ||
| entity_name = "Research Institute for Nature and Forest (INBO)", | ||
| } | ||
| if is_empty(level) or tonumber(pandoc.utils.stringify(level)) < 2 then | ||
| result.entity_title_logo = "inbo-en-black.jpg" | ||
| else | ||
| result.entity_title_logo = "inbo-en-white.png" | ||
| end | ||
| else | ||
| result = { | ||
| url = "invalid `flandersqmd.entity`" | ||
| } | ||
| end | ||
| result.flanders_title_logo = "flanders-en-title.png" | ||
| result.flanders_alt = "Flanders, state of the art" | ||
| result.title_logo_style = "max-width: 205px;" | ||
| return result | ||
| end | ||
|
|
||
| function entity_nl(entity, level) | ||
| local result | ||
| if (entity == "INBO") then | ||
| result = { | ||
| url = "https://www.vlaanderen.be/inbo", | ||
| entity_name = "Instituut voor Natuur- en Bosonderzoek (INBO)", | ||
| flanders_alt = "Vlaanderen is wetenschap" | ||
| } | ||
| if is_empty(level) or tonumber(pandoc.utils.stringify(level)) < 2 then | ||
| result.flanders_title_logo = "flanders-nl-intermediate.jpg" | ||
| result.entity_title_logo = "inbo-nl-black.png" | ||
| result.title_logo_style = "max-width: 245px;" | ||
| else | ||
| result.flanders_title_logo = "flanders-nl-transparent.png" | ||
| result.entity_title_logo = "inbo-nl-white.png" | ||
| result.title_logo_style = "max-width: 250px;" | ||
| end | ||
| else | ||
| result = { | ||
| url = "invalid `flandersqmd.entity`" | ||
| } | ||
| end | ||
| return result | ||
| end | ||
|
|
||
| function translation(lang, entity, level) | ||
| if (lang == "nl-BE") then | ||
| result = entity_nl(entity, level) | ||
| else | ||
| result = entity_en(entity, level) | ||
| end | ||
| return result | ||
| end | ||
|
|
||
| function display_person (person, i) | ||
| res = "" | ||
| if is_empty(person.name) then | ||
| res = '<h1 class = "missing">!!! flandersqmd.authors element ' .. i .. ' has no name element!!!</h1>' | ||
| return res | ||
| end | ||
| if is_empty(person.name.given) then | ||
| res = '<h1 class = "missing">!!! flandersqmd.authors element ' .. i .. ' has no given element under name!!!</h1>' | ||
| return res | ||
| end | ||
| if is_empty(person.name.family) then | ||
| res = '<h1 class = "missing">!!! flandersqmd.authors element ' .. i .. ' has no given element under name!!!</h1>' | ||
| return res | ||
| end | ||
| if is_empty(person.email) then | ||
| res = pandoc.utils.stringify(person.name.given) .. ' ' .. pandoc.utils.stringify(person.name.family) | ||
| else | ||
| res = res .. '<a href= "mailto:' .. pandoc.utils.stringify(person.email) .. '" class = "title email">' .. pandoc.utils.stringify(person.name.given) .. ' ' .. pandoc.utils.stringify(person.name.family) .. '</a>' | ||
| end | ||
| if (is_empty(person.orcid)) then | ||
| return res | ||
| end | ||
| res = res .. '<a href="https://orcid.org/' .. pandoc.utils.stringify(person.orcid) .. '" class="quarto-title-author-orcid"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iI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(author) | ||
| if is_empty(author) then | ||
| return '!!! Missing flandersqmd.author !!!' | ||
| end | ||
| z ='' | ||
| for i, person in pairs(author) do | ||
| z = z .. display_person(person, i) .. ' ' | ||
| end | ||
| return pandoc.RawInline('html', z) | ||
| end | ||
|
|
||
| function levelcss (entity) | ||
| local css | ||
| css = ':root {\n' | ||
| css = css .. ' --flanders-white: #FFFFFF;\n' | ||
| css = css .. ' --inbo-darkblue: #282A72;\n' | ||
| css = css .. ' --inbo-darkblue-40: #282A7266;\n' | ||
| css = css .. ' --inbo-darkgreen: #006635;\n' | ||
| css = css .. ' --inbo-darkgreen-40: #00663566;\n' | ||
| css = css .. ' --inbo-orange: #EF972C;\n' | ||
| css = css .. ' --inbo-orange-40: #EF972C66;\n' | ||
| css = css .. ' --inbo-yellow: #FFCD34;\n' | ||
| css = css .. ' --inbo-yellow-40: #FFCD3466;\n' | ||
| css = css .. ' --inbo-red: #BE3254;\n' | ||
| css = css .. ' --inbo-red-40: #BE325466;\n' | ||
| if (entity == "inbo") then | ||
| css = css .. ' --inbo-black: #000000;\n' | ||
| css = css .. ' --inbo-gray: #8E9DA7;\n' | ||
| css = css .. ' --inbo-fushia: #C04384;\n' | ||
| css = css .. ' --inbo-blue: #356196;\n' | ||
| css = css .. ' --inbo-lightblue: #BDDDD7;\n' | ||
|
|
||
| css = css .. ' --flandersqmd-border: var(--inbo-fushia);\n' | ||
| css = css .. ' --flandersqmd-callout-note-border: var(--inbo-darkblue);\n' | ||
| css = css .. ' --flandersqmd-callout-note-bg: var(--inbo-darkblue-40);\n' | ||
| css = css .. ' --flandersqmd-callout-tip-border: var(--inbo-darkgreen);\n' | ||
| css = css .. ' --flandersqmd-callout-tip-bg: var(--inbo-darkgreen-40);\n' | ||
| css = css .. ' --flandersqmd-callout-caution-border: var(--inbo-orange);\n' | ||
| css = css .. ' --flandersqmd-callout-caution-bg: var(--inbo-orange-40);\n' | ||
| css = css .. ' --flandersqmd-callout-warning-border: var(--inbo-yellow);\n' | ||
| css = css .. ' --flandersqmd-callout-warning-bg: var(--inbo-yellow-40);\n' | ||
| css = css .. ' --flandersqmd-callout-important-border: var(--inbo-red);\n' | ||
| css = css .. ' --flandersqmd-callout-important-bg: var(--inbo-red-40);\n' | ||
| css = css .. ' --flandersqmd-footnote: var(--inbo-gray);\n' | ||
| css = css .. ' --flandersqmd-level1-colour: var(--flanders-white);\n' | ||
| css = css .. ' --flandersqmd-level1-trapezium: var(--inbo-fushia);\n' | ||
| css = css .. ' --flandersqmd-level2-colour: var(--inbo-fushia);\n' | ||
| css = css .. ' --flandersqmd-link-colour: var(--inbo-blue);\n' | ||
| css = css .. ' --flandersqmd-sidebar-bg: var(--inbo-fushia);\n' | ||
| css = css .. ' --flandersqmd-sidebar-colour: var(--flanders-white);\n' | ||
| css = css .. ' --flandersqmd-sidebar-tussen-colour: var(--inbo-fushia);\n' | ||
| css = css .. ' --quarto-hl-fu-color: var(--inbo-black);\n' | ||
| css = css .. ' --r-link-color: var(--inbo-blue);\n' | ||
| css = css .. ' --r-link-color-hover: var(----inbo-lightblue);\n' | ||
| css = css .. ' --r-main-color: var(--inbo-black);\n' | ||
| else | ||
| css = css .. ' --flanders-canary-yellow: #FFED00;\n' | ||
| css = css .. ' --flanders-dark-yellow: #F0D70F;\n' | ||
| css = css .. ' --flanders-black: #3C3D3C;\n' | ||
| css = css .. ' --flanders-gray: #D5D5D5;\n' | ||
| css = css .. ' --flanders-dark-blue: #215E9E;\n' | ||
| css = css .. ' --flanders-light-blue: #32B2E9;\n' | ||
|
|
||
| css = css .. ' --flandersqmd-border: var(--flanders-dark-yellow);\n' | ||
| css = css .. ' --flandersqmd-footnote: var(--flanders-gray);\n' | ||
| css = css .. ' --flandersqmd-level1-trapezium: var(--flanders-canary-yellow);\n' | ||
| css = css .. ' --flandersqmd-level1-colour: var(--flanders-black);\n' | ||
| css = css .. ' --flandersqmd-level2-colour: var(--flanders-dark-yellow);\n' | ||
| css = css .. ' --flandersqmd-link-colour: var(--flanders-dark-blue);\n' | ||
| css = css .. ' --flandersqmd-sidebar-bg: var(--flanders-canary-yellow);\n' | ||
| css = css .. ' --flandersqmd-sidebar-colour: var(--flanders-black);\n' | ||
| css = css .. ' --flandersqmd-sidebar-tussen-colour: var(--flanders-black);\n' | ||
| css = css .. ' --quarto-hl-fu-color: var(--flanders-black);\n' | ||
| css = css .. ' --r-link-color: var(--flanders-dark-blue);\n' | ||
| css = css .. ' --r-link-color-hover: var(--flanders-dark-blue);\n' | ||
| css = css .. ' --r-main-color: var(--flanders-black);\n' | ||
| end | ||
| css = css .. ' --flandersqmd-callout-note-border: var(--inbo-darkblue);\n' | ||
| css = css .. ' --flandersqmd-callout-note-bg: var(--inbo-darkblue-40);\n' | ||
| css = css .. ' --flandersqmd-callout-tip-border: var(--inbo-darkgreen);\n' | ||
| css = css .. ' --flandersqmd-callout-tip-bg: var(--inbo-darkgreen-40);\n' | ||
| css = css .. ' --flandersqmd-callout-caution-border: var(--inbo-orange);\n' | ||
| css = css .. ' --flandersqmd-callout-caution-bg: var(--inbo-orange-40);\n' | ||
| css = css .. ' --flandersqmd-callout-warning-border: var(--inbo-yellow);\n' | ||
| css = css .. ' --flandersqmd-callout-warning-bg: var(--inbo-yellow-40);\n' | ||
| css = css .. ' --flandersqmd-callout-important-border: var(--inbo-red);\n' | ||
| css = css .. ' --flandersqmd-callout-important-bg: var(--inbo-red-40);\n' | ||
| css = css .. ' --flandersqmd-title-colour: var(--flanders-white);\n' | ||
| css = css .. ' --flandersqmd-title-border: var(--flanders-white);\n' | ||
| css = css .. ' --flandersqmd-level1-bg: var(--flanders-white);\n' | ||
| css = css .. ' --r-main-font: flanders_art_sanslight, Calibri, Source Sans Pro, Helvetica, sans-serif;\n' | ||
| css = css .. ' --r-heading-font-weight: 400;\n' | ||
| css = css .. '}\n' | ||
| return css | ||
| end | ||
|
|
||
| return { | ||
| { | ||
| Meta = function(meta) | ||
| if is_empty(meta.flandersqmd) then | ||
| meta.title = "No `flandersqmd` entry found in yaml" | ||
| meta.entitycolours = 'flanders' | ||
| meta.translation = translation( | ||
| pandoc.utils.stringify(meta.lang), "INBO" | ||
| ) | ||
| else | ||
| if is_empty(meta.flandersqmd.entity) then | ||
| meta.translation = translation( | ||
| pandoc.utils.stringify(meta.lang), "INBO", meta.flandersqmd.level | ||
| ) | ||
| else | ||
| meta.translation = translation( | ||
| pandoc.utils.stringify(meta.lang), | ||
| pandoc.utils.stringify(meta.flandersqmd.entity), | ||
| meta.flandersqmd.level | ||
| ) | ||
| end | ||
| if is_empty(meta.flandersqmd.title) then | ||
| meta.title = "missing `flandersqmd:title`" | ||
| else | ||
| meta.title = pandoc.utils.stringify(meta.flandersqmd.title) | ||
| end | ||
| if is_empty(meta.flandersqmd.level) or tonumber(pandoc.utils.stringify(meta.flandersqmd.level)) < 2 then | ||
| meta.entitycolours = 'flanders' | ||
| else | ||
| if is_empty(meta.flandersqmd.entity) then | ||
| meta.entitycolours = 'inbo' | ||
| else | ||
| meta.entitycolours = pandoc.text.lower(pandoc.utils.stringify(meta.flandersqmd.entity)) | ||
| end | ||
| end | ||
| meta.title_author = title_author(meta.flandersqmd.author) | ||
| end | ||
| meta.entitycss = levelcss(meta.entitycolours) | ||
| return meta | ||
| end, | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The selector
.reveal div.callout.callout-note.warning-style-default .callout-titlelooks like a typo (it targets a note callout, not a warning callout). As written, warning callouts may not get the intended title background color; this likely should target.callout-warningand the standard callout style class.