Skip to content
Snippets Groups Projects
Commit 35dbc1c0 authored by squidfunk's avatar squidfunk Committed by Martin Donath
Browse files

Refactored Admonition styles

parent 4768d785
Branches
No related tags found
No related merge requests found
......@@ -78,7 +78,7 @@ emojis. Happy scrolling :tada:
[MagicLink][9] detects links in Markdown and auto-generates the necessary
markup, so no special syntax is required. It auto-links `http[s]://` and
`ftp://` links, as well as references to email addresses:
`ftp://` links, as well as references to email addresses.
[9]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
......@@ -150,7 +150,7 @@ must be enclosed in two carets `^^...^^`.
#### Mark
[Mark][16] adds the ability to ==highlight text== like it was marked with a
==yellow text marker==. The portion of text that should be highlighted must be
==text marker==. The portion of text that should be highlighted must be
enclosed in two equal signs `==...==`.
[16]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/
......@@ -163,7 +163,7 @@ symbols ((c), (tm), (r)) and fractions (1/2, 1/4, ...).
[17]: https://facelessuser.github.io/pymdown-extensions/extensions/smartsymbols/
#### Critic
### Critic
[Critic][18] implements [Critic Markup][19], a Markdown extension that enables
the tracking of changes (additions, deletions and comments) on documents.
......
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.jp=function(){this.pipeline.reset(),this.pipeline.add(e.jp.stopWordFilter,e.jp.stemmer),r?this.tokenizer=e.jp.tokenizer:(e.tokenizer&&(e.tokenizer=e.jp.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.jp.tokenizer))};var t=new e.TinySegmenter;e.jp.tokenizer=function(n){if(!arguments.length||null==n||void 0==n)return[];if(Array.isArray(n))return n.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(var i=n.toString().toLowerCase().replace(/^\s+/,""),o=i.length-1;o>=0;o--)if(/\S/.test(i.charAt(o))){i=i.substring(0,o+1);break}return t.segment(i).filter(function(e){return!!e}).map(function(t){return r?new e.Token(t):t})},e.jp.stemmer=function(){return function(e){return e}}(),e.Pipeline.registerFunction(e.jp.stemmer,"stemmer-jp"),e.jp.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Za-zA-Z0-90-9",e.jp.stopWordFilter=function(t){if(-1===e.jp.stopWordFilter.stopWords.indexOf(r?t.toString():t))return t},e.jp.stopWordFilter=e.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),e.Pipeline.registerFunction(e.jp.stopWordFilter,"stopWordFilter-jp")}});
\ No newline at end of file
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.jp=function(){this.pipeline.reset(),this.pipeline.add(e.jp.stopWordFilter,e.jp.stemmer),r?this.tokenizer=e.jp.tokenizer:(e.tokenizer&&(e.tokenizer=e.jp.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.jp.tokenizer))};var t=new e.TinySegmenter;e.jp.tokenizer=function(n){if(!arguments.length||null==n||void 0==n)return[];if(Array.isArray(n))return n.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(var i=n.toString().toLowerCase().replace(/^\s+/,""),o=i.length-1;o>=0;o--)if(/\S/.test(i.charAt(o))){i=i.substring(0,o+1);break}return t.segment(i).filter(function(e){return!!e}).map(function(t){return r?new e.Token(t):t})},e.jp.stemmer=function(e){return e},e.Pipeline.registerFunction(e.jp.stemmer,"stemmer-jp"),e.jp.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Za-zA-Z0-90-9",e.jp.stopWordFilter=function(t){if(-1===e.jp.stopWordFilter.stopWords.indexOf(r?t.toString():t))return t},e.jp.stopWordFilter=e.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),e.Pipeline.registerFunction(e.jp.stopWordFilter,"stopWordFilter-jp")}});
\ No newline at end of file
!function(e,n,t){function r(e,n){return typeof e===n}function o(e){var n=x.className,t=C._config.classPrefix||"";if(b&&(n=n.baseVal),C._config.enableJSClass){var r=new RegExp("(^|\\s)"+t+"no-js(\\s|$)");n=n.replace(r,"$1"+t+"js$2")}C._config.enableClasses&&(n+=" "+t+e.join(" "+t),b?x.className.baseVal=n:x.className=n)}function i(e,n){if("object"==typeof e)for(var t in e)_(e,t)&&i(t,e[t]);else{var r=(e=e.toLowerCase()).split("."),s=C[r[0]];if(2==r.length&&(s=s[r[1]]),void 0!==s)return C;n="function"==typeof n?n():n,1==r.length?C[r[0]]=n:(!C[r[0]]||C[r[0]]instanceof Boolean||(C[r[0]]=new Boolean(C[r[0]])),C[r[0]][r[1]]=n),o([(n&&0!=n?"":"no-")+r.join("-")]),C._trigger(e,n)}return C}function s(e,n){return!!~(""+e).indexOf(n)}function f(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):b?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function a(){var e=n.body;return e||((e=f(b?"svg":"body")).fake=!0),e}function l(e,t,r,o){var i,s,l,u,p="modernizr",d=f("div"),c=a();if(parseInt(r,10))for(;r--;)(l=f("div")).id=o?o[r]:p+(r+1),d.appendChild(l);return i=f("style"),i.type="text/css",i.id="s"+p,(c.fake?c:d).appendChild(i),c.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(n.createTextNode(e)),d.id=p,c.fake&&(c.style.background="",c.style.overflow="hidden",u=x.style.overflow,x.style.overflow="hidden",x.appendChild(c)),s=t(d,e),c.fake?(c.parentNode.removeChild(c),x.style.overflow=u,x.offsetHeight):d.parentNode.removeChild(d),!!s}function u(e){return e.replace(/([A-Z])/g,function(e,n){return"-"+n.toLowerCase()}).replace(/^ms-/,"-ms-")}function p(n,r){var o=n.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(u(n[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+u(n[o])+":"+r+")");return i=i.join(" or "),l("@supports ("+i+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return t}function d(e){return e.replace(/([a-z])-([a-z])/g,function(e,n,t){return n+t.toUpperCase()}).replace(/^-/,"")}function c(e,n,o,i){function a(){u&&(delete z.style,delete z.modElem)}if(i=!r(i,"undefined")&&i,!r(o,"undefined")){var l=p(e,o);if(!r(l,"undefined"))return l}for(var u,c,h,m,v,g=["modernizr","tspan"];!z.style;)u=!0,z.modElem=f(g.shift()),z.style=z.modElem.style;for(h=e.length,c=0;c<h;c++)if(m=e[c],v=z.style[m],s(m,"-")&&(m=d(m)),z.style[m]!==t){if(i||r(o,"undefined"))return a(),"pfx"!=n||m;try{z.style[m]=o}catch(e){}if(z.style[m]!=v)return a(),"pfx"!=n||m}return a(),!1}function h(e,n){return function(){return e.apply(n,arguments)}}function m(e,n,t){var o;for(var i in e)if(e[i]in n)return!1===t?e[i]:(o=n[e[i]],r(o,"function")?h(o,t||n):o);return!1}function v(e,n,t,o,i){var s=e.charAt(0).toUpperCase()+e.slice(1),f=(e+" "+P.join(s+" ")+s).split(" ");return r(n,"string")||r(n,"undefined")?c(f,n,o,i):(f=(e+" "+j.join(s+" ")+s).split(" "),m(f,n,t))}function g(e,n,r){return v(e,t,t,n,r)}var y=[],w={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,n){var t=this;setTimeout(function(){n(t[e])},0)},addTest:function(e,n,t){y.push({name:e,fn:n,options:t})},addAsyncTest:function(e){y.push({name:null,fn:e})}},C=function(){};C.prototype=w,C=new C;var _,S=[],x=n.documentElement,b="svg"===x.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;_=r(e,"undefined")||r(e.call,"undefined")?function(e,n){return n in e&&r(e.constructor.prototype[n],"undefined")}:function(n,t){return e.call(n,t)}}(),w._l={},w.on=function(e,n){this._l[e]||(this._l[e]=[]),this._l[e].push(n),C.hasOwnProperty(e)&&setTimeout(function(){C._trigger(e,C[e])},0)},w._trigger=function(e,n){if(this._l[e]){var t=this._l[e];setTimeout(function(){var e;for(e=0;e<t.length;e++)(0,t[e])(n)},0),delete this._l[e]}},C._q.push(function(){w.addTest=i});var P=w._config.usePrefixes?"Moz O ms Webkit".split(" "):[];w._cssomPrefixes=P;var T={elem:f("modernizr")};C._q.push(function(){delete T.elem});var z={style:T.elem.style};C._q.unshift(function(){delete z.style});var j=w._config.usePrefixes?"Moz O ms Webkit".toLowerCase().split(" "):[];w._domPrefixes=j,w.testAllProps=v,w.testAllProps=g;var k=w.testStyles=l,E="CSS"in e&&"supports"in e.CSS,N="supportsCSS"in e;C.addTest("supports",E||N),C.addTest("csstransforms3d",function(){var e=!!g("perspective","1px",!0),n=C._config.usePrefixes;if(e&&(!n||"webkitPerspective"in x.style)){var t;C.supports?t="@supports (perspective: 1px)":(t="@media (transform-3d)",n&&(t+=",(-webkit-transform-3d)")),k("#modernizr{width:0;height:0}"+(t+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}"),function(n){e=7===n.offsetWidth&&18===n.offsetHeight})}return e}),function(){var e,n,t,o,i,s;for(var f in y)if(y.hasOwnProperty(f)){if(e=[],(n=y[f]).name&&(e.push(n.name.toLowerCase()),n.options&&n.options.aliases&&n.options.aliases.length))for(t=0;t<n.options.aliases.length;t++)e.push(n.options.aliases[t].toLowerCase());for(o=r(n.fn,"function")?n.fn():n.fn,i=0;i<e.length;i++)1===(s=e[i].split(".")).length?C[s[0]]=o:(!C[s[0]]||C[s[0]]instanceof Boolean||(C[s[0]]=new Boolean(C[s[0]])),C[s[0]][s[1]]=o),S.push((o?"":"no-")+s.join("-"))}}(),o(S),delete w.addTest,delete w.addAsyncTest;for(var q=0;q<C._q.length;q++)C._q[q]();e.Modernizr=C}(window,document);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -36,12 +36,12 @@
{% endif %}
{% endblock %}
{% block libs %}
<script src="{{ base_url }}/assets/javascripts/modernizr-1df76c4e58.js"></script>
<script src="{{ base_url }}/assets/javascripts/modernizr-a4b2c11202.js"></script>
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-bfecc7305d.css">
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-096a56e411.css">
{% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-02c2a4388f.palette.css">
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-c0da6837a6.palette.css">
{% endif %}
{% endblock %}
{% block fonts %}
......@@ -174,7 +174,7 @@
{% endblock %}
{% block analytics %}
{% if config.google_analytics %}
<script>!function(e,t,a,n,o,c,i){e.GoogleAnalyticsObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,c=t.createElement(a),i=t.getElementsByTagName(a)[0],c.async=1,c.src=n,i.parentNode.insertBefore(c,i)}(window,document,"script","https://www.google-analytics.com/analytics.js","ga"),ga("create","{{ config.google_analytics[0] }}","{{ config.google_analytics[1] }}"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");Array.prototype.map.call(links,function(e){e.host!=document.location.host&&e.addEventListener("click",function(){var t=e.getAttribute("data-md-action")||"follow";ga("send","event","outbound",t,e.href)})});var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})</script>
<script>!function(e,t,a,n,o,c,i){e.GoogleAnalyticsObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,c=t.createElement(a),i=t.getElementsByTagName(a)[0],c.async=1,c.src="https://www.google-analytics.com/analytics.js",i.parentNode.insertBefore(c,i)}(window,document,"script",0,"ga"),ga("create","{{ config.google_analytics[0] }}","{{ config.google_analytics[1] }}"),ga("set","anonymizeIp",!0),ga("send","pageview");var links=document.getElementsByTagName("a");Array.prototype.map.call(links,function(e){e.host!=document.location.host&&e.addEventListener("click",function(){var t=e.getAttribute("data-md-action")||"follow";ga("send","event","outbound",t,e.href)})});var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})</script>
{% endif %}
{% endblock %}
</body>
......
......@@ -20,4 +20,4 @@
mkdocs>=0.16
pygments>=2.2
pymdown-extensions>=2.0
pymdown-extensions>=3.4
......@@ -24,28 +24,20 @@
// Rules
// ----------------------------------------------------------------------------
// Scoped in typesetted content to match specificity of regular content
.md-typeset {
// Admonition extension
.admonition {
@include z-depth(2);
position: relative;
margin: 1.5625em 0;
padding: 0.8rem 1.2rem;
border-left: 3.2rem solid transparentize($clr-blue-a200, 0.6);
border-left: 0.4rem solid $clr-blue-a200;
border-radius: 0.2rem;
background-color: transparentize($clr-blue-a200, 0.85);
font-size: ms(-1);
// Icon
&::before {
@extend %md-icon;
position: absolute;
left: -2.6rem;
color: $md-color-white;
font-size: 2rem;
content: "edit";
vertical-align: -0.25em;
}
// Remove spacing on first element
:first-child {
margin-top: 0;
......@@ -56,11 +48,31 @@
margin-bottom: 0;
}
// Title
.admonition-title {
margin: -0.8rem -1.2rem -0.4rem;
padding: 0.8rem 1.2rem;
border-bottom: 0.1rem solid transparentize($clr-blue-a200, 0.9);
background-color: transparentize($clr-blue-a200, 0.9);
font-weight: 700;
// Icon
&::before {
@extend %md-icon;
margin-right: 0.8rem;
color: $clr-blue-a200;
font-size: 2rem;
content: "edit";
vertical-align: -0.25em;
}
}
// Build representational classes
@each $names, $appearance in (
summary tldr: $clr-light-blue-a400 "subject",
tip hint important : $clr-teal-a700 "whatshot",
success check done: $clr-green-a400 "done",
success check done: $clr-green-a700 "done",
warning caution attention: $clr-orange-a400 "warning",
failure fail missing: $clr-red-a200 "clear",
danger error: $clr-red-a400 "flash_on",
......@@ -73,14 +85,20 @@
// Define base class
&%#{nth($names, 1)},
&.#{nth($names, 1)} {
border-color: transparentize($tint, 0.6);
background-color: transparentize($tint, 0.85);
border-left: 0.4rem solid $tint;
// Title
.admonition-title {
border-bottom: 0.1rem solid transparentize($tint, 0.9);
background-color: transparentize($tint, 0.9);
// Icon
&::before {
color: $tint;
content: $icon;
}
}
}
// Define synonyms for base class
@if length($names) > 1 {
......@@ -92,18 +110,4 @@
}
}
}
// Title
.admonition-title {
font-weight: 700;
// Remove bottom spacing for title
html & {
margin-bottom: 0;
}
// Remove top spacing for first element following title
html & + * {
margin-top: 0;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment