Created
March 9, 2023 19:12
-
-
Save srozb/a1b7cb49595689b085daa97df2e90e3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nimib | |
import nimiSlides | |
const THEME = Black | |
#themes: Black, Beige, Blood, League, Moon, Night, Serif, Simple, Sky, Solarized, White | |
nbInit(theme = revealTheme) | |
export nb | |
template trainingTheme*() = | |
setSlidesTheme(THEME) | |
let lnkCol = "#FFE953" | |
nb.addStyle: """ | |
:root { | |
--r-heading-color: $1; | |
--r-background-color: #181922; | |
--r-link-color: $1; | |
--r-selection-color: $1; | |
--r-link-color-dark: darken($1 , 15%) | |
} | |
.reveal ul, .reveal ol { | |
display: block; | |
text-align: left; | |
} | |
.reveal img { | |
max-height: 40vh; | |
} | |
li::marker { | |
color: $1; | |
content: "»"; | |
} | |
li { | |
padding-left: 12px; | |
} | |
""" % [lnkCol] | |
template cimage = cornerImage("img/at.png", UpperRight, size=100, animate=false) | |
template caSlide*(body: untyped) = | |
slide: | |
cimage | |
body | |
template caSlide*(title: string, body: untyped) = | |
slide(slideOptions(autoAnimate=true)): # DO PRZEMYSLENIA | |
cimage | |
nbText: "## " & title | |
body | |
template caSlide*(title: string, image: string, body: untyped) = | |
slide(slideOptions(imageBackground=image, autoAnimate=true)): | |
cimage | |
nbText: "## " & title | |
body | |
template cycleSlide*(title: string, images: seq[string], captions: seq[string]) = | |
assert images.len == captions.len | |
for i in 0..<images.len: | |
caSlide(title): | |
nbText: captions[i] | |
nbImage: images[i] | |
template cycleSlide*(title: string, images: seq[string], caption: string) = | |
for i in 0..<images.len: | |
caSlide(title): | |
nbText: caption | |
nbImage: images[i] | |
template listText*(text: string) = | |
listItem: nbText: text | |
template listText*(fragnentAnimation: FragmentAnimation, text: string) = | |
fragmentNext(fadeInThenSemiOut): | |
listItem fragnentAnimation: nbText: text | |
template listText*(fragnentAnimation: seq[FragmentAnimation], text: string) = | |
fragmentNext(fadeInThenSemiOut): | |
listItem fragnentAnimation: nbText: text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment