Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Relativisation' #8

Open
wants to merge 10 commits into
base: gh-pages
Choose a base branch
from
Open

'Relativisation' #8

wants to merge 10 commits into from

Conversation

andrealeone
Copy link

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).

Andrea Leone added 3 commits March 30, 2016 15:22
…-compilation

# Conflicts:
#	assets/css/main.css
#	index.html
#	jquerycourse/index.html
#	jquerycourse/thanks/index.html
@travisneilson
Copy link
Owner

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?

…-compilation

# Conflicts:
#	assets/css/main.css
#	gifs/index.jade
#	index.html
#	jquerycourse/index.html
#	jquerycourse/thanks/index.html
@andrealeone
Copy link
Author

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/

Andrea Leone added 6 commits April 4, 2016 09:29
…-compilation

# Conflicts:
#	assets/css/main.css
#	gifs/index.html
#	index.html
#	jquerycourse/index.html
#	jquerycourse/thanks/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants