From 31a8498e3c6bc3cb8533b1c9c92a911539c2b9ce Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Thu, 17 Dec 2020 15:32:12 +0800 Subject: [PATCH] fix: broken avatar --- resources/img/broken-avatar.png | Bin 0 -> 1609 bytes src/main/frontend/components/header.cljs | 119 ++++++++++++----------- 2 files changed, 62 insertions(+), 57 deletions(-) create mode 100644 resources/img/broken-avatar.png diff --git a/resources/img/broken-avatar.png b/resources/img/broken-avatar.png new file mode 100644 index 0000000000000000000000000000000000000000..d82f76a345aefde221732b6a21fb9b46eb69769a GIT binary patch literal 1609 zcmV-P2DbT$P)Q+SK~#7F?VVj# z;z$(7F9GB=vx3Gaj~sMl1szvl&kD3xF!lN)i4yUHUEQ z7Lw}qdWQ_c2q6y-4-Oa98Gn69TR<2}P>VkRUyqKCT9h-n2|+62G;|3Oe0o9#0682v z*L-+)czEbi4rmwB>-A9h=lpd+%lY3JSWc7WeAX>Sn~{fBDd%Ekd`L%!R1b zbj^R*-?YW(5|gPAPEVKoa76~ErZ{+Y3`_Y+8Ig&QZB0)xXmQ`@V;0e3QOY1HSVo(6 zR|atKH>wPfDyc=tuGAHA;S_dLtJOYHN~9u0rKtbNkp6^jRNZo#MhZ(T1Twgn`%QNb z+ceUWl1PZ^Uf1ec86m17|4u??a0S1=s)An`A&3qVG9{>jUy2Zk z4y`m62OyUsM5040=Zim>ix7zp?JTvp<|2e;I3(!A-rL)on-nr9gs%%ry3)@F|H(`U zmIO$@LqA;RCn$UGd?v)QtaB1_K`qIc;!jx)33)L~TT>yJv>@p!SE~Jf{~Zpz2ziq; z4h>@(B~u~(946!g7P;b4BE%dVd@Eo^M7do4NkZ;$ul*0JR4Pey7y|d&-&;H`|0fAX zfL$sqY*#^o5x@m1bxB!b!WxZ6KS(fzjx`>S zTO=64^Ye4p!pv)_*p0x23$Lf%A|Y2eD5eW{EdPm+AKco##iJ+We-iShi*K_PRF993 z-(`MpZn*V&eIEz2(OxfPgj{HO2Yw-vwsL|ygiY^wZqaA2*Tb$qGA&3ivvdU(*BDCL z($BU3WKPJ-%gYy%3szbg4u^OC^En}Ey>ycVT{OAOUH=c3uBo%J%%ym$7fY5z=x%ZB}-W?LspvArN({)b>ol2@Icu8H!8ANF;g$hAswx`3rAALR8Si zJ&p5%*ta}tx7*cnxh!`}2nQeFMwEKPPwWLd>J4CBT3*3SZweMy29Vq4rH}sG=6Q&e zB@)R1iPjk6jgcowDtdqlypco(NWAD1c~Z3`Tzb3UgSknxPPOa#~bv~f^N_f zmsEv-Znt|`EEcgt_O90}0}O}MYPBzvBB=`js;`3kV>q;%v@lSZMv7V_6Cob=_xBh4 zDMGYVX*b9uD*R-+lf&`xaZ^?JP1=4?SL|mg17sQ@epDJmv|P}3ky(0Lg*G7`TOwvU zVUYiy&4Yu3E@?!&5D$pq)|g{h9n-=5W=yF~s~H=Y+=Te)_xtZBlgS1BZk1I@BUtc? zwK4p`xaIocj&jBbA$~AEhJDaEdd_gO6G~Z-63}7+7~+5gqt@vgCu9+9g> - [(when current-repo - {:title (t :graph) - :options {:href (rfe/href :graph)} - :icon svg/graph-sm}) + [(when current-repo + {:title (t :graph) + :options {:href (rfe/href :graph)} + :icon svg/graph-sm}) - (when (or logged? (and (nfs/supported?) current-repo)) - {:title (t :all-graphs) - :options {:href (rfe/href :repos)} - :icon svg/repos-sm}) + (when (or logged? (and (nfs/supported?) current-repo)) + {:title (t :all-graphs) + :options {:href (rfe/href :repos)} + :icon svg/repos-sm}) - (when current-repo - {:title (t :all-pages) - :options {:href (rfe/href :all-pages)} - :icon svg/pages-sm}) + (when current-repo + {:title (t :all-pages) + :options {:href (rfe/href :all-pages)} + :icon svg/pages-sm}) - (when current-repo - {:title (t :all-files) - :options {:href (rfe/href :all-files)} - :icon svg/folder-sm}) + (when current-repo + {:title (t :all-files) + :options {:href (rfe/href :all-files)} + :icon svg/folder-sm}) - (when (and default-home current-repo) - {:title (t :all-journals) - :options {:href (rfe/href :all-journals)} - :icon svg/calendar-sm}) + (when (and default-home current-repo) + {:title (t :all-journals) + :options {:href (rfe/href :all-journals)} + :icon svg/calendar-sm}) - (when (project-handler/get-current-project current-repo projects) - {:title (t :my-publishing) - :options {:href (rfe/href :my-publishing)}}) + (when (project-handler/get-current-project current-repo projects) + {:title (t :my-publishing) + :options {:href (rfe/href :my-publishing)}}) - (when-let [project (and current-repo - (project-handler/get-current-project current-repo projects))] - (let [link (str config/website "/" project)] - {:title (str (t :go-to) "/" project) - :options {:href link - :target "_blank"} - :icon svg/external-link})) + (when-let [project (and current-repo + (project-handler/get-current-project current-repo projects))] + (let [link (str config/website "/" project)] + {:title (str (t :go-to) "/" project) + :options {:href link + :target "_blank"} + :icon svg/external-link})) - {:title (t :settings) - :options {:href (rfe/href :settings)} - :icon svg/settings-sm} - - (when (and logged? current-repo) - {:title (t :export) - :options {:on-click (fn [] - (export/export-repo-as-html! current-repo))} - :icon nil}) - (when current-repo - {:title (t :import) - :options {:href (rfe/href :import)} - :icon svg/import-sm}) - {:title [:div.flex-row.flex.justify-between.items-center - [:span (t :join-community)]] - :options {:href "https://discord.gg/KpN4eHY" - :title (t :discord-title) - :target "_blank"} - :icon svg/discord} - (when logged? - {:title (t :sign-out) - :options {:on-click user-handler/sign-out!} - :icon svg/logout-sm})] - (remove nil?))) + {:title (t :settings) + :options {:href (rfe/href :settings)} + :icon svg/settings-sm} + + (when (and logged? current-repo) + {:title (t :export) + :options {:on-click (fn [] + (export/export-repo-as-html! current-repo))} + :icon nil}) + (when current-repo + {:title (t :import) + :options {:href (rfe/href :import)} + :icon svg/import-sm}) + {:title [:div.flex-row.flex.justify-between.items-center + [:span (t :join-community)]] + :options {:href "https://discord.gg/KpN4eHY" + :title (t :discord-title) + :target "_blank"} + :icon svg/discord} + (when logged? + {:title (t :sign-out) + :options {:on-click user-handler/sign-out!} + :icon svg/logout-sm})] + (remove nil?))) {}))) (rum/defc right-menu-button < rum/reactive