Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

[Courses] "Coming Soon" Styles #6649

Merged
merged 3 commits into from
Nov 2, 2021
Merged
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
5 changes: 5 additions & 0 deletions src/scss/blocks/_stack-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
}
}

// Smaller font size for placeholder meta
.is-placeholder .stack-nav__meta {
font-size: 0.7em;
}

.stack-nav__heading {
font-size: get-size('size-2');
padding-inline-start: $global-gutter-narrow;
Expand Down
5 changes: 5 additions & 0 deletions src/scss/pages/_course.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ $course-side-vert-space: 20px;
}
}

// Placeholder items have slightly dimmed look and feel
.is-placeholder span {
@include apply-utility('color', 'mid-text');
}

// Allows the sidebar elements to place and flex themselves
web-navigation-drawer > * {
display: flex;
Expand Down
2 changes: 2 additions & 0 deletions src/site/_filters/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ function mapPagesToTree(collection, map) {
title: item.data.title,
description: item.data.description,
date: item.data.date,
// @ts-ignore
placeholder: item.data.placeholder,
};
}
}
Expand Down
20 changes: 13 additions & 7 deletions src/site/_includes/partials/course-index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
{%- for item in pageNavigation.list -%}
{#- Skip the first item so we don't show an entry for the current page. -#}
{%- if not loop.first -%}
{%- set title = item.data.title or '' -%}
{%- if item.title -%}
{%- set title = item.title | i18n(locale) -%}
{%- endif -%}

<h3><a href="{{ item.url }}">{{ title }}</a></h3>
<p>{{ item.data.description }}</p>
{%- set title = item.data.title or '' -%}
{%- if item.title -%}
{%- set title = item.title | i18n(locale) -%}
{%- endif -%}
{%- if not item.data.placeholder -%}
<h3><a href="{{ item.url }}">{{ title }}</a></h3>
<p>{{ item.data.description }}</p>
{%- endif -%}
{# Don't link to placeholder items #}
{%- if item.data.placeholder -%}
<h3>{{ title }}</h3>
<p>{{ item.data.description }}</p>
{%- endif -%}
{%- endif -%}
{%- endfor -%}
10 changes: 9 additions & 1 deletion src/site/_includes/partials/navigation-drawer-course.njk
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@
{% if item.url %}
{# The isNew flag is used to display a 'NEW' badge next to content. #}
{% set isNew = false %}
{% set isPlaceholder= false %}
{# Check to make sure the content was published after the course's #}
{# initial launch date (so everything doesn't say 'NEW' when we #}
{# first launch a course). #}
{% if item.data.date > courseData.meta.date %}
{# Only show the 'NEW' badge if content is less than thirty days old. #}
{% set isNew = item.data.date | isNewContent %}
{% endif %}
<a class="repel" href="{{ item.url }}" {% if item.url == page.url %}aria-current="page"{% endif %}>
{% if item.data.placeholder %}
{# Set disabled style #}
{% set isDisabledClass = 'is-placeholder' %}
{% endif %}
<a class="repel {{isDisabledClass}}" {% if item.url == page.url %}aria-current="page"{% endif %} {% if item.data.placeholder != true %} href="{{ item.url }}" {% endif %}>
<span class="cluster">
<span class="stack-nav__meta">{{ item.counter }}</span>
<span>{{ title }}</span>
Expand All @@ -26,6 +31,9 @@
{% if isNew %}
<span class="stack-nav__meta tt-upper color-action-text">{{ 'i18n.common.new' | i18n(locale) }}</span>
{% endif %}
{% if item.data.placeholder %}
<span class="stack-nav__meta tt-upper color-action-text">{{ 'Coming Soon' }}</span>
{% endif %}
{{ icon('done') }}
</span>
</a>
Expand Down
1 change: 1 addition & 0 deletions src/site/content/en/learn/design/accessibility/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- adactio
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/design/icons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- adactio
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/design/interaction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- adactio
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/design/media-features/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- adactio
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/design/picture-element/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- adactio
date: 2021-11-03
placeholder: true
---

Coming soon!
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- adactio
date: 2021-11-03
placeholder: true
---

Coming soon!
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- adactio
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/design/theming/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- adactio
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/design/typography/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- adactio
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/design/ui-patterns/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- adactio
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/app-design/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/architecture/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/assets-and-data/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/caching/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/capabilities/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/complexity/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/conclusion/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/detection/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/enhancements/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/experimental/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/installation-prompt/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/offline-data/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/os-integration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/service-workers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/serving/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/tools-and-debug/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/update/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/web-app-manifest/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/windows/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions src/site/content/en/learn/pwa/workbox/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
authors:
- firt
date: 2021-11-03
placeholder: true
---

Coming soon!
1 change: 1 addition & 0 deletions types/navigation/navigation-item.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ declare global {
title: string,
description: string,
date: Date,
placeholder: string,
},
prev?: NavigationItem | null,
next?: NavigationItem | null,
Expand Down