From e08ec9eba90dbec2ae42c3d8ac5e253f697ccfab Mon Sep 17 00:00:00 2001 From: Fechin Date: Fri, 20 Jun 2025 20:42:34 +0800 Subject: [PATCH] feat: Modular UI component refactor Enhanced navbar and hero section --- .stylelintrc.js | 27 +- README.md | 2 +- package.json | 3 + pnpm-lock.yaml | 34 ++ source/_posts/aspect-ratio.md | 2 +- source/_posts/chmod.md | 2 +- source/_posts/fastapi.md | 2 +- source/_posts/grep.md | 2 +- source/_posts/openssl.md | 2 +- source/_posts/phpstorm.md | 2 +- source/_posts/screen.md | 2 +- source/_posts/tmux.md | 2 +- source/_posts/webstorm.md | 2 +- source/assets/icon/chevron-down.svg | 3 + source/assets/icon/coffee.svg | 5 + source/assets/icon/copy.svg | 3 + source/assets/icon/dorefer.png | Bin 0 -> 4655 bytes source/assets/icon/fionaai.png | Bin 0 -> 2363 bytes source/assets/icon/paypal.svg | 3 + source/assets/icon/tableconvert.png | Bin 0 -> 2460 bytes source/assets/icon/x.svg | 3 + source/manifest.json | 2 +- source/support/index.md | 56 ++ source/sw.js | 6 +- source/widget/chmod.html | 4 +- .../layout/_partial/buttons/buy-coffee.ejs | 78 +++ .../coo/layout/_partial/buttons/follow-x.ejs | 84 +++ .../_partial/buttons/github-contribute.ejs | 64 +++ .../layout/_partial/buttons/github-star.ejs | 73 +++ themes/coo/layout/_partial/footer.ejs | 121 ++++- themes/coo/layout/_partial/head.ejs | 4 +- themes/coo/layout/_partial/header.ejs | 165 ++++-- .../layout/_partial/index/hero-content.ejs | 32 ++ themes/coo/layout/_partial/index/hero.ejs | 80 ++- themes/coo/layout/_partial/index/logo.ejs | 34 +- themes/coo/layout/_partial/index/request.ejs | 24 +- themes/coo/layout/_partial/note/header.ejs | 2 +- .../coo/layout/_partial/post/popular_card.ejs | 2 +- themes/coo/layout/_partial/scripts.ejs | 6 +- themes/coo/layout/_partial/search.ejs | 6 +- themes/coo/layout/_partial/share.ejs | 4 +- themes/coo/layout/_partial/social-buttons.ejs | 42 ++ themes/coo/layout/index.ejs | 7 +- themes/coo/layout/page.ejs | 7 + themes/coo/layout/post.ejs | 8 + themes/coo/scripts/donation.js | 44 ++ themes/coo/scripts/share.js | 3 +- themes/coo/source/css/components/code.css | 10 +- .../coo/source/css/components/layout_list.css | 14 +- .../coo/source/css/components/layout_note.css | 6 +- .../source/css/components/layout_table.css | 4 +- themes/coo/source/css/components/navbar.css | 489 ++++++++++++++++++ .../coo/source/css/components/pagination.css | 6 +- themes/coo/source/css/components/search.css | 52 +- .../source/css/components/social-buttons.css | 198 +++++++ themes/coo/source/css/components/toc.css | 62 +-- themes/coo/source/css/style.tailwindcss | 63 ++- themes/coo/source/js/main.js | 274 +++++++++- 58 files changed, 2008 insertions(+), 229 deletions(-) create mode 100644 source/assets/icon/chevron-down.svg create mode 100644 source/assets/icon/coffee.svg create mode 100644 source/assets/icon/copy.svg create mode 100644 source/assets/icon/dorefer.png create mode 100644 source/assets/icon/fionaai.png create mode 100644 source/assets/icon/paypal.svg create mode 100644 source/assets/icon/tableconvert.png create mode 100644 source/assets/icon/x.svg create mode 100644 source/support/index.md create mode 100644 themes/coo/layout/_partial/buttons/buy-coffee.ejs create mode 100644 themes/coo/layout/_partial/buttons/follow-x.ejs create mode 100644 themes/coo/layout/_partial/buttons/github-contribute.ejs create mode 100644 themes/coo/layout/_partial/buttons/github-star.ejs create mode 100644 themes/coo/layout/_partial/index/hero-content.ejs create mode 100644 themes/coo/layout/_partial/social-buttons.ejs create mode 100644 themes/coo/scripts/donation.js create mode 100644 themes/coo/source/css/components/navbar.css create mode 100644 themes/coo/source/css/components/social-buttons.css diff --git a/.stylelintrc.js b/.stylelintrc.js index acff9ee..514a545 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -8,8 +8,33 @@ module.exports = { ignoreAtRules: ['tailwind', 'apply', 'variants', 'responsive', 'screen', 'layer'] } ], + // Disable @apply deprecation warning, as this is a Tailwind CSS feature + 'at-rule-no-deprecated': null, + // Allow duplicate selectors, as this is common in generated CSS 'no-descending-specificity': null, - 'selector-class-pattern': null // Allow camelCase class names + 'no-duplicate-selectors': null, + // Allow camelCase class names + 'selector-class-pattern': null, + // Allow camelCase ID selectors + 'selector-id-pattern': null, + // Allow unknown properties (Tailwind generated CSS variables) + 'property-no-unknown': null, + // Allow unknown type selectors (custom elements) + 'selector-type-no-unknown': null, + // Allow unknown declaration values + 'declaration-property-value-no-unknown': null, + // Allow duplicate custom properties + 'declaration-block-no-duplicate-custom-properties': null, + // Allow multiple declarations on single line + 'declaration-block-single-line-max-declarations': null, + // Allow decimal precision + 'number-max-precision': null, + // Allow unknown media feature values + 'media-feature-name-value-no-unknown': null, + // Allow non-kebab-case keyframe names + 'keyframes-name-pattern': null, + // Allow empty source files + 'no-empty-source': null }, ignoreFiles: [ 'node_modules/**/*', diff --git a/README.md b/README.md index 1af2be8..8809407 100644 --- a/README.md +++ b/README.md @@ -383,7 +383,7 @@ file should include a front matter section with the following format: title: CheatSheets date: 2020-11-25 18:28:43 icon: icon-style -background: bg-emerald-600 +background: bg-indigo-600 tags: categories: - Other diff --git a/package.json b/package.json index 7cdce6c..847b17f 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "hexo-browsersync": "^0.3.0", "hexo-excerpt": "^1.3.1", "hexo-filter-nofollow": "^2.0.2", + "hexo-fs": "^5.0.0", "hexo-generator-index": "^4.0.0", "hexo-generator-sitemap": "^3.0.1", "hexo-log": "^4.1.0", @@ -52,6 +53,8 @@ "hexo-renderer-markdown-it": "^5.0.0", "hexo-renderer-stylus": "^3.0.1", "hexo-server": "^3.0.0", + "hexo-util": "^3.3.0", + "highlight.js": "^11.11.1", "markdown-it-abbr": "^2.0.0", "markdown-it-anchor": "^9.2.0", "markdown-it-attrs": "^4.3.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9277f35..7f57be4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,6 +47,9 @@ importers: hexo-filter-nofollow: specifier: ^2.0.2 version: 2.0.2 + hexo-fs: + specifier: ^5.0.0 + version: 5.0.0 hexo-generator-index: specifier: ^4.0.0 version: 4.0.0 @@ -74,6 +77,12 @@ importers: hexo-server: specifier: ^3.0.0 version: 3.0.0 + hexo-util: + specifier: ^3.3.0 + version: 3.3.0 + highlight.js: + specifier: ^11.11.1 + version: 11.11.1 markdown-it-abbr: specifier: ^2.0.0 version: 2.0.0 @@ -988,6 +997,10 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + class-utils@0.3.6: resolution: {integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==} engines: {node: '>=0.10.0'} @@ -2292,6 +2305,10 @@ packages: resolution: {integrity: sha512-Q92zQ5PlVDouvSWFLXQoFSTLIUIODikUJs2BfAXQglyOEjN1dOQn1Z5Nimk/7GHof17R5h/uObCQLnZAjzI2tg==} engines: {node: '>=14'} + hexo-fs@5.0.0: + resolution: {integrity: sha512-oBkg1QgXyb4JxipaH+yCV/7E7XOUASTK6x1pocWvLw6U2mB6VfLENgYg61ft9Qn6JCiKSzs7FU4vyTUy6gIPvQ==} + engines: {node: '>=18'} + hexo-generator-index@4.0.0: resolution: {integrity: sha512-KeM7mOCKWINGFAk1E+CkjMMgqFIv8oaRbGxR7ipkQAp44o4aopkVftma4sdIplOq9WQEWfVYDUK5gEv9J3nzUg==} engines: {node: '>=18'} @@ -4142,6 +4159,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + rechoir@0.8.0: resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==} engines: {node: '>= 10.13.0'} @@ -6032,6 +6053,10 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + class-utils@0.3.6: dependencies: arr-union: 3.1.0 @@ -7547,6 +7572,13 @@ snapshots: graceful-fs: 4.2.11 hexo-util: 3.3.0 + hexo-fs@5.0.0: + dependencies: + bluebird: 3.7.2 + chokidar: 4.0.3 + graceful-fs: 4.2.11 + hexo-util: 3.3.0 + hexo-generator-index@4.0.0: dependencies: hexo-pagination: 3.0.0 @@ -9410,6 +9442,8 @@ snapshots: dependencies: picomatch: 2.3.1 + readdirp@4.1.2: {} + rechoir@0.8.0: dependencies: resolve: 1.22.10 diff --git a/source/_posts/aspect-ratio.md b/source/_posts/aspect-ratio.md index d6114df..fa2e323 100644 --- a/source/_posts/aspect-ratio.md +++ b/source/_posts/aspect-ratio.md @@ -1,7 +1,7 @@ --- title: Aspect Ratio date: 2022-09-21 10:28:43 -background: bg-emerald-600 +background: bg-indigo-600 tags: - photo - image diff --git a/source/_posts/chmod.md b/source/_posts/chmod.md index ded1f48..0917565 100644 --- a/source/_posts/chmod.md +++ b/source/_posts/chmod.md @@ -1,7 +1,7 @@ --- title: Chmod date: 2021-07-01 10:51:44 -background: bg-emerald-600 +background: bg-indigo-600 tags: - permission categories: diff --git a/source/_posts/fastapi.md b/source/_posts/fastapi.md index 832b0ab..f9ce713 100644 --- a/source/_posts/fastapi.md +++ b/source/_posts/fastapi.md @@ -1,7 +1,7 @@ --- title: FastAPI date: 2025-06-07 18:40:00 -background: bg-[#059669] +background: bg-[#3730a3] tags: - web - python diff --git a/source/_posts/grep.md b/source/_posts/grep.md index 3cad8f7..da43000 100644 --- a/source/_posts/grep.md +++ b/source/_posts/grep.md @@ -1,7 +1,7 @@ --- title: Grep date: 2020-11-25 18:28:43 -background: bg-emerald-400 +background: bg-indigo-400 tags: - egrep - search diff --git a/source/_posts/openssl.md b/source/_posts/openssl.md index 01632c8..be590d7 100644 --- a/source/_posts/openssl.md +++ b/source/_posts/openssl.md @@ -2,7 +2,7 @@ title: OpenSSL date: 2020-11-25 18:28:43 icon: icon-style -background: bg-emerald-600 +background: bg-indigo-600 tags: categories: - Linux Command diff --git a/source/_posts/phpstorm.md b/source/_posts/phpstorm.md index 32db796..8f555d3 100644 --- a/source/_posts/phpstorm.md +++ b/source/_posts/phpstorm.md @@ -1,7 +1,7 @@ --- title: PhpStorm date: 2022-11-23 16:23:31.703719 -background: bg-gradient-to-r from-[#be4fe9] to-[#715bef] hover:from-emerald-400 hover:to-blue-500 +background: bg-gradient-to-r from-[#be4fe9] to-[#715bef] hover:from-indigo-400 hover:to-blue-500 label: tags: - jetbrains diff --git a/source/_posts/screen.md b/source/_posts/screen.md index ac83ba6..e7f2e86 100644 --- a/source/_posts/screen.md +++ b/source/_posts/screen.md @@ -1,7 +1,7 @@ --- title: Screen date: 2021-01-02 20:03:55 -background: bg-emerald-500 +background: bg-indigo-500 tags: - terminal - session diff --git a/source/_posts/tmux.md b/source/_posts/tmux.md index cae3ae6..eebdbd7 100644 --- a/source/_posts/tmux.md +++ b/source/_posts/tmux.md @@ -1,7 +1,7 @@ --- title: Tmux date: 2021-02-20 14:31:24 -background: bg-emerald-600 +background: bg-indigo-600 tags: - utility - terminal diff --git a/source/_posts/webstorm.md b/source/_posts/webstorm.md index 9301e8d..cbc7b34 100644 --- a/source/_posts/webstorm.md +++ b/source/_posts/webstorm.md @@ -1,7 +1,7 @@ --- title: WebStorm date: 2020-12-17 21:51:44 -background: bg-gradient-to-r from-emerald-300 to-blue-400 hover:from-emerald-400 hover:to-blue-500 +background: bg-gradient-to-r from-indigo-300 to-blue-400 hover:from-indigo-400 hover:to-blue-500 tags: - jetbrains - web diff --git a/source/assets/icon/chevron-down.svg b/source/assets/icon/chevron-down.svg new file mode 100644 index 0000000..2564d78 --- /dev/null +++ b/source/assets/icon/chevron-down.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/assets/icon/coffee.svg b/source/assets/icon/coffee.svg new file mode 100644 index 0000000..a11de54 --- /dev/null +++ b/source/assets/icon/coffee.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/source/assets/icon/copy.svg b/source/assets/icon/copy.svg new file mode 100644 index 0000000..a5bcecd --- /dev/null +++ b/source/assets/icon/copy.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/assets/icon/dorefer.png b/source/assets/icon/dorefer.png new file mode 100644 index 0000000000000000000000000000000000000000..469ca78d7373ac86aceec63ea05daa634c6741c8 GIT binary patch literal 4655 zcmYLMYdDl^)PCM~-Wg+tF^&zwXviRp9FpTJltVEol|wa-q2v%7p?TR3Nisz?rHm4G z3E3(Y8B|niPZBz5CLOd@rj&%tH+?_8@4D7?-S@rLy4UmkTF>@^tMI}G9ECLh@P_OvkrR2AP` zv^;;qG1zJ$`qbO)I>m2}U%EJ0A*Lh-T|Us56R^`jLCNdT0gs|#HO<~lt!HW?gZ^G> zGvP-jet>X|=FU;n_K} zYk&7WjQ1QZ&4{go{Dsmo2Fyuz+OVUK*y z#AHL+`h%>QeOok+{$VrN)ths|dXiQ(eAJh*+~wi@b%Rj_@BW1i90qG&u3RCwVraI% zj7wJjR+}BRO~J!rtK|w$k6pCI{s0y6tVK}4EO|tKu_t9znrFIEO5Q47u&6py|6PGR z{J1pe8+VCW^ao>y0j|d08)uCUS4howtQ;IqkoMwMYoR?U-}ooG$u>>~J&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C^Ul`+vy^XY%+vgBLu~y+UHY^X%+Z%C+~sus>n953wfL4fhrfLkChMPkb|6 zo03y!?{A1{2r1@GI11_wZ%PuK&?W*i+Ej31wMv}aeB159y6nBh34KrS%9qqtJ`t`D z_3HflR;(MBuCd!kZZ+Md224l!QNspy%P^b-5_v*Dpz_cNn)Cj#{T z4gGbpA=T=I@BrVzt;|22zr?gEnwqdX-`y1YYkzcI^Yfm~*Rx&-|KK_33=MkdCozWD zN9{T-Nhb()0ag$@n=eQ1$XVw73=z2tf)1%IGZtm~5CSg{aWz&H?b?wp`` zc)K`ozcu!V@G9DG^eE-T;C$lxcMY|#fm~GkSw;P=!f4%$^+Bt(|4ea-s35bR&CmZY-T=` zy)utu?N?G%x_hCxx8`N6az*$iPu`$deu4NgpvcHlb@XfqL*sTv-dP7@ckAiBU;0mI zCdNE0Sa#m#^<ctMGrqY(=h3Q3m0Yvy{xuV{x7XwXt_{O8R3Boh7dx zt@=pm_&av+;C$+a@ZP{~m*WpA{u`9WC7udRpFP%-ytlh)#WPCEQeh4YM78CSjQZqXXx1_Hlbc1i_XW8}xULL;gO=~zg{{!>T B^CJKN literal 0 HcmV?d00001 diff --git a/source/assets/icon/fionaai.png b/source/assets/icon/fionaai.png new file mode 100644 index 0000000000000000000000000000000000000000..bdeda7963a66c40bd6f0602e8beb2c11cea04ec7 GIT binary patch literal 2363 zcmV-B3B>k^P)sj6DSlc8K?nxf)N*?DY66)4a z+~QT+ITz&1N!o8L)+Q43>sa1gQM8;8fdeDdj^O?595EAQ9?aB)ce?b}i|> zMc(IC+&voamOAFQMB&*|;9e!`gfr)7D(JXI;J!uS&rjapRNtmQsj9GR^RDY-s@Q3 z{{8;qRNh7#@i!Or{{Q_j6!T3V?l~CqP$BP#H0Xme={y6d{Z%6FZ!7GgKjy1J<<(H& z*HGV%HtCf)=Eh3ny+`8SRNvuK-(x53cP{K^C+vnZ>Wnt&ra$JdLglkVF=E9+F;?TnD_G3^zXs($d2%}itnLc?$?{` zoKx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KbP_&G65y})P#!A3M#yjQ9YM%)Q`?k-Qji~si49g9q$U{ zPkw934Alxf(n>Jlnam03ve*PvSAaBEP~n$B2 z6YiXpxPbF)hUy^T*eaNC)4&I80KvnH0Tw_~L%{@9tjqz# zti%Fa0Cb@W2Jlhv2q~Mf(71n|)_l2ye_o7>>M}0hpjpL4P~F@n7ifhpE%Vy7YhTWugufim&aNlqOZg&9z(meo zoh0Rbulzpqc7*FLJjcCGk4e5!TPToXAkf3aPsuwuZ(>h^A|;=G@$zlBzkh`5s$E+a z;c+$$>MaUN@|@ME)w#L3q48{n0%0{0NPWR{qMfui3j5%d2lGoj%r78#fv^RHuJr^n zu`Zk^uoo5pFac4)6}6#RN5OpTisV~^28}PFMDWK0@o+1_Qmk$B1bZepfS@Nr3kzS* zIx(~aAqomXEy@Wzsc2J$u0e$bEp##@#JgLY@&b3t+cYm>B4{1@)+k5z&L6Atb~d(! hA=Pc{idhTh@*AsK`m`8+fYAT|002ovPDHLkV1j`@%_aZ< literal 0 HcmV?d00001 diff --git a/source/assets/icon/paypal.svg b/source/assets/icon/paypal.svg new file mode 100644 index 0000000..49700ef --- /dev/null +++ b/source/assets/icon/paypal.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/assets/icon/tableconvert.png b/source/assets/icon/tableconvert.png new file mode 100644 index 0000000000000000000000000000000000000000..78901f5580dac47a5380e5645d9cedf2598eb624 GIT binary patch literal 2460 zcmb7`c{o)2AIHa1mLg;sW$v{mSt=riD_hJ?q=-@>5jSKRDIK$r5@WI_u54Gfv|J=x z$=GG7?zLwt&5SdQNL+KzOuzfw-}8HZfBb&WbI#{{KF{~_e!V~6^PF>@li);fkdoXb z34_6;&?q}+=-SRd#YLc)9e1W21{3yi!W};fl`tL;0C=tsc~$_=D2wL`@X&N9pKwi@ z#shQqw?DZ8p9u*}G{ANOKx{n60a!d1w}c0l&~aRQfJ>mxV}Q>NR3-sn;wUVr&5^>! z0}Chs#FIH#fP*G;2*4tayoiZoqR32q919)C#*^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s=r$Oay8b{zNYR zvEzvQME=OZT78eo^ZiwO3Kox`dzQM*0|#W?bq1@E0VY2UM3>YSya`?*E{B9L1~TXE z9Gimo9V!`ns$p<#$#q4UTUyhLv+g*@O^UU#W<(^qk12_QR}zzwMMYxBa4nJ1qP@8h ziAf2wo+#s9Qmi%+(G`M>@c8q67u-9KgN&FA3%l~;b%obD2^{39VC3(@l4qMxUEx^No}X(B^W6;%_r7PpZh{ZDC1y!=^f;>74^@=$ed zjhkYrH)$2oQbNOEh+WGDlVQsoWTQRFvrE_i^}J~-^J4S-&0r-LLMn)kMAk>w_SIgLE~PPQtguE?*V-|KyrhYwOQau=H`6?)ixOT;BG zHUDadgNyH5e=wCe7(TGtKn+N~lrtT@!&S%P^d6@#S#48G+ZX}1zogeu10;&eCcw-e pjx)vURu+x<-)86&oyxP_+`@ELm3zh0XyN~6p^p;mDs9e^{sO9S)WZM( literal 0 HcmV?d00001 diff --git a/source/assets/icon/x.svg b/source/assets/icon/x.svg new file mode 100644 index 0000000..2c410c9 --- /dev/null +++ b/source/assets/icon/x.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/manifest.json b/source/manifest.json index 7709856..228abe2 100644 --- a/source/manifest.json +++ b/source/manifest.json @@ -5,7 +5,7 @@ "start_url": "/", "display": "standalone", "background_color": "#ffffff", - "theme_color": "#10b981", + "theme_color": "#6366f1", "orientation": "portrait-primary", "scope": "/", "lang": "en", diff --git a/source/support/index.md b/source/support/index.md new file mode 100644 index 0000000..2285304 --- /dev/null +++ b/source/support/index.md @@ -0,0 +1,56 @@ +--- +title: Buy Me a Coffee +description: Support the development of CheatSheets.zip through various donation platforms +permalink: /support/ +background: bg-gradient-to-r from-pink-500 to-purple-600 +tags: + - support + - donation +categories: + - Other +intro: | + Thank you for considering supporting CheatSheets.zip! Your contributions help us maintain and improve this free resource for developers worldwide. +--- + +## Buy Me a Coffee + +### πŸ’– Why Support Us? + +CheatSheets.zip serves **1M+ developers** monthly with **200+ free cheat sheets**. + +We believe great developer resources should be **free forever**. Your support helps us: + +- πŸš€ Keep servers running smoothly +- ✨ Add new cheat sheets weekly +- 🎯 Improve user experience +- πŸ”₯ Maintain top-quality content + +_No ads, no paywalls, just pure developer goodness._ + +### β˜• Buy Me a Coffee + +**Fuel our coding sessions!** + +Buy us a coffee and help keep the cheat sheets coming. Perfect for one-time support or when you just want to say thanks. + +β˜• **What your coffee buys:** + +- Server uptime for thousands of developers +- Motivation to create new content +- A smile on our faces + +[Buy Me a Coffee](https://buymeacoffee.com/cheatsheets.zip) {.link-arrow} + +### 🌟 GitHub Sponsors + +**Join our amazing sponsors!** + +Support the future of free developer resources. Every contribution, big or small, makes a real difference. + +✨ **Sponsor perks:** + +- Your name in our README +- Early access to new features +- Good karma for supporting open source + +[Sponsor on GitHub](https://github.com/sponsors/Fechin) {.link-arrow} diff --git a/source/sw.js b/source/sw.js index e85bbfe..328b56d 100644 --- a/source/sw.js +++ b/source/sw.js @@ -174,14 +174,14 @@ function createOfflineResponse(pathname) { .offline-title { font-size: 1.5rem; margin-bottom: 1rem; - color: #10b981; + color: #6366f1; } .offline-message { margin-bottom: 1.5rem; line-height: 1.6; } .retry-button { - background: #10b981; + background: #6366f1; color: white; border: none; padding: 0.75rem 1.5rem; @@ -190,7 +190,7 @@ function createOfflineResponse(pathname) { font-size: 1rem; } .retry-button:hover { - background: #059669; + background: #3730a3; } diff --git a/source/widget/chmod.html b/source/widget/chmod.html index 2987f01..ce24a43 100644 --- a/source/widget/chmod.html +++ b/source/widget/chmod.html @@ -4,7 +4,7 @@
+ + +
+ + + + + + + + + + + + + + + +
+ <% if (showLabel) { %> + + <% if (variant === 'compact') { %>Coffee<% } else { %>Buy Me a Coffee<% } %> + + <% } %> +
\ No newline at end of file diff --git a/themes/coo/layout/_partial/buttons/follow-x.ejs b/themes/coo/layout/_partial/buttons/follow-x.ejs new file mode 100644 index 0000000..0dcee7e --- /dev/null +++ b/themes/coo/layout/_partial/buttons/follow-x.ejs @@ -0,0 +1,84 @@ +<% +// Follow on X button component +// variant: 'hero' | 'compact' | 'inline' +// showLabel: boolean - whether to show text label +// className: string - additional CSS class names + +const variant = locals.variant || 'inline'; +const showLabel = locals.showLabel !== false; // show label by default +const className = locals.className || ''; + +// Set styles based on variant +const buttonBaseClass = { + hero: 'group inline-flex items-center justify-center px-6 py-3 backdrop-blur-sm outline outline-1 rounded-3xl transition-all duration-300 hover:scale-105 hover:shadow-lg', + compact: 'group inline-flex items-center justify-center h-9 px-3 backdrop-blur-sm outline outline-1 rounded-3xl transition-colors duration-200', + inline: 'group inline-flex items-center justify-center h-9 px-4 backdrop-blur-sm outline outline-1 rounded-3xl transition-all duration-200 hover:scale-105', + request: 'group inline-flex items-center justify-center px-6 py-3 backdrop-blur-sm outline outline-1 rounded-3xl transition-all duration-300 hover:scale-105 hover:shadow-lg' +}[variant]; + +// X button styles - consistent background colors with GitHub button +const xClass = { + hero: 'bg-white/10 outline-white/20 text-white hover:bg-white/20', + compact: is_home() ? 'bg-white/10 outline-white/20 text-white hover:bg-white/20' : 'bg-white outline-slate-200 dark:bg-slate-800 dark:outline-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700', + inline: 'bg-white outline-slate-200 dark:bg-slate-800 dark:outline-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700', + request: 'bg-blue-600/80 outline-blue-500/50 text-white hover:bg-blue-500/90 dark:bg-blue-500/20 dark:outline-blue-400/30 dark:text-white dark:hover:bg-blue-500/30' +}[variant]; + +// Icon size and styles +const iconClass = { + hero: 'w-5 h-5 flex-shrink-0 flex items-center justify-center', + compact: 'w-4 h-4 flex-shrink-0 flex items-center justify-center', + inline: 'w-4 h-4 flex-shrink-0 flex items-center justify-center', + request: 'w-5 h-5 flex-shrink-0 flex items-center justify-center' +}[variant]; + +// Text size +const textSize = { + hero: 'font-semibold leading-none', + compact: 'text-sm font-medium leading-none', + inline: 'text-sm font-medium leading-none', + request: 'font-semibold leading-none' +}[variant]; + +// Spacing +const spacing = { + hero: 'mr-3', + compact: 'mr-2', + inline: 'mr-2', + request: 'mr-3' +}[variant]; +%> + +<% if (variant === 'request') { %> + +
+ <%- icon("x") %> +
+ <% if (showLabel) { %> + + Follow us on X + +
+ β†’ +
+ <% } %> +
+<% } else { %> + +
+ <%- icon("x") %> +
+ <% if (showLabel) { %> + + <% if (variant === 'compact') { %>Follow<% } else { %>Follow us on X<% } %> + + <% if (variant === 'hero') { %> +
+ β†’ +
+ <% } %> + <% } %> +
+<% } %> \ No newline at end of file diff --git a/themes/coo/layout/_partial/buttons/github-contribute.ejs b/themes/coo/layout/_partial/buttons/github-contribute.ejs new file mode 100644 index 0000000..5afa067 --- /dev/null +++ b/themes/coo/layout/_partial/buttons/github-contribute.ejs @@ -0,0 +1,64 @@ +<% +// GitHub Contribute button component +// variant: 'hero' | 'compact' | 'inline' | 'request' +// showLabel: boolean - whether to show text label +// className: string - additional CSS class names + +const variant = locals.variant || 'request'; +const showLabel = locals.showLabel !== false; // show label by default +const className = locals.className || ''; + +// Set styles based on variant +const buttonBaseClass = { + hero: 'group inline-flex items-center justify-center px-6 py-3 backdrop-blur-sm outline outline-1 rounded-3xl transition-all duration-300 hover:scale-105 hover:shadow-lg', + compact: 'group inline-flex items-center justify-center h-9 px-3 backdrop-blur-sm outline outline-1 rounded-3xl transition-colors duration-200', + inline: 'group inline-flex items-center justify-center h-9 px-4 backdrop-blur-sm outline outline-1 rounded-3xl transition-all duration-200 hover:scale-105', + request: 'group inline-flex items-center justify-center px-6 py-3 backdrop-blur-sm outline outline-1 rounded-3xl transition-all duration-300 hover:scale-105 hover:shadow-lg' +}[variant]; + +// GitHub button styles +const githubClass = { + hero: 'bg-white/10 outline-white/20 text-white hover:bg-white/20', + compact: is_home() ? 'bg-white/10 outline-white/20 text-white hover:bg-white/20' : 'bg-white outline-slate-200 dark:bg-slate-800 dark:outline-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700', + inline: 'bg-white outline-slate-200 dark:bg-slate-800 dark:outline-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700', + request: 'bg-slate-800/80 outline-slate-700/50 text-white hover:bg-slate-700/90 dark:bg-white/10 dark:outline-white/20 dark:text-white dark:hover:bg-white/20' +}[variant]; + +// Icon size and styles +const iconClass = { + hero: 'w-5 h-5 flex-shrink-0 flex items-center justify-center', + compact: 'w-4 h-4 flex-shrink-0 flex items-center justify-center', + inline: 'w-4 h-4 flex-shrink-0 flex items-center justify-center', + request: 'w-5 h-5 flex-shrink-0 flex items-center justify-center' +}[variant]; + +// Text size +const textSize = { + hero: 'font-semibold leading-none', + compact: 'text-sm font-medium leading-none', + inline: 'text-sm font-medium leading-none', + request: 'font-semibold leading-none' +}[variant]; + +// Spacing +const spacing = { + hero: 'mr-3', + compact: 'mr-2', + inline: 'mr-2', + request: 'mr-3' +}[variant]; +%> + + + + \ No newline at end of file diff --git a/themes/coo/layout/_partial/buttons/github-star.ejs b/themes/coo/layout/_partial/buttons/github-star.ejs new file mode 100644 index 0000000..89014f9 --- /dev/null +++ b/themes/coo/layout/_partial/buttons/github-star.ejs @@ -0,0 +1,73 @@ +<% +// GitHub Star button component +// variant: 'hero' | 'compact' | 'inline' +// showLabel: boolean - whether to show text label +// className: string - additional CSS class names + +const variant = locals.variant || 'inline'; +const showLabel = locals.showLabel !== false; // show label by default +const className = locals.className || ''; + +// Set styles based on variant +const buttonBaseClass = { + hero: 'group inline-flex items-center justify-center px-6 py-3 backdrop-blur-sm outline outline-1 rounded-3xl transition-all duration-300 hover:scale-105 hover:shadow-lg', + compact: 'group inline-flex items-center justify-center h-9 px-3 backdrop-blur-sm outline outline-1 rounded-3xl transition-colors duration-200', + inline: 'group inline-flex items-center justify-center h-9 px-4 backdrop-blur-sm outline outline-1 rounded-3xl transition-all duration-200 hover:scale-105' +}[variant]; + +// GitHub button styles +const githubClass = { + hero: 'bg-white/10 outline-white/20 text-white hover:bg-white/20', + compact: is_home() ? 'bg-white/10 outline-white/20 text-white hover:bg-white/20' : 'bg-white outline-slate-200 dark:bg-slate-800 dark:outline-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700', + inline: 'bg-white outline-slate-200 dark:bg-slate-800 dark:outline-slate-700 text-slate-700 dark:text-slate-300 hover:bg-slate-50 dark:hover:bg-slate-700' +}[variant]; + +// Icon size and styles +const iconClass = { + hero: 'w-5 h-5 flex-shrink-0 flex items-center justify-center', + compact: 'w-4 h-4 flex-shrink-0 flex items-center justify-center', + inline: 'w-4 h-4 flex-shrink-0 flex items-center justify-center' +}[variant]; + +// Text size +const textSize = { + hero: 'font-semibold leading-none', + compact: 'text-sm font-medium leading-none', + inline: 'text-sm font-medium leading-none' +}[variant]; + +// Spacing +const spacing = { + hero: 'mr-3', + compact: 'mr-2', + inline: 'mr-2' +}[variant]; +%> + + +
+ <%- icon("github") %> +
+ <% if (showLabel) { %> + + <% if (variant === 'compact') { %>Star<% } else { %>Star on GitHub<% } %> + + <% } %> + + <% if (variant === 'compact') { %> + <% if (is_home()) { %> +
+ ... +
+ <% } else { %> +
+ ... +
+ <% } %> + <% } else { %> +
+ ... +
+ <% } %> +
\ No newline at end of file diff --git a/themes/coo/layout/_partial/footer.ejs b/themes/coo/layout/_partial/footer.ejs index 7076bf9..0074184 100644 --- a/themes/coo/layout/_partial/footer.ejs +++ b/themes/coo/layout/_partial/footer.ejs @@ -1,29 +1,114 @@