Skip to content
Snippets Groups Projects
Commit fa33db17 authored by chrissi^'s avatar chrissi^
Browse files

Use custom rst directive for infobox


Signed-off-by: default avatarChris Fiege <chris@tinyhost.de>
parent dbf51286
No related branches found
No related tags found
No related merge requests found
Pipeline #1511 passed
......@@ -12,21 +12,18 @@ Natürlich sind wir weiterhin auf unserer
und auch im
`IRC </irc.html>`__ zu erreichen.
.. raw:: html
.. ffbsbox::
<div style="float:right; clear:right; width:20%; border-top:1px solid; border-bottom:1px solid; margin-left:2em; margin-top:1.5em; margin-bottom:1.5em;">
<p>
<strong>Kurzlinks:</strong><br />
<a href="https://treffen.freifunk-bs.de/FreifunkBS">Videokonferenz im Browser</a><br />
<a href="https://play.google.com/store/apps/details?id=org.jitsi.meet">App für Android</a><br />
<a href="https://apps.apple.com/de/app/jitsi-meet/id1165103905">App für iOS</a><br />
</p>
</div>
| **Kurzlinks**:
| `Videokonferenz im Browser <https://treffen.freifunk-bs.de/FreifunkBS>`__
| `App für Android <https://play.google.com/store/apps/details?id=org.jitsi.meet>`__
| `App für iOS <https://apps.apple.com/de/app/jitsi-meet/id1165103905>`__
Anstelle unserer Treffen vor Ort treffen wir uns nun Mittwochs ab 19:00 Uhr
in einer Online Konferenz.
Hier erhälst du weitere Informationen, wie du unserer Konferenz beitreten kannst.
Jitsi im Browser
----------------
......
from docutils.parsers.rst import directives
from docutils.nodes import raw
from flamingo.plugins.rst.base import NestedDirective
def ffbsbox(context):
class Div(NestedDirective):
def run(self):
html = self.parse_content(context)
return [
raw('', '<div style="float:right; clear:right; width:20%; border-top:1px solid; border-bottom:1px solid; margin-left:2em; margin-top:1.5em; margin-bottom:1.5em;">{}</div>'.format(html), format='html'),
]
return Div
class rstFfbsBox:
def parser_setup(self, context):
directives.register_directive('ffbsbox', ffbsbox(context))
......@@ -8,6 +8,7 @@ PLUGINS = [
'plugins/title.py::Title',
'plugins/git.py::Git',
'plugins/raw.py::Raw',
'plugins/rst_ffbs_box.py::rstFfbsBox',
]
# remove flamingo core HTML plugin.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment