jekyll-theme-apcsp 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/_includes/alert.md +0 -0
- data/_includes/footer.md +0 -0
- data/_includes/head.html +0 -0
- data/_includes/header.md +1 -0
- data/_includes/nav.md +0 -0
- data/_layouts/page.html +308 -0
- data/_layouts/redirect.html +12 -0
- data/_sass/bootstrap/LICENSE +22 -0
- data/_sass/bootstrap/scss/_accordion.scss +146 -0
- data/_sass/bootstrap/scss/_alert.scss +71 -0
- data/_sass/bootstrap/scss/_badge.scss +40 -0
- data/_sass/bootstrap/scss/_breadcrumb.scss +42 -0
- data/_sass/bootstrap/scss/_button-group.scss +142 -0
- data/_sass/bootstrap/scss/_buttons.scss +158 -0
- data/_sass/bootstrap/scss/_card.scss +234 -0
- data/_sass/bootstrap/scss/_carousel.scss +229 -0
- data/_sass/bootstrap/scss/_close.scss +40 -0
- data/_sass/bootstrap/scss/_code.scss +48 -0
- data/_sass/bootstrap/scss/_containers.scss +41 -0
- data/_sass/bootstrap/scss/_custom-forms.scss +526 -0
- data/_sass/bootstrap/scss/_dropdown.scss +248 -0
- data/_sass/bootstrap/scss/_forms.scss +9 -0
- data/_sass/bootstrap/scss/_functions.scss +302 -0
- data/_sass/bootstrap/scss/_grid.scss +33 -0
- data/_sass/bootstrap/scss/_helpers.scss +10 -0
- data/_sass/bootstrap/scss/_images.scss +42 -0
- data/_sass/bootstrap/scss/_input-group.scss +208 -0
- data/_sass/bootstrap/scss/_jumbotron.scss +17 -0
- data/_sass/bootstrap/scss/_list-group.scss +191 -0
- data/_sass/bootstrap/scss/_maps.scss +54 -0
- data/_sass/bootstrap/scss/_media.scss +8 -0
- data/_sass/bootstrap/scss/_mixins.scss +43 -0
- data/_sass/bootstrap/scss/_modal.scss +237 -0
- data/_sass/bootstrap/scss/_nav.scss +172 -0
- data/_sass/bootstrap/scss/_navbar.scss +274 -0
- data/_sass/bootstrap/scss/_offcanvas.scss +143 -0
- data/_sass/bootstrap/scss/_pagination.scss +111 -0
- data/_sass/bootstrap/scss/_placeholders.scss +51 -0
- data/_sass/bootstrap/scss/_popover.scss +198 -0
- data/_sass/bootstrap/scss/_print.scss +141 -0
- data/_sass/bootstrap/scss/_progress.scss +59 -0
- data/_sass/bootstrap/scss/_reboot.scss +610 -0
- data/_sass/bootstrap/scss/_root.scss +76 -0
- data/_sass/bootstrap/scss/_spinners.scss +85 -0
- data/_sass/bootstrap/scss/_tables.scss +164 -0
- data/_sass/bootstrap/scss/_toasts.scss +70 -0
- data/_sass/bootstrap/scss/_tooltip.scss +122 -0
- data/_sass/bootstrap/scss/_transitions.scss +27 -0
- data/_sass/bootstrap/scss/_type.scss +104 -0
- data/_sass/bootstrap/scss/_utilities.scss +647 -0
- data/_sass/bootstrap/scss/_variables.scss +1631 -0
- data/_sass/bootstrap/scss/bootstrap-grid.scss +68 -0
- data/_sass/bootstrap/scss/bootstrap-reboot.scss +14 -0
- data/_sass/bootstrap/scss/bootstrap-utilities.scss +19 -0
- data/_sass/bootstrap/scss/bootstrap.scss +54 -0
- data/_sass/bootstrap/scss/forms/_floating-labels.scss +70 -0
- data/_sass/bootstrap/scss/forms/_form-check.scss +175 -0
- data/_sass/bootstrap/scss/forms/_form-control.scss +189 -0
- data/_sass/bootstrap/scss/forms/_form-range.scss +91 -0
- data/_sass/bootstrap/scss/forms/_form-select.scss +71 -0
- data/_sass/bootstrap/scss/forms/_form-text.scss +11 -0
- data/_sass/bootstrap/scss/forms/_input-group.scss +121 -0
- data/_sass/bootstrap/scss/forms/_labels.scss +36 -0
- data/_sass/bootstrap/scss/forms/_validation.scss +12 -0
- data/_sass/bootstrap/scss/helpers/_clearfix.scss +3 -0
- data/_sass/bootstrap/scss/helpers/_color-bg.scss +10 -0
- data/_sass/bootstrap/scss/helpers/_colored-links.scss +12 -0
- data/_sass/bootstrap/scss/helpers/_position.scss +36 -0
- data/_sass/bootstrap/scss/helpers/_ratio.scss +26 -0
- data/_sass/bootstrap/scss/helpers/_stacks.scss +15 -0
- data/_sass/bootstrap/scss/helpers/_stretched-link.scss +15 -0
- data/_sass/bootstrap/scss/helpers/_text-truncation.scss +7 -0
- data/_sass/bootstrap/scss/helpers/_visually-hidden.scss +8 -0
- data/_sass/bootstrap/scss/helpers/_vr.scss +8 -0
- data/_sass/bootstrap/scss/mixins/_alert.scss +15 -0
- data/_sass/bootstrap/scss/mixins/_backdrop.scss +14 -0
- data/_sass/bootstrap/scss/mixins/_background-variant.scss +23 -0
- data/_sass/bootstrap/scss/mixins/_badge.scss +17 -0
- data/_sass/bootstrap/scss/mixins/_border-radius.scss +78 -0
- data/_sass/bootstrap/scss/mixins/_box-shadow.scss +18 -0
- data/_sass/bootstrap/scss/mixins/_breakpoints.scss +127 -0
- data/_sass/bootstrap/scss/mixins/_buttons.scss +71 -0
- data/_sass/bootstrap/scss/mixins/_caret.scss +64 -0
- data/_sass/bootstrap/scss/mixins/_clearfix.scss +9 -0
- data/_sass/bootstrap/scss/mixins/_color-scheme.scss +7 -0
- data/_sass/bootstrap/scss/mixins/_container.scss +11 -0
- data/_sass/bootstrap/scss/mixins/_deprecate.scss +10 -0
- data/_sass/bootstrap/scss/mixins/_float.scss +14 -0
- data/_sass/bootstrap/scss/mixins/_forms.scss +152 -0
- data/_sass/bootstrap/scss/mixins/_gradients.scss +47 -0
- data/_sass/bootstrap/scss/mixins/_grid-framework.scss +80 -0
- data/_sass/bootstrap/scss/mixins/_grid.scss +151 -0
- data/_sass/bootstrap/scss/mixins/_hover.scss +37 -0
- data/_sass/bootstrap/scss/mixins/_image.scss +16 -0
- data/_sass/bootstrap/scss/mixins/_list-group.scss +24 -0
- data/_sass/bootstrap/scss/mixins/_lists.scss +7 -0
- data/_sass/bootstrap/scss/mixins/_nav-divider.scss +11 -0
- data/_sass/bootstrap/scss/mixins/_pagination.scss +10 -0
- data/_sass/bootstrap/scss/mixins/_reset-text.scss +17 -0
- data/_sass/bootstrap/scss/mixins/_resize.scss +6 -0
- data/_sass/bootstrap/scss/mixins/_screen-reader.scss +34 -0
- data/_sass/bootstrap/scss/mixins/_size.scss +7 -0
- data/_sass/bootstrap/scss/mixins/_table-row.scss +39 -0
- data/_sass/bootstrap/scss/mixins/_table-variants.scss +24 -0
- data/_sass/bootstrap/scss/mixins/_text-emphasis.scss +17 -0
- data/_sass/bootstrap/scss/mixins/_text-hide.scss +11 -0
- data/_sass/bootstrap/scss/mixins/_text-truncate.scss +8 -0
- data/_sass/bootstrap/scss/mixins/_transition.scss +26 -0
- data/_sass/bootstrap/scss/mixins/_utilities.scss +92 -0
- data/_sass/bootstrap/scss/mixins/_visibility.scss +8 -0
- data/_sass/bootstrap/scss/mixins/_visually-hidden.scss +29 -0
- data/_sass/bootstrap/scss/utilities/_align.scss +8 -0
- data/_sass/bootstrap/scss/utilities/_api.scss +47 -0
- data/_sass/bootstrap/scss/utilities/_background.scss +19 -0
- data/_sass/bootstrap/scss/utilities/_borders.scss +75 -0
- data/_sass/bootstrap/scss/utilities/_clearfix.scss +3 -0
- data/_sass/bootstrap/scss/utilities/_display.scss +26 -0
- data/_sass/bootstrap/scss/utilities/_embed.scss +39 -0
- data/_sass/bootstrap/scss/utilities/_flex.scss +51 -0
- data/_sass/bootstrap/scss/utilities/_float.scss +11 -0
- data/_sass/bootstrap/scss/utilities/_interactions.scss +5 -0
- data/_sass/bootstrap/scss/utilities/_overflow.scss +5 -0
- data/_sass/bootstrap/scss/utilities/_position.scss +32 -0
- data/_sass/bootstrap/scss/utilities/_screenreaders.scss +11 -0
- data/_sass/bootstrap/scss/utilities/_shadows.scss +6 -0
- data/_sass/bootstrap/scss/utilities/_sizing.scss +20 -0
- data/_sass/bootstrap/scss/utilities/_spacing.scss +73 -0
- data/_sass/bootstrap/scss/utilities/_stretched-link.scss +19 -0
- data/_sass/bootstrap/scss/utilities/_text.scss +72 -0
- data/_sass/bootstrap/scss/utilities/_visibility.scss +13 -0
- data/_sass/bootstrap/scss/vendor/_rfs.scss +354 -0
- data/_sass/jekyll-theme-cs50.scss +298 -0
- data/_sass/page.scss +228 -0
- data/_sass/rouge.scss +35 -0
- data/assets/@fortawesome/fontawesome-free/css/all.min.css +5 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-brands-400.eot +0 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-brands-400.svg +3717 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff +0 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-regular-400.eot +0 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-regular-400.svg +801 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff +0 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-solid-900.eot +0 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-solid-900.svg +5034 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff +0 -0
- data/assets/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
- data/assets/algolia-min.css +1 -0
- data/assets/algoliasearch/dist/algoliasearch-lite.umd.js +2 -0
- data/assets/algoliasearchLite.min.js +3 -0
- data/assets/bootstrap/LICENSE +22 -0
- data/assets/bootstrap/dist/js/bootstrap.bundle.min.js +7 -0
- data/assets/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -0
- data/assets/bootstrap/dist/js/bootstrap.min.js +7 -0
- data/assets/bootstrap-table/LICENSE +21 -0
- data/assets/bootstrap-table/dist/bootstrap-table.min.css +10 -0
- data/assets/bootstrap-table/dist/bootstrap-table.min.js +10 -0
- data/assets/bootstrap-table/dist/extensions/mobile/bootstrap-table-mobile.min.js +10 -0
- data/assets/instantsearch.js/LICENSE +21 -0
- data/assets/instantsearch.js/dist/instantsearch.production.min.js +3 -0
- data/assets/instantsearch.js/dist/instantsearch.production.min.js.map +1 -0
- data/assets/instantsearch.production.min.js +3 -0
- data/assets/jekyll-theme-cs50.js +620 -0
- data/assets/jquery/LICENSE.txt +20 -0
- data/assets/jquery/dist/jquery.min.js +2 -0
- data/assets/luxon.min.js +1 -0
- data/assets/moment-timezone-with-data.min.js +1 -0
- data/assets/moment.min.js +1 -0
- data/assets/page.js +4 -0
- data/assets/page.scss +4 -0
- data/assets/popper.js/dist/umd/popper.min.js +5 -0
- data/assets/reset-min.css +1 -0
- data/assets/scratchblocks.min.js +11 -0
- data/assets/scratchblocks.min.js.map +1 -0
- data/lib/jekyll-theme-cs50/constants.rb +59 -0
- data/lib/jekyll-theme-cs50.rb +606 -0
- data/lib/liquid-tag-parser.rb +1 -0
- metadata +350 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 6ba0f205c9970e2c27f3859bceecce51608ae51990ce337047d3b3165d831528
|
|
4
|
+
data.tar.gz: 57eb94af713a04d933992a6857baf0383185d162ef7bab230024688a33ec6629
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 7c464a33b50d836430929fa5c2ee4bb0b8d153262b65c9e3954407ac4dbcb85de77d9ef414151ef64fa9df81eeca460a57303eb3f501fa9d491c807566aca56c
|
|
7
|
+
data.tar.gz: fa468ab06844037e023359660bc50b71e8cce86e2187ba683862495d347d144764749433acbd737bd20e9eca9d63cef4f6f4ae253ead2ffba34f03d4abfe8013
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/_includes/alert.md
ADDED
|
File without changes
|
data/_includes/footer.md
ADDED
|
File without changes
|
data/_includes/head.html
ADDED
|
File without changes
|
data/_includes/header.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# [{{ site.cs50.title }}](/)
|
data/_includes/nav.md
ADDED
|
File without changes
|
data/_layouts/page.html
ADDED
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html lang="{{ page.lang | default: site.lang | default: "en-us" }}">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
|
|
7
|
+
<meta charset="utf-8">
|
|
8
|
+
<meta name="viewport" content="initial-scale=1, width=device-width">
|
|
9
|
+
|
|
10
|
+
{%- if page.refresh -%}
|
|
11
|
+
<meta content="{{ page.refresh }}" http-equiv="refresh">
|
|
12
|
+
{%- endif -%}
|
|
13
|
+
|
|
14
|
+
<meta property="og:description" content="{{ page.description | default: site.cs50.description }}">
|
|
15
|
+
|
|
16
|
+
<meta property="og:image" content="{{ page.image | default: site.cs50.image }}">
|
|
17
|
+
|
|
18
|
+
{%- capture title -%}
|
|
19
|
+
{%- if page.title -%}
|
|
20
|
+
{{- page.title -}}
|
|
21
|
+
{%- endif -%}
|
|
22
|
+
{%- if site.cs50.title -%}
|
|
23
|
+
{%- unless site.github and site.cs50.title == site.github.repository_name -%}
|
|
24
|
+
{%- if page.title %} - {% endif -%}
|
|
25
|
+
{{- site.cs50.title -}}
|
|
26
|
+
{%- endunless -%}
|
|
27
|
+
{%- endif -%}
|
|
28
|
+
{%- endcapture -%}
|
|
29
|
+
|
|
30
|
+
<meta property="og:title" content="{{ title }}">
|
|
31
|
+
|
|
32
|
+
{% include head.html %}
|
|
33
|
+
|
|
34
|
+
{%- assign time = site.time | date: '%s' -%}
|
|
35
|
+
|
|
36
|
+
<link href="{{ '/favicon.ico?' | prepend: site.baseurl }}?{{ time }}" rel="icon">
|
|
37
|
+
|
|
38
|
+
<!-- https://fonts.google.com/specimen/PT+Sans?query=PT+Sans&selection.family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700 -->
|
|
39
|
+
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
|
|
40
|
+
|
|
41
|
+
<!-- https://getbootstrap.com/docs/ -->
|
|
42
|
+
<script src="{{ '/assets/jquery/dist/jquery.min.js' | prepend: site.baseurl }}?{{ time }}" ></script>
|
|
43
|
+
<script src="{{ '/assets/bootstrap/dist/js/bootstrap.bundle.min.js' | prepend: site.baseurl }}?{{ time }}"></script>
|
|
44
|
+
|
|
45
|
+
<!-- https://bootstrap-table.com/docs/getting-started/introduction/ -->
|
|
46
|
+
<link href="{{ '/assets/bootstrap-table/dist/bootstrap-table.min.css' | prepend: site.baseurl }}?{{ time }}" rel="stylesheet">
|
|
47
|
+
<script src="{{ '/assets/bootstrap-table/dist/bootstrap-table.min.js' | prepend: site.baseurl }}?{{ time }}"></script>
|
|
48
|
+
<script src="{{ '/assets/bootstrap-table/dist/extensions/mobile/bootstrap-table-mobile.min.js' | prepend: site.baseurl }}?{{ time }}"></script>
|
|
49
|
+
|
|
50
|
+
<!-- https://fontawesome.com/how-to-use/on-the-web/referencing-icons/basic-use -->
|
|
51
|
+
<link href="{{ '/assets/@fortawesome/fontawesome-free/css/all.min.css' | prepend: site.baseurl}}?{{ time }}" rel="stylesheet">
|
|
52
|
+
|
|
53
|
+
<!-- https://moment.github.io/luxon/ -->
|
|
54
|
+
<script src="{{ '/assets/luxon.min.js' | prepend: site.baseurl }}?{{ time }}"></script>
|
|
55
|
+
|
|
56
|
+
<!-- http://docs.mathjax.org/ -->
|
|
57
|
+
<!-- https://www.jsdelivr.com/package/npm/mathjax?path=es5 -->
|
|
58
|
+
<!-- http://docs.mathjax.org/en/latest/options/output/chtml.html?highlight=displayAlign#the-configuration-block -->
|
|
59
|
+
<script>
|
|
60
|
+
MathJax = {
|
|
61
|
+
chtml: {
|
|
62
|
+
displayAlign: "left"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
</script>
|
|
66
|
+
<script crossorigin="anonymous" integrity="sha256-z47L98YXVhVIaY0uyDzt675P5Ea+w3RsPh9VD5NuoTY=" src="https://cdn.jsdelivr.net/npm/mathjax@3.2.0/es5/tex-chtml.js"></script>
|
|
67
|
+
|
|
68
|
+
<!-- https://github.com/verlok/vanilla-lazyload -->
|
|
69
|
+
<script crossorigin="anonymous" integrity="sha256-33xL9TzrOxUWT7HDl78oQFuiZ+xWQyfaTgZ57S9PCDA=" src="https://cdn.jsdelivr.net/npm/intersection-observer@0.12.0/intersection-observer.js"></script>
|
|
70
|
+
<script crossorigin="anonymous" integrity="sha256-lY+AkDw7AKVByP4f3k3+iMPEtartTnSX0v3SJi80F9o=" src="https://cdn.jsdelivr.net/npm/vanilla-lazyload@17.6.1/dist/lazyload.min.js"></script>
|
|
71
|
+
|
|
72
|
+
<!-- https://github.com/davidjbradshaw/iframe-resizer -->
|
|
73
|
+
<!-- https://www.jsdelivr.com/package/npm/iframe-resizer?path=js -->
|
|
74
|
+
<script crossorigin="anonymous" integrity="sha256-oBWDuxBG1C5U0t3xjmZZ1UAlt9sKeSRk26KiVy4jxpY=" src="https://cdn.jsdelivr.net/npm/iframe-resizer@4.3.2/js/iframeResizer.min.js"></script>
|
|
75
|
+
|
|
76
|
+
<!-- https://github.com/scratchblocks/scratchblocks/releases -->
|
|
77
|
+
<script src="{{ '/assets/scratchblocks.min.js' | prepend: site.baseurl }}?{{ time }}"></script>
|
|
78
|
+
|
|
79
|
+
<!-- https://mermaid-js.github.io/ -->
|
|
80
|
+
<!-- https://www.jsdelivr.com/package/npm/mermaid -->
|
|
81
|
+
<script crossorigin="anonymous" integrity="sha256-CemUs9ITT7liCZpVMktcEw0BpAOZ1+mujlMB3UyuImU=" src="https://cdn.jsdelivr.net/npm/mermaid@9.0.1/dist/mermaid.min.js"></script>
|
|
82
|
+
|
|
83
|
+
{% if site.algolia -%}
|
|
84
|
+
<!-- https://www.algolia.com/doc/guides/building-search-ui/installation/js/ -->
|
|
85
|
+
<script src="{{ '/assets/algoliasearch/dist/algoliasearch-lite.umd.js' | prepend: site.baseurl }}?{{ time }}"></script>
|
|
86
|
+
<script src="{{ '/assets/instantsearch.js/dist/instantsearch.production.min.js' | prepend: site.baseurl }}?{{ time }}"></script>
|
|
87
|
+
{%- endif %}
|
|
88
|
+
|
|
89
|
+
<link href="{{ '/assets/' | prepend: site.baseurl | append: page.layout | append: '.css' }}?{{ time }}" rel="stylesheet">
|
|
90
|
+
<script src="{{ '/assets/jekyll-theme-cs50.js' | prepend: site.baseurl }}?{{ time }}"></script>
|
|
91
|
+
|
|
92
|
+
<script>
|
|
93
|
+
window.CS50 = {
|
|
94
|
+
local: {{ site.cs50.local | jsonify }},
|
|
95
|
+
locale: {{ site.cs50.locale | jsonify }},
|
|
96
|
+
tz: {{ site.cs50.tz | jsonify }}
|
|
97
|
+
};
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<title>{{ title }}</title>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
</head>
|
|
104
|
+
|
|
105
|
+
<body class="invisible">
|
|
106
|
+
|
|
107
|
+
{% if site.cs50.alert %}
|
|
108
|
+
{%- capture alert -%}{%- include alert.md -%}{%- endcapture -%}
|
|
109
|
+
<div class="alert fixed-top mb-0 rounded-0 shadow" data-alert="{{ site.cs50.alert }}" data-hash="{{ alert | md5 }}" id="alert" role="alert">
|
|
110
|
+
<button aria-label="Close" class="btn-close d-none" data-bs-dismiss="alert" type="button"></button>
|
|
111
|
+
{{- alert | markdownify | replace: " id=", " data-id=" | strip -}}
|
|
112
|
+
</div>
|
|
113
|
+
{% endif %}
|
|
114
|
+
|
|
115
|
+
<div class="container-fluid">
|
|
116
|
+
|
|
117
|
+
<div class="row">
|
|
118
|
+
|
|
119
|
+
<aside class="col-md">
|
|
120
|
+
|
|
121
|
+
<header>
|
|
122
|
+
|
|
123
|
+
{%- capture header -%}{%- include header.md -%}{%- endcapture -%}
|
|
124
|
+
{{- header | markdownify | replace: " id=", " data-id=" | strip -}}
|
|
125
|
+
|
|
126
|
+
</header>
|
|
127
|
+
|
|
128
|
+
{% if site.algolia -%}
|
|
129
|
+
<button class="btn btn-link d-block ps-0 pt-0" data-search data-bs-target="#search" data-bs-toggle="modal" type="button">
|
|
130
|
+
<i class="fas fa-search pe-2"></i>Search
|
|
131
|
+
</button>
|
|
132
|
+
{%- endif %}
|
|
133
|
+
|
|
134
|
+
<button aria-controls="nav" aria-expanded="false" class="btn btn-sm collapsed d-md-none" data-bs-target="aside > nav" data-bs-toggle="collapse">
|
|
135
|
+
Menu
|
|
136
|
+
</button>
|
|
137
|
+
|
|
138
|
+
<nav class="collapse d-md-block" id="nav">
|
|
139
|
+
|
|
140
|
+
{%- capture nav -%}{%- include nav.md -%}{%- endcapture -%}
|
|
141
|
+
{{- nav | markdownify | replace: " id=", " data-id=" | strip -}}
|
|
142
|
+
|
|
143
|
+
</nav>
|
|
144
|
+
|
|
145
|
+
<footer class="collapse d-md-block position-absolute bottom-0">
|
|
146
|
+
|
|
147
|
+
{%- capture footer -%}{%- include footer.md -%}{%- endcapture -%}
|
|
148
|
+
{{- footer | markdownify | replace: " id=", " data-id=" | strip -}}
|
|
149
|
+
|
|
150
|
+
</footer>
|
|
151
|
+
|
|
152
|
+
</aside>
|
|
153
|
+
|
|
154
|
+
<main class="col-md">
|
|
155
|
+
|
|
156
|
+
{{ content }}
|
|
157
|
+
|
|
158
|
+
</main>
|
|
159
|
+
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
{% if site.algolia -%}
|
|
165
|
+
<div aria-hidden="true" aria-labelledby="searchTitle" class="markdown-body modal" id="search" role="dialog" tabindex="-1">
|
|
166
|
+
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" role="document">
|
|
167
|
+
<div class="modal-content">
|
|
168
|
+
<div class="modal-header">
|
|
169
|
+
<div class="pe-3 w-100" id="searchbox"></div>
|
|
170
|
+
<button class="btn btn-secondary" data-bs-dismiss="modal" type="button">Close</button>
|
|
171
|
+
</div>
|
|
172
|
+
<div class="modal-body">
|
|
173
|
+
<div id="hits"></div>
|
|
174
|
+
</div>
|
|
175
|
+
<div class="modal-footer">
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
<script>
|
|
181
|
+
|
|
182
|
+
// Before shwoing searchbox
|
|
183
|
+
$('#search').on('show.bs.modal', function (e) {
|
|
184
|
+
|
|
185
|
+
// Client
|
|
186
|
+
const searchClient = algoliasearch('{{ site.algolia.application_id }}', '{{ site.algolia.search_only_api_key }}');
|
|
187
|
+
const search = instantsearch({
|
|
188
|
+
indexName: '{{ site.algolia.index_name }}',
|
|
189
|
+
searchClient: searchClient,
|
|
190
|
+
searchFunction: function(helper) { // https://www.algolia.com/doc/guides/building-search-ui/going-further/conditional-display/js/#handling-empty-queries
|
|
191
|
+
const hits = $('#hits');
|
|
192
|
+
if (helper.state.query === '') {
|
|
193
|
+
hits.hide();
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
helper.search();
|
|
197
|
+
hits.show();
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
// searchBox
|
|
202
|
+
// https://www.algolia.com/doc/api-reference/widgets/search-box/js/
|
|
203
|
+
search.addWidget(
|
|
204
|
+
instantsearch.widgets.searchBox({
|
|
205
|
+
container: '#searchbox',
|
|
206
|
+
cssClasses: {
|
|
207
|
+
input: 'form-control'
|
|
208
|
+
},
|
|
209
|
+
placeholder: 'Search',
|
|
210
|
+
showLoadingIndicator: false,
|
|
211
|
+
showReset: false,
|
|
212
|
+
showSubmit: false
|
|
213
|
+
})
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
// hits
|
|
217
|
+
// https://www.algolia.com/doc/api-reference/widgets/hits/js/
|
|
218
|
+
search.addWidget(
|
|
219
|
+
instantsearch.widgets.hits({
|
|
220
|
+
container: '#hits',
|
|
221
|
+
templates: {
|
|
222
|
+
item: function(hit) {
|
|
223
|
+
|
|
224
|
+
// url
|
|
225
|
+
if (window.baseurl) {
|
|
226
|
+
var url = window.baseurl + hit.url;
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
var url = hit.url;
|
|
230
|
+
}
|
|
231
|
+
if (hit.anchor) {
|
|
232
|
+
url += '#' + hit.anchor;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// title
|
|
236
|
+
if (hit._highlightResult && hit._highlightResult.headings) {
|
|
237
|
+
var title = hit._highlightResult.headings[hit._highlightResult.headings.length - 1].value;
|
|
238
|
+
}
|
|
239
|
+
else if (hit._highlightResult && hit._highlightResult.title) {
|
|
240
|
+
var title = hit._highlightResult.title.value;
|
|
241
|
+
}
|
|
242
|
+
else if (hit.headings) {
|
|
243
|
+
var title = hit.headings[hit.headings.length - 1].value;
|
|
244
|
+
}
|
|
245
|
+
else if (hit.title) {
|
|
246
|
+
var title = hit.title;
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
var title = url;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// content
|
|
253
|
+
if (hit._highlightResult && hit._highlightResult.content) {
|
|
254
|
+
var content = hit._highlightResult.content.value;
|
|
255
|
+
}
|
|
256
|
+
else if (hit._highlightResult && hit._highlightResult.title) {
|
|
257
|
+
var content = hit._highlightResult.title.value;
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
var content = hit.excerpt_text;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// Template for hit
|
|
264
|
+
return '<h2 class="font-weight-bold h3 mb-0">' +
|
|
265
|
+
'<a href="' + url + '">' +
|
|
266
|
+
title +
|
|
267
|
+
'</a>' +
|
|
268
|
+
'</h2>' +
|
|
269
|
+
'<p class="mb-0">' +
|
|
270
|
+
'<a class="text-muted" href="' + url + '">' +
|
|
271
|
+
url +
|
|
272
|
+
'</a>' +
|
|
273
|
+
'</p>' +
|
|
274
|
+
'<p>' +
|
|
275
|
+
content +
|
|
276
|
+
'</p>';
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
})
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
// poweredBy
|
|
283
|
+
search.addWidget(
|
|
284
|
+
instantsearch.widgets.poweredBy({
|
|
285
|
+
container: '#search .modal-footer'
|
|
286
|
+
})
|
|
287
|
+
);
|
|
288
|
+
|
|
289
|
+
// Let user start searching
|
|
290
|
+
search.start();
|
|
291
|
+
|
|
292
|
+
// Resize form
|
|
293
|
+
$(window).trigger('resize');
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
// After showing searchbox
|
|
297
|
+
$('#search').on('shown.bs.modal', function (e) {
|
|
298
|
+
$('#searchbox input[type=search]').focus();
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
</script>
|
|
302
|
+
{% endif %}
|
|
303
|
+
|
|
304
|
+
<script src="{{ '/assets/page.js' | prepend: site.baseurl }}?{{ time }}"></script>
|
|
305
|
+
|
|
306
|
+
</body>
|
|
307
|
+
|
|
308
|
+
</html>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta http-equiv="refresh" content="0;URL={{ page.redirect.to }}">
|
|
7
|
+
<meta name="robots" content="noindex">
|
|
8
|
+
<link href="{{ page.redirect.to }}" rel="canonical">
|
|
9
|
+
<title></title>
|
|
10
|
+
</head>
|
|
11
|
+
<body></body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2011-2022 Twitter, Inc.
|
|
4
|
+
Copyright (c) 2011-2022 The Bootstrap Authors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Base styles
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
.accordion {
|
|
6
|
+
// scss-docs-start accordion-css-vars
|
|
7
|
+
--#{$prefix}accordion-color: #{color-contrast($accordion-bg)};
|
|
8
|
+
--#{$prefix}accordion-bg: #{$accordion-bg};
|
|
9
|
+
--#{$prefix}accordion-transition: #{$accordion-transition};
|
|
10
|
+
--#{$prefix}accordion-border-color: #{$accordion-border-color};
|
|
11
|
+
--#{$prefix}accordion-border-width: #{$accordion-border-width};
|
|
12
|
+
--#{$prefix}accordion-border-radius: #{$accordion-border-radius};
|
|
13
|
+
--#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius};
|
|
14
|
+
--#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x};
|
|
15
|
+
--#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y};
|
|
16
|
+
--#{$prefix}accordion-btn-color: #{$accordion-color};
|
|
17
|
+
--#{$prefix}accordion-btn-bg: #{$accordion-button-bg};
|
|
18
|
+
--#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
|
|
19
|
+
--#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width};
|
|
20
|
+
--#{$prefix}accordion-btn-icon-transform: #{$accordion-icon-transform};
|
|
21
|
+
--#{$prefix}accordion-btn-icon-transition: #{$accordion-icon-transition};
|
|
22
|
+
--#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon)};
|
|
23
|
+
--#{$prefix}accordion-btn-focus-border-color: #{$accordion-button-focus-border-color};
|
|
24
|
+
--#{$prefix}accordion-btn-focus-box-shadow: #{$accordion-button-focus-box-shadow};
|
|
25
|
+
--#{$prefix}accordion-body-padding-x: #{$accordion-body-padding-x};
|
|
26
|
+
--#{$prefix}accordion-body-padding-y: #{$accordion-body-padding-y};
|
|
27
|
+
--#{$prefix}accordion-active-color: #{$accordion-button-active-color};
|
|
28
|
+
--#{$prefix}accordion-active-bg: #{$accordion-button-active-bg};
|
|
29
|
+
// scss-docs-end accordion-css-vars
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.accordion-button {
|
|
33
|
+
position: relative;
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
width: 100%;
|
|
37
|
+
padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-btn-padding-x);
|
|
38
|
+
@include font-size($font-size-base);
|
|
39
|
+
color: var(--#{$prefix}accordion-btn-color);
|
|
40
|
+
text-align: left; // Reset button style
|
|
41
|
+
background-color: var(--#{$prefix}accordion-btn-bg);
|
|
42
|
+
border: 0;
|
|
43
|
+
@include border-radius(0);
|
|
44
|
+
overflow-anchor: none;
|
|
45
|
+
@include transition(var(--#{$prefix}accordion-transition));
|
|
46
|
+
|
|
47
|
+
&:not(.collapsed) {
|
|
48
|
+
color: var(--#{$prefix}accordion-active-color);
|
|
49
|
+
background-color: var(--#{$prefix}accordion-active-bg);
|
|
50
|
+
box-shadow: inset 0 calc(var(--#{$prefix}accordion-border-width) * -1) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
|
|
51
|
+
|
|
52
|
+
&::after {
|
|
53
|
+
background-image: var(--#{$prefix}accordion-btn-active-icon);
|
|
54
|
+
transform: var(--#{$prefix}accordion-btn-icon-transform);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Accordion icon
|
|
59
|
+
&::after {
|
|
60
|
+
flex-shrink: 0;
|
|
61
|
+
width: var(--#{$prefix}accordion-btn-icon-width);
|
|
62
|
+
height: var(--#{$prefix}accordion-btn-icon-width);
|
|
63
|
+
margin-left: auto;
|
|
64
|
+
content: "";
|
|
65
|
+
background-image: var(--#{$prefix}accordion-btn-icon);
|
|
66
|
+
background-repeat: no-repeat;
|
|
67
|
+
background-size: var(--#{$prefix}accordion-btn-icon-width);
|
|
68
|
+
@include transition(var(--#{$prefix}accordion-btn-icon-transition));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:hover {
|
|
72
|
+
z-index: 2;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:focus {
|
|
76
|
+
z-index: 3;
|
|
77
|
+
border-color: var(--#{$prefix}accordion-btn-focus-border-color);
|
|
78
|
+
outline: 0;
|
|
79
|
+
box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.accordion-header {
|
|
84
|
+
margin-bottom: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.accordion-item {
|
|
88
|
+
color: var(--#{$prefix}accordion-color);
|
|
89
|
+
background-color: var(--#{$prefix}accordion-bg);
|
|
90
|
+
border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color);
|
|
91
|
+
|
|
92
|
+
&:first-of-type {
|
|
93
|
+
@include border-top-radius(var(--#{$prefix}accordion-border-radius));
|
|
94
|
+
|
|
95
|
+
.accordion-button {
|
|
96
|
+
@include border-top-radius(var(--#{$prefix}accordion-inner-border-radius));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:not(:first-of-type) {
|
|
101
|
+
border-top: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Only set a border-radius on the last item if the accordion is collapsed
|
|
105
|
+
&:last-of-type {
|
|
106
|
+
@include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
|
|
107
|
+
|
|
108
|
+
.accordion-button {
|
|
109
|
+
&.collapsed {
|
|
110
|
+
@include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.accordion-collapse {
|
|
115
|
+
@include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.accordion-body {
|
|
121
|
+
padding: var(--#{$prefix}accordion-body-padding-y) var(--#{$prefix}accordion-body-padding-x);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
// Flush accordion items
|
|
126
|
+
//
|
|
127
|
+
// Remove borders and border-radius to keep accordion items edge-to-edge.
|
|
128
|
+
|
|
129
|
+
.accordion-flush {
|
|
130
|
+
.accordion-collapse {
|
|
131
|
+
border-width: 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.accordion-item {
|
|
135
|
+
border-right: 0;
|
|
136
|
+
border-left: 0;
|
|
137
|
+
@include border-radius(0);
|
|
138
|
+
|
|
139
|
+
&:first-child { border-top: 0; }
|
|
140
|
+
&:last-child { border-bottom: 0; }
|
|
141
|
+
|
|
142
|
+
.accordion-button {
|
|
143
|
+
@include border-radius(0);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Base styles
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
.alert {
|
|
6
|
+
// scss-docs-start alert-css-vars
|
|
7
|
+
--#{$prefix}alert-bg: transparent;
|
|
8
|
+
--#{$prefix}alert-padding-x: #{$alert-padding-x};
|
|
9
|
+
--#{$prefix}alert-padding-y: #{$alert-padding-y};
|
|
10
|
+
--#{$prefix}alert-margin-bottom: #{$alert-margin-bottom};
|
|
11
|
+
--#{$prefix}alert-color: inherit;
|
|
12
|
+
--#{$prefix}alert-border-color: transparent;
|
|
13
|
+
--#{$prefix}alert-border: #{$alert-border-width} solid var(--#{$prefix}alert-border-color);
|
|
14
|
+
--#{$prefix}alert-border-radius: #{$alert-border-radius};
|
|
15
|
+
// scss-docs-end alert-css-vars
|
|
16
|
+
|
|
17
|
+
position: relative;
|
|
18
|
+
padding: var(--#{$prefix}alert-padding-y) var(--#{$prefix}alert-padding-x);
|
|
19
|
+
margin-bottom: var(--#{$prefix}alert-margin-bottom);
|
|
20
|
+
color: var(--#{$prefix}alert-color);
|
|
21
|
+
background-color: var(--#{$prefix}alert-bg);
|
|
22
|
+
border: var(--#{$prefix}alert-border);
|
|
23
|
+
border-radius: var(--#{$prefix}alert-border-radius, 0); // stylelint-disable-line property-disallowed-list
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Headings for larger alerts
|
|
27
|
+
.alert-heading {
|
|
28
|
+
// Specified to prevent conflicts of changing $headings-color
|
|
29
|
+
color: inherit;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Provide class for links that match alerts
|
|
33
|
+
.alert-link {
|
|
34
|
+
font-weight: $alert-link-font-weight;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
// Dismissible alerts
|
|
39
|
+
//
|
|
40
|
+
// Expand the right padding and account for the close button's positioning.
|
|
41
|
+
|
|
42
|
+
.alert-dismissible {
|
|
43
|
+
padding-right: $alert-dismissible-padding-r;
|
|
44
|
+
|
|
45
|
+
// Adjust close link position
|
|
46
|
+
.btn-close {
|
|
47
|
+
position: absolute;
|
|
48
|
+
top: 0;
|
|
49
|
+
right: 0;
|
|
50
|
+
z-index: $stretched-link-z-index + 1;
|
|
51
|
+
padding: $alert-padding-y * 1.25 $alert-padding-x;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
// scss-docs-start alert-modifiers
|
|
57
|
+
// Generate contextual modifier classes for colorizing the alert.
|
|
58
|
+
|
|
59
|
+
@each $state, $value in $theme-colors {
|
|
60
|
+
$alert-background: shift-color($value, $alert-bg-scale);
|
|
61
|
+
$alert-border: shift-color($value, $alert-border-scale);
|
|
62
|
+
$alert-color: shift-color($value, $alert-color-scale);
|
|
63
|
+
|
|
64
|
+
@if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) {
|
|
65
|
+
$alert-color: mix($value, color-contrast($alert-background), abs($alert-color-scale));
|
|
66
|
+
}
|
|
67
|
+
.alert-#{$state} {
|
|
68
|
+
@include alert-variant($alert-background, $alert-border, $alert-color);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// scss-docs-end alert-modifiers
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// stylelint-disable custom-property-empty-line-before
|
|
2
|
+
|
|
3
|
+
// Base class
|
|
4
|
+
//
|
|
5
|
+
// Requires one of the contextual, color modifier classes for `color` and
|
|
6
|
+
// `background-color`.
|
|
7
|
+
|
|
8
|
+
.badge {
|
|
9
|
+
// scss-docs-start badge-css-vars
|
|
10
|
+
--#{$prefix}badge-padding-x: #{$badge-padding-x};
|
|
11
|
+
--#{$prefix}badge-padding-y: #{$badge-padding-y};
|
|
12
|
+
@include rfs($badge-font-size, --#{$prefix}badge-font-size);
|
|
13
|
+
--#{$prefix}badge-font-weight: #{$badge-font-weight};
|
|
14
|
+
--#{$prefix}badge-color: #{$badge-color};
|
|
15
|
+
--#{$prefix}badge-border-radius: #{$badge-border-radius};
|
|
16
|
+
// scss-docs-end badge-css-vars
|
|
17
|
+
|
|
18
|
+
display: inline-block;
|
|
19
|
+
padding: var(--#{$prefix}badge-padding-y) var(--#{$prefix}badge-padding-x);
|
|
20
|
+
@include font-size(var(--#{$prefix}badge-font-size));
|
|
21
|
+
font-weight: var(--#{$prefix}badge-font-weight);
|
|
22
|
+
line-height: 1;
|
|
23
|
+
color: var(--#{$prefix}badge-color);
|
|
24
|
+
text-align: center;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
vertical-align: baseline;
|
|
27
|
+
border-radius: var(--#{$prefix}badge-border-radius, 0); // stylelint-disable-line property-disallowed-list
|
|
28
|
+
@include gradient-bg();
|
|
29
|
+
|
|
30
|
+
// Empty badges collapse automatically
|
|
31
|
+
&:empty {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Quick fix for badges in buttons
|
|
37
|
+
.btn .badge {
|
|
38
|
+
position: relative;
|
|
39
|
+
top: -1px;
|
|
40
|
+
}
|