Skip to content

Commit 5bcddd4

Browse files
authored
Add: beta for new index page
See here for more information: #48
1 parent 750fb91 commit 5bcddd4

File tree

22 files changed

+332
-14
lines changed

22 files changed

+332
-14
lines changed

_components/my-hero.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MyHeroHeader extends LitElement {
3232
<h1><slot name="title">Hero Header Title</slot></h1>
3333
<my-section>
3434
<p class="description">
35-
<slot name="description">Hero header description</slot>
35+
<slot name="description"></slot>
3636
</p>
3737
</my-section>
3838
`;

_components/my-section.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ class MySection extends LitElement {
3434
text-transform: lowercase;
3535
}
3636
37+
.next {
38+
text-align: right;
39+
}
40+
41+
.next ::slotted(a),
42+
.next ::slotted(a:hover),
43+
.next ::slotted(a:active),
44+
.next ::slotted(a:visited) {
45+
color: white;
46+
}
47+
3748
@media (width < 970px) {
3849
:host {
3950
margin-left: 0;
@@ -65,6 +76,9 @@ class MySection extends LitElement {
6576
<slot></slot>
6677
</div>
6778
</section>
79+
<div class="next">
80+
<slot name="next"></slot>
81+
</div>
6882
`;
6983
}
7084
}

_includes/layouts/base.njk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
{% include "public/css/lists.css" %}
4141
{% include "public/css/tables.css" %}
4242
{% include "public/css/legal.css" %}
43+
{% include "public/css/beta.css" %}
4344
{% endcss %}
4445

4546
<link rel="stylesheet" href="{% getBundleFileUrl "css" %}">

content/beta.njk

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
layout: layouts/home.njk
3+
---
4+
<section class="beta">
5+
<header>
6+
<my-hero>
7+
<span slot="title">The <br> Grisly Eye</span>
8+
<span slot="description">
9+
{{ metadata.description }}
10+
</span>
11+
</my-hero>
12+
</header>
13+
14+
<my-section>
15+
<div slot="subtitle">my work</div>
16+
17+
<ul id="products" class="previews">
18+
{% for post in collections.products | excludeTags([ "drafts" ]) | featured | reverse | limit(4) %}
19+
<li class="preview">
20+
{% if (post.data.redirectTo) %}{% set url %}{{ post.data.redirectTo }}{% endset %}
21+
{% else %}{% set url %}{{ post.url }}{% endset %}
22+
{% endif %}
23+
24+
<a href="{{ url }}" title="{{ post.data.title }}">
25+
26+
{% if loop.index % 3 == 1 %}
27+
{% set theme %} bloody {% endset %}
28+
{% elif loop.index % 2 == 1 %}
29+
{% set theme %} light {% endset %}
30+
{% else %}
31+
{% set theme %} dark {% endset %}
32+
{% endif %}
33+
34+
<my-preview
35+
class="{{ post.data.tags.join(' ') }} {{ theme }} featured"
36+
{% if post.data.image %}
37+
{% set imagePath %}.{{ post.inputPath }}/{{ post.data.image }}{% endset %}
38+
background="{% rawImageUrl post, post.data.image, 300 %}"
39+
{% endif %}
40+
preload
41+
>
42+
<span slot="title">{{ post.data.title }}</span>
43+
</my-preview>
44+
45+
</a>
46+
</li>
47+
{% endfor %}
48+
</ul>
49+
50+
<a slot="next" href="/products/">more...</a>
51+
</my-section>
52+
53+
<my-section>
54+
<div slot="subtitle">blog</div>
55+
<ul id="posts" class="previews">
56+
{% for post in collections.posts | excludeTags([ "drafts" ]) | reverse | featured | limit(4) %}
57+
<li class="preview">
58+
{% if (post.data.redirectTo) %}{% set url %}{{post.data.redirectTo}}{% endset %}
59+
{% else %}{% set url %}{{post.url}}{% endset %}
60+
{% endif %}
61+
62+
<a href="{{ url }}" title="{{ post.data.title }}">
63+
64+
{% if loop.index % 3 == 1 %}
65+
{% set theme %} bloody {% endset %}
66+
{% elif loop.index % 2 == 1 %}
67+
{% set theme %} light {% endset %}
68+
{% else %}
69+
{% set theme %} dark {% endset %}
70+
{% endif %}
71+
72+
<my-preview
73+
{% if post.data.image %}
74+
{% set imagePath %}.{{ post.url }}{{ post.data.image }}{% endset %}
75+
background="{% rawImageUrl post, post.data.image, 250 %}"
76+
{% endif %}
77+
class="{{ post.data.tags.join(' ') }} {{ theme }}"
78+
>
79+
<span slot="title">{{ post.data.title }}</span>
80+
</my-preview>
81+
82+
</a>
83+
</li>
84+
{% endfor %}
85+
</ul>
86+
<a slot="next" href="/blog/">more...</a>
87+
</my-section>
88+
89+
<my-section>
90+
<div slot="subtitle">campaign diaries</div>
91+
<ul id="sessions" class="previews">
92+
{% for diary in collections.diaries | reverse | limit(4) %}
93+
<li class="preview">
94+
{% if (diary.data.redirectTo) %}{% set url %}{{diary.data.redirectTo}}{% endset %}
95+
{% else %}{% set url %}{{diary.url}}{% endset %}
96+
{% endif %}
97+
98+
<a href="{{ url }}" title="{{ diary.data.title }}">
99+
100+
{% if loop.index % 3 == 1 %}
101+
{% set theme %} bloody {% endset %}
102+
{% elif loop.index % 2 == 1 %}
103+
{% set theme %} light {% endset %}
104+
{% else %}
105+
{% set theme %} dark {% endset %}
106+
{% endif %}
107+
108+
<my-preview
109+
{% if diary.data.image %}
110+
{% set imagePath %}.{{ diary.url }}{{ diary.data.image }}{% endset %}
111+
background="{% rawImageUrl diary, diary.data.image, 250 %}"
112+
{% endif %}
113+
class="{{ diary.data.tags.join(' ') }} {{ theme }}"
114+
>
115+
<span slot="title">{{ diary.data.title }}</span>
116+
</my-preview>
117+
118+
</a>
119+
</li>
120+
{% endfor %}
121+
</ul>
122+
<a slot="next" href="/blog/campaigns/">more...</a>
123+
</my-section>
124+
</section>

content/blog/black-griffin-session-30/black-griffin-session-30.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: Black Griffin Campaign Diary (Session 30)
33
date: 2019-03-18
4-
tags: posts
4+
tags:
5+
- posts
6+
- diaries
57
layout: layouts/post.njk
68
image: /blog/black-griffin-session-30/black-griffin-encampment.png
79
permalink: "{% backwardSupportPermalinkStem page %}.html"

content/blog/black-griffin-session-31/black-griffin-session-31.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: Black Griffin Campaign Diary (Session 31)
33
date: 2019-04-01
4-
tags: posts
4+
tags:
5+
- posts
6+
- diaries
57
layout: layouts/post.njk
68
image: /blog/black-griffin-session-31/lively-farm.png
79
permalink: "{% backwardSupportPermalinkStem page %}.html"

content/blog/black-griffin-session-32/black-griffin-session-32.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: Black Griffin Campaign Diary (Session 32)
33
date: 2019-04-16
4-
tags: posts
4+
tags:
5+
- posts
6+
- diaries
57
layout: layouts/post.njk
68
image: /blog/black-griffin-session-32/black-griffin-encampment.png
79
permalink: "{% backwardSupportPermalinkStem page %}.html"

content/blog/black-griffin-session-33/black-griffin-session-33.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: Black Griffin Campaign Diary (Session 33)
33
date: 2019-04-30
4-
tags: posts
4+
tags:
5+
- posts
6+
- diaries
57
layout: layouts/post.njk
68
image: /blog/black-griffin-session-33/black-griffin-encampment.png
79
permalink: "{% backwardSupportPermalinkStem page %}.html"

content/blog/black-griffin-session-34/black-griffin-session-34.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: Black Griffin Campaign Diary (Session 34)
33
date: 2019-05-13
4-
tags: posts
4+
tags:
5+
- posts
6+
- diaries
57
layout: layouts/post.njk
68
image: /blog/black-griffin-session-34/black-griffin-encampment.png
79
permalink: "{% backwardSupportPermalinkStem page %}.html"

content/blog/black-griffin-session-35/black-griffin-session-35.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
title: Black Griffin Campaign Diary (Session 35)
33
date: 2019-05-27
4-
tags: posts
4+
tags:
5+
- posts
6+
- diaries
57
layout: layouts/post.njk
68
image: /blog/black-griffin-session-35/black-griffin-encampment.png
79
permalink: "{% backwardSupportPermalinkStem page %}.html"

0 commit comments

Comments
 (0)