Skip to content

Commit 5aa7fcc

Browse files
authored
docs: add shortcodes and CSS (#71)
* docs: add shortcodes and CSS * docs: update CSS
1 parent 15b4f13 commit 5aa7fcc

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

assets/css/f5-hugo.css

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,6 @@ blockquote,
484484
dd,
485485
ol,
486486
p,
487-
table,
488487
ul {
489488
border: 0;
490489
font-family: inherit;
@@ -496,6 +495,29 @@ ul {
496495
padding: 0;
497496
}
498497

498+
table {
499+
width: 100%;
500+
border-collapse: collapse;
501+
}
502+
th, td {
503+
padding: 8px;
504+
text-align: left;
505+
}
506+
th {
507+
background-color: #289951 ; /* Dark green */
508+
color: white; /* White text for readability */
509+
}
510+
.table-striped > tbody > tr:nth-of-type(odd) {
511+
background-color: #fff; /* White */
512+
}
513+
.table-striped > tbody > tr:nth-of-type(even) {
514+
background-color: #f9f9f9; /* Light gray */
515+
}
516+
th, td {
517+
border: none;
518+
}
519+
520+
499521
.section-heading {
500522
padding-top: 20px;
501523
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<blockquote class="tip">
2+
<div><strong>Before you begin:</strong><br/> {{ .Inner | markdownify }}</div>
3+
</blockquote>

layouts/shortcodes/call-out.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!-- Blockquote element with a class that is the first parameter passed to the shortcode -->
2+
<blockquote class="{{ .Get 0 }}">
3+
<div>
4+
<!-- Check if the third parameter (icon class) is provided -->
5+
{{ with .Get 2 }}
6+
<!-- If the icon class is provided, render an <i> element with the given class -->
7+
<i class="{{ . }}"></i>
8+
{{ end }}
9+
<!-- Render the second parameter (title) as a strong element -->
10+
<strong>{{ .Get 1 }}</strong><br/>
11+
<!-- Render the inner content of the shortcode, converting it from Markdown to HTML -->
12+
{{ .Inner | markdownify }}
13+
</div>
14+
</blockquote>

0 commit comments

Comments
 (0)