From b4428c7bcf4a0505c296f87bd14b367e148c7e03 Mon Sep 17 00:00:00 2001 From: Fonoster Team Date: Fri, 21 Dec 2018 20:46:49 -0500 Subject: [PATCH] Replaced docusaurus with mkdocs --- .../assets/images}/blinkpro_tls_config.png | Bin .../assets/images}/blinkpro_tls_secured.png | Bin .../img => docs/assets/images}/docusaurus.svg | 0 .../img => docs/assets/images}/favicon.ico | Bin .../assets/images}/favicon/favicon.ico | Bin .../assets/images}/get_domains_and_agents.png | Bin .../assets/images}/get_peers_cmd_output.png | Bin .../images}/john_telephone_setup_advanced.png | Bin .../images}/john_telephone_setup_general.png | Bin .../assets/images}/locate_agents.png | Bin .../assets/images}/locate_john.png | Bin .../assets/images}/locate_john_and_ast.png | Bin .../img => docs/assets/images}/logo.png | Bin .../assets/images}/peering_ilustration.png | Bin .../assets/images}/routr_animation.gif | Bin .../assets/images}/secure_signaling.png | Bin .../assets/images}/starting_server.png | Bin .../images}/telephone_config_advanced.png | Bin .../images}/telephone_config_general.png | Bin .../assets/images}/verify_configuration.png | Bin .../images}/voip-setup-at-home-or-office.png | Bin docs/assets/logo.png | Bin 0 -> 6453 bytes docs/getting-started-introduction.md | 187 ------ docs/guide-routr-as-asterisk-frontend.md | 14 +- docs/guide-securing-the-signal.md | 6 +- docs/guide-voip-network-setup.md | 10 +- docs/index.md | 45 ++ docs/theme/assets/images/favicon.png | Bin 0 -> 1056 bytes docs/theme/assets/images/icons/bitbucket.svg | 20 + docs/theme/assets/images/icons/github.svg | 18 + docs/theme/assets/images/icons/gitlab.svg | 38 ++ docs/theme/assets/stylesheets/_config.scss | 93 +++ docs/theme/assets/stylesheets/_shame.scss | 25 + .../stylesheets/application-palette.scss | 323 +++++++++ .../theme/assets/stylesheets/application.scss | 69 ++ .../assets/stylesheets/base/.stylelintrc | 7 + .../theme/assets/stylesheets/base/_icons.scss | 81 +++ .../theme/assets/stylesheets/base/_reset.scss | 132 ++++ .../assets/stylesheets/base/_typeset.scss | 492 ++++++++++++++ .../stylesheets/extensions/_admonition.scss | 144 ++++ .../stylesheets/extensions/_codehilite.scss | 373 +++++++++++ .../stylesheets/extensions/_footnotes.scss | 149 +++++ .../stylesheets/extensions/_permalinks.scss | 99 +++ .../extensions/pymdown/_arithmatex.scss | 54 ++ .../extensions/pymdown/_critic.scss | 93 +++ .../extensions/pymdown/_details.scss | 109 +++ .../extensions/pymdown/_emoji.scss | 35 + .../extensions/pymdown/_inlinehilite.scss | 37 ++ .../extensions/pymdown/_superfences.scss | 100 +++ .../extensions/pymdown/_tasklist.scss | 83 +++ .../assets/stylesheets/helpers/_break.scss | 250 +++++++ .../assets/stylesheets/helpers/_px2em.scss | 46 ++ .../assets/stylesheets/layout/_base.scss | 245 +++++++ .../assets/stylesheets/layout/_clipboard.scss | 117 ++++ .../assets/stylesheets/layout/_content.scss | 95 +++ .../assets/stylesheets/layout/_footer.scss | 199 ++++++ .../assets/stylesheets/layout/_header.scss | 216 ++++++ .../assets/stylesheets/layout/_hero.scss | 65 ++ .../theme/assets/stylesheets/layout/_nav.scss | 525 +++++++++++++++ .../assets/stylesheets/layout/_search.scss | 622 ++++++++++++++++++ .../assets/stylesheets/layout/_sidebar.scss | 174 +++++ .../assets/stylesheets/layout/_source.scss | 234 +++++++ .../assets/stylesheets/layout/_tabs.scss | 178 +++++ docs/theme/partials/footer.html | 82 +++ docs/theme/partials/header.html | 129 ++++ mkdocs.yml | 87 +++ website/core/Footer.js | 95 --- website/i18n/en.json | 60 -- website/package.json | 14 - website/pages/en/help.js | 57 -- website/pages/en/index.html | 14 - website/pages/en/users.js | 49 -- website/pages/index.html | 14 - website/sidebars.json | 19 - website/siteConfig.js | 105 --- website/static/css/custom.css | 26 - 76 files changed, 5898 insertions(+), 655 deletions(-) rename {website/static/img => docs/assets/images}/blinkpro_tls_config.png (100%) rename {website/static/img => docs/assets/images}/blinkpro_tls_secured.png (100%) rename {website/static/img => docs/assets/images}/docusaurus.svg (100%) rename {website/static/img => docs/assets/images}/favicon.ico (100%) rename {website/static/img => docs/assets/images}/favicon/favicon.ico (100%) rename {website/static/img => docs/assets/images}/get_domains_and_agents.png (100%) rename {website/static/img => docs/assets/images}/get_peers_cmd_output.png (100%) rename {website/static/img => docs/assets/images}/john_telephone_setup_advanced.png (100%) rename {website/static/img => docs/assets/images}/john_telephone_setup_general.png (100%) rename {website/static/img => docs/assets/images}/locate_agents.png (100%) rename {website/static/img => docs/assets/images}/locate_john.png (100%) rename {website/static/img => docs/assets/images}/locate_john_and_ast.png (100%) rename {website/static/img => docs/assets/images}/logo.png (100%) rename {website/static/img => docs/assets/images}/peering_ilustration.png (100%) rename {website/static/img => docs/assets/images}/routr_animation.gif (100%) rename {website/static/img => docs/assets/images}/secure_signaling.png (100%) rename {website/static/img => docs/assets/images}/starting_server.png (100%) rename {website/static/img => docs/assets/images}/telephone_config_advanced.png (100%) rename {website/static/img => docs/assets/images}/telephone_config_general.png (100%) rename {website/static/img => docs/assets/images}/verify_configuration.png (100%) rename {website/static/img => docs/assets/images}/voip-setup-at-home-or-office.png (100%) create mode 100644 docs/assets/logo.png delete mode 100644 docs/getting-started-introduction.md create mode 100644 docs/index.md create mode 100644 docs/theme/assets/images/favicon.png create mode 100644 docs/theme/assets/images/icons/bitbucket.svg create mode 100644 docs/theme/assets/images/icons/github.svg create mode 100644 docs/theme/assets/images/icons/gitlab.svg create mode 100644 docs/theme/assets/stylesheets/_config.scss create mode 100644 docs/theme/assets/stylesheets/_shame.scss create mode 100644 docs/theme/assets/stylesheets/application-palette.scss create mode 100644 docs/theme/assets/stylesheets/application.scss create mode 100644 docs/theme/assets/stylesheets/base/.stylelintrc create mode 100644 docs/theme/assets/stylesheets/base/_icons.scss create mode 100644 docs/theme/assets/stylesheets/base/_reset.scss create mode 100644 docs/theme/assets/stylesheets/base/_typeset.scss create mode 100644 docs/theme/assets/stylesheets/extensions/_admonition.scss create mode 100644 docs/theme/assets/stylesheets/extensions/_codehilite.scss create mode 100644 docs/theme/assets/stylesheets/extensions/_footnotes.scss create mode 100644 docs/theme/assets/stylesheets/extensions/_permalinks.scss create mode 100644 docs/theme/assets/stylesheets/extensions/pymdown/_arithmatex.scss create mode 100644 docs/theme/assets/stylesheets/extensions/pymdown/_critic.scss create mode 100644 docs/theme/assets/stylesheets/extensions/pymdown/_details.scss create mode 100644 docs/theme/assets/stylesheets/extensions/pymdown/_emoji.scss create mode 100644 docs/theme/assets/stylesheets/extensions/pymdown/_inlinehilite.scss create mode 100644 docs/theme/assets/stylesheets/extensions/pymdown/_superfences.scss create mode 100644 docs/theme/assets/stylesheets/extensions/pymdown/_tasklist.scss create mode 100644 docs/theme/assets/stylesheets/helpers/_break.scss create mode 100644 docs/theme/assets/stylesheets/helpers/_px2em.scss create mode 100644 docs/theme/assets/stylesheets/layout/_base.scss create mode 100644 docs/theme/assets/stylesheets/layout/_clipboard.scss create mode 100644 docs/theme/assets/stylesheets/layout/_content.scss create mode 100644 docs/theme/assets/stylesheets/layout/_footer.scss create mode 100644 docs/theme/assets/stylesheets/layout/_header.scss create mode 100644 docs/theme/assets/stylesheets/layout/_hero.scss create mode 100644 docs/theme/assets/stylesheets/layout/_nav.scss create mode 100644 docs/theme/assets/stylesheets/layout/_search.scss create mode 100644 docs/theme/assets/stylesheets/layout/_sidebar.scss create mode 100644 docs/theme/assets/stylesheets/layout/_source.scss create mode 100644 docs/theme/assets/stylesheets/layout/_tabs.scss create mode 100644 docs/theme/partials/footer.html create mode 100644 docs/theme/partials/header.html create mode 100644 mkdocs.yml delete mode 100644 website/core/Footer.js delete mode 100644 website/i18n/en.json delete mode 100644 website/package.json delete mode 100755 website/pages/en/help.js delete mode 100644 website/pages/en/index.html delete mode 100644 website/pages/en/users.js delete mode 100644 website/pages/index.html delete mode 100644 website/sidebars.json delete mode 100644 website/siteConfig.js delete mode 100644 website/static/css/custom.css diff --git a/website/static/img/blinkpro_tls_config.png b/docs/assets/images/blinkpro_tls_config.png similarity index 100% rename from website/static/img/blinkpro_tls_config.png rename to docs/assets/images/blinkpro_tls_config.png diff --git a/website/static/img/blinkpro_tls_secured.png b/docs/assets/images/blinkpro_tls_secured.png similarity index 100% rename from website/static/img/blinkpro_tls_secured.png rename to docs/assets/images/blinkpro_tls_secured.png diff --git a/website/static/img/docusaurus.svg b/docs/assets/images/docusaurus.svg similarity index 100% rename from website/static/img/docusaurus.svg rename to docs/assets/images/docusaurus.svg diff --git a/website/static/img/favicon.ico b/docs/assets/images/favicon.ico similarity index 100% rename from website/static/img/favicon.ico rename to docs/assets/images/favicon.ico diff --git a/website/static/img/favicon/favicon.ico b/docs/assets/images/favicon/favicon.ico similarity index 100% rename from website/static/img/favicon/favicon.ico rename to docs/assets/images/favicon/favicon.ico diff --git a/website/static/img/get_domains_and_agents.png b/docs/assets/images/get_domains_and_agents.png similarity index 100% rename from website/static/img/get_domains_and_agents.png rename to docs/assets/images/get_domains_and_agents.png diff --git a/website/static/img/get_peers_cmd_output.png b/docs/assets/images/get_peers_cmd_output.png similarity index 100% rename from website/static/img/get_peers_cmd_output.png rename to docs/assets/images/get_peers_cmd_output.png diff --git a/website/static/img/john_telephone_setup_advanced.png b/docs/assets/images/john_telephone_setup_advanced.png similarity index 100% rename from website/static/img/john_telephone_setup_advanced.png rename to docs/assets/images/john_telephone_setup_advanced.png diff --git a/website/static/img/john_telephone_setup_general.png b/docs/assets/images/john_telephone_setup_general.png similarity index 100% rename from website/static/img/john_telephone_setup_general.png rename to docs/assets/images/john_telephone_setup_general.png diff --git a/website/static/img/locate_agents.png b/docs/assets/images/locate_agents.png similarity index 100% rename from website/static/img/locate_agents.png rename to docs/assets/images/locate_agents.png diff --git a/website/static/img/locate_john.png b/docs/assets/images/locate_john.png similarity index 100% rename from website/static/img/locate_john.png rename to docs/assets/images/locate_john.png diff --git a/website/static/img/locate_john_and_ast.png b/docs/assets/images/locate_john_and_ast.png similarity index 100% rename from website/static/img/locate_john_and_ast.png rename to docs/assets/images/locate_john_and_ast.png diff --git a/website/static/img/logo.png b/docs/assets/images/logo.png similarity index 100% rename from website/static/img/logo.png rename to docs/assets/images/logo.png diff --git a/website/static/img/peering_ilustration.png b/docs/assets/images/peering_ilustration.png similarity index 100% rename from website/static/img/peering_ilustration.png rename to docs/assets/images/peering_ilustration.png diff --git a/website/static/img/routr_animation.gif b/docs/assets/images/routr_animation.gif similarity index 100% rename from website/static/img/routr_animation.gif rename to docs/assets/images/routr_animation.gif diff --git a/website/static/img/secure_signaling.png b/docs/assets/images/secure_signaling.png similarity index 100% rename from website/static/img/secure_signaling.png rename to docs/assets/images/secure_signaling.png diff --git a/website/static/img/starting_server.png b/docs/assets/images/starting_server.png similarity index 100% rename from website/static/img/starting_server.png rename to docs/assets/images/starting_server.png diff --git a/website/static/img/telephone_config_advanced.png b/docs/assets/images/telephone_config_advanced.png similarity index 100% rename from website/static/img/telephone_config_advanced.png rename to docs/assets/images/telephone_config_advanced.png diff --git a/website/static/img/telephone_config_general.png b/docs/assets/images/telephone_config_general.png similarity index 100% rename from website/static/img/telephone_config_general.png rename to docs/assets/images/telephone_config_general.png diff --git a/website/static/img/verify_configuration.png b/docs/assets/images/verify_configuration.png similarity index 100% rename from website/static/img/verify_configuration.png rename to docs/assets/images/verify_configuration.png diff --git a/website/static/img/voip-setup-at-home-or-office.png b/docs/assets/images/voip-setup-at-home-or-office.png similarity index 100% rename from website/static/img/voip-setup-at-home-or-office.png rename to docs/assets/images/voip-setup-at-home-or-office.png diff --git a/docs/assets/logo.png b/docs/assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..647f7dd62dd7ecd5374df0739b2bcd032b37aea9 GIT binary patch literal 6453 zcmX9?c|6nqAK%O^$Cz8vko#8dBPN8ol?W-55^^iYR#P)K3AxJI;g--GOO9yBQHU{8 zQZrLAEctzWe}C-r*yH{BykD=^`*plOujezx32DvCEx`=}fp~3g5H27PcnSEQ#mNpl z%`7JufQ36jmX=NtF4h(@wpNy>vqq4_T5YDhcGZaoN-9lBhn(Ku) z?=}C5G~Fq=bmznysD-~SzrSoP*gp!+t1IstXkbeMdj-_NvU8I2PBvY-HCj|CF*HBd zwHndGD4y(Cy(9m?W#U#B$3$VV$RDN@PpVzUfM{^!Ftu0QBQh#J`jq*|W}IV5P$(Hy z|2gp>8aAWh2?(R2cf=OJ9H-l!UzZN*uBjK zj`TUFdF`|Y*|&<)cel9Ibw2J;kEg}sy4^qC;wN^4SI@btHS>rTeb|3`uQklJdAPan z3q6{U*4>y|w`bLSF4mpubl`n!6s07>Brv+;}ofp~-t ze_+s~Vlfa%)YBGm+AX$togCLLo}-0*Bn4b)yMsKGn!G|V~Q|i#IUbA}stFmyoHp~d4EEo6MButpj>zDp+ z4Tr;lG^LC%+VXL)Md(}<&VO-ln>2mSz~S%%-7G8pAy)_=OE)N3b2-V(GvRPqMWP*E zys{=jJcl`#u_-8g2?~9dj8W>fEv@G(21)VM>WnGpH`lbRq))qhck#_Q99FQEQz7m(r2kXJ$mMTZT+=xlm{}>UrnkX1=gfAD-`hmOl@Q7uq>X z$Rmpzi9?}556`BC<!VsHE=G3ALr-%}>$98k0AO+vug z+wZ`ZkQ}ud&SU?^qW;J6qXDLgWKmB#e;Mxdj6Kw%oBsY&(K}Z8Ed=COl{l zK)0|_wqY2f0Te_vKGDcoVA({ctLog=4mX9r>0tH~UqG;iy`*jtnNgy|kF9juQa*5C zIm>*eI5EJs^q&_MQF&d(^>3Kr(e_!g?<#FPlT|ny^`nE+Rh4Kc;|6z~iIj2t6*)bV z@~-j*JBdA!MsrOt>%{$eTyuCBBg|#Us&-x-*gI!s&23%vQ=|q*{Y}P=%L;J#i1r%r zN)Su2i-o!?`5LhUXgMGdYeV*w@R(y*SwpKzc&>79iN}LghwX%k)*II9+kb+YR_ur5*YQ(z!8Tjptpx?3#2xWtH zLZHZBk&?QCsp}*;$LaKvJ~uy9zAMT6?+L#dJ@zztI0Qw4&j;D<^5O#n1;=#8)13kg z@9T7Oaefrqlc&{pEyA^*Z=UJpfM`5ZhKiqiw6dn-ub|~#Fsnx7uuPVe8H@LuZiS> zjFS{pT=TN|eXcsi^hjL^{ z_L18vuQnK#I$d`QuubPY3fgv3h?1EWJ_7vvx8w4;_WxD%gpTZuJ~= z#@;wDvt%q8%hUfnN@?*eX1P{SakR3XsY~gHk!d~-O`#pN))IE}`=%5L3J1{&742&~ zEirbT>o?L@>T6W&9!QyUi!TmPWVp1;)%P;|ahe>_U~R zl%7v8wAwT=j8^|LBi7zaX5dP2@2*6NoGj%lwxOJKeV>74Jl3~x{1NIfHBxIUt)$XO zXkaHj5jT=Rf%4m#-N4OOSjhn0e+Z48WivfpT|Vs@z^=l3GL-zGi|1G``C#+srJ{k? zFOYlUOzgwP1*yCsNVW}tf$l<0fLO1W#08&-Eh=cK^q9w z&1?+&5bs;C=1kD~u0Il+sf^W=-iRgr$~kZeOEtmcUCz{|*m*q_=O@G4FG>ds=&8Kcg?6_SrCdVJ(#MLkT&u9_TI z?j3m&HIn3Z6Dquf zx-HUZMU`WB4m>@8NMBWGMia+wkP~?E+p$k7QPHmocl$KhbO@>b3jJj)-yW;kxv0>( z4TZNx#LoVTWS2LKedxmWa~}TQ0P}CoG%>n-Jb*u1VICtO3JFARJD|43`cK0z3e(iD z8eaH;(s->8R>B^~=Z#Nz8@@QD8M9dGf7;gUAA7ukxuI+;OMe_J)~ijHl1-xKn~Nys zmrQwGxQ3d3uC9x%E-$JV3H->1A1$m5)ZY9to)TZK<9}qm1G7w8vsYt$A)MA$@`wu+ zQG95_nfK93cUyeTw446( z_60x9luGj=+-6^arIPnH_54D0yrz<(E1o+*PqicyN5J7=6OZh@^JUyg^?Vhf|EgV~ zKI5e{({Y=~0{?*BS6DCfO|wQqAz4Im;i^T{D}sqru@~1Q)p`tDrH)GfeGpR9j_H!- zZ2lfzu#AunQYRzouG&5K4T}}-x2S36m*;HNFrLy4e`@mK^M-nqmhNy8^EjPPr^t7p zzxqC(a^8fEetjJA4RI8;O#tRC8>dY0eK0f68T~|zi$krKM^wXqX<5PYUTt6VpqRzY z6+iKwOodWD>4+{l$NO`2s*&eTh|l?=?G#IoAG{-#;)*hG5B#*~XLXoSg`(o@9^B&e z9pAjBlg+ncjHC4$n43*ali%+-tIA!ymh|bhm-%KbqkGisz+%(;9mWCkmb~vsY~`h8 ztH4$E>}T1;@bJGeep}5Na#a&$zHz9??i2HaKWGdmDJ&hVb349#I@RXJzQ_(jSX82X z#^w0Pwi}g|RZ(Q9invAVcBNiHR0fu5+$>rOcf)eLt!NU;`fAMIK0#(2PHTVU5IRNm zM}*orH+t4yoKO1LYI%>9G7)#~*Q#~?MzdZ-dSLU|z>-(IY3Fz6(f!NP#vv)!;uN=G zdb~UL2)-ex*W;t+-_J5iVlrvCbRG@XmkFe>RQ{Xz(Z2 z5u|(CY^`>NqE#j%|NQ#qLY+H0rt23$Nq)evPq;{Ni&^ZMzAK2R3~zf7#=cWua-U7P$7zJ<#X6U@dyZyN-7&s^CPZ5f>D?M*g6EP_MLx z>L@1<>$(U*gBk-;=>g--Sw4SdfL-v3vZbnniI9L8`M5nJzZZ!tKJlxV0o zc!Q;1{Cq_^7OZY@zkhl>-%!t1J1SYZH$jvmW)T$Yf%ca1hVpIg*0Kjn%OG7-!^k1q z?4O=mwUdV*g39XkMa38QiL=1y`rShKg(!irB`IrjBH5{@!Re+9X+vWr(5=d;?8`S= z_l3vjAwjj-n#5oVzq>qKXzv;TjDVb^s87u<8i5Wz{wyLVxKng6;c=Wh36Iam{5SP! z#gvU73N-x2%sbrFrWmsV^l#=(>=Ok5fO+~hMfe;1GE;@#F=K0^_7XB+*iY7@Zgw35 z`v@pz+L5Sh0vHlWNxCMv5gHb*5gN&8MNdM$Lf>w|^mLEM50Ou*ncM?LQYWf)iI){z zyIvMZ)aIcs5*v*ZcKs+tH^w(WJ2ad@Mt@=X3R=Q{b2%RB#uvj#DkDkGCy42@6^LtQ zo{b7Ysq?`?g#BI-8pIVB%*ER{+q`Ds6q#PNbNNHeL_%KjzvJ?}A9t6;nmyl}5>L`h zFA*-p_zscHxc?TUgi;7w0+&)xz~)pfO(naDWJj9)o6Ps*KxZkfy?f~CO!*bY>~FNn zd_oOci=!8tl>NDmdV(^;9iA<0!ro~VE$CuYR-x$gB$&thCvC8USuHCX+`*Kfb@PN7 z^y^0A>Wu6XK9fXP)9x3lv6_l#%Y_}GtHdl`UWxFJ(TiDpN6rL=u=+^QKaUs8j&Ty? z!>?16V-8#b1G+x!lc`GBqDNV@1R&$z`jHkt`bp9!{@zN@!{nmP!2IpZO!B@|Opo|^ z^YPJBe-u&D^p8ZX{5=tYy{z0irHuH5K626qZMEYzvZ-X14_}shJuTL8Qq(n3GpzGC zMUf&M(?ceYg)?|R!ScLQFm&^^4?4;`7l{B`$ns*6&`s$t9ey8YlSU&NbA>-^)*MxU zm2MTH_CWp15T(KFbq|qStxu0A>JVW1u&cwhLyqXXBf&R?MRi)_VIy$$7t6O~=N&fB zKieb)OE>CWI#Fy({pYv^A%HbWUz9Ke}Nto$4l2a<;{nBf814I7s2Vv8KVGJTI9u1Ka zEt*bNXPC*9v1V}a>9kmB34V`Uxh2{^Jg@Ab>dP75bLXeqFo_0=K0$*Wn6JfsybSOj zN2uH+{`}DgQS$Wa(Kq676Rj36CFHt6@t(b8DI_=qRkp4xkupGK385vmnNVEyt4pB5a>{?eQ3iu}BlHGzKVj$AZX=D{Pl z2qg4ITQh*C0a9qo=`7Sod1z7%eE^PD{cXtGh%Ofnkp7Qn%4|kjgC7H5m8$bMcP_C% zjUdSZ>3zxquxYY+hJrpGIW-#PV!}O-pI`q3+|(bURbH&WVmV}grn2eHKqp-QkmYL7 z!ZVHBR#yECf9?xx0MmHJeby${)3$W9TtAHI0D8*(YZtXG+NOx# zRDst_))ACMe1o3E;OlIBUASd>vc?ZO8x+cQiGtTO?~*rwo$(0V|7g+c~k&}^mp z<_u5wwKVKGF4!n07gOSfwnE6gT$sy{?mYWVxp_ON&yjfWjKyJqpKIe}mxhqmzFeKI zJPp8%aLqMN?k^}zj2?cdB;}HTbuSsVG>PVax(Y<7PZwtu+qw2#Qn9+UpJB(E=NG4{5DGj1^A57LLL%xd{O -
- -Yes, you can have double Agents, or Agents that exist in a multi-domain setup. All you need to do is include the domain in the Agent's `spec.domain[*]` list. In the example before, john can send or receive calls from both domains, while the rest of the Agents are only allowed to call within the domain. - -Perhaps, could this "double agent" be the operator at a remote office? - -### Single Domain Example - -The following yaml configuration shows a simple setup, involving one Domain and two Agents: - -**Domain configuration** - -```yaml -- apiVersion: v1beta1 - kind: Domain - metadata: - name: Local Office - spec: - context: - domainUri: sip.local -``` - -**Agents configuration** - -```yaml -- apiVersion: v1beta1 - kind: Agent - metadata: - name: John Doe - spec: - credentials: - username: john - secret: '1234' - domains: [sip.local] -- kind: Agent - apiVersion: v1beta1 - metadata: - name: Janie Doe - spec: - credentials: - username: janie - secret: '1234' - domains: [sip.local] -``` - -And voila! That's all the configuration you need for intra-domain communication. For calls outside the domain, see "Domain Egress Routing" section and to receive calls from the PSTN check section "Domain Ingress Routing" - -> To setup your sip devices use information found in `config/agents.yml`. Also, you must use the Host/IP of Routr server as -> the OUTBOUND PROXY of your sip device. - -**Routing Rules** - -The following rules apply to Intra-Domain Routing: - -- Agents can only call other Agents in the same Domain -- Agents must belong to a Domain -- Agents Are not allowed to send a Digest username different than the username in the `From-Header` - -## Domain Ingress Routing - -The process of receiving a call from PSTN to a domain is known in **Routr** as _Domain Ingress Routing(DIR)_ and it is done using Gateway. Gateways are defined in the yaml file `config/gateways.yml`. The following example shows a typical Gateway configuration. - -```yaml -- apiVersion: v1beta1 - kind: Gateway - metadata: - name: Plain Old Phone Service Provider - spec: - regService: - host: sip.provider.net - credentials: - username: 'gwuser' - secret: gwsecret - transport: udp - registries: [sip.nyc.provider.net] # This are additional registrars within the providers network -``` - -You also need to define DIDs. Incoming calls from a DID will be routed to an existing Agent or Peer using the Address Of Record(AOR). The AOR must be available in the location service at the time of the call or the call will be rejected. - -Please examine the following example: - -```yaml -- apiVersion: v1beta1 - kind: DID - metadata: - gwRef: dd50baa4 - geoInfo: - city: Columbus, GA - country: USA - countryISOCode: US - spec: - location: - telUri: 'tel:17066041487' - aorLink: 'sip:john@sip.local' # This is the sip uri of an agent that is spected to be logged in -``` - -Easy right? Any incoming call from this Gateway and DID will be routed to "Jhon Doe" @ Ocean New York. - -**Routing Rules** - -As mention before, the path of an inbound PSTN call is determined by the `spec.location` block of a `DID` resource. -The `aorLink` refers to an Address of Record(Agent or Peer) that is available in the `location service`. - -## Domain Egress Routing - -_Domain Egress Routing(DER)_ is the way that **Routr** deals with a call request to a _callee_ that exist in the Public Switched Telephone Network(PSTN) and not in the _callers_ domain. The Egress Policy consists in a `rule` and a `didRef`, and it is defined in the `spec.context` section of `Domains` resources. - -The `rule` and `didRef` are defined as follows: - -* `rule` is a regex to match callee in the call request. The location service will resort to this only after a search in the caller's Domain first. - -* `didRef` is the identifier of the DID that will to route the call. This DID must already exist and have a parent Gateway. - -**Routing Rules** - -Agents can only perform outbound calls using the `Egress Policy` of their own Domains. - -## Peers Routing - -Peers are very similar to Agents but they are not bound to any Domain, and they are usually collocated in the same network with Routr. A common case will be peering with Asterisk, where Asterisk acts as a Media Server and Routr is used for signaling. - -Peers can perform inbound/outbound signaling within the network without any especial consideration since they exist inside the _Location Service_ just like Agents. So it is possible to perform signaling from Peer to Peer, Peer to Agent. - -The same is true for Inbound from the PSTN. For example, we can redirect incoming calls from the PSTN using the `spec.location` settings in the `dids.yml` configuration file. - -**Routing Rules** - -Agents are not allowed to call Peers. - -> A future version of the `Peer resource` will feature a `spec.acceptFrom.*` field to allow calls from Domains or specific Agents. diff --git a/docs/guide-routr-as-asterisk-frontend.md b/docs/guide-routr-as-asterisk-frontend.md index 5c24ba146..c2f484b26 100644 --- a/docs/guide-routr-as-asterisk-frontend.md +++ b/docs/guide-routr-as-asterisk-frontend.md @@ -5,7 +5,7 @@ title: Routr as Asterisk Frontend This guide explores the use case of using Asterisk merely as a Media Server and a more specialized software, like **Routr**, to take care of the signaling and resource management. In other words, Asterisk will be in charge of the ivrs, voice mail, call recording, while **Routr** deals with connecting Agents, Peers, and Gateways. The following illustration depicts our scenario: - + **Content** @@ -47,22 +47,22 @@ The first file we will examine and change is `config/peers.yml`. Make note of th Head to the console and run the command `rctl -- get peers` to confirm that the Peer exist. The result should be as follows: - + Next, we focus our attention to `domains.yml` and `agents.yml`. With a fresh installation, we don't need to make any changes to this files. However, you could run the commands `get domains` and `get agents` to ensure that both, the Agent and the Domain, exist on the server. Your output should look similar to: - + Use the information in `agents.yml` to configure your SIP phone. The relevant information is found in `spec.credentials`. Mine looks like this: - - + + > Make the adjustments based on your prefer SIP phone. You can verify that your device registered correctly with **Routr** by running the `locate` command: - + ## Configuring Asterisk @@ -120,7 +120,7 @@ exten => 1001,n,Hangup Restart your Asterisk and check the location service. A new device will appear. - + ## Calling Asterisk from John's device diff --git a/docs/guide-securing-the-signal.md b/docs/guide-securing-the-signal.md index 7ecacd946..19a98f4ce 100644 --- a/docs/guide-securing-the-signal.md +++ b/docs/guide-securing-the-signal.md @@ -7,7 +7,7 @@ Follow this guide to secure the signaling between your endpoints and **Routr**. > For this guide we will use a fictitious domain name to demonstrate the process of securing the signaling path - + ## Creating a Java Keystore(.JKS) Certificate @@ -94,8 +94,8 @@ openssl s_client -host 192.168.1.2 -port 5061 # Remember to use Routr's IP Go to the account that you want to secure, select `Advanced -> Sip Signaling` and change the parameter `Primary Proxy` to `${proxyHost}:${proxyPort};transport=tls`. See the example in the following image: - + If everything went well you should see a green padlock like the one in the image bellow: - + diff --git a/docs/guide-voip-network-setup.md b/docs/guide-voip-network-setup.md index f5c49fbba..4ab716b64 100755 --- a/docs/guide-voip-network-setup.md +++ b/docs/guide-voip-network-setup.md @@ -121,11 +121,11 @@ Your output should be as follows: **Starting the Server** - + **Verifying the Configuration** - + ## Configuring the Sip devices @@ -133,14 +133,14 @@ Your output should be as follows: Configure your softphone using the information you gather in the last step. Start by completing only the required information: _username_, _domain_, _password_. Also, In the advanced section use the server's **IP** as your _Registry Server_ and _Proxy_. Here is how mine looks like: - - + + > Make sure to check the box "Use this account" to register your device If everything went well we just need to confirm that both softphones have registered correctly. Conveniently you can use the `.rctl locate` to obtain a list of "online" devices. This may seem like a lot of information. But what's relevant here is that both `1001` and `1002` are present in the location service and therefore can reach each other. - + ## Making calls diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..e2e56d2a3 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,45 @@ +--- +id: getting-started-introduction +title: Undertanding Routr +--- + +**Routr** is a lightweight sip proxy, location server, and registrar that provides a reliable and scalable SIP infrastructure for telephony carriers, communication service providers, and integrators. It also provides with capabilities that are suitable for the enterprise and personal needs. To get involved in the development of this project please contact us at [@fonoster](https://twitter.com/fonoster). + +## Features + +- Proxy +- Registrar Service +- Location Service +- Call Forking +- Multi-Tenancy/Multi-Domain +- Access to the PSTN Using SIP Gateways +- Transport: TCP, UDP, TLS, WebSocket +- Data Sources: Redis, Restful API, Files +- Security + - Digest SIP User Authentication + - Domain Access Control List (DACL) + - RESTful service secured with TLS and JWT tokens +- Rest API +- Command Line Tool for Admin Operations +- Routing Capabilities + - Intra-Domain Routing (IDR) + - Domain Ingress Routing(DIR) + - Domain Egress Routing (DER) + - Peer Egress Routing (PER) + +## Key Concepts + +This following table features some important concepts, including the different routing types implemented by the server. + +| Concept | Description | +| -- | -- | +| User | Users perform administrative actions on the server | +| Agent | Agents represent SIP endpoints such as softphones and IP phones | +| Domain | Enables the creation of isolated groups of Agents | +| Peer | Similar to Agents but without Domain boundaries | +| Gateway | SIP entity that allows call termination | +| DID | Routes and translate calls between the PSTN and Routr | +| Intra-Domain Routing | Routing type for calling within the same Domain | +| Domain Ingress Routing | Calling from the PSTN to an Agent or Peer | +| Domain Egress Routing | Calling from an Agent to the PSTN thru a Gateway | +| Peer Egress Routing | Similar to *DER* but applies only to Peers | diff --git a/docs/theme/assets/images/favicon.png b/docs/theme/assets/images/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..23ccc2bac7294c857add8e40e27c5c4e4d8e6397 GIT binary patch literal 1056 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE0wix1Z>k4UEa{HEjtq=#3k+XOiwE+VlDyqr z82-2SpV<%OaTa()76WMyFm^kcZO6dCc)`=fF~sBe-K+5#y@fJtAI{&lymfQKwqr2~ zCt6K)HCrDwC3%)PcB-t_tS?fYGKKrp)FS6~VQY2-dr2vsGT6H4XK{CbKb{VJ-6tv z`N9hwdeTYJqKX$@btNXswa09W3h1oa`Ppu!-h_6i%XU`FHRJBQXsHYS-&uU7;_VF9 zi;tq%ZKmpJo-4eR{QHdlyzhSHe|5Ca6`qmJT~+kSH1Aj3MvLQuvDYTKxJ6l9wvAqK zdB%3mo~lLnWlsN#UBy#ZvCMI+dDW-(9mfxMwN=FL4x8V)&NX(mep&BcE0cuQgBr{k zMYq~dDC{l1G$|*PvpMZ7$Ce!_D;)kEbzRNEq#HKP%p&W6WcS1^_evK#EnL4YO1*LE zxvKXGnaz)#_V2y0Qcm;sool(PwM;A)`5)Wj{E=t_3#|VxqKu$ENSsedl>&so{FHT&Co_$S0K>llS_qPdW8u zfu7wmU%#m*4m!l~B?(S#KA6L&Kd7c7#Uj`TLO``fq|8Q!QsPte^E5# z=BH$)RpQpLY2GwPpawUP4aNCsCFO}lsSKXEiRr1niRqci*$QTQ=6V*omI^>CO>_-R zbq$Ra0u9X+GD=Dctn~HE%ggmLL8^fms9G<-DE&^`TcCjq5+D;pGD>rktgKw}lS^|` z^Gd9&0)R@384Q>I->r|P25hI5RYq!NdPWI@p`{T&Ls2VGjX07yP&MJ1DJ2;oC70JI zasZV`A}R6B%uOw+EJ$SlyGp+xFWr7qm>-%sz9B$W42C8arlw{F#^#o8MbqyAmGC2( z6P#I<%3$E+G-Z+98=zDel2mArCqr6hPAbs*`nh=}Ir-`OX^CZ-$@zK3`iO|pPc|G%zu?NJ~mFH!-tJvPd-q+M1H42h^bla^IYl8-X@3c)I$ztaD0e0sse~ BmzDqk literal 0 HcmV?d00001 diff --git a/docs/theme/assets/images/icons/bitbucket.svg b/docs/theme/assets/images/icons/bitbucket.svg new file mode 100644 index 000000000..a25435af3 --- /dev/null +++ b/docs/theme/assets/images/icons/bitbucket.svg @@ -0,0 +1,20 @@ + + + diff --git a/docs/theme/assets/images/icons/github.svg b/docs/theme/assets/images/icons/github.svg new file mode 100644 index 000000000..c009420a7 --- /dev/null +++ b/docs/theme/assets/images/icons/github.svg @@ -0,0 +1,18 @@ + + + diff --git a/docs/theme/assets/images/icons/gitlab.svg b/docs/theme/assets/images/icons/gitlab.svg new file mode 100644 index 000000000..9e3d6f05b --- /dev/null +++ b/docs/theme/assets/images/icons/gitlab.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/theme/assets/stylesheets/_config.scss b/docs/theme/assets/stylesheets/_config.scss new file mode 100644 index 000000000..8a612f7e0 --- /dev/null +++ b/docs/theme/assets/stylesheets/_config.scss @@ -0,0 +1,93 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Variables: typography +// ---------------------------------------------------------------------------- + +// Modular typographic scale +$ms-base: 1.6rem; +$ms-ratio: $major-third; + +// ---------------------------------------------------------------------------- +// Variables: breakpoints +// ---------------------------------------------------------------------------- + +// stylelint-disable unit-whitelist + +// Device-specific breakpoints +$break-devices: ( + mobile: ( + portrait: px2em(220px) px2em(479px), + landscape: px2em(480px) px2em(719px) + ), + tablet: ( + portrait: px2em(720px) px2em(959px), + landscape: px2em(960px) px2em(1219px) + ), + screen: ( + small: px2em(1220px) px2em(1599px), + medium: px2em(1600px) px2em(1999px), + large: px2em(2000px) + ) +); + +// stylelint-enable unit-whitelist + +// ---------------------------------------------------------------------------- +// Variables: base colors +// ---------------------------------------------------------------------------- + +// Primary and accent colors +$md-color-primary: $clr-indigo-500 !default; +$md-color-accent: $clr-indigo-a200 !default; + +// Shades of black +$md-color-black: hsla(0, 0%, 0%, 0.87) !default; +$md-color-black--light: hsla(0, 0%, 0%, 0.54) !default; +$md-color-black--lighter: hsla(0, 0%, 0%, 0.26) !default; +$md-color-black--lightest: hsla(0, 0%, 0%, 0.07) !default; +$md-color-black--transparent: hsla(0, 0%, 0%, 0) !default; + +// Shades of white +$md-color-white: hsla(0, 0%, 100%, 1) !default; +$md-color-white--light: hsla(0, 0%, 100%, 0.7) !default; +$md-color-white--lighter: hsla(0, 0%, 100%, 0.3) !default; +$md-color-white--lightest: hsla(0, 0%, 100%, 0.12) !default; +$md-color-white--transparent: hsla(0, 0%, 100%, 0) !default; + +// ---------------------------------------------------------------------------- +// Variables: sizing and spacing +// ---------------------------------------------------------------------------- + +// Icons +$md-icon-size: $ms-base * 1.5; +$md-icon-padding: $ms-base * 0.5; +$md-icon-margin: $ms-base * 0.25; + +// Code blocks +$md-code-background: hsla(0, 0%, 92.5%, 0.5); +$md-code-color: #37474F; + +// Keystrokes +$md-keyboard-background: #FCFCFC; +$md-keyboard-color: #555555; diff --git a/docs/theme/assets/stylesheets/_shame.scss b/docs/theme/assets/stylesheets/_shame.scss new file mode 100644 index 000000000..31326ac51 --- /dev/null +++ b/docs/theme/assets/stylesheets/_shame.scss @@ -0,0 +1,25 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Nothing to see here, move along +// ---------------------------------------------------------------------------- diff --git a/docs/theme/assets/stylesheets/application-palette.scss b/docs/theme/assets/stylesheets/application-palette.scss new file mode 100644 index 000000000..48af85de4 --- /dev/null +++ b/docs/theme/assets/stylesheets/application-palette.scss @@ -0,0 +1,323 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Dependencies +// ---------------------------------------------------------------------------- + +@import "modularscale"; +@import "material-color"; +@import "material-shadows"; + +// ---------------------------------------------------------------------------- +// Local imports +// ---------------------------------------------------------------------------- + +@import "helpers/break"; +@import "helpers/px2em"; + +@import "config"; + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Color tile for presentation in theme documentation +button[data-md-color-primary], +button[data-md-color-accent] { + width: 13rem; + margin-bottom: 0.4rem; + padding: 2.4rem 0.8rem 0.4rem; + transition: + background-color 0.25s, + opacity 0.25s; + border-radius: 0.2rem; + color: $md-color-white; + font-size: ms(-1); + text-align: left; + cursor: pointer; + + // Hovered color tile + &:hover { + opacity: 0.75; + } +} + +// Build primary colors +@each $name, $color in ( + "red": $clr-red-400, + "pink": $clr-pink-500, + "purple": $clr-purple-400, + "deep-purple": $clr-deep-purple-400, + "indigo": $clr-indigo-500, + "blue": $clr-blue-500, + "light-blue": $clr-light-blue-500, + "cyan": $clr-cyan-500, + "teal": $clr-teal-500, + "green": $clr-green-500, + "light-green": $clr-light-green-600, + "lime": $clr-lime-600, + "yellow": $clr-yellow-800, + "amber": $clr-amber-700, + "orange": $clr-orange-600, + "deep-orange": $clr-deep-orange-400, + "brown": $clr-brown-500, + "grey": $clr-grey-600, + "blue-grey": $clr-blue-grey-600 +) { + + // Color tile for presentation in theme documentation + button[data-md-color-primary="#{$name}"] { + background-color: $color; + } + + // Color palette + [data-md-color-primary="#{$name}"] { + + // Links in typesetted content + .md-typeset a { + color: $color; + } + + // Application header (stays always on top) + .md-header { + background-color: $color; + } + + // Hero teaser + .md-hero { + background-color: $color; + } + + // Current or active link + .md-nav__link:active, + .md-nav__link--active { + color: $color; + } + + // Reset active color for nested list titles + .md-nav__item--nested > .md-nav__link { + color: inherit; + } + + // [tablet portrait -]: Layered navigation + @include break-to-device(tablet portrait) { + + // Repository containing source + .md-nav__source { + background-color: mix($color, $md-color-black, 75%); + } + } + + // [tablet -]: Layered navigation + @include break-to-device(tablet) { + + // Site title in main navigation + html & .md-nav--primary .md-nav__title--site { + background-color: $color; + } + } + + // [screen +]: Set background color for tabs + @include break-from-device(screen) { + + // Tabs with outline + .md-tabs { + background-color: $color; + } + } + } +} + +// Color tile for presentation in theme documentation +button[data-md-color-primary="white"] { + background-color: $md-color-white; + color: $md-color-black; + box-shadow: 0 0 0.1rem $md-color-black--light inset; +} + +// Overrides for white color +[data-md-color-primary="white"] { + + // Application header (stays always on top) + .md-header { + background-color: $md-color-white; + color: $md-color-black; + } + + // Hero teaser + .md-hero { + background-color: $md-color-white; + color: $md-color-black; + + // Add a border if there are no tabs + &--expand { + border-bottom: 0.1rem solid $md-color-black--lightest; + } + } + + // [tablet portrait -]: Layered navigation + @include break-to-device(tablet portrait) { + + // Repository containing source + .md-nav__source { + background-color: $md-color-black--lightest; + color: $md-color-black; + } + } + + // [tablet portrait +]: Change color of search input + @include break-from-device(tablet landscape) { + + // Search input + .md-search__input { + background-color: $md-color-black--lightest; + + // Search input placeholder + &::placeholder { + color: $md-color-black--light; + } + } + } + + // [tablet -]: Layered navigation + @include break-to-device(tablet) { + + // Site title in main navigation + html & .md-nav--primary .md-nav__title--site { + background-color: $md-color-white; + color: $md-color-black; + } + + // Hero teaser + .md-hero { + border-bottom: 0.1rem solid $md-color-black--lightest; + } + } + + // [screen +]: Set background color for tabs + @include break-from-device(screen) { + + // Tabs with outline + .md-tabs { + border-bottom: 0.1rem solid $md-color-black--lightest; + background-color: $md-color-white; + color: $md-color-black; + } + } +} + +// Build accent colors +@each $name, $color in ( + "red": $clr-red-a400, + "pink": $clr-pink-a400, + "purple": $clr-purple-a200, + "deep-purple": $clr-deep-purple-a200, + "indigo": $clr-indigo-a200, + "blue": $clr-blue-a200, + "light-blue": $clr-light-blue-a700, + "cyan": $clr-cyan-a700, + "teal": $clr-teal-a700, + "green": $clr-green-a700, + "light-green": $clr-light-green-a700, + "lime": $clr-lime-a700, + "yellow": $clr-yellow-a700, + "amber": $clr-amber-a700, + "orange": $clr-orange-a400, + "deep-orange": $clr-deep-orange-a200 +) { + + // Color tile for presentation in theme documentation + button[data-md-color-accent="#{$name}"] { + background-color: $color; + } + + // Color palette + [data-md-color-accent="#{$name}"] { + + // Typesetted content + .md-typeset { + + // Hovered and active links + a:hover, + a:active { + color: $color; + } + + // Hovered scrollbar thumb + pre code::-webkit-scrollbar-thumb:hover, + .codehilite pre::-webkit-scrollbar-thumb:hover { + background-color: $color; + } + + // Copy to clipboard active icon + .md-clipboard:hover::before, + .md-clipboard:active::before { + color: $color; + } + + // Active or targeted back reference + .footnote li:hover .footnote-backref:hover, + .footnote li:target .footnote-backref { + color: $color; + } + + // Active, targeted or focused permalink + [id]:hover .headerlink:hover, + [id]:target .headerlink, + [id] .headerlink:focus { + color: $color; + } + } + + // Focused or hovered link + .md-nav__link:focus, + .md-nav__link:hover { + color: $color; + } + + // Search container scrollbar thumb + .md-search__scrollwrap::-webkit-scrollbar-thumb:hover { + background-color: $color; + } + + // Search result link + .md-search-result__link { + + // Active or hovered link + &[data-md-state="active"], + &:hover { + background-color: transparentize($color, 0.9); + } + } + + // Wrapper for scrolling on overflow + .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover { + background-color: $color; + } + + // Source file icon + .md-source-file:hover::before { + background-color: $color; + } + } +} diff --git a/docs/theme/assets/stylesheets/application.scss b/docs/theme/assets/stylesheets/application.scss new file mode 100644 index 000000000..e135d9381 --- /dev/null +++ b/docs/theme/assets/stylesheets/application.scss @@ -0,0 +1,69 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Dependencies +// ---------------------------------------------------------------------------- + +@import "modularscale"; +@import "material-color"; +@import "material-shadows"; + +// ---------------------------------------------------------------------------- +// Local imports +// ---------------------------------------------------------------------------- + +@import "helpers/break"; +@import "helpers/px2em"; + +@import "config"; + +@import "base/reset"; +@import "base/icons"; +@import "base/typeset"; + +@import "layout/base"; +@import "layout/clipboard"; +@import "layout/content"; +@import "layout/header"; +@import "layout/hero"; +@import "layout/footer"; +@import "layout/nav"; +@import "layout/search"; +@import "layout/sidebar"; +@import "layout/source"; +@import "layout/tabs"; + +@import "extensions/admonition"; +@import "extensions/codehilite"; +@import "extensions/footnotes"; +@import "extensions/permalinks"; + +@import "extensions/pymdown/arithmatex"; +@import "extensions/pymdown/critic"; +@import "extensions/pymdown/details"; +@import "extensions/pymdown/emoji"; +@import "extensions/pymdown/inlinehilite"; +@import "extensions/pymdown/superfences"; +@import "extensions/pymdown/tasklist"; + +@import "shame"; diff --git a/docs/theme/assets/stylesheets/base/.stylelintrc b/docs/theme/assets/stylesheets/base/.stylelintrc new file mode 100644 index 000000000..422ff2c6f --- /dev/null +++ b/docs/theme/assets/stylesheets/base/.stylelintrc @@ -0,0 +1,7 @@ +{ + "extends": "../../../../.stylelintrc", + "rules": { + "font-weight-notation": null, + "property-no-vendor-prefix": null + } +} diff --git a/docs/theme/assets/stylesheets/base/_icons.scss b/docs/theme/assets/stylesheets/base/_icons.scss new file mode 100644 index 000000000..aaf4e9e1d --- /dev/null +++ b/docs/theme/assets/stylesheets/base/_icons.scss @@ -0,0 +1,81 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// stylelint-disable font-family-no-missing-generic-family-keyword + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Icon placeholders +%md-icon { + font-family: "Material Icons"; + font-style: normal; + font-variant: normal; + font-weight: normal; + line-height: 1; + text-transform: none; + white-space: nowrap; + speak: none; + word-wrap: normal; + direction: ltr; + + // Icon rendered as button + &__button { + display: inline-block; + margin: $md-icon-margin; + padding: $md-icon-padding; + font-size: $md-icon-size; + cursor: pointer; + } +} + +// Representational classes +.md-icon { + @extend %md-icon; + + // Build representational classes + @each $ligature, $name in ( + "\E5C4": "arrow-back", // arrow_back + "\E5C8": "arrow-forward", // arrow_forward + "\E5D2": "menu", // menu + "\E8B6": "search" // search + ) { + &--#{$name}::before { + content: $ligature; + } + } + + // Adjust for RTL languages + [dir="rtl"] & { + + // Flip ligatures for arrows + @each $ligature, $name in ( + "\E5C8": "arrow-back", // arrow_forward + "\E5C4": "arrow-forward" // arrow_back + ) { + &--#{$name}::before { + content: $ligature; + } + } + } +} diff --git a/docs/theme/assets/stylesheets/base/_reset.scss b/docs/theme/assets/stylesheets/base/_reset.scss new file mode 100644 index 000000000..73bbd6bf2 --- /dev/null +++ b/docs/theme/assets/stylesheets/base/_reset.scss @@ -0,0 +1,132 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// stylelint-disable no-duplicate-selectors + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Enforce correct box model +html { + box-sizing: border-box; +} + +// All elements shall inherit the document default +*, +*::before, +*::after { + box-sizing: inherit; +} + +// Prevent adjustments of font size after orientation changes in IE and iOS +html { + text-size-adjust: none; +} + +// Remove margin in all browsers +body { + margin: 0; +} + +// Reset horizontal rules in FF +hr { + overflow: visible; + box-sizing: content-box; +} + +// Remove gaps in underlined links in iOS >= 8 and Safari >= 8 +a { + -webkit-text-decoration-skip: objects; +} + +// Reset tap outlines on iOS and Android +a, +button, +label, +input { + -webkit-tap-highlight-color: transparent; +} + +// Reset link styles +a { + color: inherit; + text-decoration: none; +} + +// Normalize font-size in all browsers +small { + font-size: 80%; +} + +// Prevent subscript and superscript from affecting line-height +sub, +sup { + position: relative; + font-size: 80%; + line-height: 0; + vertical-align: baseline; +} + +// Correct subscript offset +sub { + bottom: -0.25em; +} + +// Correct superscript offset +sup { + top: -0.5em; +} + +// Remove borders on images +img { + border-style: none; +} + +// Reset table styles +table { + border-collapse: separate; + border-spacing: 0; +} + +// Reset table cell styles +td, +th { + font-weight: normal; + vertical-align: top; +} + +// Reset (native) button styles +button { + margin: 0; + padding: 0; + border: 0; + outline-style: none; + background: transparent; + font-size: inherit; +} + +// Reset (native) input styles +input { + border: 0; + outline: 0; +} diff --git a/docs/theme/assets/stylesheets/base/_typeset.scss b/docs/theme/assets/stylesheets/base/_typeset.scss new file mode 100644 index 000000000..2e89c8a55 --- /dev/null +++ b/docs/theme/assets/stylesheets/base/_typeset.scss @@ -0,0 +1,492 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules: font definitions +// ---------------------------------------------------------------------------- + +// Enable font-smoothing in Webkit and FF +body { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +// Default fonts +body, +input { + color: $md-color-black; + font-feature-settings: "kern", "liga"; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +// Proportionally spaced fonts +pre, +code, +kbd { + color: $md-color-black; + font-feature-settings: "kern"; + font-family: "Courier New", Courier, monospace; +} + +// ---------------------------------------------------------------------------- +// Rules: typesetted content +// ---------------------------------------------------------------------------- + +// Content that is typeset - if possible, all margins, paddings and font sizes +// should be set in ems, so nested blocks (e.g. Admonition) render correctly, +// except headlines that should only appear on the top level and need to have +// consistent spacing due to layout constraints. +.md-typeset { + font-size: ms(0); + line-height: 1.6; + + // Colors should be kept when printing + -webkit-print-color-adjust: exact; + + // Default spacing + p, + ul, + ol, + blockquote { + margin: 1em 0; + } + + // 1st level headline + h1 { + margin: 0 0 4rem; + color: $md-color-black--light; + font-size: ms(3); + font-weight: 300; + letter-spacing: -0.01em; + line-height: 1.3; + } + + // 2nd level headline + h2 { + margin: 4rem 0 1.6rem; + font-size: ms(2); + font-weight: 300; + letter-spacing: -0.01em; + line-height: 1.4; + } + + // 3rd level headline + h3 { + margin: 3.2rem 0 1.6rem; + font-size: ms(1); + font-weight: 400; + letter-spacing: -0.01em; + line-height: 1.5; + } + + // 3rd level headline following an 2nd level headline + h2 + h3 { + margin-top: 1.6rem; + } + + // 4th level headline + h4 { + margin: 1.6rem 0; + font-size: ms(0); + font-weight: 700; + letter-spacing: -0.01em; + } + + // 5th and 6th level headline + h5, + h6 { + margin: 1.6rem 0; + color: $md-color-black--light; + font-size: ms(-1); + font-weight: 700; + letter-spacing: -0.01em; + } + + // Overrides for 5th level headline + h5 { + text-transform: uppercase; + } + + // Horizontal separators + hr { + margin: 1.5em 0; + border-bottom: 0.1rem dotted $md-color-black--lighter; + } + + // Links + a { + color: $md-color-primary; + word-break: break-word; + + // Also enable color transition on pseudo elements + &, + &::before { + transition: color 0.125s; + } + + // Hovered and active links + &:hover, + &:active { + color: $md-color-accent; + } + + // Add URLs for print + @media print { + + // Show link URL + &::after { + color: $md-color-black--light; + content: " [" attr(href) "]"; + } + } + } + + // Code blocks + code, + pre { + background-color: $md-code-background; + color: $md-code-color; + font-size: 85%; + direction: ltr; + + // Wrap text and hide scollbars + @media print { + white-space: pre-wrap; + } + } + + // Inline code blocks, correct relative ems for smaller font size + code { + $correct: 1 / 0.85; + + margin: 0 0.25em * $correct; + padding: 0.0625em * $correct 0; + border-radius: 0.2rem; + box-shadow: + +0.25em * $correct 0 0 $md-code-background, + -0.25em * $correct 0 0 $md-code-background; + word-break: break-word; + box-decoration-break: clone; + + // Remove box-shadows for print + @media print { + box-shadow: none; + box-decoration-break: initial; + } + } + + // Disable containing block inside headlines + h1 code, + h2 code, + h3 code, + h4 code, + h5 code, + h6 code { + margin: 0; + background-color: transparent; + box-shadow: none; + } + + // Reset code if it's inside a link + a > code { + margin: inherit; + padding: inherit; + border-radius: none; + background-color: inherit; + color: inherit; + box-shadow: none; + } + + // Unformatted code blocks + pre { + position: relative; + margin: 1em 0; + border-radius: 0.2rem; + line-height: 1.4; + -webkit-overflow-scrolling: touch; + + // [mobile -]: Stretch to whole width + @include break-to-device(mobile) { + margin: 1em -1.6rem; + border-radius: 0; + } + + // Actual container with code, overflowing + > code { + display: block; + margin: 0; + padding: 1.05rem 1.2rem; + background-color: transparent; + font-size: inherit; + box-shadow: none; + box-decoration-break: none; + overflow: auto; + + // [mobile -]: Increase padding to match text + @include break-to-device(mobile) { + padding: 1.05rem 1.6rem; + } + + // Override native scrollbar styles + &::-webkit-scrollbar { + width: 0.4rem; + height: 0.4rem; + } + + // Style scrollbar thumb + &::-webkit-scrollbar-thumb { + background-color: $md-color-black--lighter; + + // Hovered scrollbar thumb + &:hover { + background-color: $md-color-accent; + } + } + } + } + + // Keystrokes + kbd { + $correct: 1 / 0.85; + + padding: 0 0.25em * $correct; + border: 0.1rem solid darken($md-keyboard-background, 20%); + border-radius: 0.3rem; + border-bottom-color: darken($md-keyboard-background, 25%); + background-color: $md-keyboard-background; + color: $md-keyboard-color; + font-size: 85%; + box-shadow: 0 0.1rem 0 darken($md-keyboard-background, 30%); + word-break: break-word; + } + + // Text highlighting marker + mark { + margin: 0 0.25em; + padding: 0.0625em 0; + border-radius: 0.2rem; + background-color: transparentize($clr-yellow-500, 0.5); + box-shadow: + +0.25em 0 0 transparentize($clr-yellow-500, 0.5), + -0.25em 0 0 transparentize($clr-yellow-500, 0.5); + word-break: break-word; + box-decoration-break: clone; + } + + // Abbreviations + abbr { + border-bottom: 0.1rem dotted $md-color-black--light; + text-decoration: none; + cursor: help; + } + + // Small text + small { + opacity: 0.75; + } + + // Superscript and subscript + sup, + sub { + margin-left: 0.0625em * 1 / 0.8; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: 0.0625em * 1 / 0.8; + margin-left: initial; + } + } + + // Blockquotes, possibly nested + blockquote { + padding-left: 1.2rem; + border-left: 0.4rem solid $md-color-black--lighter; + color: $md-color-black--light; + + // Adjust for RTL languages + [dir="rtl"] & { + padding-right: 1.2rem; + padding-left: initial; + border-right: 0.4rem solid $md-color-black--lighter; + border-left: initial; + } + } + + // Unordered lists + ul { + list-style-type: disc; + } + + // Unordered and ordered lists + ul, + ol { + margin-left: 0.625em; + padding: 0; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: 0.625em; + margin-left: initial; + } + + // Nested ordered lists + ol { + list-style-type: lower-alpha; + + // Triply nested ordered list + ol { + list-style-type: lower-roman; + } + } + + // List elements + li { + margin-bottom: 0.5em; + margin-left: 1.25em; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: 1.25em; + margin-left: initial; + } + + // Decrease vertical spacing + p, + blockquote { + margin: 0.5em 0; + } + + // Remove margin on last element + &:last-child { + margin-bottom: 0; + } + + // Nested lists + ul, + ol { + margin: 0.5em 0 0.5em 0.625em; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: 0.625em; + margin-left: initial; + } + } + } + } + + // Definition lists + dd { + margin: 1em 0 1em 1.875em; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: 1.875em; + margin-left: initial; + } + } + + // Limit width to container + iframe, + img, + svg { + max-width: 100%; + } + + // Data tables + table:not([class]) { + @include z-depth(2); + + display: inline-block; + max-width: 100%; + border-radius: 0.2rem; + font-size: ms(-1); + overflow: auto; + -webkit-overflow-scrolling: touch; + + // Due to margin collapse because of the necessary inline-block hack, we + // cannot increase the bottom margin on the table, so we just increase the + // top margin on the following element + & + * { + margin-top: 1.5em; + } + + // Table headings and cells + th:not([align]), + td:not([align]) { + text-align: left; + + // Adjust for RTL languages + [dir="rtl"] & { + text-align: right; + } + } + + // Table headings + th { + min-width: 10rem; + padding: 1.2rem 1.6rem; + background-color: $md-color-black--light; + color: $md-color-white; + vertical-align: top; + } + + // Table cells + td { + padding: 1.2rem 1.6rem; + border-top: 0.1rem solid $md-color-black--lightest; + vertical-align: top; + } + + // Remove top border on first row + tr:first-child td { + border-top: 0; + } + + // Do not wrap links in tables + a { + word-break: normal; + } + } + + // Wrapper for scrolling on overflow + &__scrollwrap { + margin: 1em -1.6rem; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } + + // Data table wrapper, in case JavaScript is available + .md-typeset__table { + display: inline-block; + margin-bottom: 0.5em; + padding: 0 1.6rem; + + // Data tables + table { + display: table; + width: 100%; + margin: 0; + overflow: hidden; + } + } +} diff --git a/docs/theme/assets/stylesheets/extensions/_admonition.scss b/docs/theme/assets/stylesheets/extensions/_admonition.scss new file mode 100644 index 000000000..7dfeeccdf --- /dev/null +++ b/docs/theme/assets/stylesheets/extensions/_admonition.scss @@ -0,0 +1,144 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// 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 1.2rem; + border-left: 0.4rem solid $clr-blue-a200; + border-radius: 0.2rem; + font-size: ms(-1); + overflow: auto; + + // Adjust for RTL languages + [dir="rtl"] & { + border-right: 0.4rem solid $clr-blue-a200; + border-left: none; + } + + // Adjust spacing on last element + html & > :last-child { + margin-bottom: 1.2rem; + } + + // Adjust margin for nested admonition blocks + .admonition { + margin: 1em 0; + } + + // Title + > .admonition-title { + margin: 0 -1.2rem; + padding: 0.8rem 1.2rem 0.8rem 4rem; + border-bottom: 0.1rem solid transparentize($clr-blue-a200, 0.9); + background-color: transparentize($clr-blue-a200, 0.9); + font-weight: 700; + + // Adjust for RTL languages + [dir="rtl"] & { + padding: 0.8rem 4rem 0.8rem 1.2rem; + } + + // Reset spacing, if title is the only element + &:last-child { + margin-bottom: 0; + } + + // Icon + &::before { + @extend %md-icon; + + position: absolute; + left: 1.2rem; + color: $clr-blue-a200; + font-size: 2rem; + content: "\E3C9"; // edit + + // Adjust for RTL languages + [dir="rtl"] & { + right: 1.2rem; + left: initial; + } + } + } + + // Build representational classes + @each $names, $appearance in ( + abstract summary tldr: $clr-light-blue-a400 "\E8D2", // subject + info todo: $clr-cyan-a700 "\E88E", // info + tip hint important : $clr-teal-a700 "\E80E", // whatshot + success check done: $clr-green-a700 "\E876", // done + question help faq: $clr-light-green-a700 "\E887", // help + warning caution attention: $clr-orange-a400 "\E002", // warning + failure fail missing: $clr-red-a200 "\E14C", // clear + danger error: $clr-red-a400 "\E3E7", // flash_on + bug: $clr-pink-a400 "\E868", // bug_report + example: $clr-deep-purple-a400 "\E242", // format_list_numbered + quote cite: $clr-grey "\E244" // format_quote + ) { + $tint: nth($appearance, 1); + $icon: nth($appearance, 2); + + // Define base class + &%#{nth($names, 1)}, + &.#{nth($names, 1)} { + border-left-color: $tint; + + // Adjust for RTL languages + [dir="rtl"] & { + border-right-color: $tint; + } + + // Title + > .admonition-title { + border-bottom-color: 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 { + @for $n from 2 through length($names) { + &.#{nth($names, $n)} { + @extend .admonition%#{nth($names, 1)}; + } + } + } + } + } +} diff --git a/docs/theme/assets/stylesheets/extensions/_codehilite.scss b/docs/theme/assets/stylesheets/extensions/_codehilite.scss new file mode 100644 index 000000000..b2778ff16 --- /dev/null +++ b/docs/theme/assets/stylesheets/extensions/_codehilite.scss @@ -0,0 +1,373 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Variables +// ---------------------------------------------------------------------------- + +// Operators +$codehilite-operator: inherit; +$codehilite-operator-word: inherit; + +// Generics +$codehilite-generic-emph: #000000; +$codehilite-generic-error: #AA0000; +$codehilite-generic-heading: #999999; +$codehilite-generic-output: #888888; +$codehilite-generic-prompt: #555555; +$codehilite-generic-strong: inherit; +$codehilite-generic-subheading: #AAAAAA; +$codehilite-generic-traceback: #AA0000; + +// Diffs +$codehilite-diff-deleted: #FFDDDD; +$codehilite-diff-inserted: #DDFFDD; + +// Keywords +$codehilite-keyword: #3B78E7; +$codehilite-keyword-constant: #A71D5D; +$codehilite-keyword-declaration: #3B78E7; +$codehilite-keyword-namespace: #3B78E7; +$codehilite-keyword-pseudo: #A71D5D; +$codehilite-keyword-reserved: #3E61A2; +$codehilite-keyword-type: #3E61A2; + +// Comments +$codehilite-comment: #999999; +$codehilite-comment-multiline: #999999; +$codehilite-comment-preproc: #666666; +$codehilite-comment-single: #999999; +$codehilite-comment-shebang: #999999; +$codehilite-comment-special: #999999; + +// Names +$codehilite-name-attribute: #C2185B; +$codehilite-name-builtin: #C2185B; +$codehilite-name-builtin-pseudo: #3E61A2; +$codehilite-name-class: #C2185B; +$codehilite-name-constant: #3E61A2; +$codehilite-name-decorator: #666666; +$codehilite-name-entity: #666666; +$codehilite-name-exception: #C2185B; +$codehilite-name-function: #C2185B; +$codehilite-name-label: #3B5179; +$codehilite-name-namespace: #EC407A; +$codehilite-name-tag: #3B78E7; +$codehilite-name-variable: #3E61A2; +$codehilite-name-variable-class: #3E61A2; +$codehilite-name-variable-instance: #3E61A2; +$codehilite-name-variable-global: #3E61A2; +$codehilite-name-extension: #EC407A; + +// Numbers +$codehilite-literal-number: #E74C3C; +$codehilite-literal-number-float: #E74C3C; +$codehilite-literal-number-hex: #E74C3C; +$codehilite-literal-number-integer: #E74C3C; +$codehilite-literal-number-integer-long: #E74C3C; +$codehilite-literal-number-oct: #E74C3C; + +// Strings +$codehilite-literal-string: #0D904F; +$codehilite-literal-string-backticks: #0D904F; +$codehilite-literal-string-char: #0D904F; +$codehilite-literal-string-doc: #999999; +$codehilite-literal-string-double: #0D904F; +$codehilite-literal-string-escape: #183691; +$codehilite-literal-string-heredoc: #183691; +$codehilite-literal-string-interpol: #183691; +$codehilite-literal-string-other: #183691; +$codehilite-literal-string-regex: #009926; +$codehilite-literal-string-single: #0D904F; +$codehilite-literal-string-symbol: #0D904F; + +// Miscellaneous +$codehilite-error: #A61717; +$codehilite-whitespace: transparent; + +// ---------------------------------------------------------------------------- +// Rules: syntax highlighting +// ---------------------------------------------------------------------------- + +// Codehilite extension +.codehilite { + + // Operators + .o { color: $codehilite-operator; } + .ow { color: $codehilite-operator-word; } + + // Generics + .ge { color: $codehilite-generic-emph; } + .gr { color: $codehilite-generic-error; } + .gh { color: $codehilite-generic-heading; } + .go { color: $codehilite-generic-output; } + .gp { color: $codehilite-generic-prompt; } + .gs { color: $codehilite-generic-strong; } + .gu { color: $codehilite-generic-subheading; } + .gt { color: $codehilite-generic-traceback; } + + // Diffs + .gd { background-color: $codehilite-diff-deleted; } + .gi { background-color: $codehilite-diff-inserted; } + + // Keywords + .k { color: $codehilite-keyword; } + .kc { color: $codehilite-keyword-constant; } + .kd { color: $codehilite-keyword-declaration; } + .kn { color: $codehilite-keyword-namespace; } + .kp { color: $codehilite-keyword-pseudo; } + .kr { color: $codehilite-keyword-reserved; } + .kt { color: $codehilite-keyword-type; } + + // Comments + .c { color: $codehilite-comment; } + .cm { color: $codehilite-comment-multiline; } + .cp { color: $codehilite-comment-preproc; } + .c1 { color: $codehilite-comment-single; } + .ch { color: $codehilite-comment-shebang; } + .cs { color: $codehilite-comment-special; } + + // Names + .na { color: $codehilite-name-attribute; } + .nb { color: $codehilite-name-builtin; } + .bp { color: $codehilite-name-builtin-pseudo; } + .nc { color: $codehilite-name-class; } + .no { color: $codehilite-name-constant; } + .nd { color: $codehilite-name-entity; } + .ni { color: $codehilite-name-entity; } + .ne { color: $codehilite-name-exception; } + .nf { color: $codehilite-name-function; } + .nl { color: $codehilite-name-label; } + .nn { color: $codehilite-name-namespace; } + .nt { color: $codehilite-name-tag; } + .nv { color: $codehilite-name-variable; } + .vc { color: $codehilite-name-variable-class; } + .vg { color: $codehilite-name-variable-global; } + .vi { color: $codehilite-name-variable-instance; } + .nx { color: $codehilite-name-extension; } + + // Numbers + .m { color: $codehilite-literal-number; } + .mf { color: $codehilite-literal-number-float; } + .mh { color: $codehilite-literal-number-hex; } + .mi { color: $codehilite-literal-number-integer; } + .il { color: $codehilite-literal-number-integer-long; } + .mo { color: $codehilite-literal-number-oct; } + + // Strings + .s { color: $codehilite-literal-string; } + .sb { color: $codehilite-literal-string-backticks; } + .sc { color: $codehilite-literal-string-char; } + .sd { color: $codehilite-literal-string-doc; } + .s2 { color: $codehilite-literal-string-double; } + .se { color: $codehilite-literal-string-escape; } + .sh { color: $codehilite-literal-string-heredoc; } + .si { color: $codehilite-literal-string-interpol; } + .sx { color: $codehilite-literal-string-other; } + .sr { color: $codehilite-literal-string-regex; } + .s1 { color: $codehilite-literal-string-single; } + .ss { color: $codehilite-literal-string-symbol; } + + // Miscellaneous + .err { color: $codehilite-error; } + .w { color: $codehilite-whitespace; } + + // Highlighted lines + .hll { + display: block; + margin: 0 -1.2rem; + padding: 0 1.2rem; + background-color: transparentize($clr-yellow-500, 0.5); + + // [mobile -]: Stretch to whole width + @include break-to-device(mobile) { + margin: 0 -1.6rem; + padding: 0 1.6rem; + } + } +} + +// ---------------------------------------------------------------------------- +// Rules: layout +// ---------------------------------------------------------------------------- + +// Scoped in typesetted content to match specificity of regular content +.md-typeset { + + // If code blocks are wrapped with codehilite, the styles must be adjusted + // so the marker stretches to the whole width and the padding is respected + .codehilite { + position: relative; + margin: 1em 0; + padding: 0; + border-radius: 0.2rem; + background-color: $md-code-background; + color: $md-code-color; + line-height: 1.4; + -webkit-overflow-scrolling: touch; + + // Actual container with code, overflowing + pre, + code { + display: block; + margin: 0; + padding: 1.05rem 1.2rem; + background-color: transparent; + overflow: auto; + vertical-align: top; + + // Override native scrollbar styles + &::-webkit-scrollbar { + width: 0.4rem; + height: 0.4rem; + } + + // Style scrollbar thumb + &::-webkit-scrollbar-thumb { + background-color: $md-color-black--lighter; + + // Hovered scrollbar thumb + &:hover { + background-color: $md-color-accent; + } + } + } + } + + // If not using Pygments, code will be under pre > code + pre.codehilite { + overflow: visible; + + // Actual container with code, overflowing + code { + display: block; + padding: 1.05rem 1.2rem; + overflow: auto; + } + } + + // Block with line numbers + .codehilitetable { + display: block; + margin: 1em 0; + border-radius: 0.2em; + font-size: ms(0); + overflow: hidden; + + // Set table elements to block layout, because otherwise the whole flexbox + // hacking won't work correctly + tbody, + td { + display: block; + padding: 0; + } + + // We need to use flexbox layout, because otherwise it's not possible to + // make the code container scroll while keeping the line numbers static + tr { + display: flex; + } + + // The pre tags are nested inside a table, so we need to remove the + // margin because it collapses below all the overflows + .codehilite, + .linenodiv { + margin: 0; + border-radius: 0; + } + + // Add spacing to line number container + .linenodiv { + padding: 1.05rem 1.2rem; + } + + // Disable user selection, so code can be easily copied without + // accidentally also copying the line numbers + .linenos { + background-color: $md-color-black--lightest; + color: $md-color-black--lighter; + user-select: none; + + // Reset spacings + pre { + margin: 0; + padding: 0; + background-color: transparent; + color: inherit; + text-align: right; + } + } + + // The table cell containing the code container wrapper and code should + // stretch horizontally to the remaining space + .code { + flex: 1; + overflow: hidden; + } + } + + // Full-width container + > .codehilite { + + // [mobile -]: Stretch to whole width + @include break-to-device(mobile) { + margin: 1em -1.6rem; + border-radius: 0; + + // Actual container with code, overflowing + pre, + code { + padding: 1.05rem 1.6rem; + } + } + } + + // Full-width container on top-level + > .codehilitetable { + box-shadow: none; + + // [mobile -]: Stretch to whole width + @include break-to-device(mobile) { + margin: 1em -1.6rem; + border-radius: 0; + + // Increase spacing + .codehilite > pre, + .codehilite > code, + .linenodiv { + padding: 1rem 1.6rem; + } + } + } + + // When pymdownx.superfences is enabled but codehilite is disabled, + // pymdownx.highlight will be used. When this happens, the outer + // container and tables get this class names by default. + .highlight { + @extend .codehilite; + } + + // Same as above, but for code blocks with line numbers enabled + .highlighttable { + @extend .codehilitetable; + } +} diff --git a/docs/theme/assets/stylesheets/extensions/_footnotes.scss b/docs/theme/assets/stylesheets/extensions/_footnotes.scss new file mode 100644 index 000000000..6b6518dfb --- /dev/null +++ b/docs/theme/assets/stylesheets/extensions/_footnotes.scss @@ -0,0 +1,149 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Scoped in typesetted content to match specificity of regular content +.md-typeset { + + // All footnote references + [id^="fnref:"] { + display: inline-block; + + // Targeted anchor + &:target { + margin-top: -(4.8rem + 1.2rem + 1.6rem); + padding-top: (4.8rem + 1.2rem + 1.6rem); + pointer-events: none; + } + } + + // All footnote back references + [id^="fn:"] { + + // Add spacing to anchor for offset + &::before { + display: none; + height: 0; + content: ""; + } + + // Targeted anchor + &:target::before { + display: block; + margin-top: -(4.8rem + 1.2rem + 1rem); + padding-top: (4.8rem + 1.2rem + 1rem); + pointer-events: none; + } + } + + // Footnotes extension + .footnote { + color: $md-color-black--light; + font-size: ms(-1); + + // Remove additional spacing on footnotes + ol { + margin-left: 0; + } + + // Footnote + li { + transition: color 0.25s; + + // Darken color for targeted footnote + &:target { + color: $md-color-black; + } + + // Remove spacing on first element + :first-child { + margin-top: 0; + } + + // Make back references visible on hover + &:hover .footnote-backref, + &:target .footnote-backref { + transform: translateX(0); + opacity: 1; + } + + // Active or targeted back reference + &:hover .footnote-backref:hover, + &:target .footnote-backref { + color: $md-color-accent; + } + } + } + + // Footnote reference + .footnote-ref { + display: inline-block; + pointer-events: initial; + + // Render a thin line before footnote + &::before { + display: inline; + margin: 0 0.2em; + border-left: 0.1rem solid $md-color-black--lighter; + font-size: 1.25em; + content: ""; + vertical-align: -0.5rem; + } + } + + // Footnote back reference + .footnote-backref { + @extend %md-icon; + + display: inline-block; + transform: translateX(0.5rem); + transition: + transform 0.25s 0.125s, + color 0.25s, + opacity 0.125s 0.125s; + color: $md-color-black--lighter; + // Hack: remove Unicode arrow for icon + font-size: 0; + opacity: 0; + vertical-align: text-bottom; + + // Adjust for RTL languages + [dir="rtl"] & { + transform: translateX(-0.5rem); + } + + // Back reference icon + &::before { + display: inline-block; + font-size: 1.6rem; + content: "\E31B"; // keyboard_return + + // Adjust for RTL languages + [dir="rtl"] & { + transform: scaleX(-1) + } + } + } +} diff --git a/docs/theme/assets/stylesheets/extensions/_permalinks.scss b/docs/theme/assets/stylesheets/extensions/_permalinks.scss new file mode 100644 index 000000000..ef0b89ae7 --- /dev/null +++ b/docs/theme/assets/stylesheets/extensions/_permalinks.scss @@ -0,0 +1,99 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Scoped in typesetted content to match specificity of regular content +.md-typeset { + + // Permalinks extension + .headerlink { + display: inline-block; + margin-left: 1rem; + transform: translate(0, 0.5rem); + transition: + transform 0.25s 0.25s, + color 0.25s, + opacity 0.125s 0.25s; + opacity: 0; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: 1rem; + margin-left: initial; + } + + // Higher specificity for color due to palettes integration + html body & { + color: $md-color-black--lighter; + } + + // Hide for print + @media print { + display: none; + } + } + + // Correct anchor offset for link blurring + @each $level, $delta in ( + h1: 0.9rem, + h2: 0.8rem, + h3: 0.9rem, + h4: 0.9rem, + h5: 1.1rem, + h6: 1.1rem + ) { + #{$level}[id] { + + // Un-targeted anchor + &::before { + display: block; + margin-top: -$delta; + padding-top: $delta; + content: ""; + } + + // Targeted anchor (48px from header, 12px from sidebar offset) + &:target::before { + margin-top: -(4.8rem + 1.2rem + $delta); + padding-top: (4.8rem + 1.2rem + $delta); + } + + // Make permalink visible on hover + &:hover .headerlink, + &:target .headerlink, + & .headerlink:focus { + transform: translate(0, 0); + opacity: 1; + } + + // Active or targeted permalink + &:hover .headerlink:hover, + &:target .headerlink, + & .headerlink:focus { + color: $md-color-accent; + } + } + } +} diff --git a/docs/theme/assets/stylesheets/extensions/pymdown/_arithmatex.scss b/docs/theme/assets/stylesheets/extensions/pymdown/_arithmatex.scss new file mode 100644 index 000000000..2ad22cbe7 --- /dev/null +++ b/docs/theme/assets/stylesheets/extensions/pymdown/_arithmatex.scss @@ -0,0 +1,54 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// stylelint-disable selector-class-pattern + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Scoped in typesetted content to match specificity of regular content +.md-typeset { + + // MathJax integration - add padding to omit vertical scrollbar + .MJXc-display { + margin: 0.75em 0; + padding: 0.75em 0; + overflow: auto; + -webkit-overflow-scrolling: touch; + } + + // Stretch top-level containers + > p > .MJXc-display { + + // [mobile -]: Stretch to whole width + @include break-to-device(mobile) { + margin: 0.75em -1.6rem; + padding: 0.25em 1.6rem; + } + } + + // Remove outline on tab index + .MathJax_CHTML { + outline: 0; + } +} diff --git a/docs/theme/assets/stylesheets/extensions/pymdown/_critic.scss b/docs/theme/assets/stylesheets/extensions/pymdown/_critic.scss new file mode 100644 index 000000000..4aba7ebf2 --- /dev/null +++ b/docs/theme/assets/stylesheets/extensions/pymdown/_critic.scss @@ -0,0 +1,93 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Scoped in typesetted content to match specificity of regular content +.md-typeset { + + // Deletions, additions and comments + del.critic, + ins.critic, + .critic.comment { + margin: 0 0.25em; + padding: 0.0625em 0; + border-radius: 0.2rem; + box-decoration-break: clone; + } + + // Deletion + del.critic { + background-color: $codehilite-diff-deleted; // TODO: dependent on order of inclusion + box-shadow: + +0.25em 0 0 $codehilite-diff-deleted, + -0.25em 0 0 $codehilite-diff-deleted; + } + + // Addition + ins.critic { + background-color: $codehilite-diff-inserted; // TODO: dependent on order of inclusion + box-shadow: + +0.25em 0 0 $codehilite-diff-inserted, + -0.25em 0 0 $codehilite-diff-inserted; + } + + // Comment + .critic.comment { + background-color: $md-code-background; // TODO: rename, centralize somehow + color: $md-code-color; + box-shadow: + +0.25em 0 0 $md-code-background, + -0.25em 0 0 $md-code-background; + + // Icon + &::before { + @extend %md-icon; + + padding-right: 0.125em; + color: $md-color-black--lighter; + content: "\E0B7"; // chat + vertical-align: -0.125em; + } + } + + // Block + .critic.block { + display: block; + margin: 1em 0; + padding-right: 1.6rem; + padding-left: 1.6rem; + box-shadow: none; + + // Decrease spacing on first element + :first-child { + margin-top: 0.5em; + } + + // Decrease spacing on last element + :last-child { + margin-bottom: 0.5em; + } + } +} diff --git a/docs/theme/assets/stylesheets/extensions/pymdown/_details.scss b/docs/theme/assets/stylesheets/extensions/pymdown/_details.scss new file mode 100644 index 000000000..ee8d29909 --- /dev/null +++ b/docs/theme/assets/stylesheets/extensions/pymdown/_details.scss @@ -0,0 +1,109 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Scoped in typesetted content to match specificity of regular content +.md-typeset { + + // Details extension + details { + @extend .admonition; + + display: block; + padding-top: 0; + + // Rotate title icon + &[open] > summary::after { + transform: rotate(180deg); + } + + // Remove bottom spacing + &:not([open]) { + padding-bottom: 0; + + // Remove bottom border if block is closed + > summary { + border-bottom: none; + } + } + + // Increase spacing to the right - scoped here for higher specificity + summary { + padding-right: 4rem; + + // Adjust for RTL languages + [dir="rtl"] & { + padding-left: 4rem; + } + } + + // Manually hide and show, if browser doesn't support details + .no-details &:not([open]) { + + // Hide all nested tags ... + > * { + display: none; + } + + // ... but show title + summary { + display: block; + } + } + } + + // Title + summary { + @extend .admonition-title; + + // Hack: set to block, so Firefox doesn't render marker + display: block; + outline: none; + cursor: pointer; + + // Remove default details marker + &::-webkit-details-marker { + display: none; + } + + // Icon + &::after { + @extend %md-icon; + + position: absolute; + top: 0.8rem; + right: 1.2rem; + color: $md-color-black--lighter; + font-size: 2rem; + content: "\E313"; // keyboard_arrow_down + + // Adjust for RTL languages + [dir="rtl"] & { + right: initial; + left: 1.2rem; + } + } + } +} diff --git a/docs/theme/assets/stylesheets/extensions/pymdown/_emoji.scss b/docs/theme/assets/stylesheets/extensions/pymdown/_emoji.scss new file mode 100644 index 000000000..f2cd14ab7 --- /dev/null +++ b/docs/theme/assets/stylesheets/extensions/pymdown/_emoji.scss @@ -0,0 +1,35 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Scoped in typesetted content to match specificity of regular content +.md-typeset { + + // Correct alignment of emojis + .emojione { + width: 2rem; + vertical-align: text-top; + } +} diff --git a/docs/theme/assets/stylesheets/extensions/pymdown/_inlinehilite.scss b/docs/theme/assets/stylesheets/extensions/pymdown/_inlinehilite.scss new file mode 100644 index 000000000..3f2d236ec --- /dev/null +++ b/docs/theme/assets/stylesheets/extensions/pymdown/_inlinehilite.scss @@ -0,0 +1,37 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Scoped in typesetted content to match specificity of regular content +.md-typeset { + + // Qualified class selector to distinguish inline code from code blocks + code.codehilite { + $correct: 1 / 0.85; + + margin: 0 0.25em * $correct; + padding: 0.0625em * $correct 0; + } +} diff --git a/docs/theme/assets/stylesheets/extensions/pymdown/_superfences.scss b/docs/theme/assets/stylesheets/extensions/pymdown/_superfences.scss new file mode 100644 index 000000000..c3dde1aff --- /dev/null +++ b/docs/theme/assets/stylesheets/extensions/pymdown/_superfences.scss @@ -0,0 +1,100 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Scoped in typesetted content to match specificity of regular content +.md-typeset { + + // Tabbed code block content + .superfences-content { + display: none; + order: 99; + width: 100%; + background-color: $md-color-white; + + // Actual content + > * { + margin: 0; + border-radius: 0 + } + } + + // Tabbed code block container + .superfences-tabs { + display: flex; + position: relative; + flex-wrap: wrap; + margin: 1em 0; + border: 0.1rem solid $md-color-black--lightest; + border-radius: 0.2em; + + // Hide radio buttons + > input { + display: none; + + // Active tab label + &:checked + label { + font-weight: 700; + + // Show code tab content + & + .superfences-content { + display: block; + } + } + } + + // Tab label + > label { + width: auto; + padding: 1.2rem 1.2rem; + transition: color 0.125s; + font-size: ms(-1); + cursor: pointer; + + // Hovered tab label + html &:hover { + color: $md-color-accent; + } + } + } + + // Full-width container on top-level + > .superfences-tabs { + + // [mobile -]: Stretch to whole width + @include break-to-device(mobile) { + margin: 1em -1.6rem; + border: 0; + border-top: 0.1rem solid $md-color-black--lightest; + border-radius: 0; + + // Actual container with code, overflowing + pre, + code { + padding: 1.05rem 1.6rem; + } + } + } +} diff --git a/docs/theme/assets/stylesheets/extensions/pymdown/_tasklist.scss b/docs/theme/assets/stylesheets/extensions/pymdown/_tasklist.scss new file mode 100644 index 000000000..be6ae8f44 --- /dev/null +++ b/docs/theme/assets/stylesheets/extensions/pymdown/_tasklist.scss @@ -0,0 +1,83 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Scoped in typesetted content to match specificity of regular content +.md-typeset { + + // Remove list icon on task items + .task-list-item { + position: relative; + list-style-type: none; + + // Make checkbox items align with normal list items, but position + // everything in ems for correct layout at smaller font sizes + [type="checkbox"] { + position: absolute; + top: 0.45em; + left: -2em; + + // Adjust for RTL languages + [dir="rtl"] & { + right: -2em; + left: initial; + } + } + } + + // Wrapper for list controls, in case custom checkboxes are enabled + .task-list-control { + + // Checkbox icon in unchecked state + .task-list-indicator::before { + @extend %md-icon; + + position: absolute; + top: 0.15em; + left: -1.25em; + color: $md-color-black--lighter; + font-size: 1.25em; + content: "\E835"; // check_box_outline_blank + vertical-align: -0.25em; + + // Adjust for RTL languages + [dir="rtl"] & { + right: -1.25em; + left: initial; + } + } + + // Checkbox icon in checked state + [type="checkbox"]:checked + .task-list-indicator::before { + content: "\E834"; // check_box + } + + // Hide original checkbox behind icon + [type="checkbox"] { + opacity: 0; + z-index: -1; + } + } +} diff --git a/docs/theme/assets/stylesheets/helpers/_break.scss b/docs/theme/assets/stylesheets/helpers/_break.scss new file mode 100644 index 000000000..eee7aa32b --- /dev/null +++ b/docs/theme/assets/stylesheets/helpers/_break.scss @@ -0,0 +1,250 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Variables +// ---------------------------------------------------------------------------- + +/// +/// Device-specific breakpoints +/// +/// @example +/// $break-devices: ( +/// mobile: ( +/// portrait: 220px 479px, +/// landscape: 480px 719px +/// ), +/// tablet: ( +/// portrait: 720px 959px, +/// landscape: 960px 1219px +/// ), +/// screen: ( +/// small: 1220px 1599px, +/// medium: 1600px 1999px, +/// large: 2000px +/// ) +/// ); +/// +/// @group helpers +/// @access private +/// @type Map +/// +$break-devices: () !default; + +// ---------------------------------------------------------------------------- +// Helpers +// ---------------------------------------------------------------------------- + +/// +/// Choose minimum and maximum device widths +/// +/// @group helpers +/// @access private +/// @param {Map} $devices Map of devices +/// @return {List} Minimum and maximum width +/// +@function break-select-min-max($devices) { + $min: 1000000; + $max: 0; + @each $key, $value in $devices { + @while type-of($value) == map { + $value: break-select-min-max($value); + } + @if type-of($value) == list { + @each $number in $value { + @if type-of($number) == number { + $min: min($number, $min); + @if $max != null { + $max: max($number, $max); + } + } @else { + @error "Invalid number: #{$number}"; + } + } + } @elseif type-of($value) == number { + $min: min($value, $min); + $max: null; + } @else { + @error "Invalid value: #{$value}"; + } + } + @return $min, $max; +} + +/// +/// Select minimum and maximum widths for a device breakpoint +/// +/// @group helpers +/// @access private +/// @param {String} $device Device +/// @return {List} Minimum and maximum width +/// +@function break-select-device($device) { + $current: $break-devices; + @for $n from 1 through length($device) { + @if type-of($current) == map { + $current: map-get($current, nth($device, $n)); + } @else { + @error "Invalid device map: #{$devices}"; + } + } + @if type-of($current) == list or type-of($current) == number { + $current: (default: $current); + } + @return break-select-min-max($current); +} + +// ---------------------------------------------------------------------------- +// Mixins +// ---------------------------------------------------------------------------- + +/// +/// A minimum-maximum media query breakpoint +/// +/// @group helpers +/// @access public +/// @param {Number|List} $breakpoint Number or number pair +/// +@mixin break-at($breakpoint) { + @if type-of($breakpoint) == number { + @media only screen and (min-width: $breakpoint) { + @content; + } + } @elseif type-of($breakpoint) == list { + $min: nth($breakpoint, 1); + $max: nth($breakpoint, 2); + @if type-of($min) == number and type-of($max) == number { + @media only screen and (min-width: $min) and (max-width: $max) { + @content; + } + } @else { + @error "Invalid breakpoint: #{$breakpoint}"; + } + } @else { + @error "Invalid breakpoint: #{$breakpoint}"; + } +} + +/// +/// An orientation media query breakpoint +/// +/// @group helpers +/// @access public +/// @param {String} $breakpoint Orientation +/// +@mixin break-at-orientation($breakpoint) { + @if type-of($breakpoint) == string { + @media only screen and (orientation: $breakpoint) { + @content; + } + } @else { + @error "Invalid breakpoint: #{$breakpoint}"; + } +} + +/// +/// A maximum-aspect-ratio media query breakpoint +/// +/// @group helpers +/// @access public +/// @param {Number} $breakpoint Ratio +/// +@mixin break-at-ratio($breakpoint) { + @if type-of($breakpoint) == number { + @media only screen and (max-aspect-ratio: $breakpoint) { + @content; + } + } @else { + @error "Invalid breakpoint: #{$breakpoint}"; + } +} + +/// +/// A minimum-maximum media query device breakpoint +/// +/// @group helpers +/// @access public +/// @param {String|List} $breakpoint Device +/// +@mixin break-at-device($device) { + @if type-of($device) == string { + $device: $device,; + } + @if type-of($device) == list { + $breakpoint: break-select-device($device); + @if nth($breakpoint, 2) != null { + $min: nth($breakpoint, 1); + $max: nth($breakpoint, 2); + @media only screen and (min-width: $min) and (max-width: $max) { + @content; + } + } @else { + @error "Invalid device: #{$device}"; + } + } @else { + @error "Invalid device: #{$device}"; + } +} + +/// +/// A minimum media query device breakpoint +/// +/// @group helpers +/// @access public +/// @param {String|List} $breakpoint Device +/// +@mixin break-from-device($device) { + @if type-of($device) == string { + $device: $device,; + } + @if type-of($device) == list { + $breakpoint: break-select-device($device); + $min: nth($breakpoint, 1); + @media only screen and (min-width: $min) { + @content; + } + } @else { + @error "Invalid device: #{$device}"; + } +} + +/// +/// A maximum media query device breakpoint +/// +/// @group helpers +/// @access public +/// @param {String|List} $breakpoint Device +/// +@mixin break-to-device($device) { + @if type-of($device) == string { + $device: $device,; + } + @if type-of($device) == list { + $breakpoint: break-select-device($device); + $max: nth($breakpoint, 2); + @media only screen and (max-width: $max) { + @content; + } + } @else { + @error "Invalid device: #{$device}"; + } +} diff --git a/docs/theme/assets/stylesheets/helpers/_px2em.scss b/docs/theme/assets/stylesheets/helpers/_px2em.scss new file mode 100644 index 000000000..2ca50e111 --- /dev/null +++ b/docs/theme/assets/stylesheets/helpers/_px2em.scss @@ -0,0 +1,46 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Helpers +// ---------------------------------------------------------------------------- + +/// +/// Convert font size in px to em. +/// +/// @group helpers +/// @access public +/// @param {Number} $size Font size in px +/// @param {Number} $base Base font size +/// @return {Number} Font size in em +/// +@function px2em($size, $base: 16px) { + @if unit($size) == px { + @if unit($base) == px { + @return ($size / $base) * 1em; + } @else { + @error "Invalid base: #{$base} - unit must be 'px'"; + } + } @else { + @error "Invalid size: #{$size} - unit must be 'px'"; + } +} diff --git a/docs/theme/assets/stylesheets/layout/_base.scss b/docs/theme/assets/stylesheets/layout/_base.scss new file mode 100644 index 000000000..38510f0cf --- /dev/null +++ b/docs/theme/assets/stylesheets/layout/_base.scss @@ -0,0 +1,245 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Variables +// ---------------------------------------------------------------------------- + +// Active (toggled) drawer +$md-toggle__drawer--checked: + "[data-md-toggle=\"drawer\"]:checked ~"; + +// ---------------------------------------------------------------------------- +// Rules: base grid and containers +// ---------------------------------------------------------------------------- + +// Stretch container to viewport and set base font-size to 10px for simple +// calculations base on relative ems (rems) +html { + height: 100%; + font-size: 62.5%; + // Hack: some browsers on some operating systems don't account for scroll + // bars when firing media queries, so we need to do this for safety. This + // currently impacts the table of contents component between 1220 and 1234px + // and is to current knowledge not fixable. + overflow-x: hidden; + + // [screen medium +]: Set base font-size to 11px + @include break-from-device(screen medium) { + font-size: 68.75%; + } + + // [screen large +]: Set base font-size to 12px + @include break-from-device(screen large) { + font-size: 75%; + } +} + +// Stretch body to container and leave room for footer +body { + position: relative; + height: 100%; + + // [tablet portrait -]: Lock body to disable scroll bubbling + @include break-to-device(tablet portrait) { + + // Lock body to viewport height (e.g. in search mode) + &[data-md-state="lock"] { + overflow: hidden; + + // Hide container on iOS, or the body will not be locked correctly + .ios & .md-container { + display: none; + } + } + } +} + +// Horizontal separators +hr { + display: block; + height: 0.1rem; + padding: 0; + border: 0; +} + +// Inline SVG container +.md-svg { + display: none; +} + +// Template-wide grid +.md-grid { + max-width: 122rem; + margin-right: auto; + margin-left: auto; +} + +// Prevent collapse of margin when setting margin on child element +.md-container, +.md-main { + overflow: auto; +} + +// Content wrapper - use display: table to make variable-height sticky footers +// work and fixed table-layout for IE, see http://bit.ly/2hZohXL +.md-container { + display: table; + width: 100%; + height: 100%; + padding-top: 4.8rem; + table-layout: fixed; +} + +// The main content should stretch to maximum height in the table +.md-main { + display: table-row; + height: 100%; + + // Increase top spacing of content area to give typography more room + &__inner { + height: 100%; + padding-top: 2.4rem + 0.6rem; + // Hack: induce margin-collapse, because otherwise the sidebar height is + // not calculated correctly and the overflow property on this element must + // be left in initial state for targetted link offsets to work properly + padding-bottom: 0.1rem; + } +} + +// ---------------------------------------------------------------------------- +// Rules: navigational elements +// ---------------------------------------------------------------------------- + +// Toggle checkbox +.md-toggle { + display: none; +} + +// Overlay below expanded drawer +.md-overlay { + position: fixed; + top: 0; + width: 0; + height: 0; + transition: + width 0s 0.25s, + height 0s 0.25s, + opacity 0.25s; + background-color: $md-color-black--light; + opacity: 0; + z-index: 3; + + // [tablet -]: Trigger overlay + @include break-to-device(tablet) { + + // Expanded drawer + #{$md-toggle__drawer--checked} & { + width: 100%; + height: 100%; + transition: + width 0s, + height 0s, + opacity 0.25s; + opacity: 1; + } + } +} + +// ---------------------------------------------------------------------------- +// Rules: flexible elements, implemented with table layout +// ---------------------------------------------------------------------------- + +// Flexible layout container +.md-flex { + display: table; + + // Flexible layout container cell/element + &__cell { + display: table-cell; + position: relative; + vertical-align: top; + + // Shrink to minimum width + &--shrink { + width: 0%; + } + + // Stretch to maximum width + &--stretch { + display: table; + width: 100%; + table-layout: fixed; + } + } + + // Apply ellipsis in case of overflowing text + &__ellipsis { + display: table-cell; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } +} + +// ---------------------------------------------------------------------------- +// Rules: skip link +// ---------------------------------------------------------------------------- + +// Skip link +.md-skip { + position: fixed; + width: 0.1rem; + height: 0.1rem; + margin: 1rem; + padding: 0.6rem 1rem; + clip: rect(0.1rem); + transform: translateY(0.8rem); + border-radius: 0.2rem; + background-color: $md-color-black; + color: $md-color-white; + font-size: ms(-1); + opacity: 0; + overflow: hidden; + + // Show skip link on focus + &:focus { + width: auto; + height: auto; + clip: auto; + transform: translateX(0); + transition: + transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), + opacity 0.175s 0.075s; + opacity: 1; + z-index: 10; + } +} + +// ---------------------------------------------------------------------------- +// Rules: print styles +// ---------------------------------------------------------------------------- + +// Add margins to page +@page { + margin: 25mm; +} diff --git a/docs/theme/assets/stylesheets/layout/_clipboard.scss b/docs/theme/assets/stylesheets/layout/_clipboard.scss new file mode 100644 index 000000000..c2d84f38f --- /dev/null +++ b/docs/theme/assets/stylesheets/layout/_clipboard.scss @@ -0,0 +1,117 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Copy to clipboard +.md-clipboard { + position: absolute; + top: 0.6rem; + right: 0.6rem; + width: 2.8rem; + height: 2.8rem; + border-radius: 0.2rem; + font-size: 1.6rem; + cursor: pointer; + z-index: 1; + // Hack: put everything on the GPU to omit flickering + backface-visibility: hidden; + + // Hide for print + @media print { + display: none; + } + + // Icon + &::before { + @extend %md-icon; + + transition: + color 0.25s, + opacity 0.25s; + color: $md-color-black--lightest; + content: "\E14D"; // content_copy + + // Show on container hover + pre:hover &, + .codehilite:hover & { + color: $md-color-black--light; + } + } + + // Focused or hovered icon + &:focus::before, + &:hover::before { + color: $md-color-accent; + } + + // Message + &__message { + display: block; + position: absolute; + top: 0; + right: 3.4rem; + padding: 0.6rem 1rem; + transform: translateX(0.8rem); + transition: + transform 0.25s cubic-bezier(0.9, 0.1, 0.9, 0), + opacity 0.175s; + border-radius: 0.2rem; + background-color: $md-color-black--light; + color: $md-color-white; + font-size: ms(-1); + white-space: nowrap; + opacity: 0; + pointer-events: none; + + // Active message + &--active { + transform: translateX(0); + transition: + transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), + opacity 0.175s 0.075s; + opacity: 1; + pointer-events: initial; + } + + // Inject content from ARIA label + &::before { + content: attr(aria-label); + } + + // Paint a nice speech bubble + &::after { + display: block; + position: absolute; + top: 50%; + right: -0.4rem; + width: 0; + margin-top: -0.4rem; + border-width: 0.4rem 0 0.4rem 0.4rem; + border-style: solid; + border-color: transparent $md-color-black--light; + content: ""; + } + } +} diff --git a/docs/theme/assets/stylesheets/layout/_content.scss b/docs/theme/assets/stylesheets/layout/_content.scss new file mode 100644 index 000000000..61e9fb8e8 --- /dev/null +++ b/docs/theme/assets/stylesheets/layout/_content.scss @@ -0,0 +1,95 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Content container +.md-content { + + // [tablet landscape +]: Add space for table of contents + @include break-from-device(tablet landscape) { + margin-right: 24.2rem; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: initial; + margin-left: 24.2rem; + } + } + + // [screen +]: Add space for table of contents + @include break-from-device(screen) { + margin-left: 24.2rem; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: 24.2rem; + } + } + + // Define spacing + &__inner { + margin: 0 1.6rem 2.4rem; + padding-top: 1.2rem; + + // [screen +]: Increase horizontal spacing + @include break-from-device(screen) { + margin-right: 2.4rem; + margin-left: 2.4rem; + } + + // Hack: add pseudo element for spacing, as the overflow of the content + // container may not be hidden due to an imminent offset error on targets + &::before { + display: block; + height: 0.8rem; + content: ""; + } + + // Hack: remove bottom spacing of last element, due to margin collapse + > :last-child { + margin-bottom: 0; + } + } + + // Icons + &__icon { + @extend %md-icon__button; + + position: relative; + margin: 0.8rem 0; + padding: 0; + float: right; + + // Override default link color for icons + .md-typeset & { + color: $md-color-black--lighter; + } + + // Hide for print + @media print { + display: none; + } + } +} diff --git a/docs/theme/assets/stylesheets/layout/_footer.scss b/docs/theme/assets/stylesheets/layout/_footer.scss new file mode 100644 index 000000000..2446d81f2 --- /dev/null +++ b/docs/theme/assets/stylesheets/layout/_footer.scss @@ -0,0 +1,199 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Application footer +.md-footer { + + // Hide for print + @media print { + display: none; + } +} + +// Navigation within footer +.md-footer-nav { + background-color: $md-color-black; + color: $md-color-white; + + // Set spacing + &__inner { + padding: 0.4rem; + overflow: auto; + } + + // Links to previous and next page + &__link { + padding-top: 2.8rem; + padding-bottom: 0.8rem; + transition: opacity 0.25s; + + // [tablet +]: Set proportional width + @include break-from-device(tablet) { + width: 50%; + } + + // Hovered link + &:hover { + opacity: 0.7; + } + + // Link to previous page + &--prev { + width: 25%; + float: left; + + // Adjust for RTL languages + [dir="rtl"] & { + float: right; + } + + // Title + .md-footer-nav__title { + + // [mobile -]: Hide title for previous page + @include break-to-device(mobile) { + display: none; + } + } + } + + // Link to next page + &--next { + width: 75%; + float: right; + text-align: right; + + // Adjust for RTL languages + [dir="rtl"] & { + float: left; + text-align: left; + } + } + } + + // Icon buttons + &__button { + @extend %md-icon__button; + + transition: background 0.25s; + } + + // Link title - set line height to match icon for correct alignment + &__title { + position: relative; + padding: 0 2rem; + font-size: 1.8rem; + line-height: 4.8rem; + } + + // Link direction + &__direction { + position: absolute; + right: 0; + left: 0; + margin-top: -2rem; + padding: 0 2rem; + color: $md-color-white--light; + font-size: 1.5rem; + } +} + +// Non-navigational information +.md-footer-meta { + background-color: opacify($md-color-black, 0.025); + + // Set spacing + &__inner { + padding: 0.4rem; + overflow: auto; + } + + // Use a decent color for non-hovered links and ensure specificity + html &.md-typeset a { + color: $md-color-white--light; + + // Focused or hovered link + &:focus, + &:hover { + color: $md-color-white; + } + } +} + +// Copyright and theme information +.md-footer-copyright { + margin: 0 1.2rem; + padding: 0.8rem 0; + color: $md-color-white--lighter; + font-size: ms(-1); + + // [tablet portrait +]: Show next to social media links + @include break-from-device(tablet portrait) { + max-width: 75%; + float: left; + + // Adjust for RTL languages + [dir="rtl"] & { + float: right; + } + } + + // Highlight copyright information + &__highlight { + color: $md-color-white--light; + } +} + +// Social media links +.md-footer-social { + margin: 0 0.8rem; + padding: 0.4rem 0 1.2rem; + + // [tablet portrait +]: Show next to copyright information + @include break-from-device(tablet portrait) { + padding: 1.2rem 0; + float: right; + + // Adjust for RTL languages + [dir="rtl"] & { + float: left; + } + } + + // Link with icon + &__link { + display: inline-block; + width: 3.2rem; + height: 3.2rem; + font-size: 1.6rem; + text-align: center; + + // Adjust line-height to match height for correct alignment + &::before { + line-height: 1.9; + } + } +} diff --git a/docs/theme/assets/stylesheets/layout/_header.scss b/docs/theme/assets/stylesheets/layout/_header.scss new file mode 100644 index 000000000..79333359e --- /dev/null +++ b/docs/theme/assets/stylesheets/layout/_header.scss @@ -0,0 +1,216 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Application header (stays always on top) +.md-header { + position: fixed; + top: 0; + right: 0; + left: 0; + height: 4.8rem; + transition: + background-color 0.25s, + color 0.25s; + background-color: $md-color-primary; + color: $md-color-white; + box-shadow: none; + z-index: 2; + // Hack: putting the header on the GPU avoids unnecessary repaints + backface-visibility: hidden; + + // Always show shadow, in case JavaScript is not available + .no-js & { + transition: none; + box-shadow: none; + } + + // Show and animate shadow + &[data-md-state="shadow"] { + transition: + background-color 0.25s, + color 0.25s, + box-shadow 0.25s; + box-shadow: + 0 0 0.4rem rgba(0, 0, 0, 0.1), + 0 0.4rem 0.8rem rgba(0, 0, 0, 0.2); + } + + // Hide for print + @media print { + display: none; + } +} + +// Navigation within header +.md-header-nav { + padding: 0 0.4rem; + + // Icon buttons + &__button { + @extend %md-icon__button; + + position: relative; + transition: opacity 0.25s; + z-index: 1; + + // Hovered icon + &:hover { + opacity: 0.7; + } + + // Set correct display on image or icon + &.md-logo * { + display: block; + } + + // Hide search icon, if JavaScript is not available. + .no-js &.md-icon--search { + display: none; + } + + // [tablet landscape +]: Hide the search icon + @include break-from-device(tablet landscape) { + + // Search icon + &.md-icon--search { + display: none; + } + } + + // [tablet -]: Hide the home icon or logo + @include break-to-device(tablet) { + + // Home icon or logo + &.md-icon--home, + &.md-logo { + display: none; + } + } + + // [screen +]: Hide the menu icon + @include break-from-device(screen) { + + // Menu icon + &.md-icon--menu { + display: none; + } + } + } + + // Header topics + &__topic { + display: block; + position: absolute; + transition: + transform 0.4s cubic-bezier(0.1, 0.7, 0.1, 1), + opacity 0.15s; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + + // Page title + & + & { + transform: translateX(2.5rem); + transition: + transform 0.4s cubic-bezier(1, 0.7, 0.1, 0.1), + opacity 0.15s; + opacity: 0; + z-index: -1; + pointer-events: none; + + // Adjust for RTL languages + [dir="rtl"] & { + transform: translateX(-2.5rem); + } + } + + // Induce ellipsis, if no JavaScript is available + .no-js & { + position: initial; + } + + // Hide page title as it is invisible anyway and will overflow the header + .no-js & + & { + display: none; + } + } + + // Header title - set line height to match icon for correct alignment + &__title { + padding: 0 2rem; + font-size: 1.8rem; + line-height: 4.8rem; + + // Show page title + &[data-md-state="active"] .md-header-nav__topic { + transform: translateX(-2.5rem); + transition: + transform 0.4s cubic-bezier(1, 0.7, 0.1, 0.1), + opacity 0.15s; + opacity: 0; + z-index: -1; + pointer-events: none; + + // Adjust for RTL languages + [dir="rtl"] & { + transform: translateX(2.5rem); + } + + // Page title + & + .md-header-nav__topic { + transform: translateX(0); + transition: + transform 0.4s cubic-bezier(0.1, 0.7, 0.1, 1), + opacity 0.15s; + opacity: 1; + z-index: 0; + pointer-events: initial; + } + } + } + + // Repository containing source + &__source { + display: none; + + // [tablet landscape +]: Show the reposistory from tablet + @include break-from-device(tablet landscape) { + display: block; + width: 23rem; + max-width: 23rem; + margin-left: 2.8rem; + padding-right: 1.2rem; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: 2.8rem; + margin-left: initial; + padding-right: initial; + padding-left: 1.2rem; + } + } + } +} diff --git a/docs/theme/assets/stylesheets/layout/_hero.scss b/docs/theme/assets/stylesheets/layout/_hero.scss new file mode 100644 index 000000000..d8d588b55 --- /dev/null +++ b/docs/theme/assets/stylesheets/layout/_hero.scss @@ -0,0 +1,65 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Hero teaser +.md-hero { + transition: background 0.25s; + background-color: $md-color-primary; + color: $md-color-white; + font-size: ms(1); + overflow: hidden; + + // Inner wrapper + &__inner { + margin-top: 2rem; + padding: 1.6rem 1.6rem 0.8rem; + transition: + transform 0.4s cubic-bezier(0.1, 0.7, 0.1, 1), + opacity 0.25s; + transition-delay: 0.1s; + + // [tablet -]: Compensate for missing tabs + @include break-to-device(tablet) { + margin-top: 4.8rem; + margin-bottom: 2.4rem; + } + + // Fade-out tabs background upon scrolling + [data-md-state="hidden"] & { + pointer-events: none; + transform: translateY(1.25rem); + transition: + transform 0s 0.4s, + opacity 0.1s 0s; + opacity: 0; + } + + // Adjust bottom spacing if there are no tabs + .md-hero--expand & { + margin-bottom: 2.4rem; + } + } +} diff --git a/docs/theme/assets/stylesheets/layout/_nav.scss b/docs/theme/assets/stylesheets/layout/_nav.scss new file mode 100644 index 000000000..969a45622 --- /dev/null +++ b/docs/theme/assets/stylesheets/layout/_nav.scss @@ -0,0 +1,525 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Navigation container +.md-nav { + font-size: 1.4rem; + line-height: 1.3; + + // List title + &__title { + display: block; + padding: 0 1.2rem; + font-weight: 700; + text-overflow: ellipsis; + overflow: hidden; + + // Icon, hidden by default + &::before { + @extend %md-icon, %md-icon__button; + + display: none; + content: "\E5C4"; // arrow_back + + // Adjust for RTL languages + [dir="rtl"] & { + content: "\E5C8"; // arrow_forward + } + } + + // Hide button by default + .md-nav__button { + display: none; + } + } + + // List of items + &__list { + margin: 0; + padding: 0; + list-style: none; + } + + // List item + &__item { + padding: 0 1.2rem; + + // Add bottom spacing to last item + &:last-child { + padding-bottom: 1.2rem; + } + + // 2nd+ level items + & & { + padding-right: 0; + + // Adjust for RTL languages + [dir="rtl"] & { + padding-right: 1.2rem; + padding-left: 0; + } + + // Remove bottom spacing for nested items + &:last-child { + padding-bottom: 0; + } + } + } + + // Button with logo + &__button { + @extend %md-icon, %md-icon__button; + + // Stretch image + img { + width: 100%; + height: auto; + } + } + + // Link inside item + &__link { + display: block; + margin-top: 0.625em; + transition: color 0.125s; + text-overflow: ellipsis; + cursor: pointer; + overflow: hidden; + + // Icon + &::after { + @extend %md-icon; + + // Item contains a nested list + .md-nav__item--nested > & { + content: "\E313"; // keyboard_arrow_down + } + } + + // Hide link to table of contents by default - this will only match the + // table of contents inside the drawer below and including tablet portrait + html &[for="__toc"] { + display: none; + + // Hide table of contents by default + & ~ .md-nav { + display: none; + } + + // Hide icon for current item + + .md-nav__link::after { + display: none; + } + } + + // Blurred link + &[data-md-state="blur"] { + color: $md-color-black--light; + } + + // Active link + &:active, + &--active { + color: $md-color-primary; + } + + // Reset active color for nested list titles + .md-nav__item--nested > & { + color: inherit; + } + + // Focused or hovered link + &:focus, + &:hover { + color: $md-color-accent; + } + } + + // Repository containing source + &__source { + display: none; + } + + // [tablet -]: Layered navigation + @include break-to-device(tablet) { + background-color: $md-color-white; + + // Stretch primary navigation to drawer + &--primary, + &--primary .md-nav { + display: flex; + position: absolute; + top: 0; + right: 0; + left: 0; + flex-direction: column; + height: 100%; + z-index: 1; + } + + // Adjust styles for primary navigation + &--primary { + + // List title and item + .md-nav__title, + .md-nav__item { + font-size: 1.6rem; + line-height: 1.5; + } + + // List title - higher specificity is necessary to ensure that the title + // inside the drawer is always styled accordingly + html & .md-nav__title { + position: relative; + height: 11.2rem; + padding: 6rem 1.6rem 0.4rem; + background-color: $md-color-black--lightest; + color: $md-color-black--light; + font-weight: 400; + line-height: 4.8rem; + white-space: nowrap; + cursor: pointer; + + // Icon + &::before { + display: block; + position: absolute; + top: 0.4rem; + left: 0.4rem; + width: 4rem; + height: 4rem; + color: $md-color-black--light; + } + + // Main lists + ~ .md-nav__list { + background-color: $md-color-white; + box-shadow: 0 0.1rem 0 $md-color-black--lightest inset; + + // Remove border for first list item + & > .md-nav__item:first-child { + border-top: 0; + } + } + + // Site title in main navigation + &--site { + position: relative; + background-color: $md-color-primary; + color: $md-color-white; + + // Site logo + .md-nav__button { + display: block; + position: absolute; + top: 0.4rem; + left: 0.4rem; + width: 6.4rem; + height: 6.4rem; + font-size: 4.8rem; + } + + // Hide back arrow icon + &::before { + display: none; + } + } + } + + // Adjust for RTL languages + html [dir="rtl"] & .md-nav__title { + + // Icon + &::before { + right: 0.4rem; + left: initial; + } + + // Site title in main navigation + &--site .md-nav__button { + right: 0.4rem; + left: initial; + } + } + + // List of items + .md-nav__list { + flex: 1; + overflow-y: auto; + } + + // List item + .md-nav__item { + padding: 0; + border-top: 0.1rem solid $md-color-black--lightest; + + // Adjust for RTL languages + [dir="rtl"] & { + padding: 0; + } + + // Increase spacing to account for icon + &--nested > .md-nav__link { + padding-right: 4.8rem; + + // Adjust for RTL languages + [dir="rtl"] & { + padding-right: 1.6rem; + padding-left: 4.8rem; + } + + // Replace icon with right arrow + &::after { + content: "\E315"; // keyboard_arrow_right + + // Adjust for RTL languages + [dir="rtl"] & { + content: "\E314"; // keyboard_arrow_left + } + } + } + } + + // Link inside item + .md-nav__link { + position: relative; + margin-top: 0; + padding: 1.2rem 1.6rem; + + // Rotate icon + &::after { + position: absolute; + top: 50%; + right: 1.2rem; + margin-top: -1.2rem; + color: inherit; + font-size: 2.4rem; + + // Adjust for RTL languages + [dir="rtl"] & { + right: initial; + left: 1.2rem; + } + } + } + + // Table of contents inside navigation + .md-nav--secondary { + + // Set links to static to avoid unnecessary layering + .md-nav__link { + position: static; + } + + // Set nested navigation for table of contents to static + .md-nav { + position: static; + background-color: transparent; + + // 3rd level link + .md-nav__link { + padding-left: 2.8rem; + + // Adjust for RTL languages + [dir="rtl"] & { + padding-right: 2.8rem; + padding-left: initial; + } + } + + // 4th level link + .md-nav .md-nav__link { + padding-left: 4rem; + + // Adjust for RTL languages + [dir="rtl"] & { + padding-right: 4rem; + padding-left: initial; + } + } + + // 5th level link + .md-nav .md-nav .md-nav__link { + padding-left: 5.2rem; + + // Adjust for RTL languages + [dir="rtl"] & { + padding-right: 5.2rem; + padding-left: initial; + } + } + + // 6th level link + .md-nav .md-nav .md-nav .md-nav__link { + padding-left: 6.4rem; + + // Adjust for RTL languages + [dir="rtl"] & { + padding-right: 6.4rem; + padding-left: initial; + } + } + } + } + } + + // Hide nested navigation by default + .md-nav__toggle ~ & { + display: flex; + transform: translateX(100%); + transition: + transform 0.25s cubic-bezier(0.8, 0, 0.6, 1), + opacity 0.125s 0.05s; + opacity: 0; + + // Adjust for RTL languages + [dir="rtl"] & { + transform: translateX(-100%); + } + + // Just hide navigation, if browser doesn't supports 3D transforms + .no-csstransforms3d & { + display: none; + } + } + + // Expand nested navigation, if toggle is checked + .md-nav__toggle:checked ~ & { + transform: translateX(0); + transition: + transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), + opacity 0.125s 0.125s; + opacity: 1; + + // Just show navigation, if browser doesn't supports 3D transforms + .no-csstransforms3d & { + display: flex; + } + } + } + + // [tablet portrait -]: Show table of contents in drawer + @include break-to-device(tablet portrait) { + + // Show link to table of contents - higher specificity is necessary to + // display the table of contents inside the drawer + html &__link[for="__toc"] { + display: block; + padding-right: 4.8rem; + + // Unrotate icon for table of contents + &::after { + color: inherit; + content: "\E8DE"; // toc + } + + // Hide link to current item + + .md-nav__link { + display: none; + } + + // Show table of contents + & ~ .md-nav { + display: flex; + } + } + + // Adjust for RTL languages + html [dir="rtl"] &__link { + padding-right: 1.6rem; + padding-left: 4.8rem; + } + + // Repository containing source + &__source { + display: block; + padding: 0 0.4rem; + background-color: mix($md-color-primary, $md-color-black, 75%); + color: $md-color-white; + } + } + + // [screen +]: Tree-like navigation + @include break-from-device(screen) { + + // Animation is only possible if JavaScript is available, as the max-height + // property must be calculated before transitioning + &[data-md-state="animate"] { + transition: max-height 0.25s cubic-bezier(0.86, 0, 0.07, 1); + } + + // Hide nested navigation by default + .md-nav__toggle ~ & { + max-height: 0; + overflow: hidden; + + // Just hide links for accessibility if JavaScript is not available + .no-js & { + display: none; + } + } + + // Expand nested navigation, if toggle is checked + .md-nav__toggle:checked ~ &, + &[data-md-state="expand"] { + max-height: 100%; + + // Just show for accessibility links if JavaScript is not available + .no-js & { + display: block; + } + } + + // Hide titles for nested navigation + &__item--nested > .md-nav > &__title { + display: none; + } + + // Link inside item - ideally the link display method would be set to + // inline on screen, but this doesn't work with text ellipsis + &__link { + + // Item contains a nested list + .md-nav__item--nested > &::after { + display: inline-block; + transform-origin: 0.45em 0.45em; + transform-style: preserve-3d; + vertical-align: -0.125em; + + // Only animate icon when JavaScript is available, as the height can + // not be animated anyway, and better no fun than half the fun + .js & { + transition: transform 0.4s; + } + } + + // Rotate icon for expanded lists + .md-nav__item--nested .md-nav__toggle:checked ~ &::after { + transform: rotateX(180deg); + } + } + } +} diff --git a/docs/theme/assets/stylesheets/layout/_search.scss b/docs/theme/assets/stylesheets/layout/_search.scss new file mode 100644 index 000000000..f8ed05b79 --- /dev/null +++ b/docs/theme/assets/stylesheets/layout/_search.scss @@ -0,0 +1,622 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Variables +// ---------------------------------------------------------------------------- + +// Active (toggled) search +$md-toggle__search--checked: + "[data-md-toggle=\"search\"]:checked ~ .md-header"; + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Search container +.md-search { + + // Hide search, if JavaScript is not available. + .no-js & { + display: none; + } + + // [tablet landscape +]: Header-embedded search + @include break-from-device(tablet landscape) { + padding: 0.4rem; + } + + // Search modal overlay + &__overlay { + opacity: 0; + z-index: 1; + + // [tablet portrait -]: Full-screen search bar + @include break-to-device(tablet portrait) { + position: absolute; + top: 0.4rem; + left: 0.4rem; + width: 3.6rem; + height: 3.6rem; + transform-origin: center; + transition: + transform 0.3s 0.1s, + opacity 0.2s 0.2s; + border-radius: 2rem; + background-color: $md-color-white; + overflow: hidden; + pointer-events: none; + + // Adjust for RTL languages + [dir="rtl"] & { + right: 0.4rem; + left: initial; + } + + // Expanded overlay + #{$md-toggle__search--checked} & { + transition: + transform 0.4s, + opacity 0.1s; + opacity: 1; + } + } + + // Set scale factors + #{$md-toggle__search--checked} & { + + // [mobile portrait -]: Scale up 45 times + @include break-to-device(mobile portrait) { + transform: scale(45); + } + + // [mobile landscape]: Scale up 60 times + @include break-at-device(mobile landscape) { + transform: scale(60); + } + + // [tablet portrait]: Scale up 75 times + @include break-at-device(tablet portrait) { + transform: scale(75); + } + } + + // [tablet landscape +]: Overlay for better focus on search + @include break-from-device(tablet landscape) { + position: fixed; + top: 0; + left: 0; + width: 0; + height: 0; + transition: + width 0s 0.25s, + height 0s 0.25s, + opacity 0.25s; + background-color: $md-color-black--light; + cursor: pointer; + + // Adjust for RTL languages + [dir="rtl"] & { + right: 0; + left: initial; + } + + // Expanded overlay + #{$md-toggle__search--checked} & { + width: 100%; + height: 100%; + transition: + width 0s, + height 0s, + opacity 0.25s; + opacity: 1; + } + } + } + + // Search modal wrapper + &__inner { + + // [tablet portrait -]: Put search modal off-canvas by default + @include break-to-device(tablet portrait) { + position: fixed; + top: 0; + left: 100%; + width: 100%; + height: 100%; + transform: translateX(5%); + transition: + right 0s 0.3s, + left 0s 0.3s, + transform 0.15s 0.15s cubic-bezier(0.4, 0, 0.2, 1), + opacity 0.15s 0.15s; + opacity: 0; + z-index: 2; + + // Active search modal + #{$md-toggle__search--checked} & { + left: 0; + transform: translateX(0); + transition: + right 0s 0s, + left 0s 0s, + transform 0.15s 0.15s cubic-bezier(0.1, 0.7, 0.1, 1), + opacity 0.15s 0.15s; + opacity: 1; + + // Adjust for RTL languages + [dir="rtl"] & { + right: 0; + left: initial; + } + } + + // Adjust for RTL languages + html [dir="rtl"] & { + right: 100%; + left: initial; + transform: translateX(-5%); + } + } + + // [tablet landscape +]: Header-embedded search + @include break-from-device(tablet landscape) { + position: relative; + width: 23rem; + padding: 0.2rem 0; + float: right; + transition: width 0.25s cubic-bezier(0.1, 0.7, 0.1, 1); + + // Adjust for RTL languages + [dir="rtl"] & { + float: left; + } + } + + // Set maximum width + #{$md-toggle__search--checked} & { + + // [tablet landscape]: Do not overlay title + @include break-at-device(tablet landscape) { + width: 46.8rem; + } + + // [screen +]: Match content width + @include break-from-device(screen) { + width: 68.8rem; + } + } + } + + // Search form + &__form { + position: relative; + + // [tablet landscape +]: Header-embedded search + @include break-from-device(tablet landscape) { + border-radius: 0.2rem; + } + } + + // Search input + &__input { + position: relative; + padding: 0 4.4rem 0 7.2rem; + text-overflow: ellipsis; + z-index: 2; + + // Adjust for RTL languages + [dir="rtl"] & { + padding: 0 7.2rem 0 4.4rem; + } + + // Transition on placeholder + &::placeholder { + transition: color 0.25s cubic-bezier(0.1, 0.7, 0.1, 1); + } + + // Placeholder and icon color in active state + ~ .md-search__icon, + &::placeholder { + color: $md-color-black--light; + } + + // Remove the "x" rendered by Internet Explorer + &::-ms-clear { + display: none; + } + + // [tablet portrait -]: Full-screen search bar + @include break-to-device(tablet portrait) { + width: 100%; + height: 4.8rem; + font-size: 1.8rem; + } + + // [tablet landscape +]: Header-embedded search + @include break-from-device(tablet landscape) { + width: 100%; + height: 3.6rem; + padding-left: 4.4rem; + transition: + background-color 0.25s cubic-bezier(0.1, 0.7, 0.1, 1), + color 0.25s cubic-bezier(0.1, 0.7, 0.1, 1); + border-radius: 0.2rem; + background-color: $md-color-black--lighter; + color: inherit; + font-size: ms(0); + + // Adjust for RTL languages + [dir="rtl"] & { + padding-right: 4.4rem; + } + + // Icon color + + .md-search__icon { + color: inherit; + } + + // Placeholder color + &::placeholder { + color: $md-color-white--light; + } + + // Hovered search field + &:hover { + background-color: $md-color-white--lightest; + } + + // Set light background on active search field + #{$md-toggle__search--checked} & { + border-radius: 0.2rem 0.2rem 0 0; + background-color: $md-color-white; + color: $md-color-black; + text-overflow: none; + + // Placeholder and icon color in active state + + .md-search__icon, + &::placeholder { + color: $md-color-black--light; + } + } + } + } + + // Icons + &__icon { + position: absolute; + transition: + color 0.25s cubic-bezier(0.1, 0.7, 0.1, 1), + opacity 0.25s; + font-size: $md-icon-size; + cursor: pointer; + z-index: 2; + + // Hovered icon + &:hover { + opacity: 0.7; + } + + // Search icon + &[for="__search"] { + top: 0.6rem; + left: 1rem; + + // Adjust for RTL languages + [dir="rtl"] & { + right: 1rem; + left: initial; + } + + // Set search icon on pseudo class, so it can be overridden for mobile + // and tablet when the search is rendered in an overlay + &::before { + content: "\E8B6"; // search + } + + // [tablet portrait -]: Full-screen search bar + @include break-to-device(tablet portrait) { + top: 1.2rem; + left: 1.6rem; + + // Show back arrow instead of search icon + &[for="__search"]::before { + content: "\E5C4"; // arrow_back + + // Adjust for RTL languages + [dir="rtl"] & { + content: "\E5C8"; // arrow_forward + } + } + } + } + + // Reset button + &[type="reset"] { + top: 0.6rem; + right: 1rem; + transform: scale(0.125); + transition: + transform 0.15s cubic-bezier(0.1, 0.7, 0.1, 1), + opacity 0.15s; + opacity: 0; + + // Adjust for RTL languages + [dir="rtl"] & { + right: initial; + left: 1rem; + } + + // [tablet portrait -]: Full-screen search bar + @include break-to-device(tablet portrait) { + top: 1.2rem; + right: 1.6rem; + } + + // Show reset button if search is active and input non-empty + #{$md-toggle__search--checked} .md-search__input:valid ~ & { + transform: scale(1); + opacity: 1; + + // Hovered icon + &:hover { + opacity: 0.7; + } + } + } + } + + // Search output container + &__output { + position: absolute; + width: 100%; + border-radius: 0 0 0.2rem 0.2rem; + overflow: hidden; + z-index: 1; + + // [tablet portrait -]: Full-screen search bar + @include break-to-device(tablet portrait) { + top: 4.8rem; + bottom: 0; + } + + // [tablet landscape +]: Header-embedded search + @include break-from-device(tablet landscape) { + top: 3.8rem; + transition: opacity 0.4s; + opacity: 0; + + // Show search output in active state + #{$md-toggle__search--checked} & { + @include z-depth(6); + + opacity: 1; + } + } + } + + // Wrapper for scrolling on overflow + &__scrollwrap { + height: 100%; + background-color: $md-color-white; + box-shadow: 0 0.1rem 0 $md-color-black--lightest inset; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + + // [tablet landscape]: Set absolute width to omit unnecessary reflow + @include break-at-device(tablet landscape) { + width: 46.8rem; + } + + // [screen +]: Set absolute width to omit unnecessary reflow + @include break-from-device(screen) { + width: 68.8rem; + } + + // [tablet landscape +]: Limit height to viewport + @include break-from-device(tablet landscape) { + max-height: 0; + + // Expand in active state + #{$md-toggle__search--checked} & { + max-height: 75vh; + } + + // Override native scrollbar styles + &::-webkit-scrollbar { + width: 0.4rem; + height: 0.4rem; + } + + // Style scrollbar thumb + &::-webkit-scrollbar-thumb { + background-color: $md-color-black--lighter; + + // Hovered scrollbar thumb + &:hover { + background-color: $md-color-accent; + } + } + } + } +} + +// Search result +.md-search-result { + color: $md-color-black; + word-break: break-word; + + // Search metadata + &__meta { + padding: 0 1.6rem; + background-color: $md-color-black--lightest; + color: $md-color-black--light; + font-size: ms(-1); + line-height: 3.6rem; + + // [tablet landscape +]: Increase left indent + @include break-from-device(tablet landscape) { + padding-left: 4.4rem; + + // Adjust for RTL languages + [dir="rtl"] & { + padding-right: 4.4rem; + padding-left: initial; + } + } + } + + // List of items + &__list { + margin: 0; + padding: 0; + border-top: 0.1rem solid $md-color-black--lightest; + list-style: none; + } + + // List item + &__item { + box-shadow: 0 -0.1rem 0 $md-color-black--lightest; + } + + // Link inside item + &__link { + display: block; + transition: background 0.25s; + outline: 0; + overflow: hidden; + + // Active or hovered link + &[data-md-state="active"], + &:hover { + background-color: transparentize($md-color-accent, 0.9); + + // Slightly transparent icon + .md-search-result__article::before { + opacity: 0.7; + } + } + + // Add a little spacing on the teaser of the last link + &:last-child .md-search-result__teaser { + margin-bottom: 1.2rem; + } + } + + // Article - document or section + &__article { + position: relative; + padding: 0 1.6rem; + overflow: auto; + + // [tablet landscape +]: Increase left indent + @include break-from-device(tablet landscape) { + padding-left: 4.4rem; + + // Adjust for RTL languages + [dir="rtl"] & { + padding-right: 4.4rem; + padding-left: 1.6rem; + } + } + + // Document + &--document { + + // Icon + &::before { + @extend %md-icon, %md-icon__button; + + position: absolute; + left: 0; + margin: 0.2rem; + transition: opacity 0.25s; + color: $md-color-black--light; + content: "\E880"; // find_in_page + + // Adjust for RTL languages + [dir="rtl"] & { + right: 0; + left: initial; + } + + // [tablet portrait -]: Hide page icon + @include break-to-device(tablet portrait) { + display: none; + } + } + + // Title + .md-search-result__title { + margin: 1.1rem 0; + font-size: ms(0); + font-weight: 400; + line-height: 1.4; + } + } + } + + // Title + &__title { + margin: 0.5em 0; + font-size: ms(-1); + font-weight: 700; + line-height: 1.4; + } + + // stylelint-disable value-no-vendor-prefix, property-no-vendor-prefix + + // Teaser + &__teaser { + display: -webkit-box; + max-height: 3.3rem; + margin: 0.5em 0; + color: $md-color-black--light; + font-size: ms(-1); + line-height: 1.4; + text-overflow: ellipsis; + overflow: hidden; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + + // [mobile -]: Increase number of lines + @include break-to-device(mobile) { + max-height: 5rem; + -webkit-line-clamp: 3; + } + + // [tablet landscape]: Increase number of lines + @include break-at-device(tablet landscape) { + max-height: 5rem; + -webkit-line-clamp: 3; + } + } + + // stylelint-enable value-no-vendor-prefix, property-no-vendor-prefix + + // Search term highlighting + em { + font-style: normal; + font-weight: 700; + text-decoration: underline; + } +} diff --git a/docs/theme/assets/stylesheets/layout/_sidebar.scss b/docs/theme/assets/stylesheets/layout/_sidebar.scss new file mode 100644 index 000000000..262323e63 --- /dev/null +++ b/docs/theme/assets/stylesheets/layout/_sidebar.scss @@ -0,0 +1,174 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Variables +// ---------------------------------------------------------------------------- + +// Active (toggled) drawer +$md-toggle__drawer--checked: + "[data-md-toggle=\"drawer\"]:checked ~ .md-container"; + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Sidebar container +.md-sidebar { + position: absolute; + width: 24.2rem; + padding: 2.4rem 0; + overflow: hidden; + + // Hide for print + @media print { + display: none; + } + + // Lock sidebar to container height (account for fixed header) + &[data-md-state="lock"] { + position: fixed; + top: 4.8rem; + } + + // [tablet -]: Convert navigation to drawer + @include break-to-device(tablet) { + + // Render primary sidebar as a slideout container + &--primary { + position: fixed; + top: 0; + left: -24.2rem; + width: 24.2rem; + height: 100%; + transform: translateX(0); + transition: + transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), + box-shadow 0.25s; + background-color: $md-color-white; + z-index: 3; + + // Adjust for RTL languages + [dir="rtl"] & { + right: -24.2rem; + left: initial; + } + + // Just hide drawer, if browser doesn't support 3D transforms + .no-csstransforms3d & { + display: none; + } + + // Expanded drawer + #{$md-toggle__drawer--checked} & { + @include z-depth(8); + + transform: translateX(24.2rem); + + // Adjust for RTL languages + [dir="rtl"] & { + transform: translateX(-24.2rem); + } + + // Just show drawer, if browser doesn't support 3D transforms + .no-csstransforms3d & { + display: block; + } + } + + // Hide overflow for nested navigation + .md-sidebar__scrollwrap { + overflow: hidden; + } + } + } + + // Secondary sidebar with table of contents + &--secondary { + display: none; + + // [tablet landscape +]: Show table of contents next to body copy + @include break-from-device(tablet landscape) { + display: block; + margin-left: 100%; + transform: translate(-100%, 0); + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: 100%; + margin-left: initial; + transform: translate(100%, 0); + } + } + + // [screen +]: Limit to grid + @include break-from-device(screen) { + margin-left: 122rem; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: 122rem; + margin-left: initial; + } + } + } + + // Wrapper for scrolling on overflow + &__scrollwrap { + max-height: 100%; + margin: 0 0.4rem; + overflow-y: auto; + // Hack: putting the scroll wrapper on the GPU massively reduces jitter + // when locking the sidebars into place + backface-visibility: hidden; + + // [tablet -]: Adjust margins + @include break-to-device(tablet) { + + // Stretch scrollwrap for primary sidebar + .md-sidebar--primary & { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + margin: 0; + } + } + + // Override native scrollbar styles + &::-webkit-scrollbar { + width: 0.4rem; + height: 0.4rem; + } + + // Style scrollbar thumb + &::-webkit-scrollbar-thumb { + background-color: $md-color-black--lighter; + + // Hovered scrollbar thumb + &:hover { + background-color: $md-color-accent; + } + } + } +} diff --git a/docs/theme/assets/stylesheets/layout/_source.scss b/docs/theme/assets/stylesheets/layout/_source.scss new file mode 100644 index 000000000..91ef7ca82 --- /dev/null +++ b/docs/theme/assets/stylesheets/layout/_source.scss @@ -0,0 +1,234 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Keyframes +// ---------------------------------------------------------------------------- + +// Show source facts +@keyframes md-source__facts--done { + 0% { + height: 0; + } + + 100% { + height: 1.3rem; + } +} + +// Show source fact +@keyframes md-source__fact--done { + 0% { + transform: translateY(100%); + opacity: 0; + } + + 50% { + opacity: 0; + } + + 100% { + transform: translateY(0%); + opacity: 1; + } +} + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Source container +.md-source { + display: block; + padding-right: 1.2rem; + transition: opacity 0.25s; + font-size: 1.3rem; + line-height: 1.2; + white-space: nowrap; + + // Adjust for RTL languages + [dir="rtl"] & { + padding-right: initial; + padding-left: 1.2rem; + } + + // Hovered source container + &:hover { + opacity: 0.7; + } + + // Necessary for vertical alignment + &::after { + display: inline-block; + height: 4.8rem; + content: ""; + vertical-align: middle; + } + + // Repository platform icon + &__icon { + display: inline-block; + width: 4.8rem; + height: 4.8rem; + content: ""; + vertical-align: middle; + + // Align SVG, do not scale, as this will incur strange formatting bugs + // in Internet Explorer and Edge + svg { + width: 2.4rem; + height: 2.4rem; + margin-top: 1.2rem; + margin-left: 1.2rem; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: 1.2rem; + margin-left: initial; + } + } + + // Correct alignment, if icon is present + + .md-source__repository { + margin-left: -4.4rem; + padding-left: 4rem; + + // Adjust for RTL languages + [dir="rtl"] & { + margin-right: -4.4rem; + margin-left: initial; + padding-right: 4rem; + padding-left: initial; + } + } + } + + // Repository name + &__repository { + display: inline-block; + max-width: 100%; + margin-left: 1.2rem; + font-weight: 700; + text-overflow: ellipsis; + overflow: hidden; + vertical-align: middle; + } + + // Source facts (statistics etc.) + &__facts { + margin: 0; + padding: 0; + font-size: 1.1rem; + font-weight: 700; + list-style-type: none; + opacity: 0.75; + overflow: hidden; + + // Show after the data was loaded + [data-md-state="done"] & { + animation: md-source__facts--done 0.25s ease-in; + } + } + + // Fact + &__fact { + float: left; + + // Adjust for RTL languages + [dir="rtl"] & { + float: right; + } + + // Show after the data was loaded + [data-md-state="done"] & { + animation: md-source__fact--done 0.4s ease-out; + } + + // Middle dot before fact + &::before { + margin: 0 0.2rem; + content: "\00B7"; + } + + // Remove middle dot on first fact + &:first-child::before { + display: none; + } + } +} + +// Source file +.md-source-file { + display: inline-block; + margin: 1em 0.5em 1em 0; + padding-right: 0.5rem; + border-radius: 0.2rem; + background-color: $md-color-black--lightest; + font-size: ms(-1); + list-style-type: none; + cursor: pointer; + overflow: hidden; + + // Icon + &::before { + @extend %md-icon; + + display: inline-block; + margin-right: 0.5rem; + padding: 0.5rem; + background-color: $md-color-black--lighter; + color: $md-color-white; + font-size: ms(0); + content: "\E86F"; // code + vertical-align: middle; + } + + // Some properties need to be set with higher specificity due to the default + // styling of text links inside typesetted content + html & { + transition: + background 0.4s, + color 0.4s, + box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1); + + // Icon + &::before { + transition: inherit; + } + } + + // Color needs even higher specifity because custom color palettes are set + // using the body and override text links inside typesetted content + html body .md-typeset & { + color: $md-color-black--light; + } + + // Hovered source file + &:hover { + @include z-depth-focus; + + // Icon + &::before { + background-color: $md-color-accent; + } + } +} diff --git a/docs/theme/assets/stylesheets/layout/_tabs.scss b/docs/theme/assets/stylesheets/layout/_tabs.scss new file mode 100644 index 000000000..63aab9fe8 --- /dev/null +++ b/docs/theme/assets/stylesheets/layout/_tabs.scss @@ -0,0 +1,178 @@ +//// +/// Copyright (c) 2016-2018 Martin Donath +/// +/// Permission is hereby granted, free of charge, to any person obtaining a +/// copy of this software and associated documentation files (the "Software"), +/// to deal in the Software without restriction, including without limitation +/// the rights to use, copy, modify, merge, publish, distribute, sublicense, +/// and/or sell copies of the Software, and to permit persons to whom the +/// Software is furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL +/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +/// DEALINGS +//// + +// ---------------------------------------------------------------------------- +// Rules +// ---------------------------------------------------------------------------- + +// Tabs with outline +.md-tabs { + width: 100%; + transition: background 0.25s; + background-color: $md-color-primary; + color: $md-color-white; + overflow: auto; + + // [tablet -]: Hide tabs for tablet and below, as they don't make any sense + @include break-to-device(tablet) { + display: none; + } + + // Hide for print + @media print { + display: none; + } + + // List of items + &__list { + margin: 0; + margin-left: 0.4rem; + padding: 0; + list-style: none; + white-space: nowrap; + } + + // List item + &__item { + display: inline-block; + height: 4.8rem; + padding-right: 1.2rem; + padding-left: 1.2rem; + } + + // Link inside item - could be defined as block elements and aligned via + // line height, but this would imply more repaints when scrolling + &__link { + display: block; + margin-top: 1.6rem; + transition: + transform 0.4s cubic-bezier(0.1, 0.7, 0.1, 1), + opacity 0.25s; + font-size: 1.4rem; + opacity: 0.7; + + // Active or hovered link + &--active, + &:hover { + color: inherit; + opacity: 1; + } + + // Delay transitions by a small amount + @for $i from 2 through 16 { + .md-tabs__item:nth-child(#{$i}) & { + transition-delay: 0.02s * ($i - 1); + } + } + } + + // Fade-out tabs background upon scrolling + &[data-md-state="hidden"] { + pointer-events: none; + + // Hide tabs upon scrolling - disable transition to minimizes repaints whilte + // scrolling down, while scrolling up seems to be okay + .md-tabs__link { + transform: translateY(50%); + transition: + color 0.25s, + transform 0s 0.4s, + opacity 0.1s; + opacity: 0; + } + } + + // [screen +]: Adjust main navigation styles + @include break-from-device(screen) { + + // Hide 1st level nested items, as they are listed in the tabs by setting + // font-size to zero, as we need to preserve bottom padding + ~ .md-main .md-nav--primary > .md-nav__list > .md-nav__item--nested { + font-size: 0; + visibility: hidden; + } + + // We're on the 2nd+ level + &--active ~ .md-main { + + // Adjust 1st level styles + .md-nav--primary { + + // Show title and remove spacing + .md-nav__title { + display: block; + padding: 0; + } + + // Hide site title + .md-nav__title--site { + display: none; + } + + // Show 1st level navigation always expanded + .no-js & .md-nav { + display: block; + } + + // Hide 1st level normal items + & > .md-nav__list > .md-nav__item { + font-size: 0; + visibility: hidden; + + // Reset font-size for nested items and induce margin collapse + &--nested { + display: none; + font-size: 1.4rem; + overflow: auto; + visibility: visible; + + // Hide nested links + > .md-nav__link { + display: none; + } + } + + // Show 1st level active nested items + &--active { + display: block; + } + } + } + + // Always expand nested navigation on 2nd level + .md-nav[data-md-level="1"] { + max-height: initial; + overflow: visible; + + // Remove left spacing on 2nd level items + > .md-nav__list > .md-nav__item { + padding-left: 0; + } + + // Hide titles from 2nd level on + .md-nav .md-nav__title { + display: none; + } + } + } + } +} diff --git a/docs/theme/partials/footer.html b/docs/theme/partials/footer.html new file mode 100644 index 000000000..6d3da9373 --- /dev/null +++ b/docs/theme/partials/footer.html @@ -0,0 +1,82 @@ +{% import "partials/language.html" as lang with context %} + + + diff --git a/docs/theme/partials/header.html b/docs/theme/partials/header.html new file mode 100644 index 000000000..93a6ebeb2 --- /dev/null +++ b/docs/theme/partials/header.html @@ -0,0 +1,129 @@ + + + +
+ + +
+ + +
+ + + +
diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 000000000..bf34397b3 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,87 @@ +# Project information +site_name: Routr Documentation +site_description: Next-generation SIP Server +site_author: Pedro Sanders +site_url: https://routr.io + +# Repository +repo_name: fonoster/routr +repo_url: https://github.com/fonoster/routr +edit_uri: "" + +nav: + - Introduction: index.md + - Installation: getting-started-installation.md + - Routing Methods: getting-started-routing.md + - Command Line: api-cli-commands.md + - API: + - Reference: api-reference.md + - Resources: api-resources.md + - Guides: + - Voip Network Setup: guide-voip-network-setup.md + - Routr as Asterisk frontend: guide-routr-as-asterisk-frontend.md + - Securing the Signaling Path: guide-securing-the-signal.md + - Web Console: api-webconsole.md + - Faqs: faqs.md + +# Copyright +copyright: 'Copyright © 2018 Fonoster Inc' +theme: + name: material + custom_dir: docs/theme + + # 404 page + static_templates: + - 404.html + + # Don't include MkDocs' JavaScript + include_search_page: false + search_index_only: true + + # Default values, taken from mkdocs_theme.yml + language: en + palette: + primary: blue grey + accent: indigo + font: + text: Roboto + code: Roboto Mono + favicon: /assets/images/favicon/favicon.ico + +extra: + social: + - type: globe + link: https://fonoster.com + - type: github-alt + link: https://github.com/fonoster + - type: twitter + link: https://twitter.com/fonoster + - type: linkedin + link: https://linkedin.com/in/fonoster + +markdown_extensions: + - markdown.extensions.admonition + - markdown.extensions.codehilite: + guess_lang: false + - markdown.extensions.def_list + - markdown.extensions.footnotes + - markdown.extensions.meta + - markdown.extensions.toc: + permalink: true + - pymdownx.arithmatex + - pymdownx.betterem: + smart_enable: all + - pymdownx.caret + - pymdownx.critic + - pymdownx.details + - pymdownx.emoji: + emoji_generator: !!python/name:pymdownx.emoji.to_svg + - pymdownx.inlinehilite + - pymdownx.keys + - pymdownx.magiclink + - pymdownx.mark + - pymdownx.smartsymbols + - pymdownx.superfences + - pymdownx.tasklist: + custom_checkbox: true + - pymdownx.tilde diff --git a/website/core/Footer.js b/website/core/Footer.js deleted file mode 100644 index b0af9f274..000000000 --- a/website/core/Footer.js +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -class Footer extends React.Component { - docUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - return baseUrl + 'docs/' + (language ? language + '/' : '') + doc; - } - - pageUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - return baseUrl + (language ? language + '/' : '') + doc; - } - - render() { - const currentYear = new Date().getFullYear(); - return ( - - ); - } -} - -module.exports = Footer; diff --git a/website/i18n/en.json b/website/i18n/en.json deleted file mode 100644 index e0d36663b..000000000 --- a/website/i18n/en.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_comment": "This file is auto-generated by write-translations.js", - "localized-strings": { - "next": "Next", - "previous": "Previous", - "tagline": "Next-generation Sip Server", - "docs": { - "api-cli-commands": { - "title": "CLI Commands" - }, - "api-reference": { - "title": "API Reference" - }, - "api-resources": { - "title": "Resource Files" - }, - "api-webconsole": { - "title": "Web Console" - }, - "faqs": { - "title": "Frequently asked questions" - }, - "getting-started-installation": { - "title": "Installation" - }, - "getting-started-introduction": { - "title": "Undertanding Routr" - }, - "getting-started-routing": { - "title": "Traffic Routing" - }, - "guide-routr-as-asterisk-frontend": { - "title": "Routr as Asterisk Frontend" - }, - "guide-securing-the-signal": { - "title": "Securing the Signal" - }, - "guide-voip-network-setup": { - "title": "VoIP Network Setup" - } - }, - "links": { - "Docs": "Docs", - "API": "API", - "Help": "Help", - "GitHub": "GitHub" - }, - "categories": { - "Getting Started": "Getting Started", - "Guides": "Guides", - "API": "API", - "Misc": "Misc" - } - }, - "pages-strings": { - "Help Translate|recruit community translators for your project": "Help Translate", - "Edit this Doc|recruitment message asking to edit the doc source": "Edit", - "Translate this Doc|recruitment message asking to translate the docs": "Translate" - } -} diff --git a/website/package.json b/website/package.json deleted file mode 100644 index 15dbdc59f..000000000 --- a/website/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "scripts": { - "examples": "docusaurus-examples", - "start": "docusaurus-start", - "build": "docusaurus-build", - "publish-gh-pages": "docusaurus-publish", - "write-translations": "docusaurus-write-translations", - "version": "docusaurus-version", - "rename-version": "docusaurus-rename-version" - }, - "devDependencies": { - "docusaurus": "^1.6.2" - } -} diff --git a/website/pages/en/help.js b/website/pages/en/help.js deleted file mode 100755 index e6fb14bbc..000000000 --- a/website/pages/en/help.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); -const Container = CompLibrary.Container; -const GridBlock = CompLibrary.GridBlock; - -const siteConfig = require(process.cwd() + '/siteConfig.js'); - -function docUrl(doc, language) { - return siteConfig.baseUrl + 'docs/' + (language ? language + '/' : '') + doc; -} - -class Help extends React.Component { - render() { - let language = this.props.language || ''; - const supportLinks = [ - { - content: `Learn more using the [documentation on this section.](${docUrl( - 'getting-started-introduction.html', - language - )})`, - title: 'Browse Docs', - }, - { - content: 'Ask questions about the documentation and project', - title: 'Join the community', - }, - { - content: "Find out what's new with this project", - title: 'Stay up to date', - }, - ]; - - return ( -
- -
-
-

Need help?

-
-

This project is maintained by Fonoster, Inc and friends.

- -
-
-
- ); - } -} - -module.exports = Help; diff --git a/website/pages/en/index.html b/website/pages/en/index.html deleted file mode 100644 index 5867ca9da..000000000 --- a/website/pages/en/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Routr - - - If you are not redirected automatically, follow this link. - - diff --git a/website/pages/en/users.js b/website/pages/en/users.js deleted file mode 100644 index 57535f0f0..000000000 --- a/website/pages/en/users.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); -const Container = CompLibrary.Container; - -const siteConfig = require(process.cwd() + '/siteConfig.js'); - -class Users extends React.Component { - render() { - if ((siteConfig.users || []).length === 0) { - return null; - } - const editUrl = siteConfig.repoUrl + '/edit/master/website/siteConfig.js'; - const showcase = siteConfig.users.map((user, i) => { - return ( - - {user.caption} - - ); - }); - - return ( -
- -
-
-

Who is Using This?

-

This project is used by many folks

-
-
{showcase}
-

Are you using this project?

- - Add your company - -
-
-
- ); - } -} - -module.exports = Users; diff --git a/website/pages/index.html b/website/pages/index.html deleted file mode 100644 index e0bd115ec..000000000 --- a/website/pages/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - Your Site Title Here - - - If you are not redirected automatically, follow this link. - - diff --git a/website/sidebars.json b/website/sidebars.json deleted file mode 100644 index 385566725..000000000 --- a/website/sidebars.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "docs": { - "Getting Started": [ - "getting-started-introduction", - "getting-started-installation" - ], - "Guides": [ - "guide-voip-network-setup", - "guide-routr-as-asterisk-frontend", - "guide-securing-the-signal"], - "API": [ - "api-reference", - "api-resources", - "api-cli-commands", - "api-webconsole" - ], - "Misc": ["faqs"] - } -} diff --git a/website/siteConfig.js b/website/siteConfig.js deleted file mode 100644 index e8403d1d9..000000000 --- a/website/siteConfig.js +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// See https://docusaurus.io/docs/site-config.html for all the possible -// site configuration options. - -/* List of projects/orgs using your project for the users page */ -const users = [ - { - caption: 'User1', - // You will need to prepend the image path with your baseUrl - // if it is not '/', like: '/test-site/img/docusaurus.svg'. - image: '/img/docusaurus.svg', - infoLink: 'https://www.facebook.com', - pinned: true, - }, -]; - -const siteConfig = { - tagline: 'Next-generation Sip Server', - url: 'https://routr.io' /* your website url */, - baseUrl: '/' /* base url for your project */, - // For github.io type URLs, you would set the url and baseUrl like: - //url: 'https://fonoster.github.io/routr', - //baseUrl: '/', - editUrl: "https://github.com/fonoster/routr/edit/master/docs/", - // Used for publishing and more - projectName: 'routr', - organizationName: 'fonoster', - // For top-level user or org sites, the organization is still the same. - // e.g., for the https://JoelMarcey.github.io site, it would be set like... - // organizationName: 'JoelMarcey' - - // For no header links in the top nav bar -> headerLinks: [], - headerLinks: [ - {doc: 'getting-started-introduction', label: 'Docs'}, - {doc: 'api-reference', label: 'API'}, - {page: 'help', label: 'Help'}, - //{blog: false, label: 'GitHub'}, - { - href: 'https://github.com/fonoster/routr', - label: 'GitHub', - }, - ], - - // If you have users set above, you add it here: - users, - - title: '1.0', - disableTitleTagline: true, - - /* path to images for header/footer */ - headerIcon: 'img/logo.png', - footerIcon: 'img/docusaurus.svg', - favicon: 'img/favicon.ico', - - /* colors for website */ - colors: { - primaryColor: '#444444', - secondaryColor: '#205C3B', - }, - - /* custom fonts for website */ - /*fonts: { - myFont: [ - "Times New Roman", - "Serif" - ], - myOtherFont: [ - "-apple-system", - "system-ui" - ] - },*/ - - // This copyright info is used in /core/Footer.js and blog rss/atom feeds. - copyright: - 'Copyright © ' + - new Date().getFullYear() + - ' Brought to you by Fonoster, Inc and friends.', - - highlight: { - // Highlight.js theme to use for syntax highlighting in code blocks - theme: 'androidstudio', - }, - - // Add custom scripts here that would be placed in