Skip to content

Commit

Permalink
Merge pull request #4 from Black-Axis/dev
Browse files Browse the repository at this point in the history
Restructure files & add `list` mixin
  • Loading branch information
krypton225 authored Oct 30, 2024
2 parents 2ad61ca + 42c6ca9 commit b086c31
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/mixins/global/_index.pug
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include ./_no-script

include ./_space

include ./_list
11 changes: 11 additions & 0 deletions src/mixins/global/_list.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include ./_space.pug

mixin list(type="ul", items)
if type === "ul"
ul(role="list")
each item in items
li(role="listitem")= item
else if type === "ol"
ol(role="list")
each item in items
li(role="listitem")= item
8 changes: 7 additions & 1 deletion src/mixins/meta/_index.pug
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
include ./_meta
include ./_meta-theme

include ./_main-meta-data

include ./_meta-description

include ./_meta-keywords
12 changes: 0 additions & 12 deletions src/mixins/meta/_meta.pug → src/mixins/meta/_main-meta-data.pug
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,3 @@ mixin meta-data(author = "Author Name")

meta(name="author" content=author)
+space()

mixin meta-desc(contentOfDescription)
meta(name="description" content=contentOfDescription)
+space()

mixin meta-words(words)
meta(name="keywords", content=words)
+space()

mixin meta-theme(color)
meta(name="theme-color" content=color)
+space()
5 changes: 5 additions & 0 deletions src/mixins/meta/_meta-description.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include ../global/_space

mixin meta-desc(contentOfDescription)
meta(name="description" content=contentOfDescription)
+space()
7 changes: 7 additions & 0 deletions src/mixins/meta/_meta-keywords.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include ../global/_space

mixin meta-words(...words)
- const keywords = words.join(", ");

meta(name="keywords", content=keywords)
+space()
5 changes: 5 additions & 0 deletions src/mixins/meta/_meta-theme.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include ../global/_space

mixin meta-theme(color = "#212121")
meta(name="theme-color" content=color)
+space()

0 comments on commit b086c31

Please sign in to comment.