sneakers-the-rat / paper-feeds

A FastAPI web server for creating RSS feeds for scholarly journals with the magic of adversarial interoperability
GNU General Public License v3.0
63 stars 4 forks source link

CSS and HTML improvements #11

Closed roaldarbol closed 10 months ago

roaldarbol commented 10 months ago

I've refactored the HTML files, so we use include instead of extends as I find that syntax much clearer. I have created various individual HTML components and out them in an includes folder.

CSS-wise I've done things in a very similar way.

Took me a looooong time getting everything to work for me, but now it's all playing nicely, and I learned about htmx along the way (and the Liquid-like syntax).

Lastly, I changed the main index.html to be inside of the shared folder, instead of _layout.html, and adjusted accordingly in app.py.

The Download button is of course just a place-holder, there's no connection to back-end.

Now time to rest a bit! :-P

roaldarbol commented 10 months ago
Screenshot 2024-01-03 at 16 38 23 Screenshot 2024-01-03 at 16 38 31
sneakers-the-rat commented 10 months ago

Sorry one more thing - we'll probably want to use extends with a base template so we can reuse the base structure of the page (which is super nice). So eg. we have a uniform head/header/footer/etc. across pages and can change just the page content. I don't want to undo your work here and it's not that big of a deal since we're only going to have 2 or 3 page types, but since we're also talking about having author/tag/etc. feeds it might be good to do that now.

roaldarbol commented 10 months ago

That's also fine by me - we could have a shared and pages folders, no trouble. :-) Then pages can extend shared templates, and I'll make the template a bit more generic then. I can make some edits to that later. Btw, I'm working a lot with Jekyll and not so much other webdev, so please let me know if anything becomes too Jekyllian - I may just think that's general webdev. :P

sneakers-the-rat commented 10 months ago

That's also fine by me - we could have a shared and pages folders, no trouble.

ya ya sounds good, again i don't have terribly strong feelings here since i'm anticipating only having a few page types.

Btw, I'm working a lot with Jekyll and not so much other webdev, so please let me know if anything becomes too Jekyllian - I may just think that's general webdev. :P

big same. you can think of extends as being like setting the layout in jekyll frontmatter, where we are putting the content of that template in the {{content}} tag, except with a named block so it's possible to have multiple {{content}}-like blocks in one parent template.

this project is sorta jekyll-ish in that we are doing templating with sort-of-static pages, rather than doing the usual react thing where everything is javascript, so that intuition probably applies better here than it does in other more typical client/server web apps :)

i'm good to merge this whenever you're satisfied

roaldarbol commented 10 months ago

Cool, then I'll merge and open a new branch for further play!