From e6ddc2cfc8f34153be1c01a31aab9b1bbdd4dda8 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Fri, 28 Jan 2022 14:49:28 +0100 Subject: [PATCH] Improved accessibility, switched to locally supplied icons --- saturn/__init__.py | 14 +++--- saturn/server/static/css/index.css | 40 ++++++--------- saturn/server/static/css/login.css | 1 - saturn/server/static/icons/remixicon.css | 45 +++++++++++++++++ saturn/server/static/icons/remixicon.eot | Bin 0 -> 2224 bytes saturn/server/static/icons/remixicon.less | 47 ++++++++++++++++++ saturn/server/static/icons/remixicon.svg | 12 +++++ .../server/static/icons/remixicon.symbol.svg | 1 + saturn/server/static/icons/remixicon.ttf | Bin 0 -> 2052 bytes saturn/server/static/icons/remixicon.woff | Bin 0 -> 1316 bytes saturn/server/static/icons/remixicon.woff2 | Bin 0 -> 928 bytes saturn/server/templates/base.html | 3 ++ saturn/server/templates/index.html | 8 +-- saturn/server/templates/login.html | 3 +- 14 files changed, 135 insertions(+), 39 deletions(-) create mode 100644 saturn/server/static/icons/remixicon.css create mode 100644 saturn/server/static/icons/remixicon.eot create mode 100644 saturn/server/static/icons/remixicon.less create mode 100644 saturn/server/static/icons/remixicon.svg create mode 100644 saturn/server/static/icons/remixicon.symbol.svg create mode 100644 saturn/server/static/icons/remixicon.ttf create mode 100644 saturn/server/static/icons/remixicon.woff create mode 100644 saturn/server/static/icons/remixicon.woff2 diff --git a/saturn/__init__.py b/saturn/__init__.py index 50c380c..e277c2a 100644 --- a/saturn/__init__.py +++ b/saturn/__init__.py @@ -1,4 +1,4 @@ -import argparse +#import argparse import configparser import logging import locale @@ -12,14 +12,14 @@ from .server import create_app from .calendar import get_davclient -parser = argparse.ArgumentParser(description='Web-based CalDav client') -parser.add_argument('-c', '--config', type=Path, default='config.ini', - help='Configuration file path') - -args = parser.parse_args() +#parser = argparse.ArgumentParser(description='Web-based CalDav client') +#parser.add_argument('-c', '--config', type=Path, default='config.ini', +# help='Configuration file path') +# +#args = parser.parse_known_args() config = configparser.RawConfigParser() -config.read(args.config) +config.read('config.ini') locale.setlocale(locale.LC_ALL, config.get('locale', 'locale', fallback=None)) diff --git a/saturn/server/static/css/index.css b/saturn/server/static/css/index.css index 058541e..0bf4810 100644 --- a/saturn/server/static/css/index.css +++ b/saturn/server/static/css/index.css @@ -4,40 +4,28 @@ body { 1fr; grid-template-rows: auto - 1fr; + 1fr + auto; +} + +body > .topbar, +body > footer { + grid-column: 1 / span 2; + padding: 1rem 3rem; + position: relative; } body > .topbar { + padding-top: 3rem; grid-row: 1; - grid-column: 1 / span 2; - margin: 3rem 3rem 1rem 3rem; - position: relative; } .topbar h1 { margin: 0; } -.topbar > a { - position: absolute; - top: 0; - right: 0; - color: var(--text-02) !important; - text-decoration: none; - padding: 0 1rem; - line-height: 4rem; - background: none; - cursor: pointer; -} -.topbar > a > i { - vertical-align: top; -} -.topbar > a:hover { - background: var(--hover-ui); -} -.topbar > a:active { - background: var(--active-ui); -} -.topbar > a:focus { - outline: 2px solid var(--focus); + +body > footer { + grid-row: 3; + background: var(--ui-01); } body > #events { diff --git a/saturn/server/static/css/login.css b/saturn/server/static/css/login.css index 72989f2..15bc634 100644 --- a/saturn/server/static/css/login.css +++ b/saturn/server/static/css/login.css @@ -70,7 +70,6 @@ form button:focus { outline: 2px solid var(--focus); } form button.primary { - padding-right: 4rem; color: var(--text-04); background: var(--interactive-01); position: relative; diff --git a/saturn/server/static/icons/remixicon.css b/saturn/server/static/icons/remixicon.css new file mode 100644 index 0000000..5e8ae8f --- /dev/null +++ b/saturn/server/static/icons/remixicon.css @@ -0,0 +1,45 @@ + +/* +* https://remixicon.com +* https://github.com/Remix-Design/RemixIcon +* Copyright RemixIcon.com +* Released under the Apache License Version 2.0 +*/ + +@font-face { + font-family: "remixicon"; + src: url('remixicon.eot?t=1643377622508'); /* IE9*/ + src: url('remixicon.eot?t=1643377622508#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url("remixicon.woff2?t=1643377622508") format("woff2"), + url("remixicon.woff?t=1643377622508") format("woff"), + url('remixicon.ttf?t=1643377622508') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ + url('remixicon.svg?t=1643377622508#remixicon') format('svg'); /* iOS 4.1- */ + font-display: swap; +} + +[class^="ri-"], [class*="ri-"] { + font-family: 'remixicon' !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.ri-lg { font-size: 1.3333em; line-height: 0.75em; vertical-align: -.0667em; } +.ri-xl { font-size: 1.5em; line-height: 0.6666em; vertical-align: -.075em; } +.ri-xxs { font-size: .5em; } +.ri-xs { font-size: .75em; } +.ri-sm { font-size: .875em } +.ri-1x { font-size: 1em; } +.ri-2x { font-size: 2em; } +.ri-3x { font-size: 3em; } +.ri-4x { font-size: 4em; } +.ri-5x { font-size: 5em; } +.ri-6x { font-size: 6em; } +.ri-7x { font-size: 7em; } +.ri-8x { font-size: 8em; } +.ri-9x { font-size: 9em; } +.ri-10x { font-size: 10em; } +.ri-fw { text-align: center; width: 1.25em; } + +.ri-map-pin-line:before { content: "\ef14"; } +.ri-repeat-line:before { content: "\f074"; } diff --git a/saturn/server/static/icons/remixicon.eot b/saturn/server/static/icons/remixicon.eot new file mode 100644 index 0000000000000000000000000000000000000000..c670a9159ed858893f6bf9c42847f9942f572420 GIT binary patch literal 2224 zcmd^B&2Jk;6o0e3v6DCoa+=s_MZzQ{PE!&mGK~W<3Z)G#MU|-B;HGL+y0O=erTwsW z*HMB{)Dx8ep&Wo7xFD1R2PzebV-Kj}&>Iq}K;lp#C{j-}7fOj}%5P@Zj-up0U{*8p zd%yQFAAY;fH(QA`bVdq^rcjG20ho0r(Ajf=yfaD~;`Q~7BRgyZb&*R3SyZJJ^ddQA zL)A%nuobG4NjfZu5>x==k_Rhc!zn{)nuKQm2vCTHV|0~NnmB#_?GyaNp?5*P1a|JN z^W&M*cjx*ce+0QuwDj5+ul@E2@+SKG6?3)xwfo~Bk$M$!_mZKPp8MhBpJDqedUgp! z+qm{E@GbP`mn?s!?FtaF`xrV*r>N5v`T+hbkXtQ%rN-iP3i@8i+}17Q+15X>eeDz2 z9IZK?|LN}|b)x8Z(9ep!Yd3)!w#IjiO@@>~d%~4_2Id6f;f=UXwNv%t&Ps{V7i0m|-b)9_$^7&IJ0uw+?v$jW-y# z@~}JT;$}Dfpf__&yOSyNk5Bd{lfBn2UA%bdnn1IEZ{NPqk9K3( zb(e1lbYc7UNG_Mp9q|Gf2KY zF-jr}1~Q4B_~H0K&+rr*7)(vZUyKh-CZlXr`Ln05^kjBxOPPPt1*qKG+EO3%^=yC1 zMnAiA=ifK`df4UdyMVaEF1jakQCw#my2wj0w&4k|LQz-+SOt49#2WBmh+FVwdm+RT z@YxWz;}iL6h+}ksz7d(PiFLZ@`w%nWpF*tQQ~MyqD)>hs)~JiMhPZ_i>`;g!;3q=d zPWRb~5XUH`r1FMUT{%;9Y*&CPK;Ed-P2FwEO;9jguj<%5lb&pHdEv!{Kd*XR=bqtn zr_7z2VUKxE-7Om2HtN2sn`558Y8u>I^?bv^WGynw1u?E?uG4KwGrHdUK;BAa`*tzgArPilaAffYs zJm|zafn?DlyiKqitSGob7QVvDggr-GA(tgnf?SpsoJz0|CAlKk6y;g$(*_^tmSqHo z#6E>K4Soqxd@$2Ajz>hY!<9_nw7hi-85{h?Ks6OF$UaSF3R9Uz9Vp&owW>X4R&68Z L8Z|@rB_{e01!h|e literal 0 HcmV?d00001 diff --git a/saturn/server/static/icons/remixicon.less b/saturn/server/static/icons/remixicon.less new file mode 100644 index 0000000..f7653fc --- /dev/null +++ b/saturn/server/static/icons/remixicon.less @@ -0,0 +1,47 @@ + +/* +* https://remixicon.com +* https://github.com/Remix-Design/RemixIcon +* Copyright RemixIcon.com +* Released under the Apache License Version 2.0 +*/ + +@font-face { + font-family: "remixicon"; + src: url('remixicon.eot?t=1643377622508'); /* IE9*/ + src: url('remixicon.eot?t=1643377622508#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url("remixicon.woff2?t=1643377622508") format("woff2"), + url("remixicon.woff?t=1643377622508") format("woff"), + url('remixicon.ttf?t=1643377622508') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ + url('remixicon.svg?t=1643377622508#remixicon') format('svg'); /* iOS 4.1- */ + font-display: swap; +} + +[class^="ri-"], [class*="ri-"] { + font-family: 'remixicon' !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +:global { +.ri-lg { font-size: 1.3333em; line-height: 0.75em; vertical-align: -.0667em; } +.ri-xl { font-size: 1.5em; line-height: 0.6666em; vertical-align: -.075em; } +.ri-xxs { font-size: .5em; } +.ri-xs { font-size: .75em; } +.ri-sm { font-size: .875em } +.ri-1x { font-size: 1em; } +.ri-2x { font-size: 2em; } +.ri-3x { font-size: 3em; } +.ri-4x { font-size: 4em; } +.ri-5x { font-size: 5em; } +.ri-6x { font-size: 6em; } +.ri-7x { font-size: 7em; } +.ri-8x { font-size: 8em; } +.ri-9x { font-size: 9em; } +.ri-10x { font-size: 10em; } +.ri-fw { text-align: center; width: 1.25em; } + +.ri-map-pin-line:before { content: "\ef14"; } +.ri-repeat-line:before { content: "\f074"; } +} \ No newline at end of file diff --git a/saturn/server/static/icons/remixicon.svg b/saturn/server/static/icons/remixicon.svg new file mode 100644 index 0000000..291b05d --- /dev/null +++ b/saturn/server/static/icons/remixicon.svg @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/saturn/server/static/icons/remixicon.symbol.svg b/saturn/server/static/icons/remixicon.symbol.svg new file mode 100644 index 0000000..e6d167e --- /dev/null +++ b/saturn/server/static/icons/remixicon.symbol.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/saturn/server/static/icons/remixicon.ttf b/saturn/server/static/icons/remixicon.ttf new file mode 100644 index 0000000000000000000000000000000000000000..243b0221ff3f059d4553973df77b234a95d63649 GIT binary patch literal 2052 zcmd^A&u<$=6n?Y2v6DCoa_ZP=MZzQ{PE!&m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 HcmV?d00001 diff --git a/saturn/server/static/icons/remixicon.woff b/saturn/server/static/icons/remixicon.woff new file mode 100644 index 0000000000000000000000000000000000000000..a8a6e761ef8f3230c57d27641e17e7ed329ac215 GIT binary patch literal 1316 zcmXT-cXMN4WB>wI6$Wk)&A|fUgV?CRJvh{ffq{_&C~6JFAqw59RsO;HMnEwaAm0v% z!`!cg$R+0{768Rsfc$VE-L}B-(YN%R$}}MR4p8h1kQP}}bV(^AH8F*Of$0KJOb>|7 zd0|!nWIPhii&F03&MAnwHqJ#}eCajlu)|}yqaCDfJ&DDIkdLqB7 zj&#Ev8H1At4sa+j>?z`EV*u)ZJ7J?>g8>ioeLs(bfkrH>%z=ii)suOf9vu*S@ow$r zH(m!=R5o_=lqHqOdg*>TB2(EnU&;JW-0Q1SHF`7iRPUH_?VmQ|_U_93>rmALwhJ~uOZo<}X%9d_|c5cf$3v;-zrQy{k^{Z z(9?#5+{nPdn^6MVf9@;#X1`X*&i36bVZ3>UjDX?qcHOS$bf*de#!-G*p| zSjTIc0lp4Rjg6dd{#i}4V#{MIWMgx4RW=NCOm%b(EG>3(RW%KEOm=h)E-Z7CT~@wm zlV*Kv-QT3HAKEM_MsI(9?f%)i=EZ*39;?fKbACKl)jlQh{XN$NP6n>^Zg-*a$dJ^l zy7t+}KW6cgJ0i^(TqWLl>Tx4Je}0|bNEp!5Y*n~=5vm?jt))fApFIkC0-Z+|7PaQB9?$9jzNxJB5K?1oR9m-{$iP1 z?Xl6VK|#o+?)e@2Acko_TDdM4pUZ#LRTEdy7Jg>dkCu184;6nperS2bgW!k8zv8*# z4?NC($a?RQwROm6lk`scR_#yc4;k+{IRB9Pm;Yk(k|X!()pV6#Z9kO$#a?{hf%mVX zAF}GDPnW)1-oL$fvz?>+jTe6trr5tyzLP0$mHu?qzPd?16GHT31ymi~3)k*w-nRMy z+x?7-fp&@J*!)^_W0+Du#8{RULUYIFEx3wpt9$4zT|6} z=ay9EMCN|tnfrc9$*SJS{x7rF+~c@d&F8ki`_I^GIe!x<9+Mgvl X^{4LE*s5TyNU0s}+aJ5C`0|Jn4V literal 0 HcmV?d00001 diff --git a/saturn/server/static/icons/remixicon.woff2 b/saturn/server/static/icons/remixicon.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..183b8bef50cd201c83cbb861258ee19833bba51d GIT binary patch literal 928 zcmV;R17G}iPew8T0RR9100W=^3jhEB00;yC00UD10RR9100000000000000000000 z0000SR0dW6g9ZwM6oMcDHUcCA3=0SV1Rw>5DhEUxLkAI6lzU`fLQXdEAWzHA6hAgRsb}Q;vy{AfP)6#Jl28X?D-m-xTgLJ zlZVj&@XKi0O=wo2vxuZf8@TT=oT!UxR?JsEf&jK8Q-~_BtZKq>s()z)UkpL5K%Fa7 zmp>uL;=D_A2~j%?MzauN#aKcB$moJtjwD;ce^&;%RnMkqOg z8E7E>e6-RtYHmZ9;dnH*j@aO-mKX#@<@iR z7!J@&yE%XPX?B}{>ZYj zKcl5NU^!quv@T!&3PFJ2iS(A{f|oH@8$`i)W@ko5=Trn{@~Lteu8%)|@p$UdGZg>m z)c;@9M(lamw(w6d#Kf8|0JEKQzldpgpWm026Th!+-`|FJKIdC<_A)D2-%X3a5^l<& zsEA}5Va04_)#QGaK?T@`8hEqw0bF^vU23y98w49{YNEmlSE9xSABaJO5-qSJj%bMu znM7L_DB5j@8+R~bYyelD07MYahzdtO6E&{<0Sr>Ci57T@uh4P~kxaDZy|~VfNEO+j zVlVqy$50B0<|W z9gb0t+Sq4b@nduq>}ZUI8oL9!kZC-@#Da;d%;7L6C`>Km%8qVDsS20Y(#J5E7*@RD zqSDcKU+iT+>ljK8AuPPJd2v**Djf0`E>&22@SvVaIb06emqIECl^dc-PfZ;98keFO z0m_$F$RXi&IL%y-ww1k>?#Jlp#e6+1!P+Kn41Yk2jUJw0P%Nf!m06y&oTE74ta0(W znIl-pDuqjH>0=04B+?)y?4r72ssHwP|Gp~0U7QfakN|s6sZSDmCxLGZC#F`bx()yw Cl$7ZJ literal 0 HcmV?d00001 diff --git a/saturn/server/templates/base.html b/saturn/server/templates/base.html index ccbfd99..5627dd1 100644 --- a/saturn/server/templates/base.html +++ b/saturn/server/templates/base.html @@ -4,11 +4,14 @@ + + {% block title %}Saturn{% endblock %} {% block style %} + {% endblock %} diff --git a/saturn/server/templates/index.html b/saturn/server/templates/index.html index d2a97ce..c57e429 100644 --- a/saturn/server/templates/index.html +++ b/saturn/server/templates/index.html @@ -3,13 +3,11 @@ {% block style %} {{ super() }} - {% endblock %} {% block body %}
-

Saturn

- +

Saturn

@@ -78,4 +76,8 @@
{% endfor %} + + {% endblock %} diff --git a/saturn/server/templates/login.html b/saturn/server/templates/login.html index 516ca84..75e7ff9 100644 --- a/saturn/server/templates/login.html +++ b/saturn/server/templates/login.html @@ -3,7 +3,6 @@ {% block style %} {{ super() }} - {% endblock %} {% block body %} @@ -14,7 +13,7 @@ {% endif %}