How to Add CSS and JS to vibe.d templates
seany
seany at uni-bonn.de
Fri Jan 20 04:44:10 UTC 2023
Hi
Howcan one add CSS and JS to vibe.d templates? Here is my setup
(vibe.d project initiated with dub using dub init myproject
vibe.d):
./public:
main.css main.js
./source:
app.d
./views:
auth2fa.dt fail.dt login.dt pair.dt passfail.dt userfail.dt
I am trying to add a css file using `link(rel="stylesheet",
type="text/css", href="main.css")` in the diet templates, but it
has no effect. I took the files from here:
https://codepen.io/ricardoolivaalonso/pen/YzyaRPN
Note that (as discussed in my previous post by Steven
Schveighoffer) , there are some errors in the jade/pug template
file. But even if we correct them, and then I try to use the
setup, I do not get the styles. (Of course, i can't point my
browser to www.my.server/main.css or so, because those endpoints
are not defined. However, as I understood, all non-defined
endpoints should anyway be redirected to public)
Thank you.
More information about the Digitalmars-d-learn
mailing list