diff --git a/assets/css/cards.css b/assets/css/components/cards.css similarity index 100% rename from assets/css/cards.css rename to assets/css/components/cards.css diff --git a/assets/css/components/steps.css b/assets/css/components/steps.css new file mode 100644 index 0000000..680d02d --- /dev/null +++ b/assets/css/components/steps.css @@ -0,0 +1,11 @@ +.steps h3 { + counter-increment: step; + + &:before { + @apply absolute w-[33px] h-[33px]; + @apply border-4 border-white bg-gray-100 dark:border-dark dark:bg-neutral-800; + @apply rounded-full text-neutral-400 text-base font-normal text-center -indent-px; + @apply mt-[3px] ml-[-41px]; + content: counter(step); + } +} diff --git a/assets/css/styles.css b/assets/css/styles.css index 94fe56c..0dc9e3b 100644 --- a/assets/css/styles.css +++ b/assets/css/styles.css @@ -3,7 +3,8 @@ @tailwind utilities; @import "typography.css"; -@import "cards.css"; +@import "components/cards.css"; +@import "components/steps.css"; html { @apply text-base antialiased; diff --git a/content/docs/components/steps.md b/content/docs/components/steps.md new file mode 100644 index 0000000..e8835a1 --- /dev/null +++ b/content/docs/components/steps.md @@ -0,0 +1,40 @@ +--- +title: Steps +--- + +A built-in component to display a series of steps. + +## Example + +{{< steps >}} + +### Step 1 + +This is the first step. + +### Step 2 + +This is the second step. + +### Step 3 + +This is the third step. + +{{< /steps >}} + + +## Usage + +Put Markdown h3 header within `steps` shortcode. + +```markdown +{{* steps */>}} +### Step 1 + +This is the first step. + +### Step 2 + +This is the second step. +{{* /steps */>}} +``` diff --git a/data/icons.yaml b/data/icons.yaml index dbcbd13..b6dc10b 100644 --- a/data/icons.yaml +++ b/data/icons.yaml @@ -33,6 +33,6 @@ theme-light: > theme-dark: -breadcrumb-delimiter: +chevron-right: warning: diff --git a/layouts/partials/breadcrumb.html b/layouts/partials/breadcrumb.html index e7a4e3c..8540d7f 100644 --- a/layouts/partials/breadcrumb.html +++ b/layouts/partials/breadcrumb.html @@ -4,7 +4,7 @@
- {{ partial "utils/icon.html" (dict "context" . "name" "breadcrumb-delimiter" "attributes" "class=\"w-3.5 shrink-0\"") }} + {{ partial "utils/icon.html" (dict "context" . "name" "chevron-right" "attributes" "class=\"w-3.5 shrink-0\"") }} {{ end }} {{ end }}