From 29103c08abc47343238bcba53a908192376effe3 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 30 Jun 2020 09:47:15 +1000 Subject: [PATCH] [matrix] Display navbar links on mobile --- docs/_static/icons.css | 10 ++++++++++ docs/_static/icons.woff | Bin 0 -> 2608 bytes docs/_static/style.css | 38 ++++++++++++++++-------------------- docs/_templates/layout.html | 8 +++++--- docs/images/snake.svg | 18 ++++++++--------- docs/images/snake_dark.svg | 18 ++++++++--------- 6 files changed, 50 insertions(+), 42 deletions(-) create mode 100644 docs/_static/icons.css create mode 100644 docs/_static/icons.woff diff --git a/docs/_static/icons.css b/docs/_static/icons.css new file mode 100644 index 000000000..b237f109d --- /dev/null +++ b/docs/_static/icons.css @@ -0,0 +1,10 @@ +@font-face { + font-family: 'Custom Icons'; + font-style: normal; + font-weight: 400; + src: url('icons.woff') format('woff2'); +} + +.custom-icons { + font-family: 'Custom Icons' !important; +} diff --git a/docs/_static/icons.woff b/docs/_static/icons.woff new file mode 100644 index 0000000000000000000000000000000000000000..50a340c47fcf3f6d621ee929e49fa4ff55bd50b4 GIT binary patch literal 2608 zcmeHJ&2Jk;6o0d`-u3Q!*Wcf<<9y(>Y3n#~;xtVfswkvN)en-Y6+#Gb6XOIWc8DEF zIYmTVsvcVPe4cIU6?+Zq`KEU4`E(RNdk~EUmUSfqe>pTBsGJ&sG`>;CV%So5x%7^Q)CjjO#rJEN5$sZqzHQ zRbVHP<0nF2JbC-OwMG*;=z+g@9F|xYow9V0*h-~UN9HmRA)VEX1?ESsk%>5#-JkQPu$msM%N6NMM0(w+*-unr8vMP& zM7j^iF`{;x-)i5YV;qV$k=w51Y(qgQW;YBK8D9p+@kKtu=XS4Q)M74|fj)scg#0;X z!zf3Kv`h`!xJT`sb{lO3>;lz*t-Ba&f8V~=zS@4LeI@R9Bih70h0nIJKemW{6XL9< zi0G)u?E-WWD)OsAm!T@O;i||}oXHKSL39t5P^>Qd)wGq6JtKx}fr%ztB%;wV+x;IC zD?io#gWu#&(+6-0tgpa&x)s%8_@a?mJj>#-^5`TRDdtBe*a*;`?mS5N1{}Iu_2mVv zBs%PVr6B={&*nS5P>u|jN5L-J(LqMHp;+9ZqO+RC$ZiTwB0w_CPR1dP4Cnj!c6Pp0 zT044ltyG%NX0rVU`s>qPLzZP`ssUY#>PA@8OxeRVRWTJ=k|o9&lO#z~d>+47vlIoi zu&xDF)l|6U3uaBT!?NObs}t@%QVs=$+ZIBPIPg!hJhMrSyDAlWmKOpSMOSyc>=N0q%03zJYd?;1}f zCwh_x!r@NC7xrR7xWdf-j+Yg$%q13^J2JjKi!~EJ1(~+nxA+49gi-kUG)d=xj${kkcu8doG)))lULFp4bi zGtGoFRW1%3k4Ab8PiViY1Pq3w#pOtNUr;rABhljn#qyN6HSL=%H2-7p8UMuZWQePb z=$p=&FaEBv1LD^w-bma`wxFMVpOYLFKEJu=_Hr0OCz9jrc5}S{F41=ik+*H8P7%Cz z`)G(JXoeoACvoT2X_H=|%j}YL#2z_FAKJGt9;knaZqW@lKW6_o;oPbc?&{ZEoCAN% zwPo1XT-$?tyVtc9;LEP9Q;I$p?}w}bNub5CCA^n!yEX?t=h`yt8?No47!A0#0(`@@ zb-aCd7dD!$#_FNvg+{$e3utRn3-8G)9m3cPu6;Djle)#H? zqd_WA@nM2I3}?Pt+gPcr(>w;LA(s`Z(E7u4oN3fsxmvYeU9YsNi@6IIbF&MLQ;kNw ofE^TbXd%@aqSo#7EAXq>Rq nav { display: flex; flex-direction: row; - justify-content: space-evenly; + justify-content: flex-end; } header > nav > a { color: var(--white); } +.main-heading { + margin-right: auto; +} + +header > nav a:not(.main-heading) { + margin: 0 0.5em; +} + header > nav > a:hover { color: var(--white); text-decoration: underline; } -.main-heading { - display: none; -} - .sub-header { grid-area: n; background-color: var(--grey-6); color: var(--white); + display: none; } /* these aren't shown on mobile */ @@ -1007,21 +1012,12 @@ div.code-block-caption { "s f f f f f"; } - header { - background-color: var(--black); - } - - header > nav { - justify-content: flex-end; - } - - .main-heading { - margin-right: auto; - display: unset; + .mobile-only { + display: none; } - header > nav a:not(.main-heading) { - margin: 0 0.5em; + header { + background-color: var(--black); } .sub-header { @@ -1060,7 +1056,7 @@ div.code-block-caption { display: inline-block; position: sticky; top: 1em; - height: calc(100vh - 1em); + max-height: calc(100vh - 1em); overflow-y: auto; margin: 1em; } diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html index 13452e08d..ef5a81d24 100644 --- a/docs/_templates/layout.html +++ b/docs/_templates/layout.html @@ -9,6 +9,7 @@ + {%- block css %} {%- for css in css_files %} {%- if css|attr("filename") %} @@ -58,9 +59,10 @@
diff --git a/docs/images/snake.svg b/docs/images/snake.svg index 1f3521b5d..aa741440e 100644 --- a/docs/images/snake.svg +++ b/docs/images/snake.svg @@ -1,17 +1,17 @@ - - - - - - - - + + + + + + + + - + diff --git a/docs/images/snake_dark.svg b/docs/images/snake_dark.svg index 1517d60d0..12022af4d 100644 --- a/docs/images/snake_dark.svg +++ b/docs/images/snake_dark.svg @@ -1,17 +1,17 @@ - - - - - - - - + + + + + + + + - +