Skip to content

base.html links style.css, but no stylesheet exists and there is no web/static/ for Snowman to copy #128

Description

@rybesh

web/templates/layouts/base.html has carried this since the layout was written:

<link rel="stylesheet" href="style.css">

There is no style.css anywhere in the repo, and no web/static/ directory. Snowman copies a static/ directory into the built site (that is what snowman build --static reprocesses), so there is nothing for it to copy and nothing lands in web/site/:

$ ls web/site/
construction  construction.html  index.html  item  reference  references.html  subject  subjects.html

Every page therefore requests /style.css and 404s, and the site has been rendering entirely unstyled.

The class names suggest what was intended

The templates already use utility classes that nothing defines:

class used in
mx max-width line-height base.html (on <body>)
my base.html (nav)
mb index.html, artists-book.html, references.html, …

Those are Basscss utility names, so the original intent looks like a small utility stylesheet that was never committed. Whether to restore that, write a minimal hand-rolled stylesheet, or drop the classes and the <link> is the actual decision here — this issue is just to record that the current state is broken either way.

Why it matters now

Two things run into it:

  • Images ([Main] AB cover image #9). The <img> elements added for item 4 stage 1 are inline-styled (max-width:100%;height:auto) precisely because there is no stylesheet to put the rule in. That works but does not belong inline.
  • Deep zoom. OpenSeadragon needs somewhere to serve a vendored JS bundle from, which is the same missing web/static/ pipeline.

Suggested fix

  1. Create web/static/ and confirm Snowman copies it into web/site/ on build.
  2. Put a stylesheet there — either Basscss or a small hand-written one defining the five classes actually in use.
  3. Move the inline image styles out of the templates.
  4. Add web/static/** to the web/site/index.html prerequisites in the top-level Makefile so editing the stylesheet triggers a rebuild, as the templates and queries already do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions