Move show/hide deprecated from core to sample code

This commit is contained in:
2024-07-12 22:19:53 -04:00
parent dcbc471c4d
commit e1643b4f38
6 changed files with 8533 additions and 50 deletions

View File

@@ -6,6 +6,10 @@
-
var content = [
{
name: "this-pattern-doesn't-exist",
status: "deprecated",
},
{
name: "colours",
status: "complete",

View File

@@ -33,10 +33,14 @@ mixin show-content(items, path)
data-status=items.status
data-core= (items.core ? "true" : "false")
)
h1(class="status-" + items.status )
span= items.name.toSentenceCase().toContent()
tool-tip(role="tooltip" inert tip-position="right")= items.status.toSentenceCase().toContent()
if items.files
each item in items.files
+show-content(item, path)
doctype html
html(lang= lang )
head
@@ -56,11 +60,6 @@ html(lang= lang )
block header
p.deprecated-switch
span
span#deprecated(role="switch")
label(for="deprecated") Show deprecated patterns
main#main
h1= site

View File

@@ -16,4 +16,9 @@ block header
a(href="./") Home
each first in content
li(class= navClass)
a(href="./?p=" + first.name )= first.name.toContent().toSentenceCase()
a(href="./?p=" + first.name )= first.name.toContent().toSentenceCase()
p.deprecated-switch
span
span#deprecated(role="switch")
label(for="deprecated") Show deprecated patterns