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

Make images and section links relative to the root directory #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title = "My Awesome Title"

# Hero section (from here on is for icon theme)
[params.hero]
img = "images/hero_bg.jpg"
img = "/images/hero_bg.jpg"
title = "Create awesome things for better web"
description = "Lovingly hand-crafted by the fine folks at [FreeHTML5.co](http://freehtml5.co/)"

Expand All @@ -32,13 +32,13 @@ title = "My Awesome Title"
enable = true

[[params.mission.images.list]]
img = "images/img_3.jpg"
img = "/images/img_3.jpg"
[[params.mission.images.list]]
img = "images/img_2.jpg"
img = "/images/img_2.jpg"
[[params.mission.images.list]]
img = "images/img_1.jpg"
img = "/images/img_1.jpg"
[[params.mission.images.list]]
img = "images/img_4.jpg"
img = "/images/img_4.jpg"

[[params.mission.item]]
weight = 1
Expand Down Expand Up @@ -106,42 +106,42 @@ title = "My Awesome Title"
[[params.work.item]]
title = "Consectetur adipisicing"
subtitle = "Web Design"
img = "images/img_1.jpg"
img = "/images/img_1.jpg"

[[params.work.item]]
title = "Consectetur adipisicing"
subtitle = "Web Design"
img = "images/img_2.jpg"
img = "/images/img_2.jpg"

[[params.work.item]]
title = "Consectetur adipisicing"
subtitle = "Web Design"
img = "images/img_3.jpg"
img = "/images/img_3.jpg"

[[params.work.item]]
title = "Consectetur adipisicing"
subtitle = "Web Design"
img = "images/img_2.jpg"
img = "/images/img_2.jpg"

[[params.work.item]]
title = "Consectetur adipisicing"
subtitle = "Web Design"
img = "images/img_3.jpg"
img = "/images/img_3.jpg"

[[params.work.item]]
title = "Consectetur adipisicing"
subtitle = "Web Design"
img = "images/img_2.jpg"
img = "/images/img_2.jpg"

[[params.work.item]]
title = "Consectetur adipisicing"
subtitle = "Web Design"
img = "images/img_3.jpg"
img = "/images/img_3.jpg"

[[params.work.item]]
title = "Consectetur adipisicing"
subtitle = "Web Design"
img = "images/img_4.jpg"
img = "/images/img_4.jpg"

# Team section
[params.team]
Expand All @@ -153,7 +153,7 @@ title = "My Awesome Title"
name = "Jean Doe"
position = "Chief legend"
description = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Eveniet nam itaque ipsam iste provident quo ipsam iste provident."
img = "images/person1.jpg"
img = "/images/person1.jpg"
email = "#"
telephone = "#"
facebook = "#"
Expand All @@ -168,7 +168,7 @@ title = "My Awesome Title"
name = "Alice Doe"
position = "Chief overlord"
description = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Eveniet nam itaque ipsam iste provident quo ipsam iste provident."
img = "images/person2.jpg"
img = "/images/person2.jpg"
email = "#"
telephone = "#"
facebook = "#"
Expand All @@ -182,7 +182,7 @@ title = "My Awesome Title"
name = "John Doe"
position = "Chief haranguer"
description = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Eveniet nam itaque ipsam iste provident quo ipsam iste provident."
img = "images/person3.jpg"
img = "/images/person3.jpg"
email = "#"
telephone = "#"
facebook = "#"
Expand All @@ -196,7 +196,7 @@ title = "My Awesome Title"
# name = "Jason Doe"
# position = "Chief haranguer"
# description = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Eveniet nam itaque ipsam iste provident quo ipsam iste provident."
# img = "images/person3.jpg"
# img = "/images/person3.jpg"
# email = "#"
# telephone = "#"
# facebook = "#"
Expand Down Expand Up @@ -228,4 +228,4 @@ title = "My Awesome Title"
vine = "#"
linkedin = "#"
instagram = "#"

14 changes: 8 additions & 6 deletions layouts/partials/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,26 @@
<div class="container">
<div class="fh5co-menu-1">

<a href="#" data-nav-section="home">{{ with .Site.Params.nav }}{{ if isset . "logo" }}<img src={{ .logo | absURL }} height="20" alt="">{{ end }}{{ if (not (isset . "logo")) }}Home{{ end }}{{ end }}</a>
<a href="/#" data-nav-section="home">{{ with .Site.Params.nav }}{{ if isset . "logo" }}<img src={{ .logo | absURL }} height="20" alt="">{{ end }}{{ if (not (isset . "logo")) }}Home{{ end }}{{ end }}</a>

{{ if .Site.Params.mission.enable }}
<a href="#" data-nav-section="mission">{{ with .Site.Params.nav.mission }}{{ . | markdownify }}{{ end }}</a>
<a href="/#" data-nav-section="mission">{{ with .Site.Params.nav.mission }}{{ . | markdownify }}{{ end }}</a>
{{ end }}

{{ if .Site.Params.services.enable }}
<a href="#" data-nav-section="services">{{ with .Site.Params.nav.services }}{{ . | markdownify }}{{ end }}</a>
<a href="/#" data-nav-section="services">{{ with .Site.Params.nav.services }}{{ . | markdownify }}{{ end }}</a>
{{ end }}

{{ if .Site.Params.team.enable }}
<a href="#" data-nav-section="team">{{ with .Site.Params.nav.team }}{{ . | markdownify }}{{ end }}</a>
<a href="/#" data-nav-section="team">{{ with .Site.Params.nav.team }}{{ . | markdownify }}{{ end }}</a>
{{ end }}

<a href="/blog" onclick="location.href='/blog';">Blog</a>

{{ if .Site.Params.contact.enable }}
<a href="#" data-nav-section="contact">{{ with .Site.Params.nav.contact }}{{ . | markdownify }}{{ end }}</a>
<a href="/#" data-nav-section="contact">{{ with .Site.Params.nav.contact }}{{ . | markdownify }}{{ end }}</a>
{{ end }}

</div>
</div>
</div>
Expand Down