Responsive nav (molecule). On screen < M, it shows a hamburger in the
top right which displays a full screen modal nav, and on screen > M it
displays a one-line nav.
Can be clicked to toggle between hamburger and cross. The hamburger must
be called with an Int as id (`hamburger 0` e.g.), and a function
`onHamburgerChecked :: Int -> Selector` gives the selector to use side
effects.
The cssMap now contains the rendered css together with its hash. That
way there is no need to give a component a name, and css is rendered
along the way and carried as a string.
Feels much less hacky: An Organism with type Component (String -> Tags
-> Context a) makes the necessary field and includes the appropriate
Css. A Component () is defined in main, which gathers all resources. It
is bound to become IO (Component ()) (or Component (IO ())?) when reading
from external files, see
#22
Feels hacky: I define Core.Contexts.tagsLinksField to make the tags with
a tagLink component, so this is a call to the Kit from Core, and not
gathered in components so I have to have tagSpan and tagLink in my main
with other templates.
How to solve? It is part of the bigger problem to gather resources at
compile time. Most promising lead now would be to have some sort of
ComponentT Monad transform (=WriterT Prop) *on top* of the Compiler /
Rules Monad so that the compilation steps can accumulate resources.
Non limit on the number of posts yet (thinking of 12). Post teaser must
be hand implemented by adding the comment <!--more--> to the `md` file.
This is both a nuisance and a feature.
Assets declared throughout Components are gathered in a FileTree
structure. At compile time, the assets tree is flattened to give all
assets paths and each asset is matched and copied.
This prevents unused assets that are in the source to be deployed.
Changed the operator on Palettes to @ and @@ to avoid clashing with Clay
and Blaze.
The buttonLink is roughly styled.
New organism head: supply components to populate the head or just use
the default head to render global css easily.
Components are now a state monad with a map of css elements. At runtime,
css is gathered from the different components without duplication and
rendered. This should provide a scalable solution. Care should be taken
when naming a new component as overlapping names would not be both
rendered.
At the moment, it seems a little hacky: templates from Kit.Templates are
compiled as html in a _templates directory, so that Hakyll can use them.
It seems that I might have to compile twice at times, as templates may
not be cached when I want to apply them. Might have to sort this out, or
it is a happy hack..