apiad / auditorium

An HTML+CSS+JS generator from pure Python code
https://apiad.net/auditorium
81 stars 13 forks source link

Themes: FileNotFoundError #58

Open lambdamusic opened 3 years ago

lambdamusic commented 3 years ago

Hi! Really cool idea!

I'm trying to reuse the themes options on reveal.js but getting an error. Is the themes list restricted somehow?


static_html = show.render(theme="beige")

....

Traceback (most recent call last):
  File "test.py", line 45, in <module>
    static_html = show.render(theme="beige")
  File "/usr/local/lib/python3.8/site-packages/auditorium/show.py", line 241, in render
    return self._template_static.render(
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 13, in top-level template code
  File "/usr/local/lib/python3.8/site-packages/auditorium/show.py", line 256, in _embed
    with open(path(src)) as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/site-packages/auditorium/static/css/auditorium-beige.css'

On a separate note: is there a way to pass custom CSS styles ? Eg I have a slide with a lot of text so I'd like to set the base font to a smaller size cause otherwise it gets cropped..