Skip to content

Commit

Permalink
polish keywork shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
nunocoracao committed Jan 4, 2024
1 parent 09bdcb7 commit 23bb87b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ smartTOCHideUnfocusedChildren = false
showMoreLinkDest = "docs"
cardView = false
cardViewScreenWidth = false
layoutBackgroundBlur = false # only used when layout equals background
layoutBackgroundBlur = true # only used when layout equals background

[article]
showDate = false
Expand Down
11 changes: 10 additions & 1 deletion exampleSite/content/docs/shortcodes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,22 @@ The `keyword` component can be used to visually highlight certain important word

The input is written in Markdown so you can format it however you please.

**Example:**
**Example1 :**

```md
{{</* keyword */>}} Super skill {{</* /keyword */>}}
```

{{< keyword >}} *Standalone* skill {{< /keyword >}}

**Example2 :**

```md
{{</* keywordList */>}}
{{</* keyword icon="github" */>}} Lorem ipsum dolor. {{</* /keyword */>}}
{{</* keyword icon="code" */>}} **Important** skill {{</* /keyword */>}}
{{</* /keywordList */>}}

{{</* keyword */>}} *Standalone* skill {{</* /keyword */>}}
```

Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/samples/icons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The full list of built-in icons and their corresponding names can referenced bel
| edit | {{< icon edit >}} |
| email | {{< icon email >}} |
| envelope | {{< icon envelope >}} |
| expand | {{< icon expand >}} |
| eye | {{< icon eye >}} |
| facebook | {{< icon facebook >}} |
| fire | {{< icon fire >}} |
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/keyword.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ $icon := .Get "icon"}}
<div class="flex mt-2">
<span
class="rounded-full bg-primary-500 dark:bg-primary-300 text-neutral-50 dark:text-neutral-700 px-1.5 py-[1px] text-xs font-normal"
class="rounded-full bg-primary-500 dark:bg-primary-400 text-neutral-50 dark:text-neutral-800 px-1.5 py-[1px] text-xs font-normal"
>
<span class="flex flex-row items-center">
{{if $icon}}
Expand Down

0 comments on commit 23bb87b

Please sign in to comment.