diff --git a/CHANGELOG.md b/CHANGELOG.md index 11fae7130a43c9fcca4a5acdf44fd4c4e2c6cc9a..ff723069cd95b96559b5edff4b68c11de69b710a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,9 @@ * Added a shortcode to render a GitLab based activity heatmap calander. * Added `cal-heatmap` support along with `D3.js` and several related extensions. * Opened up CORS headers since a static site shouldnt need any CORS protections. +* Added a `quote-box` shortcode useful for displaying pretty quotes. +* Improved the `tabs` shortcode so the title can be left off and it wont render + a black empty square. ## 1.1.0 diff --git a/assets/css/main.css b/assets/css/main.css index 7238df13c2514a71834ee6039140feb2d5b61065..8571585da1be694d85fd4f15c5566343016cfe45 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -536,6 +536,7 @@ background: transparent; .ButtonTabs > .nav-tabs > .button, .ButtonTabs > .nav-tabs > .button.is-active { box-shadow: none; + white-space: normal; } /* highlight styles */ @@ -673,3 +674,65 @@ div#ch-tooltip { justify-content: center; display: flex; } + +/* Adding pretty quote boxes */ +/* @import url('https://fonts.googleapis.com/css?family=Special+Elite'); */ + +.quote-box { + text-align: left; + /* padding-right: 5em; */ + /* font-family: 'Special Elite', cursive; */ + + color: #3f3f5a; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-left: 5em; + padding-right: 5em; +} + +.quote-box > blockquote { + font-weight: 100; + font-size: 2rem; + max-width: 600px; + line-height: 1.4; + position: relative; + padding: .5rem; + border-left: none; + + margin: auto; +} + +.quote-box > blockquote:before, +.quote-box > blockquote:after { + position: absolute; + color: #ccc; + font-size: 8rem; + width: 4rem; + height: 4rem; +} + +.quote-box > blockquote:before { + content: '“'; + left: -5rem; + top: -2rem; +} + +.quote-box > blockquote:after { + content: 'â€'; + right: -5rem; + bottom: 1rem; +} + +.quote-box > cite { + line-height: 3; + text-align: right; + font-size: 2rem; + margin: auto; +} + +.quote-box > cite:before { + content: '- '; + font-size: 2rem; +} diff --git a/layouts/shortcodes/quote-box.html b/layouts/shortcodes/quote-box.html new file mode 100644 index 0000000000000000000000000000000000000000..178400cfafe6cf6eba3cae5e50342c381cf9e699 --- /dev/null +++ b/layouts/shortcodes/quote-box.html @@ -0,0 +1,6 @@ +<div class="quote-box"> + <blockquote> + {{ .Inner }} + </blockquote> + <cite>{{ .Get "source" }}</cite> +</div> diff --git a/layouts/shortcodes/tabs.html b/layouts/shortcodes/tabs.html index 26443a4ef7504982ad38cc246aa8c1055d7ba685..debe887209c2b1e40e88a54804c492bd3730fbfb 100644 --- a/layouts/shortcodes/tabs.html +++ b/layouts/shortcodes/tabs.html @@ -5,7 +5,7 @@ </div> <div class="col col--9 code-with-header"> <div class="code-with-header"> - <div class="code-header">{{ .Get 0 }}</div> + {{ if .Get 0 }}<div class="code-header">{{ .Get 0 }}</div>{{ end }} <div class="scrollbar-container tab-content"> {{ .Inner }} </div>