Skip to content

Commit e1e026b

Browse files
committed
stubs out data and template helpers
1 parent de580df commit e1e026b

File tree

5 files changed

+47
-1
lines changed

5 files changed

+47
-1
lines changed

public/_helpers.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555

5656
{% includeData 'demos.json' as demos %}
5757

58+
{% includeData 'learning.json' as learning %}
59+
5860
{# includeData '_db/webvr_scenes.json' as sites #}
5961
{# includeData '_db/bugs.json' as bugs #}
6062
{# includeData '_db/compat_reports.json' as compat_reports #}
@@ -67,6 +69,27 @@
6769
people: people
6870
} #}
6971

72+
{% macro learning_item (slug) %}
73+
{% set learn = learning[slug] %}
74+
{% set name = learn.name %}
75+
{% set description = learn.description %}
76+
{% set url = learn.url %}
77+
{% set thumb = learn.thumbnail %}
78+
{% set author = learn.author %}
79+
80+
<li>
81+
<div>
82+
<div>
83+
<a itemprop="url" href="{{ url }}" class="no-underline">
84+
<img src="{{ thumb }}"/>
85+
<h3>{{ name }}</h3>
86+
</a>
87+
{{ description }}
88+
</div>
89+
</div>
90+
</li>
91+
{% endmacro %}
92+
7093
{% set browsers = {
7194
chrome: chrome,
7295
chromium: chromium,

public/_learning.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% from '_helpers.html' import learning_item %}
2+
3+
<section class="notifications" id="notifications">
4+
{% block learning %}
5+
{{ learning_item('progressive-webvr') }}
6+
{% endblock %}
7+
</section>
219 KB
Loading

public/index.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,14 @@
3838
</div>
3939
</section>
4040

41+
<section id="learn" class="section">
42+
<h1>Learn about WebVR</h1>
43+
44+
{% include '_learning.html' %}
45+
</section>
46+
4147
<section id="browsers" class="section browsers" data-section="browsers">
42-
<h1><a href="#browsers">WebVR Browsers</a></h1>
48+
<h1><a href="#browsers">Supported Browsers</a></h1>
4349

4450
<div class="notifications" id="notifications">
4551
{% for _, browser in browsers %}

public/learning.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"progressive-webvr": {
3+
"name": "Progressive Enhancement with WebVR.",
4+
"description": "Arturo Paracuellos, the creator of Puzzle Rain and other notable WebVR experiences, runs us through how he made a WebVR experience for weather.com that progressively enhances from mobile phones all the way up to full VR systems like the HTC VIVE.",
5+
"url": "https://unboring.net/workflows/progressive-enhancement/",
6+
"author": "Arturo Paracuellos",
7+
"author_url": "unboring.net",
8+
"thumbnail": "articles/progressive-webvr/thumbnail.png"
9+
}
10+
}

0 commit comments

Comments
 (0)