Compare commits

..

No commits in common. "release" and "main" have entirely different histories.

17 changed files with 3159 additions and 28 deletions

111
demo/.gitignore vendored Executable file
View File

@ -0,0 +1,111 @@
# Created by https://www.gitignore.io/api/node
# Edit at https://www.gitignore.io/?templates=node
### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# rollup.js default build output
dist/
# Uncomment the public line if your project uses Gatsby
# https://nextjs.org/blog/next-9-1#public-directory-support
# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
# public
# Storybook build outputs
.out
.storybook-out
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# Temporary folders
tmp/
temp/
# End of https://www.gitignore.io/api/node

0
demo/images/.gitkeep Executable file
View File

View File

Before

Width:  |  Height:  |  Size: 374 B

After

Width:  |  Height:  |  Size: 374 B

2
demo/layouts/default.html Executable file
View File

@ -0,0 +1,2 @@
<h1>@title(inline)</h1>
@content

14
demo/layouts/root.html Executable file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="@language">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
<link rel="stylesheet" href="styles/style.css"/>
<title>@title</title>
</head>
<body>
@slides <!-- reserved keyword -->
<script src="../onpoint.js"></script>
</body>
</html>

2
demo/layouts/titlepage.html Executable file
View File

@ -0,0 +1,2 @@
<h1>@title(inline)</h1>

6
demo/meta.yml Executable file
View File

@ -0,0 +1,6 @@
language: # available language options and their value for the html lang attribute
de: de
en: en
title:
de: Präsentation zur Demonstration
en: Presentation for Demonstration Purposes

2883
demo/package-lock.json generated Executable file

File diff suppressed because it is too large Load Diff

10
demo/package.json Executable file
View File

@ -0,0 +1,10 @@
{
"name": "onpoint-core",
"version": "0.0.1",
"scripts": {
"build": "babel scripts -d ../"
},
"devDependencies": {
"babel-cli": "^6.26.0"
}
}

2
demo/slides.yml Executable file
View File

@ -0,0 +1,2 @@
- chapter1
- chapter2

30
demo/slides/chapter1.de.md Executable file
View File

@ -0,0 +1,30 @@
@slide(layout=titlepage)
@title
Wirklich auf den Punkt!
@slide
@title
++ Wirklich auf den Punkt!
@content
* ++ Stichpunkt 1
* ++ Stichpunkt 2
* ++ Stichpunkt 3
* ++ Stichpunkt 4
@slide
@title
Folie mit Todo
@todo
Das ist das Todo.
* Stichpunkt
@content
Diese Folie ist noch nicht fertig.

30
demo/slides/chapter1.en.md Executable file
View File

@ -0,0 +1,30 @@
@slide(layout=titlepage)
@title
OnPoint for real!
@slide
@title
OnPoint for real!
@content
* bullet point 1
* bullet point 2
* bullet point 3
* bullet point 4
@slide
@title
Slide with todo
@todo
This is the todo.
* bullet point
@content
This slide is not done yet.

4
demo/slides/chapter2.de.md Executable file
View File

@ -0,0 +1,4 @@
@slide(layout=titlepage)
@title
Ende

10
demo/slides/chapter2.en.md Executable file
View File

@ -0,0 +1,10 @@
@slide(layout=titlepage)
@title
OnPoint for real!
@content
* bullet point 1
* bullet point 2
* bullet point 3
* bullet point 4

54
demo/styles/style.css Executable file
View File

@ -0,0 +1,54 @@
* {
box-sizing: border-box;
}
html {
margin: 0;
padding: 0;
overflow: hidden;
font-size: 16pt;
}
h1 {
font-size: 2.4rem;
}
.fragment {
opacity: 0;
transition: .3s opacity ease-in-out;
}
.fragment.visible {
opacity: 1;
}
body.laser-pointer-active {
cursor: url("../images/pointer.svg"), auto;
}
@media screen {
body {
background: black;
margin: 0;
padding: 0;
}
section {
display: contents;
}
article {
display: none;
align-items: center;
justify-content: center;
flex-direction: column;
background: white;
position: absolute;
width: 100vw;
height: 100vh;
}
article:target {
display: flex;
}
}

View File

@ -43,7 +43,7 @@ def compile_slide(slide, root_directory):
# contain them.
def get_slide_metadata(slide):
metadata = { 'layout': 'default' }
metadata_attributes = re.search(r'^@slide\((.+)\)', slide.splitlines()[0])
metadata_attributes = re.search('^@slide\((.+)\)', slide.splitlines()[0])
if metadata_attributes:
metadata_attributes = metadata_attributes.group(1).split(' ')
for attribute in metadata_attributes:

View File

@ -1,27 +0,0 @@
// Reference: https://www.delftstack.com/howto/javascript/detect-finger-swipe-events-in-javascript/
window.addEventListener('load', () => {
document.body.addEventListener('touchstart', onTouchStart);
document.body.addEventListener('touchmove', onTouchMove);
document.body.addEventListener('touchend', onTouchEnd);
})
var startX, startY, moveX, moveY;
function onTouchStart(e){
startX = e.touches[0].clientX;
startY = e.touches[0].clientY;
}
function onTouchMove(e){
moveX = e.touches[0].clientX;
moveY = e.touches[0].clientY;
}
function onTouchEnd(){
if (startY+100 < moveY){
goToPreviousSlide();
} else if (startY-100 > moveY){
goToNextSlide();
}
}