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

Learning sections #221

Open
wants to merge 5 commits into
base: main
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
24 changes: 24 additions & 0 deletions public/_helpers.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@

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

{% includeData 'learning.json' as learning %}

{# includeData '_db/webvr_scenes.json' as sites #}
{# includeData '_db/bugs.json' as bugs #}
{# includeData '_db/compat_reports.json' as compat_reports #}
Expand All @@ -67,6 +69,28 @@
people: people
} #}

{% macro learning_item (slug) %}
{% set learn = learning[slug] %}
{% set name = learn.name %}
{% set description = learn.description %}
{% set url = learn.url %}
{% set thumb = learn.thumbnail %}
{% set author = learn.author %}
{% set datePublished = learn.date_published %}
<li class="grid-flex-cell-1of2">
<div>
<div>
<a itemprop="url" href="{{ url }}" class="no-underline">
<img src="{{ thumb }}"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add alt="{{ name }}"?

<h3>{{ name }}</h3>
</a>
<time datetime="{{ datePublished }}">{{ datePublished }}</time>
<p>{{ description }}</p>
</div>
</div>
</li>
{% endmacro %}

{% set browsers = {
chrome: chrome,
chromium: chromium,
Expand Down
6 changes: 6 additions & 0 deletions public/_learning.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% from '_helpers.html' import learning_item %}

{% block learning %}
{{ learning_item('progressive-webvr') }}
{{ learning_item('tools') }}
{% endblock %}
Binary file added public/articles/progressive-webvr/thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/articles/tools/thumbnail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 18 additions & 9 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@

<main id="main" class="main" role="main">
<div class="container">
<section class="notifications" id="notifications">
{% for _, browser in browsers %}
{% if browser.notifications %}
{{ browser_notifications(browser) }}
{% endif %}
{% endfor %}
</section>

<section id="intro" class="section intro" data-section="intro">
<div class="intro-text">
<p class="intro-para"><strong>WebVR</strong> is a <a href="https://w3c.github.com/webvr/"><em>JavaScript API</em></a> for creating immersive 3D, <em>Virtual Reality</em> experiences in your <em>browser</em>.</p>
Expand All @@ -46,8 +38,25 @@
</div>
</section>

<section id="learn" class="section">
<h1>Learn about WebVR</h1>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a <a href="#learn">…</a>?


<ul class="matrix grid-flex-container">
{% include '_learning.html' %}
</ul>
</section>

<section id="browsers" class="section browsers" data-section="browsers">
<h1><a href="#browsers">WebVR Browsers</a></h1>
<h1><a href="#browsers">Supported Browsers</a></h1>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can lowercase Browsers: browsers


<div class="notifications" id="notifications">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think we need to show the Notifications?

{% for _, browser in browsers %}
{% if browser.notifications %}
{{ browser_notifications(browser) }}
{% endif %}
{% endfor %}
</div>

<ul data-section="browsers" class="matrix grid-flex-container">
{{ browser_item('microsoft_edge') }}
{{ browser_item('firefox') }}
Expand Down
20 changes: 20 additions & 0 deletions public/learning.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"progressive-webvr": {
"name": "Progressive Enhancement with WebVR.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove the period

"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.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd capitalise: Weather.com

"url": "https://unboring.net/workflows/progressive-enhancement/",
"author": "Arturo Paracuellos",
"author_url": "unboring.net",
"thumbnail": "articles/progressive-webvr/thumbnail.png",
"date_published": "5-April-2017"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change this to April 5, 2017 (to be consistent with the dates elsewhere)

},
"tools": {
"name": "Tools for creating WebVR content.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove the period

"description": "See all the options available for creating WebVR content",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add a period (to be consistent with the description above)

"url": "tools.html",
"author": "Casey Yee",
"author_url": "twitter.com/whoyee",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefix with https://

"thumbnail": "articles/tools/thumbnail.jpg",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefix with /

"date_published": "9-May-2017"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change to May 9, 2017?

}
}
2 changes: 1 addition & 1 deletion public/media/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ h1.page-heading {
.notifications {
display: flex;
flex-direction: column-reverse;
margin-bottom: 1.5rem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does this look on mobile on the homepage?

}

.notifications .message {
Expand Down Expand Up @@ -1618,7 +1619,6 @@ html[data-layout~="headset"][data-layout~="htc_vive"] .edit-page a:hover {
}

.main h1 {
border-top: 1px solid #eee;
padding-top: 3rem;
}

Expand Down
36 changes: 36 additions & 0 deletions public/tools.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% from '_helpers.html' import author_item, browsers, site_title %}
Copy link
Contributor

@cvan cvan May 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove author_item, which seems to be unused

{% set browser = browsers.servo %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this and the line below

{% set page = 'servo.html' %}
<!doctype html>
<html lang="en" data-layout="secondary" data-browser="{{ browser.slug }}">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove the data-browser attribute

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change to data-layout="secondary tools"?

<head>
{% include '_head.html' %}
<title>Tools</title>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change to add the WebVR Rocks text to the title?

<title>Tools • {{ site_title }}</title>

</head>
<body>
<header id="header" class="header" role="banner">
<div class="container section">
{% include '_logo.html' %}

<a class="page-heading-link" href="{{ browser.about }}">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change this to href="/tools?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could replace this with something like this instead:

        <a class="page-heading-link" href="/tools">
          <h1 class="page-heading">Tools</h1>
        </a>

        <p class="browser-intro page-intro">Creating WebVR content</p>

<h1 class="browser-name page-heading">Tools for creating WebVR content</h1>
</a>
</div>
</header>

<main id="main" class="main" role="main">
<div class="container">

<section class="section">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add id="setup"?

<h2><a href="#setup">Instructions</a></h2>
<ul class="bullets-light">
<li><span>Three.js</span></li>
<li><span>A-Frame</span></li>
</ul>
</section>
</div>
</main>

{% include '_footer.html' %}
</body>
</html>