Skip to content
All gists
Back to GitHub
Sign in
Sign up
Sign in
Sign up
{{ message }}
Instantly share code, notes, and snippets.
bogdan-andrei-sturzoiu
/
section_page_with_blocks.hbs
Last active
Apr 25, 2019
Star
0
Fork
0
Star
Code
Revisions
3
Embed
What would you like to do?
Embed
Embed this gist in your website.
Share
Copy sharable link for this gist.
Clone via HTTPS
Clone with Git or checkout with SVN using the repository’s web address.
Learn more about clone URLs
Download ZIP
Section page example with sub-sections presented as blocks
Raw
section_page_with_blocks.hbs
<
div
class
=
"
container-divider
"
></
div
>
<
div
class
=
"
container
"
>
<
nav
class
=
"
sub-nav
"
>
{{
breadcrumbs
}}
{{
search
submit
=
false
scoped
=
true
}}
</
nav
>
<
div
class
=
"
section-container
"
>
<
section
class
=
"
section-content
"
>
<
header
>
<
h1
>
{{
section.name
}}
{{
#if
section.internal
}}
<
span
class
=
"
icon-lock
"
title
=
"
{{
t
'
internal
'
}}
"
></
span
>
{{
/if
}}
</
h1
>
{{
subscribe
}}
{{
#if
section.description
}}
<
p
class
=
"
page-header-description
"
>
{{
section.description
}}
</
p
>
{{
/if
}}
</
header
>
{{
#if
section.articles
}}
<
ul
class
=
"
article-list
"
>
{{
#each
section.articles
}}
<
li
class
=
"
article-list-item
{{
#if
promoted
}}
article-promoted
{{
/if
}}
"
>
{{
#if
promoted
}}
<
span
data-title
=
"
{{
t
'
promoted
'
}}
"
class
=
"
icon-star
"
></
span
>
{{
/if
}}
<
a
href
=
"
{{
url
}}
"
class
=
"
article-list-link
"
>
{{
title
}}
</
a
>
{{
#if
internal
}}
<
span
class
=
"
icon-lock
"
title
=
"
{{
t
'
internal
'
}}
"
></
span
>
{{
/if
}}
</
li
>
{{
/each
}}
</
ul
>
{{
else
}}
{{
#if
section.sections
}}
{{
else
}}
<
i
class
=
"
section-empty
"
>
<
a
href
=
"
{{
section.url
}}
"
>
{{
t
'
empty
'
}}
</
a
>
</
i
>
{{
/if
}}
{{
/if
}}
<
br
/>
<
section
class
=
"
categories blocks
"
>
<
ul
class
=
"
blocks-list
"
>
{{
#each
section.sections
}}
<
li
class
=
"
blocks-item
"
>
<
a
href
=
'
{{
url
}}
'
class
=
"
blocks-item-link
"
>
<
h4
class
=
"
blocks-item-title
"
>
{{
name
}}
</
h4
>
<
p
class
=
"
blocks-item-description
"
>
{{
excerpt
description
}}
</
p
>
</
a
>
{{
#if
internal
}}
<
span
class
=
"
icon-lock
"
title
=
"
{{
t
'
internal
'
}}
"
></
span
>
{{
/if
}}
</
li
>
{{
/each
}}
</
ul
>
</
section
>
{{
pagination
}}
</
section
>
</
div
>
</
div
>
Sign up for free
to join this conversation on GitHub
. Already have an account?
Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.