Skip to content

Commit a765585

Browse files
feat(blog): migrate sunshine community guides (#202)
1 parent 01825bd commit a765585

30 files changed

+1549
-7
lines changed

_config_theme.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ navbar-text-col: "#e4e6eb"
5959
page-col: "#303436"
6060
text-col: "#e4e4e4"
6161
mobile-theme-col: "#05FF3B"
62+
sass:
63+
sass_dir: _sass
64+
style: compressed
6265
site-css:
63-
- "/assets/css/custom-styles.css"
66+
- "/assets/css/styles.css"
6467
gtag: "G-SSW90X5YZX"
6568
giscus:
6669
hostname: giscus.app # Replace with your giscus instance's hostname if self-hosting

_includes/admonition.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{% comment %}
2+
credit: https://www.adamsdesk.com/posts/admonitions-jekyll
3+
{% endcomment %}
4+
5+
{% if include.type.size > 0 and include.body.size > 0 %}
6+
{% assign types = "
7+
attention:Attention,
8+
caution:Caution,
9+
danger:Danger,
10+
error:Error,
11+
hint:Hint,
12+
important:Important,
13+
note:Note,
14+
seealso:See also,
15+
tip:Tip,
16+
todo: TODO,
17+
warning:Warning" | split: "," %}
18+
{% assign title = include.title | default: "" %}
19+
{% if title == "" %}
20+
{% for type in types %}
21+
{% assign typeKeyVal = type | split: ":" %}
22+
{% assign typeKey = typeKeyVal[0] | strip %}
23+
{% assign typeValue = typeKeyVal[1] | strip %}
24+
{% if typeKey == include.type %}
25+
{% assign title = typeValue %}
26+
{% endif %}
27+
{% endfor %}
28+
{% endif %}
29+
<div class="admonition {{ include.type }} rounded">
30+
<p class="admonition-title">{{ title }}</p>
31+
<p>
32+
{{ include.body | markdownify }}
33+
</p>
34+
</div>
35+
{% endif %}

_includes/tabs.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<div class="tabs">
2+
<ul class="nav nav-underline" role="tablist">
3+
{% for tab in include.tabs %}
4+
<li class="nav-item" role="presentation">
5+
<button
6+
class="nav-link {% if forloop.first %}active{% endif %}"
7+
id="{{ tab.name | slugify }}{% if include.index and include.index >= 0 %}-{{ include.index }}{% endif %}-tab"
8+
data-bs-toggle="tab"
9+
data-bs-target="#{{ tab.name | slugify }}{% if include.index and include.index >= 0 %}-{{ include.index }}{% endif %}-pane"
10+
type="button"
11+
role="tab"
12+
aria-controls="{{ tab.name | slugify }}{% if include.index and include.index >= 0 %}-{{ include.index }}{% endif %}-pane"
13+
aria-selected="{% if forloop.first %}true{% else %}false{% endif %}"
14+
>{{ tab.name }}</button>
15+
</li>
16+
{% endfor %}
17+
</ul>
18+
<div class="tab-content">
19+
{% for tab in include.tabs %}
20+
<div
21+
class="tab-pane fade {% if forloop.first %}show active{% endif %}"
22+
id="{{ tab.name | slugify }}{% if include.index and include.index >= 0 %}-{{ include.index }}{% endif %}-pane"
23+
role="tabpanel"
24+
aria-labelledby="{{ tab.name | slugify }}{% if include.index and include.index >= 0 %}-{{ include.index }}{% endif %}-tab"
25+
tabindex="0"
26+
>
27+
{% if include.index and include.index >= 0 %}
28+
{{ tab.content[include.index] | markdownify }}
29+
{% else %}
30+
{{ tab.content | markdownify }}
31+
{% endif %}
32+
</div>
33+
{% endfor %}
34+
</div>
35+
</div>

0 commit comments

Comments
 (0)