Compare commits

..

No commits in common. "67388f2a7ed5cd3408fc24082aa4374523a6c8a5" and "eb0aec2cd3f7e9d863e62db5379c7d3f6bc6a213" have entirely different histories.

27 changed files with 8 additions and 17 deletions

0
.gitignore vendored Executable file → Normal file
View File

0
README.md Executable file → Normal file
View File

0
autocompile.sh Executable file → Normal file
View File

0
cache.py Executable file → Normal file
View File

0
chapters.py Executable file → Normal file
View File

0
fragments.py Executable file → Normal file
View File

0
help-menu.html Executable file → Normal file
View File

0
helper.py Executable file → Normal file
View File

14
main.py
View File

@ -12,18 +12,14 @@ import helper
# stores it in a corresponding slides.lang.html file inside the same directory.
def compile(root, language='en', force_recompile=False, lazyload_images=False, no_helpmenu=False):
def compile(root, language='en', force_recompile=False, lazyload_images=False):
wrapper = open(os.path.join(root, 'layouts/root.html'), 'r', encoding='utf8').read()
compiled_chapters = chapters.compile_chapters(root, language, force_recompile)
wrapper = wrapper.replace('@slides', compiled_chapters)
wrapper = helper.insert_metadata(wrapper, root, language)
wrapper = fragments.defragmentize(wrapper)
wrapper = helper.add_lazyload(wrapper, lazyload_images)
if not no_helpmenu:
with open(os.path.join(root, 'slides.' + language + '.html'), 'w+') as output:
wrapper = helper.add_help_menu(wrapper, root)
wrapper = helper.add_help_menu(wrapper, root)
with open(os.path.join(root, 'slides.' + language + '.html'), 'w+', encoding='utf8') as output:
output.write(wrapper)
print('done')
@ -38,17 +34,15 @@ if __name__ == '__main__':
help="recompile the entire presentation without caches")
parser.add_argument("-i", "--lazyload-images", action='store_true',
help="replace all images' src attributes by data-src for image lazyloading")
parser.add_argument("-n", "--nohelpmenu", action="store_true", help="do not compile the help menu")
args = parser.parse_args()
force_recompile = False or args.force_recompile
lazyload_images = False or args.lazyload_images
no_helpmenu = False or args.nohelpmenu
if args.language == "all":
for language in helper.get_available_languages(args.rootdirectory):
compile(args.rootdirectory, language=language,
force_recompile=force_recompile, lazyload_images=lazyload_images, no_helpmenu=no_helpmenu)
force_recompile=force_recompile, lazyload_images=lazyload_images)
else:
compile(args.rootdirectory, language=args.language,
force_recompile=force_recompile, lazyload_images=lazyload_images, no_helpmenu=no_helpmenu)
force_recompile=force_recompile, lazyload_images=lazyload_images)

0
onpoint.js Executable file → Normal file
View File

0
requirements.txt Executable file → Normal file
View File

3
slides.py Executable file → Normal file
View File

@ -26,10 +26,9 @@ def compile_slide(slide, root_directory):
# very unelegant attempt at inline elements
inline_key = '@' + key + '(inline)'
if inline_key in slide:
filler_without_outer_paragraph = re.sub(r"<p>(.+)</p>", r"\1", filler, flags=re.DOTALL)
slide = slide.replace(
inline_key,
filler_without_outer_paragraph
re.sub(r"<p>(.+)</p>", r"\1", filler)
)
elif '@' + key in slide:

0
structure-draft Executable file → Normal file
View File

0
test/.gitignore vendored Executable file → Normal file
View File

0
test/images/.gitkeep Executable file → Normal file
View File

0
test/layouts/default.html Executable file → Normal file
View File

4
test/layouts/root.html Executable file → Normal file
View File

@ -4,13 +4,11 @@
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<!-- FIXME: Make this stylesheet work again. -->
<!--link rel="stylesheet" href="styles/style.css"/-->
<link rel="stylesheet" href="styles/style.css"/>
<title>@title</title>
</head>
<body>
@slides <!-- reserved keyword -->
<!-- FIXME: Make this script work again. -->
<script src="../slidify.js"></script>
</body>
</html>

0
test/layouts/titlepage.html Executable file → Normal file
View File

0
test/meta.yml Executable file → Normal file
View File

0
test/package-lock.json generated Executable file → Normal file
View File

0
test/package.json Executable file → Normal file
View File

0
test/slides.yml Executable file → Normal file
View File

0
test/slides/chapter1.de.md Executable file → Normal file
View File

0
test/slides/chapter1.en.md Executable file → Normal file
View File

0
test/slides/chapter2.de.md Executable file → Normal file
View File

0
test/slides/chapter2.en.md Executable file → Normal file
View File

4
test/styles/style.css Executable file → Normal file
View File

@ -33,7 +33,7 @@ h1 {
display: contents;
}
section {
article {
display: none;
align-items: center;
justify-content: center;
@ -44,7 +44,7 @@ h1 {
height: 100vh;
}
section:target {
article:target {
display: flex;
}
}