mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
expand: don't handle expand as task list in bullet point list #508
This commit is contained in:
parent
689abf0706
commit
fbec0ece8f
4 changed files with 185 additions and 8 deletions
172
exampleSite/content/tests/lists/_index.en.md
Normal file
172
exampleSite/content/tests/lists/_index.en.md
Normal file
|
@ -0,0 +1,172 @@
|
|||
+++
|
||||
description = "Test shortcodes inside of list items"
|
||||
title = "Lists"
|
||||
+++
|
||||
|
||||
## Plain
|
||||
|
||||
- one
|
||||
- two
|
||||
- two
|
||||
|
||||
and a half
|
||||
|
||||
- three
|
||||
|
||||
## Attachments
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{% attachments style="blue" /%}}
|
||||
|
||||
{{% attachments style="blue" /%}}
|
||||
|
||||
- three
|
||||
|
||||
## Badge
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{% badge color="fuchsia" icon="fab fa-hackerrank" %}}Awesome{{% /badge %}}
|
||||
|
||||
{{% badge color="fuchsia" icon="fab fa-hackerrank" %}}Awesome{{% /badge %}}
|
||||
|
||||
- three
|
||||
|
||||
## Button
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{% button href="https://gohugo.io/" style="warning" icon="dragon" %}}Get Hugo{{% /button %}}
|
||||
|
||||
{{% button href="https://gohugo.io/" style="warning" icon="dragon" %}}Get Hugo{{% /button %}}
|
||||
|
||||
- three
|
||||
|
||||
## Children
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{% children sort="weight" %}}
|
||||
|
||||
{{% children sort="weight" %}}
|
||||
|
||||
- three
|
||||
|
||||
## Expand
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{% expand title="Expand me..." %}}Thank you!{{% /expand %}}
|
||||
|
||||
{{% expand title="Expand me..." %}}Thank you!{{% /expand %}}
|
||||
|
||||
- three
|
||||
|
||||
## Icon
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{% icon icon="exclamation-triangle" %}}
|
||||
|
||||
{{% icon icon="exclamation-triangle" %}}
|
||||
|
||||
- three
|
||||
|
||||
## Include
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{% include file="shortcodes/INCLUDE_ME.md" %}}
|
||||
|
||||
{{% include file="shortcodes/INCLUDE_ME.md" %}}
|
||||
|
||||
- three
|
||||
|
||||
## Math
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{< math align="center" >}}
|
||||
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
|
||||
{{< /math >}}
|
||||
|
||||
{{< math align="center" >}}
|
||||
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$
|
||||
{{< /math >}}
|
||||
|
||||
- three
|
||||
|
||||
## Mermaid
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{< mermaid align="center" zoom="true" >}}
|
||||
graph LR;
|
||||
If --> Then
|
||||
Then --> Else
|
||||
{{< /mermaid >}}
|
||||
|
||||
{{< mermaid align="center" zoom="true" >}}
|
||||
graph LR;
|
||||
If --> Then
|
||||
Then --> Else
|
||||
{{< /mermaid >}}
|
||||
|
||||
- three
|
||||
|
||||
## Notice
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{% notice style="primary" title="There may be pirates" icon="skull-crossbones" %}}
|
||||
It is all about the boxes.
|
||||
{{% /notice %}}
|
||||
|
||||
{{% notice style="primary" title="There may be pirates" icon="skull-crossbones" %}}
|
||||
It is all about the boxes.
|
||||
{{% /notice %}}
|
||||
|
||||
- three
|
||||
|
||||
## Siteparam
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{% siteparam name="editURL" %}}
|
||||
|
||||
{{% siteparam name="editURL" %}}
|
||||
|
||||
- three
|
||||
|
||||
## Tabs
|
||||
|
||||
- one
|
||||
- two
|
||||
- {{< tabs >}}
|
||||
{{% tab name="python" %}}
|
||||
```python
|
||||
print("Hello World!")
|
||||
```
|
||||
{{% /tab %}}
|
||||
{{% tab name="bash" %}}
|
||||
```bash
|
||||
echo "Hello World!"
|
||||
```
|
||||
{{% /tab %}}
|
||||
{{< /tabs >}}
|
||||
|
||||
{{< tabs >}}
|
||||
{{% tab name="python" %}}
|
||||
```python
|
||||
print("Hello World!")
|
||||
```
|
||||
{{% /tab %}}
|
||||
{{% tab name="bash" %}}
|
||||
```bash
|
||||
echo "Hello World!"
|
||||
```
|
||||
{{% /tab %}}
|
||||
{{< /tabs >}}
|
||||
|
||||
- three
|
5
exampleSite/content/tests/lists/_index.pir.md
Normal file
5
exampleSite/content/tests/lists/_index.pir.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
+++
|
||||
description = "Test shortcodes inside of list items"
|
||||
title = "Lists"
|
||||
+++
|
||||
{{< piratify >}}
|
|
@ -171,7 +171,7 @@
|
|||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
article ul li:has(input[type="checkbox"]) {
|
||||
article ul > li:has(> input[type="checkbox"]) {
|
||||
margin-left: -1rem;
|
||||
}
|
||||
/* tabs */
|
||||
|
@ -748,12 +748,12 @@
|
|||
color: #4a4a4a; /* var(--MAIN-TITLES-TEXT-color) */
|
||||
}
|
||||
|
||||
article ul li input[type="checkbox"] {
|
||||
article ul > li > input[type="checkbox"] {
|
||||
background-color: #ffffff; /* var(--INTERNAL-MAIN-BG-color); */
|
||||
color: #101010; /* var(--INTERNAL-MAIN-TEXT-color) */
|
||||
}
|
||||
|
||||
article ul li input[type="checkbox"]::before {
|
||||
article ul > li > input[type="checkbox"]::before {
|
||||
box-shadow: inset 1em 1em #7dc903; /* var(--INTERNAL-PRIMARY-color) */
|
||||
}
|
||||
|
||||
|
|
|
@ -1586,17 +1586,17 @@ input[type="search"]::-webkit-search-results-decoration { display: none; }
|
|||
}
|
||||
|
||||
/* task list and its checkboxes */
|
||||
article ul li:has(input[type="checkbox"]) {
|
||||
article ul > li:has(> input[type="checkbox"]) {
|
||||
list-style: none;
|
||||
margin-inline-start: -1rem;
|
||||
}
|
||||
|
||||
article ul li:has(input[type="checkbox"])::before {
|
||||
article ul > li:has(> input[type="checkbox"])::before {
|
||||
content: "\200B"; /* accessibilty for Safari https://developer.mozilla.org/en-US/docs/Web/CSS/list-style */
|
||||
}
|
||||
|
||||
/* https://moderncss.dev/pure-css-custom-checkbox-style/ */
|
||||
article ul li input[type="checkbox"] {
|
||||
article ul > li > input[type="checkbox"] {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
/* For iOS < 15 */
|
||||
|
@ -1613,7 +1613,7 @@ article ul li input[type="checkbox"] {
|
|||
width: 1.15em;
|
||||
}
|
||||
|
||||
article ul li input[type="checkbox"]::before {
|
||||
article ul > li > input[type="checkbox"]::before {
|
||||
box-shadow: inset 1em 1em var(--INTERNAL-PRIMARY-color);
|
||||
clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
|
||||
content: "";
|
||||
|
@ -1626,7 +1626,7 @@ article ul li input[type="checkbox"]::before {
|
|||
background-color: CanvasText;
|
||||
}
|
||||
|
||||
article ul li input[type="checkbox"]:checked::before {
|
||||
article ul > li > input[type="checkbox"]:checked::before {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue