Compare commits

...

7 Commits

Author SHA1 Message Date
Florian
5a9d41193a Merge branch 'master' into release 2025-04-30 19:44:00 +02:00
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
5 changed files with 73 additions and 7 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: 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. Make sure to have python3 and pandoc (the same version for all developers!) installed.
Next, we can install all requirements: Next, we can install all requirements:
$ python3 -m venv venv ```sh
$ source venv/bin/activate python3 -m venv venv
$ cd onpoint source venv/bin/activate
$ pip3 install -r requirements.txt cd onpoint
pip3 install -r requirements.txt
```
## The Project Structure ## 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 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) re.escape(FRAGMENT_TAG), '', fragment.text)
return etree.tostring(dom, method='html', encoding='utf-8', 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>Open slide overview: Hit <kbd>Ctrl</kbd> twice.</li>
<li>Close slide overview: <kbd>Esc</kbd></li> <li>Close slide overview: <kbd>Esc</kbd></li>
<li>Open the help menu: <kbd>H</kbd></li> <li>Open the help menu: <kbd>H</kbd></li>
<li>Show laser pointer: <kbd>P</kbd></li>
</ul> </ul>
<p> <p>
<a href="@imprint">Imprint</a> and <a href="@privacy-policy">privacy policy</a> <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 case 72: // H
onHPressed(); onHPressed();
break; break;
case 80: // P
onPPressed();
break;
} }
} }
@ -112,6 +115,11 @@ function onHPressed() {
toggleHelpMenu(); toggleHelpMenu();
} }
function onPPressed() {
if (!(document.activeElement === topicListSearch))
togglePointer();
}
function showNextFragment() { function showNextFragment() {
let fragments = [...slides[currentSlide].querySelectorAll('.fragment')] let fragments = [...slides[currentSlide].querySelectorAll('.fragment')]
let visible = [...slides[currentSlide].querySelectorAll('.fragment.visible')] let visible = [...slides[currentSlide].querySelectorAll('.fragment.visible')]
@ -395,6 +403,10 @@ function toggleHelpMenu() {
document.getElementById('help-menu-toggle').click(); document.getElementById('help-menu-toggle').click();
} }
function togglePointer() {
document.body.classList.toggle('laser-pointer-active');
}
function hideHelpMenu() { function hideHelpMenu() {
document.getElementById('help-menu-checkbox').checked = false; 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