Commit graph

45 commits

Author SHA1 Message Date
18c5deda11 Merge pull request 'Minimal Footer' (#28) from addFooter into main
Reviewed-on: #28
2023-07-08 00:55:20 +01:00
c957ccba00 Minimal Footer
Added a very simple and quite ugly footer, will have to do some more
designing but it is functional for now.
2023-07-08 01:52:35 +02:00
560fc0812a Merge pull request 'Sticky top menu.' (#27) from stickyHeader into main
Reviewed-on: #27
2023-07-07 23:52:59 +01:00
2f336d956a Sticky top menu.
On pages without the big profile header, a small top menu for easy nav:
just the logo (drop shape) linking to home and the nav.
2023-07-08 00:48:17 +02:00
67807ac7e6 Merge pull request 'addNav' (#26) from addNav into main
Reviewed-on: #26
2023-07-07 21:48:09 +01:00
bd6239dcb1 Useless import 2023-07-07 22:46:49 +02:00
dffa10fd93 Fully functional nav' :: [(Route, Html)] -> Component Html
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.
2023-07-07 22:38:25 +02:00
f8d5cfc404 Hamburger icon.
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.
2023-07-04 15:43:34 +02:00
6851bd1600 Merge pull request 'CssStrings' (#25) from CssStrings into main
Reviewed-on: #25
2023-07-03 15:29:07 +01:00
1068b16a67 Changed Prop's cssMap from Map String Css to IntMap String.
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.
2023-07-03 16:21:46 +02:00
fb23dd73d9 Updated stackage version 2023-07-03 15:57:43 +02:00
588cde3c3d Merge pull request 'addTags' (#23) from addTags into main
Reviewed-on: #23
2023-06-23 14:03:20 +01:00
c44de84d71 Removed redundant module calls. 2023-06-23 14:59:38 +02:00
2c02500b72 Tag support completed.
Archive page still needs a bit of styling. Declare tags in a post. Tags
are displayed in the blog card and populate the archive.
2023-06-23 14:51:52 +02:00
2c06b5851d Functional tag mechanism.
TODO: Style the archive page!
2023-06-22 16:49:04 +02:00
0b6afbe513 Messy but quasi-working!
Directly following
https://stackoverflow.com/questions/52805193/in-hakyll-how-can-i-generate-a-tags-page
Sole problem now is that the title field for the tags is #tag instead of
tag leading to troubles with ids (link/#id not found because the id is
\#\#id...)
And archive page is bleh!
2023-06-22 16:39:56 +02:00
d460d545be Revised how the tags css is brought in.
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
2023-06-22 15:28:46 +02:00
77f4d651af Added tags list to blog cards.
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.
2023-06-21 20:48:05 +02:00
c3d2bdad2e Tinkered with templates compiling, no need for runGHC.
Issue created #20
to address the feature.
2023-06-21 16:14:12 +02:00
60097556ef Added tags to 2 posts for testing.
Adding tags demands designing a tags list page, TODO
2023-06-21 03:28:52 +02:00
57fe110a5d Merge pull request 'IndexPostList' (#19) from IndexPostList into main
Reviewed-on: #19
2023-06-20 23:14:41 +01:00
fad0d06337 Completed Index post list.
And wrote a post about the framework and the Components.
2023-06-21 00:11:23 +02:00
dda65d1116 Blog cards added to the index as as for loop template.
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.
2023-06-20 19:25:03 +02:00
af7a1da258 Merge pull request 'BlogCards' (#18) from BlogCards into main
Reviewed-on: #18
2023-06-20 13:31:37 +01:00
21bf143f95 Tweaked some styles in blog Card.
Blog card completed in organisms with a title, summary and date. Adding
fields is done by modifying the PostProp type and the component.
2023-06-20 14:25:24 +02:00
5549461f4c Blog cards first design. Organisms that take a PostProp ADT for their
content.

TODO: tweak the desing (font sizes, lineHeights), decide how to make the
summary from a blog post (description metadata or first N chars?)
2023-06-20 02:58:28 +02:00
aec350eaf9 Added Routes to Main.
No PR right away, I feel this could take a bit more refining.
2023-06-19 23:47:41 +02:00
ad606b4938 Merge pull request 'FileTree' (#16) from FileTree into main
Reviewed-on: #16
2023-06-19 21:27:04 +01:00
b6696ea83c Upped version and populated Changelog. 2023-06-19 22:26:09 +02:00
978dffb671 Added compile rule on assets.
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.
2023-06-19 22:17:20 +02:00
4a900ab57c Modified Components declaration of Props.
Props are now added using add(...) functions in a Monad block, and the
Html is "return"ed.
2023-06-19 22:02:28 +02:00
454b7f48f0 FileTree Type defined in Utils.FileTree
Trees can be built, merged, and paths extraced. FileTrees have a Monoid
structure.
2023-06-19 21:16:09 +02:00
b66b5d6d3c Merge pull request 'Added sitemap.xml' (#13) from addSitemap into main
Reviewed-on: #13
2023-06-18 23:20:26 +01:00
2602d815e0 Added sitemap.xml
Generation is done and the end of app.hs. Care should be taken when
adding pages: they must be declared in the sitemap's context.
2023-06-19 00:16:25 +02:00
f6a38efa1c Merge pull request 'newComponents' (#1) from newComponents into main
Reviewed-on: #1
2023-06-18 19:47:03 +01:00
d38167de89 Modified the Render logic
In Core.Render instances are declared for the Show class, and show and
print are used elsewhere.
2023-06-18 20:37:14 +02:00
ef97b3fb76 Core change: Components use a Writer Monad instead of State.
Replacing Core.Components is the Components module where Props are
defined with a Monoid structure. Component is a synonym of Writer Prop.
2023-06-18 20:05:07 +02:00
84c85d02bd Header integration.
Responsive large profile header, still needs more styling and nav, but
functional.
2023-06-13 02:30:07 +02:00
ccc0bf7afd Started header. 2023-06-09 03:12:16 +02:00
6428597dde New head declaration, css tweaks on buttons and colours defined.
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.
2023-06-09 02:36:02 +02:00
1a445dd1a1 Big change on Components logic.
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.
2023-06-07 20:03:32 +02:00
2d19db1362 Fixed template hack
Templates are directly compiled from the `hs` file. They are thus
identified with the source name, e.g. `src/Kit/Templates/Post.hs`.
2022-09-26 11:30:24 +02:00
84eef2f8cd Added Core.Colors
Define a Palette, handle Colors gracefully, simply interfaced to output
to Clay or String formats.
2022-09-23 17:03:34 +02:00
2d5e928689 Added rudimentary blog posts functionality
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..
2022-09-21 19:56:36 +02:00
4bb7d7b140 First commit
Describes the base structure for the project, as well as some basic
functions.
TODO: everything really...
2022-09-21 18:02:50 +02:00