diff options
author | Maxim Tsoy <maks.tsoy@gmail.com> | 2019-05-06 17:54:23 +0300 |
---|---|---|
committer | Maxim Tsoy <maks.tsoy@gmail.com> | 2019-05-06 17:54:23 +0300 |
commit | 6c26b2f50e7d6caba54f11e43ec1227762f8efaa (patch) | |
tree | a4178c616697cc5f891119d48f24eab2929fe6dc | |
parent | 212d36183d990a6d8e5ec15a0ab92efb2a889f39 (diff) |
Add the deprecation section
-rw-r--r-- | archetypes/deprecated.md | 11 | ||||
-rw-r--r-- | assets/changelog.scss | 22 | ||||
-rw-r--r-- | layouts/index.html | 51 |
3 files changed, 71 insertions, 13 deletions
diff --git a/archetypes/deprecated.md b/archetypes/deprecated.md new file mode 100644 index 0000000..2684fbf --- /dev/null +++ b/archetypes/deprecated.md @@ -0,0 +1,11 @@ +--- +title: "({{ now.Format "2006-01-02" }})" +subtitle: created on {{ now.Format "2006-01-02" }} +date: {{ .Date }} +removal_date: {{ now.Format "2006-01-02" }} # Set this to the target date of removal (YYYY-MM-DD) +weight: +version: +draft: true +--- + +Feature X will be removed diff --git a/assets/changelog.scss b/assets/changelog.scss index 15d56f9..1978de6 100644 --- a/assets/changelog.scss +++ b/assets/changelog.scss @@ -26,12 +26,16 @@ $tag-security: #e85600; // @import "spectre/src/codes"; // @import "spectre/src/media"; +// Icons +@import "spectre/src/icons/icons-core"; +@import "spectre/src/icons/icons-navigation"; + // Layout @import "spectre/src/layout"; // @import "spectre/src/navbar"; // Components -// @import "spectre/src/accordions"; +@import "spectre/src/accordions"; // @import "spectre/src/avatars"; // @import "spectre/src/badges"; // @import "spectre/src/breadcrumbs"; @@ -105,6 +109,22 @@ $tag-security: #e85600; display: inline-block; } +.deprecated { + border-radius: 10px; + + label { + cursor: pointer; + } + + .accordion-body { + margin-top: 1rem; + + .timeline-item::before { + background-color: #ffb700; + } + } +} + .experimental ul { margin: 0.4em; } diff --git a/layouts/index.html b/layouts/index.html index 8b8b3c7..84ce954 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,21 +11,48 @@ <div class="section timeline"> {{ if eq $paginator.PageNumber 1 }} - {{ $experimentalPages := where .Pages "Section" "experimental" }} - {{ if $experimentalPages }} - <div class="timeline-item experimental"> - <div class="timeline-left"> - <div class="timeline-icon"></div> - </div> - <div class="changes timeline-content"> - <div> - {{ range $experimentalPages }} - {{ .Content }} - {{ end }} + {{ $deprecatedFeatures := where .Pages "Section" "deprecated" }} + {{ if $deprecatedFeatures }} + <div class="accordion deprecated"> + <input type="checkbox" id="accordion-1" name="accordion-checkbox" hidden> + <label class="accordion-header" for="accordion-1"> + <i class="icon icon-arrow-right mr-1"></i> + <span class="label label-rounded label-warning">{{ len ($deprecatedFeatures) }}</span> deprecated features + </label> + <div class="accordion-body"> + <div class="timeline-item"> + <div class="timeline-left"> + <div class="timeline-icon"></div> + </div> + <div class="changes timeline-content"> + <div> + {{ range $deprecatedFeatures }} + <h6>{{ .Params.removal_date }}</h6> + {{ .Content }} + {{ end }} + </div> </div> </div> </div> - {{ end }} + </div> + {{ end }} + + {{ $experimentalPages := where .Pages "Section" "experimental" }} + + {{ if $experimentalPages }} + <div class="timeline-item experimental"> + <div class="timeline-left"> + <div class="timeline-icon"></div> + </div> + <div class="changes timeline-content"> + <div> + {{ range $experimentalPages }} + {{ .Content }} + {{ end }} + </div> + </div> + </div> + {{ end }} {{ end }} {{ range $paginator.Pages }} |