8000 docs: update theme · coreui/coreui@c0214b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit c0214b8

Browse files
committed
docs: update theme
1 parent ea13655 commit c0214b8

File tree

4 files changed

+38
-1
lines changed

4 files changed

+38
-1
lines changed

docs/assets/scss/_component-examples.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
// Docs examples
33
//
44

5+
.tab-content .tab-pane .docs-code-snippet {
6+
border-top-left-radius: 0;
7+
border-top-right-radius: 0;
8+
9+
.highlight {
10+
border-top-left-radius: 0;
11+
border-top-right-radius: 0;
12+
}
13+
}
14+
515
.docs-code-snippet {
616
margin: 0 ($cd-gutter-x * -.5) 1rem;
717
border: solid var(--cui-border-color);

docs/layouts/shortcodes/bootstrap-compatibility.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="docs-callout docs-callout-warning">
22
<p>
3-
<strong>Heads up!</strong> In our documentation, all examples show <a href="{{ .Site.BaseURL }}getting-started/introduction/#standalone-library">standard CoreUI implementation</a>. If you are using a <a href="{{ .Site.BaseURL }}getting-started/introduction/#bootstrap-replacement">Bootstrap-compatible</a> version of CoreUI, remember to use the following changes:
3+
<strong>Heads up!</strong> In our documentation, all examples show <a href="{{ .Site.BaseURL }}getting-started/introduction/#quick-start">standard CoreUI implementation</a>. If you are using a <a href="{{ .Site.BaseURL }}getting-started/introduction/#bootstrap-replacement">Bootstrap-compatible</a> version of CoreUI, remember to use the following changes:
44
<ul>
55
<li>In the constructor, please use <strong>bootstrap</strong> instead of <strong>coreui</strong>. For example, <code>new bootstrap.Alert(...)</code> instead of <code>new coreui.Alert(...)</code></li>
66
<li>In events, please use <strong>bs</strong> instead of <strong>coreui</strong>, for example <code>close.bs.alert</code> instead of <code>close.coreui.alert</code></li>

docs/layouts/shortcodes/tab.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{ if .Parent }}
2+
{{ $name := trim (.Get "name") " " }}
3+
{{ if not (.Parent.Scratch.Get "tabs") }}
4+
{{ .Parent.Scratch.Set "tabs" slice }}
5+
{{ end }}
6+
{{ with .Inner }}
7+
{{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }}
8+
{{ end }}
9+
{{ else }}
10+
{{- errorf "[%s] %q: tab shortcode missing its parent" site.Language.Lang .Page.Path -}}
11+
{{ end}}

docs/layouts/shortcodes/tabs.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{ with .Inner }}{{/* don't do anything, just call it */}}{{ end }}
2+
{{ $groupId := default "default" (.Get "groupId") }}
3+
<ul class="nav nav-underline-border border-1" role="tablist">
4+
{{ range $idx, $tab := .Scratch.Get "tabs" }}
5+
<li class="nav-item mb-0" role="presentation">
6+
<button class="nav-link {{ cond (eq $idx 0) "active" ""}}" data-coreui-toggle="tab" data-coreui-target="#{{ $groupId }}-{{ .name | urlize}}" type="button" role="tab">{{ .name }}</button>
7+
</li>
8+
{{ end }}
9+
</ul>
10+
<div class="tab-content">
11+
{{ range $idx, $tab := .Scratch.Get "tabs" }}
12+
<div class="tab-pane fade {{ cond (eq $idx 0) "show active" ""}}" id="{{ $groupId }}-{{ .name | urlize}}" role="tabpanel" aria-labelledby="{{ .name }}-tab" tabindex="0">
13+
{{ .content }}
14+
</div>
15+
{{ end }}
16+
</div>

0 commit comments

Comments
 (0)
0