Compare commits

...

6 Commits

Author SHA1 Message Date
Florian
108fea6bf1 Remove TODOs 2025-04-30 19:40:41 +02:00
Florian
f05fa6875a Add laser pointer option 2025-04-30 19:40:32 +02:00
Florian
905a3fef54 Fix test CSS 2025-04-30 19:40:01 +02:00
Florian
cc56bad408 Fix bug with vanishing doctype 2025-04-30 19:36:52 +02:00
Florian
7d54677bb9 List more dependencies 2025-04-30 18:59:09 +02:00
Florian
898a2064d9 Add troubleshooting section 2025-04-30 18:54:59 +02:00
7 changed files with 82 additions and 14 deletions

View File

@ -4,15 +4,19 @@
This program is meant to be used as a git submodule of your actual presentation project, therefore you need to add it:
$ git submodule add -b release git@path-to-onpoint.git
```sh
git submodule add -b release git@path-to-onpoint.git
````
Make sure to have python3 and pandoc (the same version for all developers!) installed.
Next, we can install all requirements:
$ python3 -m venv venv
$ source venv/bin/activate
$ cd onpoint
$ pip3 install -r requirements.txt
```sh
python3 -m venv venv
source venv/bin/activate
cd onpoint
pip3 install -r requirements.txt
```
## The Project Structure
@ -57,4 +61,29 @@ In order to update the version of onPoint in an existing project, simply enter t
You might want to have all slides auto-compiled for you on safe. For this case, we wrote a small bash script that spawns a file watcher to compile your presentation once any markdown file in the slides folder is saved. Simply run `./onpoint/autocompile.sh` from your project root folder.
You will need Python and `inotify-tools` to execute the script.
You will need Python and `inotify-tools` to execute the script.
## Troubleshooting
### Missing packages
Error message (example):
Collecting lxml==5.2.0 (from -r requirements.txt (line 2))
Using cached lxml-5.2.0.tar.gz (3.7 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [4 lines of output]
<string>:67: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Building lxml version 5.2.0.
Building without Cython.
Error: Please make sure the libxml2 and libxslt development packages are installed.
Make sure to install the following packages:
+ Ubuntu: `libxml2-dev`, `libxslt-dev`, `python-dev`, `gcc`, `pandoc`
+ Fedora: `libxml2-devel`, `libxslt-devel`, `python-devel`, `gcc`, `pandoc`

View File

@ -37,4 +37,4 @@ def defragmentize(html):
re.escape(FRAGMENT_TAG), '', fragment.text)
return etree.tostring(dom, method='html', encoding='utf-8',
pretty_print=True).decode('utf-8')
pretty_print=True, doctype="<!DOCTYPE html>").decode('utf-8')

View File

@ -8,6 +8,7 @@
<li>Open slide overview: Hit <kbd>Ctrl</kbd> twice.</li>
<li>Close slide overview: <kbd>Esc</kbd></li>
<li>Open the help menu: <kbd>H</kbd></li>
<li>Show laser pointer: <kbd>P</kbd></li>
</ul>
<p>
<a href="@imprint">Imprint</a> and <a href="@privacy-policy">privacy policy</a>

View File

@ -104,6 +104,9 @@ function onKeyPressed(event) {
case 72: // H
onHPressed();
break;
case 80: // P
onPPressed();
break;
}
}
@ -112,6 +115,11 @@ function onHPressed() {
toggleHelpMenu();
}
function onPPressed() {
if (!(document.activeElement === topicListSearch))
togglePointer();
}
function showNextFragment() {
let fragments = [...slides[currentSlide].querySelectorAll('.fragment')]
let visible = [...slides[currentSlide].querySelectorAll('.fragment.visible')]
@ -395,6 +403,10 @@ function toggleHelpMenu() {
document.getElementById('help-menu-toggle').click();
}
function togglePointer() {
document.body.classList.toggle('laser-pointer-active');
}
function hideHelpMenu() {
document.getElementById('help-menu-checkbox').checked = false;
}

24
test/images/pointer.svg Normal file
View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="4.2333331mm"
height="4.2333331mm"
viewBox="0 0 4.2333331 4.2333331"
version="1.1"
id="svg1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<g
id="layer1"
transform="translate(-36.493334,-89.210833)">
<circle
style="fill:#d40000;stroke-width:0.264583"
id="path1"
cx="38.610001"
cy="91.327499"
r="2.1166666" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 576 B

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>
<script src="../onpoint.js"></script>
</body>
</html>
</html>

View File

@ -22,6 +22,10 @@ h1 {
opacity: 1;
}
body.laser-pointer-active {
cursor: url("../images/pointer.svg"), auto;
}
@media screen {
body {
background: black;
@ -33,7 +37,7 @@ h1 {
display: contents;
}
section {
article {
display: none;
align-items: center;
justify-content: center;
@ -44,7 +48,7 @@ h1 {
height: 100vh;
}
section:target {
article:target {
display: flex;
}
}