Skip to content

Commit 85fe85e

Browse files
committed
fix: update docs site inner page template to use the new pinned content option with bands
1 parent cae9b00 commit 85fe85e

File tree

1 file changed

+32
-30
lines changed

1 file changed

+32
-30
lines changed

docs-site/src/templates/default.twig

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -36,43 +36,45 @@
3636

3737
<div class="c-bds-layout__wrapper">
3838
<main class="c-bds-layout__main {{ currentUrl != 'index.html' ? 't-bolt-xlight' }}">
39+
{% set gitBranch = gitBranch ? gitBranch : "master" %}
3940

40-
{% set content %}
41-
<div class="o-bolt-grid o-bolt-grid--flex o-bolt-grid--small o-bolt-grid--matrix o-bolt-grid--rev o-bolt-grid--bottom u-bolt-margin-bottom-small">
42-
<div class="o-bolt-grid__cell u-bolt-text-align-right u-bolt-margin-left-auto">
43-
{% include "@bolt-components-link/link.twig" with {
44-
url: "https://github.com/bolt-design-system/bolt/blob/" ~ gitBranch ~ "/docs-site/" ~ page.srcPath,
45-
text: "Edit",
46-
icon: {
47-
name: "pencil"
48-
},
49-
attributes: {
50-
class: [
51-
"u-bolt-text-decoration-none",
52-
]
53-
}
54-
} only %}
55-
</div>
41+
{% set pinned_content %}
42+
{% include "@bolt-components-button/button.twig" with {
43+
url: "https://github.com/bolt-design-system/bolt/blob/" ~ gitBranch ~ "/docs-site/" ~ page.srcPath,
44+
text: "Edit on Github",
45+
style: "text",
46+
size: "xsmall",
47+
icon: {
48+
name: "pencil"
49+
}
50+
} only %}
51+
{% endset %}
5652

57-
<div class="o-bolt-grid__cell u-bolt-flex-grow">
58-
{% include "@bolt-components-headline/headline.twig" with {
59-
text: page.meta.title,
60-
size: "xxxlarge",
61-
tag: "h2"
62-
} %}
63-
</div>
64-
</div>
53+
{% set band_content %}
54+
{% include "@bolt-components-headline/headline.twig" with {
55+
text: page.meta.title,
56+
size: "xxxlarge",
57+
tag: "h2",
58+
longTitle: true,
59+
} only %}
6560

66-
<article>
67-
{% block article_content %}
68-
{{ page.body|raw }}
69-
{% endblock %}
70-
</article>
61+
{% block article_content %}
62+
{{ page.body|raw }}
63+
{% endblock %}
7164
{% endset %}
7265

7366
{% include "@bolt-components-band/band.twig" with {
74-
content: content,
67+
content: band_content,
68+
pinned_content: {
69+
upper: [
70+
{
71+
content: pinned_content,
72+
align: "end",
73+
},
74+
],
75+
},
7576
full_bleed: false,
77+
size: "xsmall",
7678
theme: currentUrl == 'index.html' ? 'none' : 'xlight'
7779
} only %}
7880
</main>

0 commit comments

Comments
 (0)