DevTipsShowWebsite
DevTipsShowWebsite copied to clipboard
'Relativisation'
Just a bunch of code to make links relative -- idea from issue #7
I used Jade variables (like @travisneilson's htmlClass) to create a customizable reference to the assets folder, so you have only to declare the path once at the top of each index.jade file. Moreover, I converted the other paths into relative ones (like the gifs' hrefs).
This is pretty cool. Thanks for doing it. Sorry about the conflicts... If you resolve I'll pull.
Do you have any suggestions about the @include's I do for the svg icons and stuff?
Conflicts are resolved for now - they were due to my different way of compiling HTML and CSS.
As regards the include
's: you used them in order to insert the content of another .jade file, and the same with .svg code, right? If you give a look to the rendered DOM, <svg>
elements have no src
attribute, because during the compilation CodeKit or PrePros copied the entire code of the .svg and pasted it in the compiled .html page.
This means that the path you have to write to include an .svg only serves to your compiler to find that specific file and make its magic. This is good, because you do not need to worry that source-paths work in all pages. Nevertheless remains the hassle of writing the entire (although still relative) path. I tried to use variables but it seems not to work for me. Do you have something in mind, @travisneilson?
For more information about Jade includes: http://jade-lang.com/reference/includes/