diff --git a/dist/404.html b/404.html similarity index 100% rename from dist/404.html rename to 404.html diff --git a/dist/assets/css/0.styles.05d6b1d5.css b/assets/css/0.styles.05d6b1d5.css similarity index 100% rename from dist/assets/css/0.styles.05d6b1d5.css rename to assets/css/0.styles.05d6b1d5.css diff --git a/dist/assets/img/danger-dark.7b1d6aa1.svg b/assets/img/danger-dark.7b1d6aa1.svg similarity index 100% rename from dist/assets/img/danger-dark.7b1d6aa1.svg rename to assets/img/danger-dark.7b1d6aa1.svg diff --git a/dist/assets/img/danger.b143eda2.svg b/assets/img/danger.b143eda2.svg similarity index 100% rename from dist/assets/img/danger.b143eda2.svg rename to assets/img/danger.b143eda2.svg diff --git a/dist/assets/img/default-skin.b257fa9c.svg b/assets/img/default-skin.b257fa9c.svg similarity index 100% rename from dist/assets/img/default-skin.b257fa9c.svg rename to assets/img/default-skin.b257fa9c.svg diff --git a/dist/assets/img/info-dark.f8a43cf6.svg b/assets/img/info-dark.f8a43cf6.svg similarity index 100% rename from dist/assets/img/info-dark.f8a43cf6.svg rename to assets/img/info-dark.f8a43cf6.svg diff --git a/dist/assets/img/info.88826912.svg b/assets/img/info.88826912.svg similarity index 100% rename from dist/assets/img/info.88826912.svg rename to assets/img/info.88826912.svg diff --git a/dist/assets/img/landscape.58bdb6b2.png b/assets/img/landscape.58bdb6b2.png similarity index 100% rename from dist/assets/img/landscape.58bdb6b2.png rename to assets/img/landscape.58bdb6b2.png diff --git a/dist/assets/img/search.83621669.svg b/assets/img/search.83621669.svg similarity index 100% rename from dist/assets/img/search.83621669.svg rename to assets/img/search.83621669.svg diff --git a/dist/assets/img/superchain-diag.96e9f28f.png b/assets/img/superchain-diag.96e9f28f.png similarity index 100% rename from dist/assets/img/superchain-diag.96e9f28f.png rename to assets/img/superchain-diag.96e9f28f.png diff --git a/dist/assets/img/tip-dark.075a244c.svg b/assets/img/tip-dark.075a244c.svg similarity index 100% rename from dist/assets/img/tip-dark.075a244c.svg rename to assets/img/tip-dark.075a244c.svg diff --git a/dist/assets/img/tip.a2b80aa5.svg b/assets/img/tip.a2b80aa5.svg similarity index 100% rename from dist/assets/img/tip.a2b80aa5.svg rename to assets/img/tip.a2b80aa5.svg diff --git a/dist/assets/img/warning-dark.aac7e30c.svg b/assets/img/warning-dark.aac7e30c.svg similarity index 100% rename from dist/assets/img/warning-dark.aac7e30c.svg rename to assets/img/warning-dark.aac7e30c.svg diff --git a/dist/assets/img/warning.ec428b6d.svg b/assets/img/warning.ec428b6d.svg similarity index 100% rename from dist/assets/img/warning.ec428b6d.svg rename to assets/img/warning.ec428b6d.svg diff --git a/dist/assets/js/41.f0f3702e.js b/assets/js/41.f0f3702e.js similarity index 100% rename from dist/assets/js/41.f0f3702e.js rename to assets/js/41.f0f3702e.js diff --git a/dist/assets/js/app.a10c3567.js b/assets/js/app.a10c3567.js similarity index 100% rename from dist/assets/js/app.a10c3567.js rename to assets/js/app.a10c3567.js diff --git a/dist/assets/js/layout-Blog.a994568e.js b/assets/js/layout-Blog.a994568e.js similarity index 100% rename from dist/assets/js/layout-Blog.a994568e.js rename to assets/js/layout-Blog.a994568e.js diff --git a/dist/assets/js/layout-Blog~layout-Layout~layout-NotFound.3f9ea462.js b/assets/js/layout-Blog~layout-Layout~layout-NotFound.3f9ea462.js similarity index 100% rename from dist/assets/js/layout-Blog~layout-Layout~layout-NotFound.3f9ea462.js rename to assets/js/layout-Blog~layout-Layout~layout-NotFound.3f9ea462.js diff --git a/dist/assets/js/layout-Layout.203bc08b.js b/assets/js/layout-Layout.203bc08b.js similarity index 100% rename from dist/assets/js/layout-Layout.203bc08b.js rename to assets/js/layout-Layout.203bc08b.js diff --git a/dist/assets/js/layout-NotFound.1ba9c6f7.js b/assets/js/layout-NotFound.1ba9c6f7.js similarity index 100% rename from dist/assets/js/layout-NotFound.1ba9c6f7.js rename to assets/js/layout-NotFound.1ba9c6f7.js diff --git a/dist/assets/js/layout-Slide.84c3cb7a.js b/assets/js/layout-Slide.84c3cb7a.js similarity index 100% rename from dist/assets/js/layout-Slide.84c3cb7a.js rename to assets/js/layout-Slide.84c3cb7a.js diff --git a/dist/assets/js/page-BedrockExplainer.94d12776.js b/assets/js/page-BedrockExplainer.94d12776.js similarity index 100% rename from dist/assets/js/page-BedrockExplainer.94d12776.js rename to assets/js/page-BedrockExplainer.94d12776.js diff --git "a/dist/assets/js/page-Bedrock\344\270\216L1\344\273\245\345\244\252\345\235\212\344\271\213\351\227\264\347\232\204\345\267\256\345\274\202.8cd91997.js" "b/assets/js/page-Bedrock\344\270\216L1\344\273\245\345\244\252\345\235\212\344\271\213\351\227\264\347\232\204\345\267\256\345\274\202.8cd91997.js" similarity index 100% rename from "dist/assets/js/page-Bedrock\344\270\216L1\344\273\245\345\244\252\345\235\212\344\271\213\351\227\264\347\232\204\345\267\256\345\274\202.8cd91997.js" rename to "assets/js/page-Bedrock\344\270\216L1\344\273\245\345\244\252\345\235\212\344\271\213\351\227\264\347\232\204\345\267\256\345\274\202.8cd91997.js" diff --git a/dist/assets/js/page-OPStackDocs.59efd7a5.js b/assets/js/page-OPStackDocs.59efd7a5.js similarity index 100% rename from dist/assets/js/page-OPStackDocs.59efd7a5.js rename to assets/js/page-OPStackDocs.59efd7a5.js diff --git "a/dist/assets/js/page-OPStackHacks\347\256\200\344\273\213.f30301fb.js" "b/assets/js/page-OPStackHacks\347\256\200\344\273\213.f30301fb.js" similarity index 100% rename from "dist/assets/js/page-OPStackHacks\347\256\200\344\273\213.f30301fb.js" rename to "assets/js/page-OPStackHacks\347\256\200\344\273\213.f30301fb.js" diff --git "a/dist/assets/js/page-OPStack\344\273\243\347\240\201\345\272\223V1-Bedrock.3aa1884a.js" "b/assets/js/page-OPStack\344\273\243\347\240\201\345\272\223V1-Bedrock.3aa1884a.js" similarity index 100% rename from "dist/assets/js/page-OPStack\344\273\243\347\240\201\345\272\223V1-Bedrock.3aa1884a.js" rename to "assets/js/page-OPStack\344\273\243\347\240\201\345\272\223V1-Bedrock.3aa1884a.js" diff --git "a/dist/assets/js/page-OPStack\345\205\250\350\262\214.61392c30.js" "b/assets/js/page-OPStack\345\205\250\350\262\214.61392c30.js" similarity index 100% rename from "dist/assets/js/page-OPStack\345\205\250\350\262\214.61392c30.js" rename to "assets/js/page-OPStack\345\205\250\350\262\214.61392c30.js" diff --git "a/dist/assets/js/page-Rollup\346\223\215\344\275\234.0d703b3b.js" "b/assets/js/page-Rollup\346\223\215\344\275\234.0d703b3b.js" similarity index 100% rename from "dist/assets/js/page-Rollup\346\223\215\344\275\234.0d703b3b.js" rename to "assets/js/page-Rollup\346\223\215\344\275\234.0d703b3b.js" diff --git "a/dist/assets/js/page-Superchain\350\247\243\351\207\212\345\231\250.89242b1c.js" "b/assets/js/page-Superchain\350\247\243\351\207\212\345\231\250.89242b1c.js" similarity index 100% rename from "dist/assets/js/page-Superchain\350\247\243\351\207\212\345\231\250.89242b1c.js" rename to "assets/js/page-Superchain\350\247\243\351\207\212\345\231\250.89242b1c.js" diff --git a/dist/assets/js/page-WelcometotheOPStack.b8bd9ef7.js b/assets/js/page-WelcometotheOPStack.b8bd9ef7.js similarity index 100% rename from dist/assets/js/page-WelcometotheOPStack.b8bd9ef7.js rename to assets/js/page-WelcometotheOPStack.b8bd9ef7.js diff --git "a/dist/assets/js/page-\344\270\272\346\234\211\347\224\250\350\275\257\344\273\266\350\200\214\350\256\276\350\256\241\347\232\204\345\216\237\345\210\231.2fc5fb96.js" "b/assets/js/page-\344\270\272\346\234\211\347\224\250\350\275\257\344\273\266\350\200\214\350\256\276\350\256\241\347\232\204\345\216\237\345\210\231.2fc5fb96.js" similarity index 100% rename from "dist/assets/js/page-\344\270\272\346\234\211\347\224\250\350\275\257\344\273\266\350\200\214\350\256\276\350\256\241\347\232\204\345\216\237\345\210\231.2fc5fb96.js" rename to "assets/js/page-\344\270\272\346\234\211\347\224\250\350\275\257\344\273\266\350\200\214\350\256\276\350\256\241\347\232\204\345\216\237\345\210\231.2fc5fb96.js" diff --git "a/dist/assets/js/page-\344\273\216OPStack\345\214\272\345\235\227\351\223\276\344\270\255\345\274\272\345\210\266\346\217\220\345\217\226\350\265\204\344\272\247.9051bd64.js" "b/assets/js/page-\344\273\216OPStack\345\214\272\345\235\227\351\223\276\344\270\255\345\274\272\345\210\266\346\217\220\345\217\226\350\265\204\344\272\247.9051bd64.js" similarity index 100% rename from "dist/assets/js/page-\344\273\216OPStack\345\214\272\345\235\227\351\223\276\344\270\255\345\274\272\345\210\266\346\217\220\345\217\226\350\265\204\344\272\247.9051bd64.js" rename to "assets/js/page-\344\273\216OPStack\345\214\272\345\235\227\351\223\276\344\270\255\345\274\272\345\210\266\346\217\220\345\217\226\350\265\204\344\272\247.9051bd64.js" diff --git "a/dist/assets/js/page-\344\275\277\347\224\250OPStackClientSDK.b54e1490.js" "b/assets/js/page-\344\275\277\347\224\250OPStackClientSDK.b54e1490.js" similarity index 100% rename from "dist/assets/js/page-\344\275\277\347\224\250OPStackClientSDK.b54e1490.js" rename to "assets/js/page-\344\275\277\347\224\250OPStackClientSDK.b54e1490.js" diff --git "a/dist/assets/js/page-\344\275\277\347\224\250OPStack\350\277\233\350\241\214\346\236\204\345\273\272.bdc6fc4a.js" "b/assets/js/page-\344\275\277\347\224\250OPStack\350\277\233\350\241\214\346\236\204\345\273\272.bdc6fc4a.js" similarity index 100% rename from "dist/assets/js/page-\344\275\277\347\224\250OPStack\350\277\233\350\241\214\346\236\204\345\273\272.bdc6fc4a.js" rename to "assets/js/page-\344\275\277\347\224\250OPStack\350\277\233\350\241\214\346\236\204\345\273\272.bdc6fc4a.js" diff --git "a/dist/assets/js/page-\344\277\256\346\224\271\351\242\204\351\203\250\347\275\262\345\220\210\347\272\246.c797a1aa.js" "b/assets/js/page-\344\277\256\346\224\271\351\242\204\351\203\250\347\275\262\345\220\210\347\272\246.c797a1aa.js" similarity index 100% rename from "dist/assets/js/page-\344\277\256\346\224\271\351\242\204\351\203\250\347\275\262\345\220\210\347\272\246.c797a1aa.js" rename to "assets/js/page-\344\277\256\346\224\271\351\242\204\351\203\250\347\275\262\345\220\210\347\272\246.c797a1aa.js" diff --git "a/dist/assets/js/page-\345\214\272\345\235\227\346\265\217\350\247\210\345\231\250\345\222\214\347\264\242\345\274\225\345\231\250.c803de8a.js" "b/assets/js/page-\345\214\272\345\235\227\346\265\217\350\247\210\345\231\250\345\222\214\347\264\242\345\274\225\345\231\250.c803de8a.js" similarity index 100% rename from "dist/assets/js/page-\345\214\272\345\235\227\346\265\217\350\247\210\345\231\250\345\222\214\347\264\242\345\274\225\345\231\250.c803de8a.js" rename to "assets/js/page-\345\214\272\345\235\227\346\265\217\350\247\210\345\231\250\345\222\214\347\264\242\345\274\225\345\231\250.c803de8a.js" diff --git "a/dist/assets/js/page-\345\217\221\345\270\203\345\216\206\345\217\262.69ab2491.js" "b/assets/js/page-\345\217\221\345\270\203\345\216\206\345\217\262.69ab2491.js" similarity index 100% rename from "dist/assets/js/page-\345\217\221\345\270\203\345\216\206\345\217\262.69ab2491.js" rename to "assets/js/page-\345\217\221\345\270\203\345\216\206\345\217\262.69ab2491.js" diff --git "a/dist/assets/js/page-\345\220\221\346\264\276\347\224\237\345\207\275\346\225\260\346\267\273\345\212\240\345\261\236\346\200\247.96209ab2.js" "b/assets/js/page-\345\220\221\346\264\276\347\224\237\345\207\275\346\225\260\346\267\273\345\212\240\345\261\236\346\200\247.96209ab2.js" similarity index 100% rename from "dist/assets/js/page-\345\220\221\346\264\276\347\224\237\345\207\275\346\225\260\346\267\273\345\212\240\345\261\236\346\200\247.96209ab2.js" rename to "assets/js/page-\345\220\221\346\264\276\347\224\237\345\207\275\346\225\260\346\267\273\345\212\240\345\261\236\346\200\247.96209ab2.js" diff --git "a/dist/assets/js/page-\345\256\211\345\205\250\347\255\226\347\225\245\343\200\201\346\274\217\346\264\236\346\212\245\345\221\212\345\222\214\350\265\217\351\207\221\350\256\241\345\210\222.41700a4f.js" "b/assets/js/page-\345\256\211\345\205\250\347\255\226\347\225\245\343\200\201\346\274\217\346\264\236\346\212\245\345\221\212\345\222\214\350\265\217\351\207\221\350\256\241\345\210\222.41700a4f.js" similarity index 100% rename from "dist/assets/js/page-\345\256\211\345\205\250\347\255\226\347\225\245\343\200\201\346\274\217\346\264\236\346\212\245\345\221\212\345\222\214\350\265\217\351\207\221\350\256\241\345\210\222.41700a4f.js" rename to "assets/js/page-\345\256\211\345\205\250\347\255\226\347\225\245\343\200\201\346\274\217\346\264\236\346\212\245\345\221\212\345\222\214\350\265\217\351\207\221\350\256\241\345\210\222.41700a4f.js" diff --git "a/dist/assets/js/page-\345\270\270\350\247\201\345\256\211\345\205\250\351\227\256\351\242\230.4686caaa.js" "b/assets/js/page-\345\270\270\350\247\201\345\256\211\345\205\250\351\227\256\351\242\230.4686caaa.js" similarity index 100% rename from "dist/assets/js/page-\345\270\270\350\247\201\345\256\211\345\205\250\351\227\256\351\242\230.4686caaa.js" rename to "assets/js/page-\345\270\270\350\247\201\345\256\211\345\205\250\351\227\256\351\242\230.4686caaa.js" diff --git "a/dist/assets/js/page-\345\270\270\350\247\201\347\232\204\345\256\211\345\205\250\351\227\256\351\242\230.12aaeb7b.js" "b/assets/js/page-\345\270\270\350\247\201\347\232\204\345\256\211\345\205\250\351\227\256\351\242\230.12aaeb7b.js" similarity index 100% rename from "dist/assets/js/page-\345\270\270\350\247\201\347\232\204\345\256\211\345\205\250\351\227\256\351\242\230.12aaeb7b.js" rename to "assets/js/page-\345\270\270\350\247\201\347\232\204\345\256\211\345\205\250\351\227\256\351\242\230.12aaeb7b.js" diff --git "a/dist/assets/js/page-\345\277\253\351\200\237\345\274\200\345\247\213.4118c74c.js" "b/assets/js/page-\345\277\253\351\200\237\345\274\200\345\247\213.4118c74c.js" similarity index 100% rename from "dist/assets/js/page-\345\277\253\351\200\237\345\274\200\345\247\213.4118c74c.js" rename to "assets/js/page-\345\277\253\351\200\237\345\274\200\345\247\213.4118c74c.js" diff --git "a/dist/assets/js/page-\346\211\247\350\241\214\346\212\200\345\267\247.afc3d4ed.js" "b/assets/js/page-\346\211\247\350\241\214\346\212\200\345\267\247.afc3d4ed.js" similarity index 100% rename from "dist/assets/js/page-\346\211\247\350\241\214\346\212\200\345\267\247.afc3d4ed.js" rename to "assets/js/page-\346\211\247\350\241\214\346\212\200\345\267\247.afc3d4ed.js" diff --git "a/dist/assets/js/page-\346\225\260\346\215\256\345\217\257\347\224\250\346\200\247\346\212\200\345\267\247.be17871a.js" "b/assets/js/page-\346\225\260\346\215\256\345\217\257\347\224\250\346\200\247\346\212\200\345\267\247.be17871a.js" similarity index 100% rename from "dist/assets/js/page-\346\225\260\346\215\256\345\217\257\347\224\250\346\200\247\346\212\200\345\267\247.be17871a.js" rename to "assets/js/page-\346\225\260\346\215\256\345\217\257\347\224\250\346\200\247\346\212\200\345\267\247.be17871a.js" diff --git "a/dist/assets/js/page-\346\232\202\345\201\234\345\222\214\346\201\242\345\244\215\346\241\245\346\216\245.cd2944e7.js" "b/assets/js/page-\346\232\202\345\201\234\345\222\214\346\201\242\345\244\215\346\241\245\346\216\245.cd2944e7.js" similarity index 100% rename from "dist/assets/js/page-\346\232\202\345\201\234\345\222\214\346\201\242\345\244\215\346\241\245\346\216\245.cd2944e7.js" rename to "assets/js/page-\346\232\202\345\201\234\345\222\214\346\201\242\345\244\215\346\241\245\346\216\245.cd2944e7.js" diff --git "a/dist/assets/js/page-\346\267\273\345\212\240\344\270\200\344\270\252\351\242\204\347\274\226\350\257\221\345\220\210\347\272\246.8a6381b1.js" "b/assets/js/page-\346\267\273\345\212\240\344\270\200\344\270\252\351\242\204\347\274\226\350\257\221\345\220\210\347\272\246.8a6381b1.js" similarity index 100% rename from "dist/assets/js/page-\346\267\273\345\212\240\344\270\200\344\270\252\351\242\204\347\274\226\350\257\221\345\220\210\347\272\246.8a6381b1.js" rename to "assets/js/page-\346\267\273\345\212\240\344\270\200\344\270\252\351\242\204\347\274\226\350\257\221\345\220\210\347\272\246.8a6381b1.js" diff --git "a/dist/assets/js/page-\347\211\271\350\211\262\351\273\221\345\256\242\346\212\200\345\267\247.dec0ea51.js" "b/assets/js/page-\347\211\271\350\211\262\351\273\221\345\256\242\346\212\200\345\267\247.dec0ea51.js" similarity index 100% rename from "dist/assets/js/page-\347\211\271\350\211\262\351\273\221\345\256\242\346\212\200\345\267\247.dec0ea51.js" rename to "assets/js/page-\347\211\271\350\211\262\351\273\221\345\256\242\346\212\200\345\267\247.dec0ea51.js" diff --git "a/dist/assets/js/page-\347\273\223\347\256\227\345\261\202\346\212\200\345\267\247.9da9c0a8.js" "b/assets/js/page-\347\273\223\347\256\227\345\261\202\346\212\200\345\267\247.9da9c0a8.js" similarity index 100% rename from "dist/assets/js/page-\347\273\223\347\256\227\345\261\202\346\212\200\345\267\247.9da9c0a8.js" rename to "assets/js/page-\347\273\223\347\256\227\345\261\202\346\212\200\345\267\247.9da9c0a8.js" diff --git "a/dist/assets/js/page-\350\241\215\347\224\237\346\212\200\345\267\247.9334377a.js" "b/assets/js/page-\350\241\215\347\224\237\346\212\200\345\267\247.9334377a.js" similarity index 100% rename from "dist/assets/js/page-\350\241\215\347\224\237\346\212\200\345\267\247.9334377a.js" rename to "assets/js/page-\350\241\215\347\224\237\346\212\200\345\267\247.9334377a.js" diff --git "a/dist/assets/js/page-\350\264\241\347\214\256\346\214\207\345\215\227.da66b8ad.js" "b/assets/js/page-\350\264\241\347\214\256\346\214\207\345\215\227.da66b8ad.js" similarity index 100% rename from "dist/assets/js/page-\350\264\241\347\214\256\346\214\207\345\215\227.da66b8ad.js" rename to "assets/js/page-\350\264\241\347\214\256\346\214\207\345\215\227.da66b8ad.js" diff --git "a/dist/assets/js/page-\351\205\215\347\275\256.fe26aa4e.js" "b/assets/js/page-\351\205\215\347\275\256.fe26aa4e.js" similarity index 100% rename from "dist/assets/js/page-\351\205\215\347\275\256.fe26aa4e.js" rename to "assets/js/page-\351\205\215\347\275\256.fe26aa4e.js" diff --git a/dist/assets/js/vendors~docsearch.9346ec91.js b/assets/js/vendors~docsearch.9346ec91.js similarity index 100% rename from dist/assets/js/vendors~docsearch.9346ec91.js rename to assets/js/vendors~docsearch.9346ec91.js diff --git a/dist/assets/js/vendors~layout-Blog~layout-Layout~layout-NotFound.aa392ad9.js b/assets/js/vendors~layout-Blog~layout-Layout~layout-NotFound.aa392ad9.js similarity index 100% rename from dist/assets/js/vendors~layout-Blog~layout-Layout~layout-NotFound.aa392ad9.js rename to assets/js/vendors~layout-Blog~layout-Layout~layout-NotFound.aa392ad9.js diff --git a/dist/assets/js/vendors~layout-Layout.668d9695.js b/assets/js/vendors~layout-Layout.668d9695.js similarity index 100% rename from dist/assets/js/vendors~layout-Layout.668d9695.js rename to assets/js/vendors~layout-Layout.668d9695.js diff --git a/dist/assets/js/vendors~photo-swipe.b538c7ab.js b/assets/js/vendors~photo-swipe.b538c7ab.js similarity index 100% rename from dist/assets/js/vendors~photo-swipe.b538c7ab.js rename to assets/js/vendors~photo-swipe.b538c7ab.js diff --git a/dist/assets/logos/favicon.png b/assets/logos/favicon.png similarity index 100% rename from dist/assets/logos/favicon.png rename to assets/logos/favicon.png diff --git a/dist/assets/logos/header.png b/assets/logos/header.png similarity index 100% rename from dist/assets/logos/header.png rename to assets/logos/header.png diff --git a/dist/assets/logos/icon-1020x1020.png b/assets/logos/icon-1020x1020.png similarity index 100% rename from dist/assets/logos/icon-1020x1020.png rename to assets/logos/icon-1020x1020.png diff --git a/dist/assets/logos/icon-192x192.png b/assets/logos/icon-192x192.png similarity index 100% rename from dist/assets/logos/icon-192x192.png rename to assets/logos/icon-192x192.png diff --git a/dist/assets/logos/icon-256x256.png b/assets/logos/icon-256x256.png similarity index 100% rename from dist/assets/logos/icon-256x256.png rename to assets/logos/icon-256x256.png diff --git a/dist/assets/logos/icon-384x384.png b/assets/logos/icon-384x384.png similarity index 100% rename from dist/assets/logos/icon-384x384.png rename to assets/logos/icon-384x384.png diff --git a/dist/assets/logos/icon-512x512.png b/assets/logos/icon-512x512.png similarity index 100% rename from dist/assets/logos/icon-512x512.png rename to assets/logos/icon-512x512.png diff --git a/dist/assets/logos/logo.png b/assets/logos/logo.png similarity index 100% rename from dist/assets/logos/logo.png rename to assets/logos/logo.png diff --git a/dist/assets/logos/twitter-logo.png b/assets/logos/twitter-logo.png similarity index 100% rename from dist/assets/logos/twitter-logo.png rename to assets/logos/twitter-logo.png diff --git a/dist/assets/logos/twitter-superchain.png b/assets/logos/twitter-superchain.png similarity index 100% rename from dist/assets/logos/twitter-superchain.png rename to assets/logos/twitter-superchain.png diff --git a/dist/atom.xml b/atom.xml similarity index 100% rename from dist/atom.xml rename to atom.xml diff --git a/config.js b/config.js deleted file mode 100644 index 970740a..0000000 --- a/config.js +++ /dev/null @@ -1,208 +0,0 @@ -const { description } = require('../../package') -const path = require('path') - -module.exports = { - title: 'OP Stack Docs', - description: description, - head: [ - ['link', { rel: 'manifest', href: '/manifest.json' }], - ['meta', { name: 'theme-color', content: '#3eaf7c' }], - ['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }], - ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }], - ['meta', { property: 'og:image', content: 'https://stack.optimism.io/assets/logos/twitter-logo.png' }], - ['meta', { name: 'twitter:image', content: 'https://stack.optimism.io/assets/logos/twitter-logo.png' }], - ['meta', { name: 'twitter:title', content: 'OP Stack Docs' }], - ['meta', { property: 'og:title', content: 'OP Stack Docs' }], - ['meta', { name: 'twitter:card', content: 'summary' } ], - ['link', { rel: "icon", type: "image/png", sizes: "32x32", href: "/assets/logos/favicon.png"}], - ], - theme: path.resolve(__dirname, './theme'), - themeConfig: { - "twitter:card": "summary", - contributor: false, - hostname: 'https://stack.optimism.io', - logo: '/assets/logos/logo.png', - docsDir: 'src', - docsRepo: 'https://github.com/ethereum-optimism/stack-docs', - docsBranch: 'main', - lastUpdated: false, - darkmode: 'disable', - themeColor: false, - blog: false, - iconPrefix: 'far fa-', - pageInfo: false, - pwa: { - cacheHTML: false, - }, - activeHash: { - offset: -200, - }, - algolia: { - appId: 'O9WKE9RMCV', - apiKey: '00cf17cba30b374d08d7f7afead974be', - indexName: 'optimism' - }, - nav: [ - { - text: 'Home', - link: 'https://www.optimism.io/' - }, - { - text: 'OP Stack Docs', - link: '/' - }, - { - text: 'Optimism Docs', - link: 'https://community.optimism.io/' - }, - { - text: 'Governance', - link: 'https://community.optimism.io/docs/governance/' - }, - { - text: 'Community', - items: [ - { - icon: 'discord', - iconPrefix: 'fab fa-', - iconClass: 'color-discord', - text: 'Discord', - link: 'https://discord.optimism.io', - }, - { - icon: 'github', - iconPrefix: 'fab fa-', - iconClass: 'color-github', - text: 'GitHub', - link: 'https://github.com/ethereum-optimism/optimism', - }, - { - icon: 'twitter', - iconPrefix: 'fab fa-', - iconClass: 'color-twitter', - text: 'Twitter', - link: 'https://twitter.com/optimismFND', - }, - { - icon: 'twitch', - iconPrefix: 'fab fa-', - iconClass: 'color-twitch', - text: 'Twitch', - link: 'https://www.twitch.tv/optimismpbc' - }, - { - icon: 'medium', - iconPrefix: 'fab fa-', - iconClass: 'color-medium', - text: 'Blog', - link: 'https://optimismpbc.medium.com/' - }, - { - icon: 'computer-classic', - iconClass: 'color-ecosystem', - text: 'Ecosystem', - link: 'https://www.optimism.io/apps/all', - }, - { - icon: 'globe', - iconClass: 'color-optimism', - text: 'optimism.io', - link: 'https://www.optimism.io/', - } - ] - } - ], - searchPlaceholder: 'Search the docs', - sidebar: [ - { - title: "OP Stack", - collapsable: false, - children: [ - '/', - [ - '/docs/understand/design-principles.md', - '设计原则' - ], - '/docs/understand/landscape.md', - '/docs/understand/explainer.md' - ] - }, - { - title: "Releases", - collapsable: false, - children: [ - '/docs/releases/', - { - title: "Bedrock", - collapsable: true, - children: [ - '/docs/releases/bedrock/', - '/docs/releases/bedrock/explainer.md', - '/docs/releases/bedrock/differences.md' - ] - } - ] - }, - { - title: "Building OP Stack Rollups", - collapsable: false, - children: [ - '/docs/build/getting-started.md', - '/docs/build/conf.md', - '/docs/build/operations.md', - '/docs/build/explorer.md', - '/docs/build/sdk.md', - { - title: "OP Stack Hacks", - collapsable: true, - children: [ - '/docs/build/hacks.md', - '/docs/build/featured.md', - '/docs/build/data-avail.md', - '/docs/build/derivation.md', - '/docs/build/execution.md', - '/docs/build/settlement.md', - { - title: "Sample Hacks", - children: [ - "/docs/build/tutorials/add-attr.md", - "/docs/build/tutorials/new-precomp.md", - "/docs/build/tutorials/predeploys.md" - ] - } // End of tutorials - ], - }, // End of OP Stack hacks - ], - }, // End of Building OP Stack Rollups - { - title: "Contributing", - collapsable: false, - children: [ - '/docs/contribute.md', - ] - }, - { - title: "Security", - collapsable: false, - children: [ - '/docs/security/faq.md', - '/docs/security/policy.md', - '/docs/security/pause.md', - '/docs/security/forced-withdrawal.md', - ] - }, - ], // end of sidebar - plugins: [ - "@vuepress/pwa", - [ - '@vuepress/plugin-medium-zoom', - { - selector: ':not(a) > img' - } - ], - "plausible-analytics" - ] -} -} - -// module.exports.themeConfig.sidebar["/docs/useful-tools/"] = module.exports.themeConfig.sidebar["/docs/developers/"] diff --git a/dist/docs/build/conf/index.html b/docs/build/conf/index.html similarity index 100% rename from dist/docs/build/conf/index.html rename to docs/build/conf/index.html diff --git a/dist/docs/build/data-avail/index.html b/docs/build/data-avail/index.html similarity index 100% rename from dist/docs/build/data-avail/index.html rename to docs/build/data-avail/index.html diff --git a/dist/docs/build/derivation/index.html b/docs/build/derivation/index.html similarity index 100% rename from dist/docs/build/derivation/index.html rename to docs/build/derivation/index.html diff --git a/dist/docs/build/execution/index.html b/docs/build/execution/index.html similarity index 100% rename from dist/docs/build/execution/index.html rename to docs/build/execution/index.html diff --git a/dist/docs/build/explorer/index.html b/docs/build/explorer/index.html similarity index 100% rename from dist/docs/build/explorer/index.html rename to docs/build/explorer/index.html diff --git a/dist/docs/build/featured/index.html b/docs/build/featured/index.html similarity index 100% rename from dist/docs/build/featured/index.html rename to docs/build/featured/index.html diff --git a/dist/docs/build/getting-started/index.html b/docs/build/getting-started/index.html similarity index 100% rename from dist/docs/build/getting-started/index.html rename to docs/build/getting-started/index.html diff --git a/dist/docs/build/hacks/index.html b/docs/build/hacks/index.html similarity index 100% rename from dist/docs/build/hacks/index.html rename to docs/build/hacks/index.html diff --git a/dist/docs/build/index.html b/docs/build/index.html similarity index 100% rename from dist/docs/build/index.html rename to docs/build/index.html diff --git a/dist/docs/build/operations/index.html b/docs/build/operations/index.html similarity index 100% rename from dist/docs/build/operations/index.html rename to docs/build/operations/index.html diff --git a/dist/docs/build/sdk/index.html b/docs/build/sdk/index.html similarity index 100% rename from dist/docs/build/sdk/index.html rename to docs/build/sdk/index.html diff --git a/dist/docs/build/settlement/index.html b/docs/build/settlement/index.html similarity index 100% rename from dist/docs/build/settlement/index.html rename to docs/build/settlement/index.html diff --git a/dist/docs/build/tutorials/add-attr/index.html b/docs/build/tutorials/add-attr/index.html similarity index 100% rename from dist/docs/build/tutorials/add-attr/index.html rename to docs/build/tutorials/add-attr/index.html diff --git a/dist/docs/build/tutorials/new-precomp/index.html b/docs/build/tutorials/new-precomp/index.html similarity index 100% rename from dist/docs/build/tutorials/new-precomp/index.html rename to docs/build/tutorials/new-precomp/index.html diff --git a/dist/docs/build/tutorials/predeploys/index.html b/docs/build/tutorials/predeploys/index.html similarity index 100% rename from dist/docs/build/tutorials/predeploys/index.html rename to docs/build/tutorials/predeploys/index.html diff --git a/dist/docs/contribute/index.html b/docs/contribute/index.html similarity index 100% rename from dist/docs/contribute/index.html rename to docs/contribute/index.html diff --git a/dist/docs/index.html b/docs/index.html similarity index 100% rename from dist/docs/index.html rename to docs/index.html diff --git a/dist/docs/releases/bedrock/differences/index.html b/docs/releases/bedrock/differences/index.html similarity index 100% rename from dist/docs/releases/bedrock/differences/index.html rename to docs/releases/bedrock/differences/index.html diff --git a/dist/docs/releases/bedrock/explainer/index.html b/docs/releases/bedrock/explainer/index.html similarity index 100% rename from dist/docs/releases/bedrock/explainer/index.html rename to docs/releases/bedrock/explainer/index.html diff --git a/dist/docs/releases/bedrock/index.html b/docs/releases/bedrock/index.html similarity index 100% rename from dist/docs/releases/bedrock/index.html rename to docs/releases/bedrock/index.html diff --git a/dist/docs/releases/index.html b/docs/releases/index.html similarity index 100% rename from dist/docs/releases/index.html rename to docs/releases/index.html diff --git a/dist/docs/security/faq/index.html b/docs/security/faq/index.html similarity index 100% rename from dist/docs/security/faq/index.html rename to docs/security/faq/index.html diff --git a/dist/docs/security/forced-withdrawal/index.html b/docs/security/forced-withdrawal/index.html similarity index 100% rename from dist/docs/security/forced-withdrawal/index.html rename to docs/security/forced-withdrawal/index.html diff --git a/dist/docs/security/index.html b/docs/security/index.html similarity index 100% rename from dist/docs/security/index.html rename to docs/security/index.html diff --git a/dist/docs/security/pause/index.html b/docs/security/pause/index.html similarity index 100% rename from dist/docs/security/pause/index.html rename to docs/security/pause/index.html diff --git a/dist/docs/security/policy/index.html b/docs/security/policy/index.html similarity index 100% rename from dist/docs/security/policy/index.html rename to docs/security/policy/index.html diff --git a/dist/docs/understand/design-principles/index.html b/docs/understand/design-principles/index.html similarity index 100% rename from dist/docs/understand/design-principles/index.html rename to docs/understand/design-principles/index.html diff --git a/dist/docs/understand/explainer/index.html b/docs/understand/explainer/index.html similarity index 100% rename from dist/docs/understand/explainer/index.html rename to docs/understand/explainer/index.html diff --git a/dist/docs/understand/landscape/index.html b/docs/understand/landscape/index.html similarity index 100% rename from dist/docs/understand/landscape/index.html rename to docs/understand/landscape/index.html diff --git a/enhanceApp.js b/enhanceApp.js deleted file mode 100644 index 8580ae3..0000000 --- a/enhanceApp.js +++ /dev/null @@ -1,24 +0,0 @@ -import event from '@vuepress/plugin-pwa/lib/event' - -export default ({ router }) => { - registerAutoReload(); - - router.addRoutes([ - { path: '/docs/', redirect: '/' }, - ]) -} - -// When new content is detected by the app, this will automatically -// refresh the page, so that users do not need to manually click -// the refresh button. For more details see: -// https://linear.app/optimism/issue/FE-1003/investigate-archive-issue-on-docs -const registerAutoReload = () => { - event.$on('sw-updated', e => { - e.skipWaiting().then(() => - { - if (typeof location !== 'undefined') - location.reload(true); - } - ) - }) -} diff --git a/dist/feed.json b/feed.json similarity index 100% rename from dist/feed.json rename to feed.json diff --git a/dist/index.html b/index.html similarity index 100% rename from dist/index.html rename to index.html diff --git a/dist/manifest.json b/manifest.json similarity index 100% rename from dist/manifest.json rename to manifest.json diff --git a/dist/manifest.webmanifest b/manifest.webmanifest similarity index 100% rename from dist/manifest.webmanifest rename to manifest.webmanifest diff --git a/public/assets/logos/favicon.png b/public/assets/logos/favicon.png deleted file mode 100644 index 720c081..0000000 Binary files a/public/assets/logos/favicon.png and /dev/null differ diff --git a/public/assets/logos/header.png b/public/assets/logos/header.png deleted file mode 100644 index b74a60c..0000000 Binary files a/public/assets/logos/header.png and /dev/null differ diff --git a/public/assets/logos/icon-1020x1020.png b/public/assets/logos/icon-1020x1020.png deleted file mode 100644 index edfac6e..0000000 Binary files a/public/assets/logos/icon-1020x1020.png and /dev/null differ diff --git a/public/assets/logos/icon-192x192.png b/public/assets/logos/icon-192x192.png deleted file mode 100644 index 077cdc8..0000000 Binary files a/public/assets/logos/icon-192x192.png and /dev/null differ diff --git a/public/assets/logos/icon-256x256.png b/public/assets/logos/icon-256x256.png deleted file mode 100644 index 166308a..0000000 Binary files a/public/assets/logos/icon-256x256.png and /dev/null differ diff --git a/public/assets/logos/icon-384x384.png b/public/assets/logos/icon-384x384.png deleted file mode 100644 index d8c5684..0000000 Binary files a/public/assets/logos/icon-384x384.png and /dev/null differ diff --git a/public/assets/logos/icon-512x512.png b/public/assets/logos/icon-512x512.png deleted file mode 100644 index 77c3a5b..0000000 Binary files a/public/assets/logos/icon-512x512.png and /dev/null differ diff --git a/public/assets/logos/logo.png b/public/assets/logos/logo.png deleted file mode 100644 index 2765b36..0000000 Binary files a/public/assets/logos/logo.png and /dev/null differ diff --git a/public/assets/logos/twitter-logo.png b/public/assets/logos/twitter-logo.png deleted file mode 100644 index 0a88b91..0000000 Binary files a/public/assets/logos/twitter-logo.png and /dev/null differ diff --git a/public/assets/logos/twitter-superchain.png b/public/assets/logos/twitter-superchain.png deleted file mode 100644 index a2a2ac0..0000000 Binary files a/public/assets/logos/twitter-superchain.png and /dev/null differ diff --git a/public/manifest.json b/public/manifest.json deleted file mode 100644 index 9c94acd..0000000 --- a/public/manifest.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "OP Docs", - "short_name": "OP Docs", - "description": "The official OP Docs", - "icons": [ - { - "src": "/assets/logos/icon-192x192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "/assets/logos/icon-256x256.png", - "sizes": "256x256", - "type": "image/png" - }, - { - "src": "/assets/logos/icon-384x384.png", - "sizes": "384x384", - "type": "image/png" - }, - { - "src": "/assets/logos/icon-512x512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "/assets/logos/icon-1020x1020.png", - "sizes": "any", - "type": "image/png" - } - ], - "start_url": "/index.html", - "display": "standalone", - "background_color": "#ffffff", - "theme_color": "#ff0420" -} diff --git a/dist/robots.txt b/robots.txt similarity index 100% rename from dist/robots.txt rename to robots.txt diff --git a/dist/rss.xml b/rss.xml similarity index 100% rename from dist/rss.xml rename to rss.xml diff --git a/dist/service-worker.js b/service-worker.js similarity index 100% rename from dist/service-worker.js rename to service-worker.js diff --git a/dist/service-worker.js.map b/service-worker.js.map similarity index 100% rename from dist/service-worker.js.map rename to service-worker.js.map diff --git a/dist/sitemap.xml b/sitemap.xml similarity index 100% rename from dist/sitemap.xml rename to sitemap.xml diff --git a/styles/index.styl b/styles/index.styl deleted file mode 100644 index d24d368..0000000 --- a/styles/index.styl +++ /dev/null @@ -1,317 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap'); -@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,400;0,600;0,700;1,600;1,700&display=swap'); -@import 'https://pro.fontawesome.com/releases/v5.15.4/css/all.css'; - -main, body, html { - font-family: 'Open Sans', sans-serif; -} - -p { - font-size: 16px; - line-height: 24px; -} - -aside.sidebar { - background-color: #F1F4F9; - border-right: none; -} - -p.sidebar-heading { - color: #323A43 !important; - font-family: 'Open Sans', sans-serif; - font-weight: 600 !important; - font-size: 14px !important; - line-height: 24px !important; - min-height: 36px; - margin-left: 20px; - padding: 8px 16px !important; - width: calc(100% - 60px) !important; - border-radius: 8px; -} - -a.sidebar-link { - font-family: 'Open Sans', sans-serif; - font-size: 14px !important; - line-height: 24px !important; - min-height: 36px; - margin-top: 3px; - margin-left: 20px; - padding: 8px 16px !important; - width: calc(100% - 60px) !important; - border-radius: 8px; -} - -section.sidebar-group a.sidebar-link, -section.sidebar-group p.sidebar-heading.clickable { - margin-left: 32px; - width: calc(100% - 60px) !important; -} - -.sidebar-links:not(.sidebar-group-items) > li > a.sidebar-link { - font-weight: 600 !important; - color: #323A43 !important; -} - -.sidebar-links:not(.sidebar-group-items) > li > a.sidebar-link.active { - border-left-color: #F1F4F9 !important; - background-color: #FFDBDF !important; - color: #FF0420 !important; -} - -a.sidebar-link.active { - border-left-color: #F1F4F9 !important; - background-color: #FFDBDF !important; - color: #FF0420 !important; -} - -h1 { - font-size: 50px; -} - -h2 { - font-size: 40px; -} - -h3 { - font-size: 28px; -} - -h4 { - font-size: 20px; -} - -h1 { - font-family: 'Rubik', sans-serif; - font-weight: 700; - font-style: italic; - border-bottom: none; - color: #202327 !important; -} - -h2, h3, h4 { - font-family: 'Rubik', sans-serif; - border-bottom: none; - font-weight: 400; -} - -#search-form { - @media (min-width $MQNormal) { - margin-left: 2rem; - } -} - -.search-box { - @media (min-width $MQNormal) { - order: 1; - margin-right: 0; - margin-left: 1rem; - - .suggestions { - left: auto !important; - right: 0 !important; - } - } - - input { - border-color: #CBD5E0 !important; - border-radius: 100px !important; - background-color: #FFFFFF !important; - } -} - -header.navbar { - border-bottom: none; - box-shadow: 0px 6px 8px -6px rgba(20, 23, 26, 0.06), 0px 8px 16px -6px rgba(20, 23, 26, 0.04); - --bgcolor-blur: hsla(0,0%,100%,0.9); -} - -span.site-name { - display: none !important; -} - -a.nav-link, -div.nav-item span.title { - font-weight: 600; -} - -a.nav-link:not(.router-link-active), -div.nav-item span.title { - color: #68778D; -} - -.theme-default-content:not(.custom) > p { - text-align: inherit !important; -} - -.sidebar { - box-shadow: none !important; -} - -div.hero-info { - color: white; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - display: flex; - align-items: center; -} - -div.hero-info .description { - display: none; -} - -div.hero-info #main-title { - color: white !important; -} - -header.hero > img { - border-radius: 16px; - max-height: none !important; -} - -header.hero { - margin-top: 20px; - position: relative; - justify-content: space-between !important; -} - -.home .features { - border-top: none !important; - justify-content: space-between !important; - margin: 0 !important; - padding-top: 0.5rem !important; -} - -.home .features h2 { - font-family: 'Open Sans', sans-serif; - font-style: normal; - font-size: 16px !important; - font-weight: 600 !important; - color: #202327 !important; -} - -.home .features p { - font-family: 'Open Sans', sans-serif; - font-size: 14px !important; - color: #68778D !important; -} - -.home .features .icon-container { - height: 44px; - width: 44px; - background-color: #FFF0F1; - border-radius: 8px; - display: flex; - justify-content: center; - align-items: center; - color: #FF0420; -} - -.home .features .feature { - background-color: #FFFFFF !important; - box-shadow: 0px 6px 8px -6px rgba(20, 23, 26, 0.12), 0px 8px 16px -6px rgba(20, 23, 26, 0.08); - border-radius: 16px !important; - margin: 0 !important; - margin-bottom: 2rem !important; - padding: 1.5rem !important; -} - -.features-header { - margin-top: 30px; - margin-bottom: 0px; -} - -div.theme-container:not(.has-sidebar) { - background-color: #F1F4F9; -} - -.anchor-header { - color: #202327; - font-weight: 600; - font-size: 14px; - font-height: 20px; - margin-bottom: 10px; -} - -.anchor-support { - margin-top: 20px; -} - -.anchor-support-links i { - width: 20px; - text-align: center; - margin-right: 5px; -} - -.anchor-support-links a { - color: #68778D; -} - -.anchor-support-links a div { - height: 30px; - font-size: 14px; -} - -.anchor-support-links a:hover { - color: #FF0420; -} - -#anchor { - width: 15rem !important; -} - -#anchor .anchor { - line-height: 27.2px !important; -} - -#anchor .anchor div { - color: #68778D !important; -} - -#anchor .anchor.active div { - font-weight: 600 !important; -} - -.theme-default-content code { - top: 1px; - line-height: 22.4px !important; - vertical-align: middle !important; -} - -.nav-dropdown svg.icon.outbound { - display: none; -} - -.nav-dropdown .dropdown-item i { - width: 20px; -} - -.color-discord { - color: #5865F2; -} - -.color-github { - color: #121212; -} - -.color-twitter { - color: #1DA1F2; -} - -.color-twitch { - color: #6441A5; -} - -.color-medium { - color: #000000; -} - -.color-optimism { - color: #FF0420; -} - -.color-ecosystem { - color: #ea94db; -} diff --git a/styles/palette.styl b/styles/palette.styl deleted file mode 100644 index 8e319b7..0000000 --- a/styles/palette.styl +++ /dev/null @@ -1,5 +0,0 @@ -$textColor = #000000 -$accentColor = #f01a37 -$backgroundColor = #272934 -$lightBackgroundColor = #f3f3f3 -$sidebarWidth = 320px diff --git a/theme/assets/hero.jpg b/theme/assets/hero.jpg deleted file mode 100644 index 7f3f61a..0000000 Binary files a/theme/assets/hero.jpg and /dev/null differ diff --git a/theme/components/AlgoliaSearch/Dropdown.d.ts b/theme/components/AlgoliaSearch/Dropdown.d.ts deleted file mode 100644 index 0d618a5..0000000 --- a/theme/components/AlgoliaSearch/Dropdown.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import Vue from "vue"; -import type { AlgoliaOption } from "@mr-hope/vuepress-types"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/AlgoliaSearch/Dropdown.js b/theme/components/AlgoliaSearch/Dropdown.js deleted file mode 100644 index 50cc6a0..0000000 --- a/theme/components/AlgoliaSearch/Dropdown.js +++ /dev/null @@ -1,55 +0,0 @@ -import Vue from "vue"; -export default Vue.extend({ - name: "AlgoliaSearchDropdown", - props: { - options: { type: Object, required: true }, - }, - data: () => ({ - placeholder: "", - }), - watch: { - $lang(newValue) { - this.update(this.options, newValue); - }, - options(newValue) { - this.update(newValue, this.$lang); - }, - }, - mounted() { - this.initialize(this.options, this.$lang); - this.placeholder = - this.$site.themeConfig.searchPlaceholder || ""; - }, - methods: { - initialize(userOptions, lang) { - void Promise.all([ - import( - /* webpackChunkName: "docsearch" */ "docsearch.js/dist/cdn/docsearch.min.js"), - import( - /* webpackChunkName: "docsearch" */ "docsearch.js/dist/cdn/docsearch.min.css"), - ]).then(([docsearch]) => { - // eslint-disable-next-line - docsearch.default(Object.assign(Object.assign({}, userOptions), { inputSelector: "#algolia-search-input", - // #697 Make docsearch work well at i18n mode. - algoliaOptions: { - facetFilters: [`lang:${lang}`].concat( - // eslint-disable-next-line - userOptions.facetFilters || []), - }, handleSelected: (_input, _event, suggestion) => { - const { pathname, hash } = new URL(suggestion.url); - const routepath = pathname.replace(this.$site.base, "/"); - if (this.$router.getRoutes().some((route) => route.path === routepath)) - void this.$router.push(`${routepath}${decodeURIComponent(hash)}`); - else - window.open(suggestion.url); - } })); - }); - }, - update(options, lang) { - this.$el.innerHTML = - ''; - this.initialize(options, lang); - }, - }, -}); -//# sourceMappingURL=Dropdown.js.map \ No newline at end of file diff --git a/theme/components/AlgoliaSearch/Dropdown.js.map b/theme/components/AlgoliaSearch/Dropdown.js.map deleted file mode 100644 index 2e68e39..0000000 --- a/theme/components/AlgoliaSearch/Dropdown.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Dropdown.js","sourceRoot":"","sources":["Dropdown.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAKtB,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,uBAAuB;IAE7B,KAAK,EAAE;QACL,OAAO,EAAE,EAAE,IAAI,EAAE,MAAiC,EAAE,QAAQ,EAAE,IAAI,EAAE;KACrE;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,WAAW,EAAE,EAAE;KAChB,CAAC;IAEF,KAAK,EAAE;QACL,KAAK,CAAC,QAAgB;YACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACtC,CAAC;QAED,OAAO,CAAC,QAAuB;YAC7B,IAAI,CAAC,MAAM,CAAC,QAAQ,E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C,IAAI,CAAC,EAAE,CAAC,CAAC;;4BAC/D,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;oBACnC,CAAC,IACD,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,OAAsB,EAAE,IAAY;YACzC,IAAI,CAAC,GAAG,CAAC,SAAS;gBAChB,wDAAwD,CAAC;YAC3D,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACjC,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/AlgoliaSearch/Dropdown.vue b/theme/components/AlgoliaSearch/Dropdown.vue deleted file mode 100644 index 79a941f..0000000 --- a/theme/components/AlgoliaSearch/Dropdown.vue +++ /dev/null @@ -1,130 +0,0 @@ - - - Algolia search - - - - - - - diff --git a/theme/components/AlgoliaSearch/Full.d.ts b/theme/components/AlgoliaSearch/Full.d.ts deleted file mode 100644 index 01f17f0..0000000 --- a/theme/components/AlgoliaSearch/Full.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Vue from "vue"; -import type { AlgoliaOption } from "@mr-hope/vuepress-types"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/AlgoliaSearch/Full.js b/theme/components/AlgoliaSearch/Full.js deleted file mode 100644 index 832b350..0000000 --- a/theme/components/AlgoliaSearch/Full.js +++ /dev/null @@ -1,87 +0,0 @@ -import { createElement } from "preact"; -import Vue from "vue"; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore: docsearch type issue -import docsearch from "@docsearch/js"; -export default Vue.extend({ - name: "AlgoliaSearchFull", - props: { - options: { type: Object, required: true }, - }, - watch: { - $lang(newValue) { - this.update(this.options, newValue); - }, - options(newValue) { - this.update(newValue, this.$lang); - }, - }, - mounted() { - this.initialize(this.options, this.$lang); - }, - methods: { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - initialize(userOptions, _lang) { - // eslint-disable-next-line - docsearch(Object.assign(Object.assign({ container: "#docsearch", placeholder: this.$site.themeConfig.searchPlaceholder || "" }, userOptions), { searchParameters: userOptions.searchParameters || {}, - // transform full url to route path - transformItems: (items) => items.map((item) => (Object.assign(Object.assign({}, item), { - // the `item.url` is full url with protocol and hostname - // so we have to transform it to vue-router path - url: this.resolveRoutePathFromUrl(item.url) }))), - // render the hit component with custom `onClick` handler - hitComponent: ({ hit, children }) => createElement("a", { - href: hit.url, - onClick: (event) => { - // We rely on the native link scrolling when user is - // already on the right anchor because Vue Router doesn’t - // support duplicated history entries. - if (this.$route.fullPath === hit.url) - return; - const fullPath = `${window.location.origin}${hit.url}`; - const { pathname: hitPathname } = new URL(fullPath); - // If the hits goes to another page, we prevent the native link behavior - // to leverage the Vue Router loading feature. - if (this.$route.path !== hitPathname) - event.preventDefault(); - if (this.$router - .getRoutes() - .some((route) => route.path.replace(/index\.html$/, "") === hitPathname)) - void this.$router.push(hit.url); - else - window.open(fullPath); - }, - }, children), navigator: { - navigate: ({ itemUrl }) => { - const fullPath = `${window.location.origin}${itemUrl}`; - const { pathname: hitPathname } = new URL(fullPath); - // Vue Router doesn’t handle same-page navigation so we use - // the native browser location API for anchor navigation. - if (this.$route.path === hitPathname) - window.location.assign(fullPath); - else if (this.$router - .getRoutes() - .some((route) => route.path === hitPathname)) - void this.$router.push(itemUrl); - else - window.open(fullPath); - }, - navigateNewTab({ itemUrl }) { - window.open(itemUrl); - }, - navigateNewWindow({ itemUrl }) { - window.open(itemUrl); - }, - } })); - }, - resolveRoutePathFromUrl(absoluteUrl) { - const { pathname, hash } = new URL(absoluteUrl); - return `${pathname.replace(this.$site.base, "/")}${hash}`; - }, - update(options, lang) { - this.$el.innerHTML = ''; - this.initialize(options, lang); - }, - }, -}); -//# sourceMappingURL=Full.js.map \ No newline at end of file diff --git a/theme/components/AlgoliaSearch/Full.js.map b/theme/components/AlgoliaSearch/Full.js.map deleted file mode 100644 index 72aa33e..0000000 --- a/theme/components/AlgoliaSearch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G,CAAC,QAAQ,CAAC,CAAC;wBAEpD,2DAA2D;wBAC3D,yDAAyD;wBACzD,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,WAAW;4BAClC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;6BAC9B,IACH,IAAI,CAAC,OAAO;6BACT,SAAS,EAAE;6BACX,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,WAAW,CAAC;4BAE9C,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;;4BAC7B,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAC7B,CAAC;oBACD,cAAc,CAAC,EAAE,OAAO,EAAE;wBACxB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACvB,CAAC;oBACD,iBAAiB,CAAC,EAAE,OAAO,EAAE;wBAC3B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBACvB,CAAC;iBACF,IACD,CAAC;QACL,CAAC;QAED,uBAAuB,CAAC,WAAmB;YACzC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;YAEhD,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC;QAC5D,CAAC;QAED,MAAM,CAAC,OAAsB,EAAE,IAAY;YACzC,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,4BAA4B,CAAC;YAClD,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACjC,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/AlgoliaSearch/Full.vue b/theme/components/AlgoliaSearch/Full.vue deleted file mode 100644 index e141f5b..0000000 --- a/theme/components/AlgoliaSearch/Full.vue +++ /dev/null @@ -1,569 +0,0 @@ - - - - - - - diff --git a/theme/components/Anchor.d.ts b/theme/components/Anchor.d.ts deleted file mode 100644 index 7a44c2a..0000000 --- a/theme/components/Anchor.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import Vue from "vue"; -import { SidebarHeader } from "@theme/utils/sidebar"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/Anchor.js b/theme/components/Anchor.js deleted file mode 100644 index 6be9c6a..0000000 --- a/theme/components/Anchor.js +++ /dev/null @@ -1,91 +0,0 @@ -import Vue from "vue"; -import { isActive } from "@theme/utils/path"; -const renderLink = (h, { text, link, level }) => h("RouterLink", { - props: { - to: link, - activeClass: "", - exactActiveClass: "", - }, - class: { - "anchor-link": true, - [level ? `heading${level}` : ""]: level, - }, -}, [h("div", {}, [text])]); -const renderChildren = (h, { children, route }) => h("ul", { class: "anchor-list" }, children.map((child) => { - const active = isActive(route, `${route.path}#${child.slug}`); - return h("li", { class: { anchor: true, active } }, [ - renderLink(h, { - text: child.title, - link: `${route.path}#${child.slug}`, - level: child.level, - }), - ]); -})); -export default Vue.extend({ - name: "Anchor", - functional: true, - props: { - items: { - type: Array, - default: () => [], - }, - }, - render(h, { props, parent: { $page, $route } }) { - return h("div", { attrs: { class: "anchor-place-holder" } }, [ - h("aside", { attrs: { id: "anchor" } }, [ - ($page.headers && $page.headers.length) - ? h("div", { class: "anchor-header" }, [ - "On this page" - ]) - : null, - h("div", { class: "anchor-wrapper" }, [ - props.items.length - ? renderChildren(h, { - children: props.items, - route: $route, - }) - : $page.headers - ? renderChildren(h, { - children: $page.headers, - route: $route, - }) - : null, - ]), - ($page.headers && $page.headers.length) - ? h("div", [ - h("div", { class: "anchor-header anchor-support" }, [ - "Support" - ]), - h("div", { class: "anchor-support-links" }, [ - h("a", { attrs: { href: "https://discord.optimism.io", target: "_blank" } }, [ - h("div", [ - h("i", { attrs: { class: "fab fa-discord" } }), - " Discord community" - ]) - ]), - h("a", { attrs: { href: "https://forms.monday.com/forms/c867f3f357707ff1fb4af0d3d5080710?r=use1", target: "_blank" } }, [ - h("div", [ - h("i", { attrs: { class: "far fa-comment-dots" } }), - " Get support for going live" - ]) - ]), - h("a", { attrs: { href: "https://github.com/ethereum-optimism/optimism/issues", target: "_blank" } }, [ - h("div", [ - h("i", { attrs: { class: "fab fa-github" } }), - " Make an issue on GitHub" - ]) - ]), - h("a", { attrs: { href: "https://github.com/ethereum-optimism/optimism/contribute", target: "_blank" } }, [ - h("div", [ - h("i", { attrs: { class: "far fa-hands-helping" } }), - " Contribute to Optimism" - ]) - ]), - ]) - ]) - : null - ]), - ]); - }, -}); -//# sourceMappingURL=Anchor.js.map diff --git a/theme/components/Anchor.js.map b/theme/components/Anchor.js.map deleted file mode 100644 index cf3c20e..0000000 --- a/theme/components/Anchor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Anchor.js","sourceRoot":"","sources":["Anchor.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAW7C,MAAM,UAAU,GAAG,CACjB,CAAgB,EAChB,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAc,EAC1B,EAAE,CACT,CAAC,CACC,YAAY,EACZ;IACE,KAAK,EAAE;QACL,EAAE,EAAE,IAAI;QACR,WAAW,EAAE,EAAE;QACf,gBAAgB,EAAE,EAAE;KACrB;IACD,KAAK,EAAE;QACL,aAAa,EAAE,IAAI;QACnB,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK;KACxC;CACF,EACD,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CACvB,CAAC;AAOJ,MAAM,cAAc,GAAG,CACrB,CAAgB,EAChB,EAAE,QAAQ,EAAE,KAAK,EAAyB,EACnC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AE,KAAK,CAAC,KAAK;4BACrB,KAAK,EAAE,MAAM;yBACd,CAAC;wBACJ,CAAC,CAAC,KAAK,CAAC,OAAO;4BACf,CAAC,CAAC,cAAc,CAAC,CAAC,EAAE;gCAChB,QAAQ,EAAE,KAAK,CAAC,OAAO;gCACvB,KAAK,EAAE,MAAM;6BACd,CAAC;4BACJ,CAAC,CAAC,IAAI;iBACT,CAAC;aACH,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Anchor.vue b/theme/components/Anchor.vue deleted file mode 100644 index bb6af5c..0000000 --- a/theme/components/Anchor.vue +++ /dev/null @@ -1,109 +0,0 @@ - - - diff --git a/theme/components/Blog/ArticleInfo.d.ts b/theme/components/Blog/ArticleInfo.d.ts deleted file mode 100644 index 178d651..0000000 --- a/theme/components/Blog/ArticleInfo.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import Vue from "vue"; -import type { PageComputed } from "@mr-hope/vuepress-types"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/Blog/ArticleInfo.js b/theme/components/Blog/ArticleInfo.js deleted file mode 100644 index cf26f73..0000000 --- a/theme/components/Blog/ArticleInfo.js +++ /dev/null @@ -1,70 +0,0 @@ -import Vue from "vue"; -import { capitalize } from "@mr-hope/vuepress-shared"; -import AuthorIcon from "@mr-hope/vuepress-plugin-comment/lib/client/icons/AuthorIcon.vue"; -import CalendarIcon from "@mr-hope/vuepress-plugin-comment/lib/client/icons/CalendarIcon.vue"; -import CategoryInfo from "@mr-hope/vuepress-plugin-comment/lib/client/CategoryInfo.vue"; -import TagInfo from "@mr-hope/vuepress-plugin-comment/lib/client/TagInfo.vue"; -import TimerIcon from "@mr-hope/vuepress-plugin-comment/lib/client/icons/TimerIcon.vue"; -export default Vue.extend({ - name: "ArticleInfo", - components: { - AuthorIcon, - CalendarIcon, - CategoryInfo, - TagInfo, - TimerIcon, - }, - props: { - article: { type: Object, required: true }, - }, - computed: { - author() { - return (this.article.frontmatter.author || - (this.$themeConfig.author && this.article.frontmatter.author !== false - ? this.$themeConfig.author - : "")); - }, - time() { - const { date, time = date } = this.article.frontmatter; - if (typeof time === "string") { - if (time.indexOf("T") !== -1) { - const [dateString, temp] = time.split("T"); - const [times] = temp.split("."); - return `${dateString} ${times === "00:00:00" ? "" : times}`; - } - return time; - } - return this.article.createTime || ""; - }, - tags() { - const { tag, tags = tag } = this.article.frontmatter; - if (typeof tags === "string") - return [capitalize(tags)]; - if (Array.isArray(tags)) - return tags.map((item) => capitalize(item)); - return []; - }, - readingTimeContent() { - return `PT${Math.max(Math.round(this.$page.readingTime.minutes), 1)}M`; - }, - readingTime() { - const { minute, time } = READING_TIME_I18N[this.$localePath || "/"]; - return this.article.readingTime.minutes < 1 - ? minute - : time.replace("$time", Math.round(this.article.readingTime.minutes).toString()); - }, - authorText() { - return PAGE_INFO_I18N[this.$localePath || "/"].author; - }, - timeText() { - return PAGE_INFO_I18N[this.$localePath || "/"].time; - }, - tagText() { - return PAGE_INFO_I18N[this.$localePath || "/"].tag; - }, - readingTimeText() { - return PAGE_INFO_I18N[this.$localePath || "/"].readingTime; - }, - }, -}); -//# sourceMappingURL=ArticleInfo.js.map \ No newline at end of file diff --git a/theme/components/Blog/ArticleInfo.js.map b/theme/components/Blog/ArticleInfo.js.map deleted file mode 100644 index 3b86016..0000000 --- a/theme/components/Blog/ArticleInfo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ArticleInfo.js","sourceRoot":"","sources":["ArticleInfo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,UAAU,MAAM,kEAAkE,CAAC;AAC1F,OAAO,YAAY,MAAM,oEAAoE,CAAC;AAC9F,OAAO,YAAY,MAAM,8DAA8D,CAAC;AACxF,OAAO,OAAO,MAAM,yDAAyD,CAAC;AAC9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AAW,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC;QAC7D,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/ArticleInfo.vue b/theme/components/Blog/ArticleInfo.vue deleted file mode 100644 index 0a9741c..0000000 --- a/theme/components/Blog/ArticleInfo.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/theme/components/Blog/ArticleItem.d.ts b/theme/components/Blog/ArticleItem.d.ts deleted file mode 100644 index 712359b..0000000 --- a/theme/components/Blog/ArticleItem.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import Vue from "vue"; -import type { PageComputed } from "@mr-hope/vuepress-types"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/Blog/ArticleItem.js b/theme/components/Blog/ArticleItem.js deleted file mode 100644 index 75d10fd..0000000 --- a/theme/components/Blog/ArticleItem.js +++ /dev/null @@ -1,27 +0,0 @@ -import Vue from "vue"; -import ArticleInfo from "@theme/components/Blog/ArticleInfo.vue"; -import LockIcon from "@theme/icons/LockIcon.vue"; -import PresentationIcon from "@theme/icons/PresentationIcon.vue"; -import StickyIcon from "@theme/icons/StickyIcon.vue"; -import { getPathMatchedKeys } from "@theme/utils/encrypt"; -export default Vue.extend({ - name: "ArticleItem", - components: { ArticleInfo, LockIcon, StickyIcon, PresentationIcon }, - props: { - article: { type: Object, required: true }, - }, - computed: { - isEncrypted() { - return (getPathMatchedKeys(this.$themeConfig.encrypt, this.article.path) - .length !== 0 || Boolean(this.article.frontmatter.password)); - }, - excerpt() { - if (this.article.excerpt) - return this.article.excerpt; - return (this.article.frontmatter.description || - this.article.frontmatter.summary || - ""); - }, - }, -}); -//# sourceMappingURL=ArticleItem.js.map \ No newline at end of file diff --git a/theme/components/Blog/ArticleItem.js.map b/theme/components/Blog/ArticleItem.js.map deleted file mode 100644 index 2bf641b..0000000 --- a/theme/components/Blog/ArticleItem.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ArticleItem.js","sourceRoot":"","sources":["ArticleItem.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,UAAU,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAK1D,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,aAAa;IAEnB,UAAU,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE;IAEnE,KAAK,EAAE;QACL,OAAO,EAAE,EAAE,IAAI,EAAE,MAAgC,EAAE,QAAQ,EAAE,IAAI,EAAE;KACpE;IAED,QAAQ,EAAE;QACR,WAAW;YACT,OAAO,CACL,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;iBAC7D,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAC9D,CAAC;QACJ,CAAC;QAED,OAAO;YACL,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO;gBAAE,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YAEtD,OAAO,CACL,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW;gBACpC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO;gBAChC,EAAE,CACH,CAAC;QACJ,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/ArticleItem.vue b/theme/components/Blog/ArticleItem.vue deleted file mode 100644 index 8a5d8da..0000000 --- a/theme/components/Blog/ArticleItem.vue +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - {{ article.title }} - - - - - - - - - - - - diff --git a/theme/components/Blog/ArticleList.d.ts b/theme/components/Blog/ArticleList.d.ts deleted file mode 100644 index ca9b44e..0000000 --- a/theme/components/Blog/ArticleList.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import Vue from "vue"; -import type { BlogOptions } from "@theme/types"; -import type { PageComputed } from "@mr-hope/vuepress-types"; -declare const _default: import("vue/types/vue").ExtendedVue boolean) | undefined; - $articles: PageComputed[]; - articles: PageComputed[]; -}, Record>; -export default _default; diff --git a/theme/components/Blog/ArticleList.js b/theme/components/Blog/ArticleList.js deleted file mode 100644 index 5b7a917..0000000 --- a/theme/components/Blog/ArticleList.js +++ /dev/null @@ -1,77 +0,0 @@ -import Vue from "vue"; -import ArticleItem from "@theme/components/Blog/ArticleItem.vue"; -import EmptyIcon from "@theme/icons/EmptyIcon.vue"; -import MyTransition from "@theme/components/MyTransition.vue"; -import { filterArticle, sortArticle } from "@theme/utils/article"; -import { getPathMatchedKeys } from "@theme/utils/encrypt"; -export default Vue.extend({ - name: "ArticleList", - components: { ArticleItem, EmptyIcon, MyTransition }, - data: () => ({ - currentPage: 1, - articleList: [], - }), - computed: { - blogConfig() { - return this.$themeConfig.blog || {}; - }, - articlePerPage() { - return this.blogConfig.perPage || 10; - }, - filter() { - const { path } = this.$route; - return path.includes("/article") - ? (page) => page.frontmatter.layout !== "Slide" - : path.includes("/star") - ? (page) => Boolean(page.frontmatter.star || page.frontmatter.sticky) - : path.includes("/encrypt") - ? (page) => getPathMatchedKeys(this.$themeConfig.encrypt, page.path).length !== - 0 || Boolean(page.frontmatter.password) - : path.includes("/slide") - ? (page) => page.frontmatter.layout === "Slide" - : undefined; - }, - $articles() { - // filter then sort - return sortArticle(filterArticle(this.$site.pages, this.filter), "sticky"); - }, - /** Articles in this page */ - articles() { - return this.articleList.slice((this.currentPage - 1) * this.articlePerPage, this.currentPage * this.articlePerPage); - }, - }, - watch: { - // update article list when route is changed - $route(to, from) { - if (to.path !== from.path) { - this.articleList = this.getArticleList(); - // reset page to 1 - this.currentPage = 1; - } - }, - currentPage() { - // list top border distance - const distance = document.querySelector("#article-list").getBoundingClientRect().top + window.scrollY; - setTimeout(() => { - window.scrollTo(0, distance); - }, 100); - }, - }, - mounted() { - this.articleList = this.getArticleList(); - }, - methods: { - getArticleList() { - try { - return this.$pagination - ? // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - this.$pagination._matchedPages - : this.$articles; - } - catch (err) { - return this.$articles; - } - }, - }, -}); -//# sourceMappingURL=ArticleList.js.map \ No newline at end of file diff --git a/theme/components/Blog/ArticleList.js.map b/theme/components/Blog/ArticleList.js.map deleted file mode 100644 index fbfc74c..0000000 --- a/theme/components/Blog/ArticleList.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ArticleList.js","sourceRoot":"","sources":["ArticleList.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,SAAS,MAAM,4BAA4B,CAAC;AACnD,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAM1D,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,aAAa;IAEnB,UAAU,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE;IAEpD,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,EAAoB;KAClC,CAAC;IAEF,QAAQ,EAAE;QACR,UAAU;YACR,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,EAAE,CAAC;QACtC,CAAC;QAED,cAAc;YACZ,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,IAAI,EAAE,CAAC;QACvC,CAAC;Q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J,CAAC;KACF;IAED,KAAK,EAAE;QACL,4CAA4C;QAC5C,MAAM,CAAC,EAAS,EAAE,IAAW;YAC3B,IAAI,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE;gBACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;gBACzC,kBAAkB;gBAClB,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;aACtB;QACH,CAAC;QAED,WAAW;YACT,2BAA2B;YAC3B,MAAM,QAAQ,GAEV,QAAQ,CAAC,aAAa,CAAC,eAAe,CACvC,CAAC,qBAAqB,EAAE,CAAC,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;YAEjD,UAAU,CAAC,GAAG,EAAE;gBACd,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;YAC/B,CAAC,EAAE,GAAG,CAAC,CAAC;QACV,CAAC;KACF;IAED,OAAO;QACL,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IAC3C,CAAC;IAED,OAAO,EAAE;QACP,cAAc;YACZ,IAAI;gBACF,OAAO,IAAI,CAAC,WAAW;oBACrB,CAAC,CAAC,sEAAsE;wBACrE,IAAI,CAAC,WAAW,CAAC,aAAgC;oBACpD,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC;aACpB;YAAC,OAAO,GAAG,EAAE;gBACZ,OAAO,IAAI,CAAC,SAAS,CAAC;aACvB;QACH,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/ArticleList.vue b/theme/components/Blog/ArticleList.vue deleted file mode 100644 index 3962170..0000000 --- a/theme/components/Blog/ArticleList.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/theme/components/Blog/ArticleType.d.ts b/theme/components/Blog/ArticleType.d.ts deleted file mode 100644 index 253e5c7..0000000 --- a/theme/components/Blog/ArticleType.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import Vue from "vue"; -interface ArticleTypeItem { - text: string; - path: string; -} -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Blog/ArticleType.js b/theme/components/Blog/ArticleType.js deleted file mode 100644 index f73848b..0000000 --- a/theme/components/Blog/ArticleType.js +++ /dev/null @@ -1,23 +0,0 @@ -import Vue from "vue"; -import { getDefaultLocale } from "@mr-hope/vuepress-shared"; -import { navigate } from "@theme/utils/navigate"; -export default Vue.extend({ - name: "ArticleType", - computed: { - types() { - const blogI18n = this.$themeLocaleConfig.blog || getDefaultLocale().blog; - return [ - { text: blogI18n.allText, path: "/article/" }, - { text: blogI18n.star, path: "/star/" }, - { text: blogI18n.slides, path: "/slide/" }, - { text: blogI18n.encrypt, path: "/encrypt/" }, - ]; - }, - }, - methods: { - navigate(path) { - navigate(path, this.$router, this.$route); - }, - }, -}); -//# sourceMappingURL=ArticleType.js.map \ No newline at end of file diff --git a/theme/components/Blog/ArticleType.js.map b/theme/components/Blog/ArticleType.js.map deleted file mode 100644 index 925710c..0000000 --- a/theme/components/Blog/ArticleType.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ArticleType.js","sourceRoot":"","sources":["ArticleType.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOjD,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,aAAa;IAEnB,QAAQ,EAAE;QACR,KAAK;YACH,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,gBAAgB,EAAE,CAAC,IAAI,CAAC;YAEzE,OAAO;gBACL,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE;gBAC7C,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACvC,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE;gBAC1C,EAAE,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE;aAC9C,CAAC;QACJ,CAAC;KACF;IAED,OAAO,EAAE;QACP,QAAQ,CAAC,IAAY;YACnB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/ArticleType.vue b/theme/components/Blog/ArticleType.vue deleted file mode 100644 index bc87e98..0000000 --- a/theme/components/Blog/ArticleType.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - - {{ type.text }} - - - - - - - diff --git a/theme/components/Blog/BlogHero.d.ts b/theme/components/Blog/BlogHero.d.ts deleted file mode 100644 index 25ded68..0000000 --- a/theme/components/Blog/BlogHero.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue; - bgImageStyle: Record; -}, Record>; -export default _default; diff --git a/theme/components/Blog/BlogHero.js b/theme/components/Blog/BlogHero.js deleted file mode 100644 index 90d7b27..0000000 --- a/theme/components/Blog/BlogHero.js +++ /dev/null @@ -1,29 +0,0 @@ -import Vue from "vue"; -import MyTransition from "@theme/components/MyTransition.vue"; -import defaultHeroImage from "@theme/assets/hero.jpg"; -export default Vue.extend({ - name: "BlogHero", - components: { MyTransition }, - data: () => ({ defaultHeroImage }), - computed: { - heroImageStyle() { - const defaultStyle = { - maxHeight: "180px", - margin: this.$frontmatter.showTitle === false - ? "6rem auto 1.5rem" - : "1rem auto", - }; - return Object.assign(Object.assign({}, defaultStyle), this.$frontmatter.heroImageStyle); - }, - bgImageStyle() { - const defaultBgImageStyle = { - height: "350px", - textAlign: "center", - overflow: "hidden", - }; - const { bgImageStyle = {} } = this.$frontmatter; - return Object.assign(Object.assign({}, defaultBgImageStyle), bgImageStyle); - }, - }, -}); -//# sourceMappingURL=BlogHero.js.map \ No newline at end of file diff --git a/theme/components/Blog/BlogHero.js.map b/theme/components/Blog/BlogHero.js.map deleted file mode 100644 index 1bacbc1..0000000 --- a/theme/components/Blog/BlogHero.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BlogHero.js","sourceRoot":"","sources":["BlogHero.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAC9D,OAAO,gBAAgB,MAAM,wBAAwB,CAAC;AAEtD,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,UAAU;IAEhB,UAAU,EAAE,EAAE,YAAY,EAAE;IAE5B,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAElC,QAAQ,EAAE;QACR,cAAc;YACZ,MAAM,YAAY,GAAG;gBACnB,SAAS,EAAE,OAAO;gBAClB,MAAM,EACJ,IAAI,CAAC,YAAY,CAAC,SAAS,KAAK,KAAK;oBACnC,CAAC,CAAC,kBAAkB;oBACpB,CAAC,CAAC,WAAW;aAClB,CAAC;YAEF,uCACK,YAAY,GACX,IAAI,CAAC,YAAY,CAAC,cAAyC,EAC/D;QACJ,CAAC;QAED,YAAY;YACV,MAAM,mBAAmB,GAA2B;gBAClD,MAAM,EAAE,OAAO;gBACf,SAAS,EAAE,QAAQ;gBACnB,QAAQ,EAAE,QAAQ;aACnB,CAAC;YACF,MAAM,EAAE,YAAY,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;YAEhD,uCACK,mBAAmB,GAClB,YAAuC,EAC3C;QACJ,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/BlogHero.vue b/theme/components/Blog/BlogHero.vue deleted file mode 100644 index e379694..0000000 --- a/theme/components/Blog/BlogHero.vue +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - {{ $frontmatter.heroText || $title || "Hope" }} - - - - - - - - - - - - diff --git a/theme/components/Blog/BlogHome.d.ts b/theme/components/Blog/BlogHome.d.ts deleted file mode 100644 index b1470f1..0000000 --- a/theme/components/Blog/BlogHome.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import Vue from "vue"; -/** - * 项目配置 - * - * Project Configuration - */ -export interface ProjectOptions { - /** - * 项目类型 - * - * Type of project - */ - type: "article" | "book" | "link" | "project"; - /** - * 项目名称 - * - * Project name - */ - name: string; - /** - * 项目描述 - * - * Project desription - */ - desc?: string; - /** - * 项目封面,应为绝对路径 - * - * Cover for the project, must be an absolute path - */ - cover?: string; - /** - * 项目链接 - * - * Link of the project - */ - link: string; -} -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Blog/BlogHome.js b/theme/components/Blog/BlogHome.js deleted file mode 100644 index d1b774c..0000000 --- a/theme/components/Blog/BlogHome.js +++ /dev/null @@ -1,17 +0,0 @@ -import Vue from "vue"; -import ArticleList from "@theme/components/Blog/ArticleList.vue"; -import BlogHero from "@theme/components/Blog/BlogHero.vue"; -import BlogInfo from "@BlogInfo"; -import MyTransition from "@theme/components/MyTransition.vue"; -import ProjectList from "@theme/components/Blog/ProjectList.vue"; -export default Vue.extend({ - name: "BlogHome", - components: { - ArticleList, - BlogHero, - BlogInfo, - MyTransition, - ProjectList, - }, -}); -//# sourceMappingURL=BlogHome.js.map \ No newline at end of file diff --git a/theme/components/Blog/BlogHome.js.map b/theme/components/Blog/BlogHome.js.map deleted file mode 100644 index f3871bd..0000000 --- a/theme/components/Blog/BlogHome.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BlogHome.js","sourceRoot":"","sources":["BlogHome.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,QAAQ,MAAM,qCAAqC,CAAC;AAC3D,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAC9D,OAAO,WAAW,MAAM,wCAAwC,CAAC;AAwCjE,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,UAAU;IAEhB,UAAU,EAAE;QACV,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,YAAY;QACZ,WAAW;KACZ;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/BlogHome.vue b/theme/components/Blog/BlogHome.vue deleted file mode 100644 index 3d86377..0000000 --- a/theme/components/Blog/BlogHome.vue +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/theme/components/Blog/BlogInfo.d.ts b/theme/components/Blog/BlogInfo.d.ts deleted file mode 100644 index 65de639..0000000 --- a/theme/components/Blog/BlogInfo.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Blog/BlogInfo.js b/theme/components/Blog/BlogInfo.js deleted file mode 100644 index fed92e4..0000000 --- a/theme/components/Blog/BlogInfo.js +++ /dev/null @@ -1,9 +0,0 @@ -import Vue from "vue"; -import BlogInfoList from "@theme/components/Blog/BlogInfoList.vue"; -import BloggerInfo from "@theme/components/Blog/BloggerInfo.vue"; -import MyTransition from "@theme/components/MyTransition.vue"; -export default Vue.extend({ - name: "BlogInfo", - components: { BlogInfoList, BloggerInfo, MyTransition }, -}); -//# sourceMappingURL=BlogInfo.js.map \ No newline at end of file diff --git a/theme/components/Blog/BlogInfo.js.map b/theme/components/Blog/BlogInfo.js.map deleted file mode 100644 index 459a3b1..0000000 --- a/theme/components/Blog/BlogInfo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BlogInfo.js","sourceRoot":"","sources":["BlogInfo.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAE9D,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,UAAU;IAEhB,UAAU,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE;CACxD,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/BlogInfo.vue b/theme/components/Blog/BlogInfo.vue deleted file mode 100644 index 4befe03..0000000 --- a/theme/components/Blog/BlogInfo.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - diff --git a/theme/components/Blog/BlogInfoList.d.ts b/theme/components/Blog/BlogInfoList.d.ts deleted file mode 100644 index 8354913..0000000 --- a/theme/components/Blog/BlogInfoList.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -import ArticleIcon from "@theme/icons/ArticleIcon.vue"; -declare const _default: import("vue/types/vue").ExtendedVue<{ - $starArticles: import("@mr-hope/vuepress-types").PageComputed[]; -} & Record & ArticleIcon, { - active: string; -}, { - setActive(name: string): void; - navigate(path: string): void; -}, { - i18n: { - article: string; - articleList: string; - category: string; - tag: string; - timeline: string; - timelineText: string; - allText: string; - intro: string; - star: string; - slides: string; - encrypt: string; - }; - articleNumber: number; -}, Record>; -export default _default; diff --git a/theme/components/Blog/BlogInfoList.js b/theme/components/Blog/BlogInfoList.js deleted file mode 100644 index 34f424c..0000000 --- a/theme/components/Blog/BlogInfoList.js +++ /dev/null @@ -1,49 +0,0 @@ -import { getDefaultLocale } from "@mr-hope/vuepress-shared"; -import ArticleIcon from "@theme/icons/ArticleIcon.vue"; -import CategoryIcon from "@mr-hope/vuepress-plugin-comment/lib/client/icons/CategoryIcon.vue"; -import TagIcon from "@mr-hope/vuepress-plugin-comment/lib/client/icons/TagIcon.vue"; -import TimeIcon from "@mr-hope/vuepress-plugin-comment/lib/client/icons/TimeIcon.vue"; -import ArticleList from "@theme/components/Blog/ArticleList.vue"; -import CategoryList from "@theme/components/Blog/CategoryList.vue"; -import MyTransition from "@theme/components/MyTransition.vue"; -import TagList from "@theme/components/Blog/TagList.vue"; -import Timeline from "@theme/components/Blog/Timeline.vue"; -import TimelineList from "@theme/components/Blog/TimelineList.vue"; -import { filterArticle } from "@theme/utils/article"; -import { starMixin } from "@theme/mixins/star"; -export default starMixin.extend({ - name: "BlogInfo", - components: { - ArticleIcon, - ArticleList, - CategoryIcon, - CategoryList, - MyTransition, - TagIcon, - TagList, - TimeIcon, - Timeline, - TimelineList, - }, - data: () => ({ - active: "category", - }), - computed: { - i18n() { - return this.$themeLocaleConfig.blog || getDefaultLocale().blog; - }, - articleNumber() { - return filterArticle(this.$site.pages).length; - }, - }, - methods: { - setActive(name) { - this.active = name; - }, - navigate(path) { - if (this.$route.path !== path) - void this.$router.push(path); - }, - }, -}); -//# sourceMappingURL=BlogInfoList.js.map \ No newline at end of file diff --git a/theme/components/Blog/BlogInfoList.js.map b/theme/components/Blog/BlogInfoList.js.map deleted file mode 100644 index c17997c..0000000 --- a/theme/components/Blog/BlogInfoList.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BlogInfoList.js","sourceRoot":"","sources":["BlogInfoList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,YAAY,MAAM,oEAAoE,CAAC;AAC9F,OAAO,OAAO,MAAM,+DAA+D,CAAC;AACpF,OAAO,QAAQ,MAAM,gEAAgE,CAAC;AACtF,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAC9D,OAAO,OAAO,MAAM,oCAAoC,CAAC;AACzD,OAAO,QAAQ,MAAM,qCAAqC,CAAC;AAC3D,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,eAAe,SAAS,CAAC,MAAM,CAAC;IAC9B,IAAI,EAAE,UAAU;IAEhB,UAAU,EAAE;QACV,WAAW;QACX,WAAW;QACX,YAAY;QACZ,YAAY;QACZ,YAAY;QACZ,OAAO;QACP,OAAO;QACP,QAAQ;QACR,QAAQ;QACR,YAAY;KACb;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,MAAM,EAAE,UAAU;KACnB,CAAC;IAEF,QAAQ,EAAE;QACR,IAAI;YACF,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,gBAAgB,EAAE,CAAC,IAAI,CAAC;QACjE,CAAC;QAED,aAAa;YACX,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;QAChD,CAAC;KACF;IAED,OAAO,EAAE;QACP,SAAS,CAAC,IAAY;YACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,CAAC;QAED,QAAQ,CAAC,IAAY;YACnB,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI;gBAAE,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/BlogInfoList.vue b/theme/components/Blog/BlogInfoList.vue deleted file mode 100644 index dcc863d..0000000 --- a/theme/components/Blog/BlogInfoList.vue +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ articleNumber }} - {{ i18n.article }} - - - - - - - - - - - - - - - - {{ $category.list.length }} - {{ i18n.category }} - - - - - - - - - - - - - - {{ $tag.list.length }} - {{ i18n.tag }} - - - - - - - - - - - - - - - - diff --git a/theme/components/Blog/BlogPage.d.ts b/theme/components/Blog/BlogPage.d.ts deleted file mode 100644 index 723c47d..0000000 --- a/theme/components/Blog/BlogPage.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Blog/BlogPage.js b/theme/components/Blog/BlogPage.js deleted file mode 100644 index 7efa46c..0000000 --- a/theme/components/Blog/BlogPage.js +++ /dev/null @@ -1,37 +0,0 @@ -import Vue from "vue"; -import ArticleList from "@theme/components/Blog/ArticleList.vue"; -import ArticleType from "@theme/components/Blog/ArticleType.vue"; -import BlogInfo from "@BlogInfo"; -import CategoryList from "@theme/components/Blog/CategoryList.vue"; -import MyTransition from "@theme/components/MyTransition.vue"; -import TagList from "@theme/components/Blog/TagList.vue"; -import Timeline from "@theme/components/Blog/Timeline.vue"; -import TimelineList from "@theme/components/Blog/TimelineList.vue"; -export default Vue.extend({ - name: "BlogPage", - components: { - ArticleList, - ArticleType, - BlogInfo, - CategoryList, - MyTransition, - TagList, - Timeline, - TimelineList, - }, - computed: { - showArticles() { - const { path } = this.$route; - return !path.includes("/timeline"); - }, - componentName() { - const pathName = this.$route.path.split("/")[1]; - if (["category", "tag"].includes(pathName)) - return `${pathName}List`; - else if (pathName === "timeline") - return pathName; - return "articleType"; - }, - }, -}); -//# sourceMappingURL=BlogPage.js.map \ No newline at end of file diff --git a/theme/components/Blog/BlogPage.js.map b/theme/components/Blog/BlogPage.js.map deleted file mode 100644 index 0769a75..0000000 --- a/theme/components/Blog/BlogPage.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BlogPage.js","sourceRoot":"","sources":["BlogPage.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAC9D,OAAO,OAAO,MAAM,oCAAoC,CAAC;AACzD,OAAO,QAAQ,MAAM,qCAAqC,CAAC;AAC3D,OAAO,YAAY,MAAM,yCAAyC,CAAC;AAEnE,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,UAAU;IAEhB,UAAU,EAAE;QACV,WAAW;QACX,WAAW;QACX,QAAQ;QACR,YAAY;QACZ,YAAY;QACZ,OAAO;QACP,QAAQ;QACR,YAAY;KACb;IAED,QAAQ,EAAE;QACR,YAAY;YACV,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;YAE7B,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACrC,CAAC;QAED,aAAa;YACX,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAEhD,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;gBAAE,OAAO,GAAG,QAAQ,MAAM,CAAC;iBAChE,IAAI,QAAQ,KAAK,UAAU;gBAAE,OAAO,QAAQ,CAAC;YAElD,OAAO,aAAa,CAAC;QACvB,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/BlogPage.vue b/theme/components/Blog/BlogPage.vue deleted file mode 100644 index fcdbee5..0000000 --- a/theme/components/Blog/BlogPage.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/theme/components/Blog/BloggerInfo.d.ts b/theme/components/Blog/BloggerInfo.d.ts deleted file mode 100644 index 5d84f1b..0000000 --- a/theme/components/Blog/BloggerInfo.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -import MediaLinks from "@theme/components/MediaLinks.vue"; -import type { BlogOptions } from "@theme/types"; -declare const _default: import("vue/types/vue").ExtendedVue<{ - $timelineItems: import("@mr-hope/vuepress-types").PageComputed[]; - $timeline: import("@theme/mixins/timeline").TimelineItem[]; -} & Record & MediaLinks, unknown, { - navigate(url: string): void; - jumpIntro(): void; -}, { - blogConfig: BlogOptions; - bloggerName: string; - bloggerAvatar: string; - hasIntro: boolean; - hintAttr: string; - i18n: { - article: string; - articleList: string; - category: string; - tag: string; - timeline: string; - timelineText: string; - allText: string; - intro: string; - star: string; - slides: string; - encrypt: string; - }; - articleNumber: number; -}, Record>; -export default _default; diff --git a/theme/components/Blog/BloggerInfo.js b/theme/components/Blog/BloggerInfo.js deleted file mode 100644 index 5196fc6..0000000 --- a/theme/components/Blog/BloggerInfo.js +++ /dev/null @@ -1,45 +0,0 @@ -import { getDefaultLocale } from "@mr-hope/vuepress-shared"; -import MediaLinks from "@theme/components/MediaLinks.vue"; -import { timelineMixin } from "@theme/mixins/timeline"; -import { filterArticle } from "@theme/utils/article"; -import { navigate } from "@theme/utils/navigate"; -export default timelineMixin.extend({ - name: "BloggerInfo", - components: { MediaLinks }, - computed: { - blogConfig() { - return this.$themeConfig.blog || {}; - }, - bloggerName() { - return (this.blogConfig.name || - this.$themeConfig.author || - this.$site.title || - ""); - }, - bloggerAvatar() { - return this.blogConfig.avatar || this.$themeConfig.logo || ""; - }, - hasIntro() { - return Boolean(this.blogConfig.intro); - }, - hintAttr() { - return this.hasIntro ? "aria-label" : ""; - }, - i18n() { - return this.$themeLocaleConfig.blog || getDefaultLocale().blog; - }, - articleNumber() { - return filterArticle(this.$site.pages).length; - }, - }, - methods: { - navigate(url) { - navigate(url, this.$router, this.$route); - }, - jumpIntro() { - if (this.hasIntro) - navigate(this.blogConfig.intro, this.$router, this.$route); - }, - }, -}); -//# sourceMappingURL=BloggerInfo.js.map \ No newline at end of file diff --git a/theme/components/Blog/BloggerInfo.js.map b/theme/components/Blog/BloggerInfo.js.map deleted file mode 100644 index 6500adc..0000000 --- a/theme/components/Blog/BloggerInfo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"BloggerInfo.js","sourceRoot":"","sources":["BloggerInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAKjD,eAAe,aAAa,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,aAAa;IAEnB,UAAU,EAAE,EAAE,UAAU,EAAE;IAE1B,QAAQ,EAAE;QACR,UAAU;YACR,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,EAAE,CAAC;QACtC,CAAC;QAED,WAAW;YACT,OAAO,CACL,IAAI,CAAC,UAAU,CAAC,IAAI;gBACpB,IAAI,CAAC,YAAY,CAAC,MAAM;gBACxB,IAAI,CAAC,KAAK,CAAC,KAAK;gBAChB,EAAE,CACH,CAAC;QACJ,CAAC;QAED,aAAa;YACX,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,EAAE,CAAC;QAChE,CAAC;QAED,QAAQ;YACN,OAAO,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACxC,CAAC;QAED,QAAQ;YACN,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,CAAC;QAED,IAAI;YACF,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI,gBAAgB,EAAE,CAAC,IAAI,CAAC;QACjE,CAAC;QAED,aAAa;YACX,OAAO,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;QAChD,CAAC;KACF;IAED,OAAO,EAAE;QACP,QAAQ,CAAC,GAAW;YAClB,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC;QAED,SAAS;YACP,IAAI,IAAI,CAAC,QAAQ;gBACf,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,KAAe,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACzE,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/BloggerInfo.vue b/theme/components/Blog/BloggerInfo.vue deleted file mode 100644 index 3df8afb..0000000 --- a/theme/components/Blog/BloggerInfo.vue +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - {{ articleNumber }} - {{ i18n.article }} - - - {{ $category.list.length }} - {{ i18n.category }} - - - {{ $tag.list.length }} - {{ i18n.tag }} - - - {{ $timelineItems.length }} - {{ i18n.timeline }} - - - - - - - - - diff --git a/theme/components/Blog/CategoryList.d.ts b/theme/components/Blog/CategoryList.d.ts deleted file mode 100644 index 24bf5d3..0000000 --- a/theme/components/Blog/CategoryList.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue string; - clickCategory(path: string): void; -}, unknown, Record>; -export default _default; diff --git a/theme/components/Blog/CategoryList.js b/theme/components/Blog/CategoryList.js deleted file mode 100644 index 303a319..0000000 --- a/theme/components/Blog/CategoryList.js +++ /dev/null @@ -1,13 +0,0 @@ -import Vue from "vue"; -import { capitalize } from "@mr-hope/vuepress-shared"; -import { navigate } from "@theme/utils/navigate"; -export default Vue.extend({ - name: "CategoryList", - methods: { - capitalize, - clickCategory(path) { - navigate(path, this.$router, this.$route); - }, - }, -}); -//# sourceMappingURL=CategoryList.js.map \ No newline at end of file diff --git a/theme/components/Blog/CategoryList.js.map b/theme/components/Blog/CategoryList.js.map deleted file mode 100644 index 8471207..0000000 --- a/theme/components/Blog/CategoryList.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CategoryList.js","sourceRoot":"","sources":["CategoryList.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,cAAc;IAEpB,OAAO,EAAE;QACP,UAAU;QAEV,aAAa,CAAC,IAAY;YACxB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/CategoryList.vue b/theme/components/Blog/CategoryList.vue deleted file mode 100644 index a7f4b0c..0000000 --- a/theme/components/Blog/CategoryList.vue +++ /dev/null @@ -1,90 +0,0 @@ - - - - {{ capitalize(category.name) }} - {{ category.pages.length }} - - - - - - - diff --git a/theme/components/Blog/ProjectList.d.ts b/theme/components/Blog/ProjectList.d.ts deleted file mode 100644 index 8d7ff61..0000000 --- a/theme/components/Blog/ProjectList.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Blog/ProjectList.js b/theme/components/Blog/ProjectList.js deleted file mode 100644 index cbe966d..0000000 --- a/theme/components/Blog/ProjectList.js +++ /dev/null @@ -1,16 +0,0 @@ -import Vue from "vue"; -import ArticleIcon from "@theme/icons/ArticleIcon.vue"; -import BookIcon from "@theme/icons/BookIcon.vue"; -import LinkIcon from "@theme/icons/LinkIcon.vue"; -import ProjectIcon from "@theme/icons/ProjectIcon.vue"; -import { navigate } from "@theme/utils/navigate"; -export default Vue.extend({ - name: "ProjectList", - components: { ArticleIcon, BookIcon, LinkIcon, ProjectIcon }, - methods: { - navigate(link) { - navigate(link, this.$router, this.$route); - }, - }, -}); -//# sourceMappingURL=ProjectList.js.map \ No newline at end of file diff --git a/theme/components/Blog/ProjectList.js.map b/theme/components/Blog/ProjectList.js.map deleted file mode 100644 index 1654e4d..0000000 --- a/theme/components/Blog/ProjectList.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ProjectList.js","sourceRoot":"","sources":["ProjectList.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,aAAa;IAEnB,UAAU,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE;IAE5D,OAAO,EAAE;QACP,QAAQ,CAAC,IAAY;YACnB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/ProjectList.vue b/theme/components/Blog/ProjectList.vue deleted file mode 100644 index 4dd4c94..0000000 --- a/theme/components/Blog/ProjectList.vue +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - {{ project.name }} - {{ project.desc }} - - - - - - - diff --git a/theme/components/Blog/TagList.d.ts b/theme/components/Blog/TagList.d.ts deleted file mode 100644 index fc08bc5..0000000 --- a/theme/components/Blog/TagList.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import Vue from "vue"; -interface TagOption { - name: string; - path: string; -} -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Blog/TagList.js b/theme/components/Blog/TagList.js deleted file mode 100644 index b209d13..0000000 --- a/theme/components/Blog/TagList.js +++ /dev/null @@ -1,35 +0,0 @@ -import Vue from "vue"; -import { getDefaultLocale } from "@mr-hope/vuepress-shared"; -import { navigate } from "@theme/utils/navigate"; -export default Vue.extend({ - name: "TagList", - computed: { - tagList() { - return [ - { - name: - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - this.$themeLocaleConfig.blog.allText || - getDefaultLocale().blog.allText, - path: "/tag/", - }, - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - ...this.$tag.list, - ]; - }, - }, - methods: { - isActive(name) { - return (name === - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - ((this.$currentTag && this.$currentTag.key) || - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - this.$themeLocaleConfig.blog.allText || - getDefaultLocale().blog.allText)); - }, - clickTag(path) { - navigate(path, this.$router, this.$route); - }, - }, -}); -//# sourceMappingURL=TagList.js.map \ No newline at end of file diff --git a/theme/components/Blog/TagList.js.map b/theme/components/Blog/TagList.js.map deleted file mode 100644 index c353a72..0000000 --- a/theme/components/Blog/TagList.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TagList.js","sourceRoot":"","sources":["TagList.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOjD,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,SAAS;IAEf,QAAQ,EAAE;QACR,OAAO;YACL,OAAO;gBACL;oBACE,IAAI;oBACF,oEAAoE;oBACpE,IAAI,CAAC,kBAAkB,CAAC,IAAK,CAAC,OAAO;wBACrC,gBAAgB,EAAE,CAAC,IAAI,CAAC,OAAO;oBACjC,IAAI,EAAE,OAAO;iBACd;gBACD,sEAAsE;gBACtE,GAAI,IAAI,CAAC,IAAI,CAAC,IAAoB;aACnC,CAAC;QACJ,CAAC;KACF;IAED,OAAO,EAAE;QACP,QAAQ,CAAC,IAAY;YACnB,OAAO,CACL,IAAI;gBACJ,sEAAsE;gBACtE,CAAC,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC;oBACzC,oEAAoE;oBACpE,IAAI,CAAC,kBAAkB,CAAC,IAAK,CAAC,OAAO;oBACrC,gBAAgB,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CACnC,CAAC;QACJ,CAAC;QAED,QAAQ,CAAC,IAAY;YACnB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/TagList.vue b/theme/components/Blog/TagList.vue deleted file mode 100644 index fdba54b..0000000 --- a/theme/components/Blog/TagList.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - - {{ tag.name }} - - - - - - - diff --git a/theme/components/Blog/Timeline.d.ts b/theme/components/Blog/Timeline.d.ts deleted file mode 100644 index 31f1e33..0000000 --- a/theme/components/Blog/Timeline.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import Anchor from "@theme/components/Anchor.vue"; -import type { SidebarHeader } from "@theme/utils/groupHeader"; -declare const _default: import("vue/types/vue").ExtendedVue<{ - $timelineItems: import("@mr-hope/vuepress-types").PageComputed[]; - $timeline: import("@theme/mixins/timeline").TimelineItem[]; -} & Record & Anchor, unknown, { - navigate(url: string): void; -}, { - hint: string; - anchorConfig: SidebarHeader[]; -}, Record>; -export default _default; diff --git a/theme/components/Blog/Timeline.js b/theme/components/Blog/Timeline.js deleted file mode 100644 index 5475bcb..0000000 --- a/theme/components/Blog/Timeline.js +++ /dev/null @@ -1,29 +0,0 @@ -import Anchor from "@theme/components/Anchor.vue"; -import MyTransition from "@theme/components/MyTransition.vue"; -import { timelineMixin } from "@theme/mixins/timeline"; -import { getDefaultLocale } from "@mr-hope/vuepress-shared"; -export default timelineMixin.extend({ - name: "Timeline", - components: { Anchor, MyTransition }, - computed: { - hint() { - return ((this.$themeConfig.blog && this.$themeConfig.blog.timeline) || - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - this.$themeLocaleConfig.blog.timelineText || - getDefaultLocale().blog.timelineText); - }, - anchorConfig() { - return this.$timeline.map((item) => ({ - title: item.year.toString(), - level: 2, - slug: item.year.toString(), - })); - }, - }, - methods: { - navigate(url) { - void this.$router.push(url); - }, - }, -}); -//# sourceMappingURL=Timeline.js.map \ No newline at end of file diff --git a/theme/components/Blog/Timeline.js.map b/theme/components/Blog/Timeline.js.map deleted file mode 100644 index e955656..0000000 --- a/theme/components/Blog/Timeline.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Timeline.js","sourceRoot":"","sources":["Timeline.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAClD,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,eAAe,aAAa,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,UAAU;IAEhB,UAAU,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE;IAEpC,QAAQ,EAAE;QACR,IAAI;YACF,OAAO,CACL,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAC3D,oEAAoE;gBACpE,IAAI,CAAC,kBAAkB,CAAC,IAAK,CAAC,YAAY;gBAC1C,gBAAgB,EAAE,CAAC,IAAI,CAAC,YAAY,CACrC,CAAC;QACJ,CAAC;QAED,YAAY;YACV,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBACnC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;gBAC3B,KAAK,EAAE,CAAC;gBACR,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;aAC3B,CAAC,CAAC,CAAC;QACN,CAAC;KACF;IAED,OAAO,EAAE;QACP,QAAQ,CAAC,GAAW;YAClB,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9B,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/Timeline.vue b/theme/components/Blog/Timeline.vue deleted file mode 100644 index 0192cc3..0000000 --- a/theme/components/Blog/Timeline.vue +++ /dev/null @@ -1,180 +0,0 @@ - - - - - {{ hint }} - - - - - - {{ item.year }} - - - - {{ article.frontmatter.parsedDate }} - - {{ article.title }} - - - - - - - - - - - - -D diff --git a/theme/components/Blog/TimelineList.d.ts b/theme/components/Blog/TimelineList.d.ts deleted file mode 100644 index 4085357..0000000 --- a/theme/components/Blog/TimelineList.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import MyTransition from "@theme/components/MyTransition.vue"; -declare const _default: import("vue/types/vue").ExtendedVue<{ - $timelineItems: import("@mr-hope/vuepress-types").PageComputed[]; - $timeline: import("@theme/mixins/timeline").TimelineItem[]; -} & Record & MyTransition, unknown, { - navigate(url: string): void; -}, { - hint: string; -}, Record>; -export default _default; diff --git a/theme/components/Blog/TimelineList.js b/theme/components/Blog/TimelineList.js deleted file mode 100644 index 084fff9..0000000 --- a/theme/components/Blog/TimelineList.js +++ /dev/null @@ -1,22 +0,0 @@ -import MyTransition from "@theme/components/MyTransition.vue"; -import TimeIcon from "@mr-hope/vuepress-plugin-comment/lib/client/icons/TimeIcon.vue"; -import { timelineMixin } from "@theme/mixins/timeline"; -import { getDefaultLocale } from "@mr-hope/vuepress-shared"; -export default timelineMixin.extend({ - name: "TimelineList", - components: { MyTransition, TimeIcon }, - computed: { - hint() { - return ( - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - this.$themeLocaleConfig.blog.timeline || - getDefaultLocale().blog.timeline); - }, - }, - methods: { - navigate(url) { - void this.$router.push(url); - }, - }, -}); -//# sourceMappingURL=TimelineList.js.map \ No newline at end of file diff --git a/theme/components/Blog/TimelineList.js.map b/theme/components/Blog/TimelineList.js.map deleted file mode 100644 index f7042be..0000000 --- a/theme/components/Blog/TimelineList.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"TimelineList.js","sourceRoot":"","sources":["TimelineList.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAC9D,OAAO,QAAQ,MAAM,gEAAgE,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,eAAe,aAAa,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,cAAc;IAEpB,UAAU,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE;IAEtC,QAAQ,EAAE;QACR,IAAI;YACF,OAAO;YACL,oEAAoE;YACpE,IAAI,CAAC,kBAAkB,CAAC,IAAK,CAAC,QAAQ;gBACtC,gBAAgB,EAAE,CAAC,IAAI,CAAC,QAAQ,CACjC,CAAC;QACJ,CAAC;KACF;IAED,OAAO,EAAE;QACP,QAAQ,CAAC,GAAW;YAClB,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9B,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Blog/TimelineList.vue b/theme/components/Blog/TimelineList.vue deleted file mode 100644 index 77853c4..0000000 --- a/theme/components/Blog/TimelineList.vue +++ /dev/null @@ -1,155 +0,0 @@ - - - - - {{ $timelineItems.length }} - {{ hint }} - - - - - - - {{ item.year }} - - - {{ article.frontmatter.parsedDate }} - - {{ article.title }} - - - - - - - - - - - - - diff --git a/theme/components/Clipboard.d.ts b/theme/components/Clipboard.d.ts deleted file mode 100644 index 0e5736f..0000000 --- a/theme/components/Clipboard.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/Clipboard.js b/theme/components/Clipboard.js deleted file mode 100644 index 92af8a7..0000000 --- a/theme/components/Clipboard.js +++ /dev/null @@ -1,27 +0,0 @@ -import Vue from "vue"; -export default Vue.extend({ - name: "Clipboard", - props: { - html: { type: String, default: "" }, - lang: { type: String, default: "en-US" }, - }, - data: () => ({ - location: "", - }), - computed: { - copyright() { - const { author } = this.$themeConfig; - const content = { - "zh-CN": `${this.html}\n-----\n${author ? `著作权归${author}所有。\n` : ""}链接: ${this.location}`, - "en-US": `${this.html}\n-----\n${author ? `Copyright by ${author}.\n` : ""}Link: ${this.location}`, - "vi-VN": `${this.html}\n-----\n${author ? `bản quyền bởi ${author}.\n` : ""}Liên kết: ${this.location}`, - }; - return content[this.lang]; - }, - }, - created() { - if (typeof window !== "undefined") - this.location = window.location.toString(); - }, -}); -//# sourceMappingURL=Clipboard.js.map \ No newline at end of file diff --git a/theme/components/Clipboard.js.map b/theme/components/Clipboard.js.map deleted file mode 100644 index 917f537..0000000 --- a/theme/components/Clipboard.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Clipboard.js","sourceRoot":"","sources":["Clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,WAAW;IAEjB,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;QACnC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE;KACzC;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE,EAAE;KACb,CAAC;IAEF,QAAQ,EAAE;QACR,SAAS;YACP,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;YACrC,MAAM,OAAO,GAA2B;gBACtC,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,YACnB,MAAM,CAAC,CAAC,CAAC,OAAO,MAAM,OAAO,CAAC,CAAC,CAAC,EAClC,OAAO,IAAI,CAAC,QAAQ,EAAE;gBACtB,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,YACnB,MAAM,CAAC,CAAC,CAAC,gBAAgB,MAAM,KAAK,CAAC,CAAC,CAAC,EACzC,SAAS,IAAI,CAAC,QAAQ,EAAE;gBACxB,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,YACnB,MAAM,CAAC,CAAC,CAAC,iBAAiB,MAAM,KAAK,CAAC,CAAC,CAAC,EAC1C,aAAa,IAAI,CAAC,QAAQ,EAAE;aAC7B,CAAC;YAEF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;KACF;IAED,OAAO;QACL,IAAI,OAAO,MAAM,KAAK,WAAW;YAC/B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC/C,CAAC;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Clipboard.vue b/theme/components/Clipboard.vue deleted file mode 100644 index 41fcb94..0000000 --- a/theme/components/Clipboard.vue +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/theme/components/Common.d.ts b/theme/components/Common.d.ts deleted file mode 100644 index 51d8432..0000000 --- a/theme/components/Common.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import Navbar from "@theme/components/Navbar/Navbar.vue"; -import type { SidebarItem, SidebarHeader } from "@theme/utils/sidebar"; -declare const _default: import("vue/types/vue").ExtendedVue<{ - globalEncryptPassword: string; -} & { - checkGlobalPassword(globalPassword: string): void; -} & { - isGlobalEncrypted: boolean; -} & Record & { - encryptOptions: import("../types").EncryptOptions; -} & Navbar, { - isSidebarOpen: boolean; - hideNavbar: boolean; - touchStart: { - clientX: number; - clientY: number; - }; -}, { - /** Get scroll distance */ - getScrollTop(): number; - toggleSidebar(to: boolean): void; - onTouchStart(event: TouchEvent): void; - onTouchEnd(event: TouchEvent): void; - getHeader(items: SidebarItem[]): SidebarHeader[]; -}, { - enableNavbar: boolean; - enableSidebar: boolean; - sidebarItems: SidebarItem[]; - pageClasses: unknown; - headers: SidebarHeader[]; - enableAnchor: boolean; -}, { - navbar: boolean; - sidebar: boolean; -}>; -export default _default; diff --git a/theme/components/Common.js b/theme/components/Common.js deleted file mode 100644 index a7f39fa..0000000 --- a/theme/components/Common.js +++ /dev/null @@ -1,138 +0,0 @@ -import { getSidebarItems } from "@theme/utils/sidebar"; -import { globalEncryptMixin } from "@theme/mixins/globalEncrypt"; -import Navbar from "@theme/components/Navbar/Navbar.vue"; -import PageFooter from "@theme/components/PageFooter.vue"; -import Password from "@theme/components/Password.vue"; -import Sidebar from "@theme/components/Sidebar/Sidebar.vue"; -import throttle from "lodash.throttle"; -export default globalEncryptMixin.extend({ - name: "Common", - components: { - Navbar, - PageFooter, - Password, - Sidebar, - }, - props: { - navbar: { type: Boolean, default: true }, - sidebar: { type: Boolean, default: true }, - }, - data: () => ({ - isSidebarOpen: false, - hideNavbar: false, - touchStart: { - clientX: 0, - clientY: 0, - }, - }), - computed: { - enableNavbar() { - if (this.navbar === false) - return false; - const { frontmatter } = this.$page; - if (frontmatter.navbar === false || this.$themeConfig.navbar === false) - return false; - return Boolean(this.$title || - this.$themeConfig.logo || - this.$themeConfig.repo || - this.$themeConfig.nav || - this.$themeLocaleConfig.nav); - }, - enableSidebar() { - if (this.sidebar === false) - return false; - return (!this.$frontmatter.home && - this.$frontmatter.sidebar !== false && - this.sidebarItems.length !== 0); - }, - sidebarItems() { - if (this.sidebar === false) - return []; - return getSidebarItems(this.$page, this.$site, this.$localePath); - }, - pageClasses() { - const userPageClass = this.$page.frontmatter.pageClass; - return [ - { - "has-navbar": this.enableNavbar, - "has-sidebar": this.enableSidebar, - "has-anchor": this.enableAnchor, - "hide-navbar": this.hideNavbar, - "sidebar-open": this.isSidebarOpen, - }, - userPageClass, - ]; - }, - headers() { - return this.getHeader(this.sidebarItems); - }, - enableAnchor() { - return (this.$frontmatter.anchorDisplay || - (this.$themeConfig.anchorDisplay !== false && - this.$frontmatter.anchorDisplay !== false)); - }, - }, - mounted() { - let lastDistance = 0; - this.$router.afterEach(() => { - this.isSidebarOpen = false; - }); - window.addEventListener("scroll", throttle(() => { - const distance = this.getScrollTop(); - // scroll down - if (lastDistance < distance && distance > 58) { - if (!this.isSidebarOpen) - this.hideNavbar = true; - // scroll up - } - else - this.hideNavbar = false; - lastDistance = distance; - }, 300)); - }, - methods: { - /** Get scroll distance */ - getScrollTop() { - return (window.pageYOffset || - document.documentElement.scrollTop || - document.body.scrollTop || - 0); - }, - toggleSidebar(to) { - this.isSidebarOpen = typeof to === "boolean" ? to : !this.isSidebarOpen; - this.$emit("toggle-sidebar", this.isSidebarOpen); - }, - // Side swipe - onTouchStart(event) { - this.touchStart = { - clientX: event.changedTouches[0].clientX, - clientY: event.changedTouches[0].clientY, - }; - }, - onTouchEnd(event) { - const dx = event.changedTouches[0].clientX - this.touchStart.clientX; - const dy = event.changedTouches[0].clientY - this.touchStart.clientY; - if (Math.abs(dx) > Math.abs(dy) && Math.abs(dx) > 40) - if (dx > 0 && this.touchStart.clientX <= 80) - this.toggleSidebar(true); - else - this.toggleSidebar(false); - }, - getHeader(items) { - for (let i = 0; i < items.length; i++) { - const item = items[i]; - if (item.type === "group") { - const matching = this.getHeader(item.children); - if (matching.length !== 0) - return matching; - } - else if (item.type === "page" && - item.headers && - item.path === this.$route.path) - return item.headers; - } - return []; - }, - }, -}); -//# sourceMappingURL=Common.js.map \ No newline at end of file diff --git a/theme/components/Common.js.map b/theme/components/Common.js.map deleted file mode 100644 index 9203cc3..0000000 --- a/theme/components/Common.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Common.js","sourceRoot":"","sources":["Common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,MAAM,MAAM,qCAAqC,CAAC;AACzD,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAC1D,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AAEtD,OAAO,OAAO,MAAM,uCAAuC,CAAC;AAC5D,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAIvC,eAAe,kBAAkB,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,QAAQ;IAEd,UAAU,EAAE;QACV,MAAM;QACN,UAAU;QACV,QAAQ;QACR,OAAO;KACR;IAED,KAAK,EAAE;QACL,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;QACxC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;KAC1C;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE;YACV,OAAO,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;SACX;KACF,CAAC;IAEF,QAAQ,EAAE;QACR,YAAY;YACV,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK;gBAAE,OAAO,KAAK,CAAC;YAExC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YAEnC,IAAI,WAAW,CAAC,MAAM,KAAK,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,KAAK,KAAK;gBACpE,OAAO,KAAK,CAAC;YAEf,OAAO,OAAO,CAC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,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Common.vue b/theme/components/Common.vue deleted file mode 100644 index f5aaad8..0000000 --- a/theme/components/Common.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/theme/components/Home.d.ts b/theme/components/Home.d.ts deleted file mode 100644 index 0c5bd05..0000000 --- a/theme/components/Home.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import Vue from "vue"; -interface ActionConfig { - text: string; - link: string; -} -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Home.js b/theme/components/Home.js deleted file mode 100644 index 106443c..0000000 --- a/theme/components/Home.js +++ /dev/null @@ -1,22 +0,0 @@ -import Vue from "vue"; -import MyTransition from "@theme/components/MyTransition.vue"; -import NavLink from "@theme/components/Navbar/NavLink.vue"; -import { navigate } from "@theme/utils/navigate"; -export default Vue.extend({ - name: "Home", - components: { MyTransition, NavLink }, - computed: { - actionLinks() { - const { action } = this.$frontmatter; - if (Array.isArray(action)) - return action; - return [action]; - }, - }, - methods: { - navigate(link) { - navigate(link, this.$router, this.$route); - }, - }, -}); -//# sourceMappingURL=Home.js.map \ No newline at end of file diff --git a/theme/components/Home.js.map b/theme/components/Home.js.map deleted file mode 100644 index 4a2dcd7..0000000 --- a/theme/components/Home.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Home.js","sourceRoot":"","sources":["Home.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAC9D,OAAO,OAAO,MAAM,sCAAsC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAOjD,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM;IAEZ,UAAU,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE;IAErC,QAAQ,EAAE;QACR,WAAW;YACT,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;YACrC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBAAE,OAAO,MAAwB,CAAC;YAC3D,OAAO,CAAC,MAAM,CAAmB,CAAC;QACpC,CAAC;KACF;IAED,OAAO,EAAE;QACP,QAAQ,CAAC,IAAY;YACnB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5C,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Home.vue b/theme/components/Home.vue deleted file mode 100644 index 8480fcd..0000000 --- a/theme/components/Home.vue +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resources - - - - - - - {{ feature.title }} - {{ feature.details }} - - - {{ feature.title }} - {{ feature.details }} - - - - - - - - - - - - - - - diff --git a/theme/components/MediaLinks.d.ts b/theme/components/MediaLinks.d.ts deleted file mode 100644 index 4183561..0000000 --- a/theme/components/MediaLinks.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import Vue from "vue"; -import type { BlogMedia } from "@theme/types"; -interface MediaLink { - icon: string; - url: string; -} -declare const _default: import("vue/types/vue").ExtendedVue>; - links: MediaLink[]; -}, Record>; -export default _default; diff --git a/theme/components/MediaLinks.js b/theme/components/MediaLinks.js deleted file mode 100644 index 4bdaaa0..0000000 --- a/theme/components/MediaLinks.js +++ /dev/null @@ -1,121 +0,0 @@ -import Vue from "vue"; -import Baidu from "@theme/icons/media/Baidu.vue"; -import Bitbucket from "@theme/icons/media/Bitbucket.vue"; -import Dingding from "@theme/icons/media/Dingding.vue"; -import Discord from "@theme/icons/media/Discord.vue"; -import Dribbble from "@theme/icons/media/Dribbble.vue"; -import Email from "@theme/icons/media/Email.vue"; -import Evernote from "@theme/icons/media/Evernote.vue"; -import Facebook from "@theme/icons/media/Facebook.vue"; -import Flipboard from "@theme/icons/media/Flipboard.vue"; -import Gitee from "@theme/icons/media/Gitee.vue"; -import Github from "@theme/icons/media/Github.vue"; -import Gitlab from "@theme/icons/media/Gitlab.vue"; -import Gmail from "@theme/icons/media/Gmail.vue"; -import Instagram from "@theme/icons/media/Instagram.vue"; -import Lines from "@theme/icons/media/Lines.vue"; -import Linkedin from "@theme/icons/media/Linkedin.vue"; -import Pinterest from "@theme/icons/media/Pinterest.vue"; -import Pocket from "@theme/icons/media/Pocket.vue"; -import QQ from "@theme/icons/media/QQ.vue"; -import Qzone from "@theme/icons/media/Qzone.vue"; -import Reddit from "@theme/icons/media/Reddit.vue"; -import Rss from "@theme/icons/media/Rss.vue"; -import Steam from "@theme/icons/media/Steam.vue"; -import Twitter from "@theme/icons/media/Twitter.vue"; -import Wechat from "@theme/icons/media/Wechat.vue"; -import Weibo from "@theme/icons/media/Weibo.vue"; -import Whatsapp from "@theme/icons/media/Whatsapp.vue"; -import Youtube from "@theme/icons/media/Youtube.vue"; -import Zhihu from "@theme/icons/media/Zhihu.vue"; -const medias = [ - "Baidu", - "Bitbucket", - "Dingding", - "Discord", - "Dribbble", - "Email", - "Evernote", - "Facebook", - "Flipboard", - "Gitee", - "Github", - "Gitlab", - "Gmail", - "Instagram", - "Lines", - "Linkedin", - "Pinterest", - "Pocket", - "QQ", - "Qzone", - "Reddit", - "Rss", - "Steam", - "Twitter", - "Wechat", - "Weibo", - "Whatsapp", - "Youtube", - "Zhihu", -]; -export default Vue.extend({ - name: "MediaLinks", - components: { - Baidu, - Bitbucket, - Dingding, - Discord, - Dribbble, - Email, - Evernote, - Facebook, - Flipboard, - Gitee, - Github, - Gitlab, - Gmail, - Instagram, - Lines, - Linkedin, - Pinterest, - Pocket, - QQ, - Qzone, - Reddit, - Rss, - Steam, - Twitter, - Wechat, - Weibo, - Whatsapp, - Youtube, - Zhihu, - }, - computed: { - mediaLink() { - const { medialink } = this.$frontmatter; - return medialink === false - ? false - : typeof medialink === "object" - ? medialink - : this.$themeConfig.blog - ? this.$themeConfig.blog.links || false - : false; - }, - links() { - if (this.mediaLink) { - const links = []; - for (const media in this.mediaLink) - if (medias.includes(media)) - links.push({ - icon: media, - url: this.mediaLink[media], - }); - return links; - } - return []; - }, - }, -}); -//# sourceMappingURL=MediaLinks.js.map \ No newline at end of file diff --git a/theme/components/MediaLinks.js.map b/theme/components/MediaLinks.js.map deleted file mode 100644 index 8bb8b73..0000000 --- a/theme/components/MediaLinks.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MediaLinks.js","sourceRoot":"","sources":["MediaLinks.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,MAAM,8BAA8B,CAAC;AACjD,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AACvD,OAAO,OAAO,MAAM,gCAAgC,CAAC;AACrD,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AACvD,OAAO,KAAK,MAAM,8BAA8B,CAAC;AACjD,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AACvD,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AACvD,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,KAAK,MAAM,8BAA8B,CAAC;AACjD,OAAO,MAAM,MAAM,+BAA+B,CAAC;AACnD,OAAO,MAAM,MAAM,+BAA+B,CAAC;AACnD,OAAO,KAAK,MAAM,8BAA8B,CAAC;AACjD,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,KAAK,MAAM,8BAA8B,CAAC;AACjD,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AACvD,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,MAAM,MAAM,+BAA+B,CAAC;AACnD,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAC3C,OAAO,KAAK,MAAM,8BAA8B,CAAC;AACjD,OAAO,MAAM,MAAM,+BA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ACP,CAAC,CAAC,OAAO,SAAS,KAAK,QAAQ;oBAC/B,CAAC,CAAE,SAAgD;oBACnD,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI;wBACxB,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK;wBACvC,CAAC,CAAC,KAAK,CAAC;QACZ,CAAC;QAED,KAAK;YACH,IAAI,IAAI,CAAC,SAAS,EAAE;gBAClB,MAAM,KAAK,GAAgB,EAAE,CAAC;gBAE9B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,SAAS;oBAChC,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAkB,CAAC;wBACrC,KAAK,CAAC,IAAI,CAAC;4BACT,IAAI,EAAE,KAAK;4BACX,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,KAAkB,CAAW;yBAClD,CAAC,CAAC;gBAEP,OAAO,KAAK,CAAC;aACd;YAED,OAAO,EAAE,CAAC;QACZ,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/MediaLinks.vue b/theme/components/MediaLinks.vue deleted file mode 100644 index 81cdb89..0000000 --- a/theme/components/MediaLinks.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - diff --git a/theme/components/MyTransition.d.ts b/theme/components/MyTransition.d.ts deleted file mode 100644 index 4b4da5a..0000000 --- a/theme/components/MyTransition.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/MyTransition.js b/theme/components/MyTransition.js deleted file mode 100644 index 4fec3ca..0000000 --- a/theme/components/MyTransition.js +++ /dev/null @@ -1,29 +0,0 @@ -import Vue from "vue"; -export default Vue.extend({ - name: "MyTransition", - props: { - delay: { type: Number, default: 0 }, - duration: { type: Number, default: 0.25 }, - disable: { type: Boolean, default: false }, - }, - methods: { - setStyle(items) { - if (this.disable) { - return; - } - - items.style.transition = `transform ${this.duration}s ease-in-out ${this.delay}s, opacity ${this.duration}s ease-in-out ${this.delay}s`; - items.style.transform = "translateY(-20px)"; - items.style.opacity = "0"; - }, - unsetStyle(items) { - if (this.disable) { - return; - } - - items.style.transform = "translateY(0)"; - items.style.opacity = "1"; - }, - }, -}); -//# sourceMappingURL=MyTransition.js.map \ No newline at end of file diff --git a/theme/components/MyTransition.js.map b/theme/components/MyTransition.js.map deleted file mode 100644 index 68c51e0..0000000 --- a/theme/components/MyTransition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"MyTransition.js","sourceRoot":"","sources":["MyTransition.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,cAAc;IAEpB,KAAK,EAAE;QACL,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE;QACnC,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;KAC1C;IAED,OAAO,EAAE;QACP,QAAQ,CAAC,KAAkB;YACzB,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,aAAa,IAAI,CAAC,QAAQ,iBAAiB,IAAI,CAAC,KAAK,cAAc,IAAI,CAAC,QAAQ,iBAAiB,IAAI,CAAC,KAAK,GAAG,CAAC;YACxI,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,mBAAmB,CAAC;YAC5C,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;QAC5B,CAAC;QAED,UAAU,CAAC,KAAkB;YAC3B,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,eAAe,CAAC;YACxC,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;QAC5B,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/MyTransition.vue b/theme/components/MyTransition.vue deleted file mode 100644 index e04cb4d..0000000 --- a/theme/components/MyTransition.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/theme/components/Navbar/DropdownLink.d.ts b/theme/components/Navbar/DropdownLink.d.ts deleted file mode 100644 index 51d22ea..0000000 --- a/theme/components/Navbar/DropdownLink.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from "vue"; -import type { NavBarConfigItem } from "@theme/utils/navbar"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/Navbar/DropdownLink.js b/theme/components/Navbar/DropdownLink.js deleted file mode 100644 index 78bc108..0000000 --- a/theme/components/Navbar/DropdownLink.js +++ /dev/null @@ -1,42 +0,0 @@ -import Vue from "vue"; -import NavLink from "@theme/components/Navbar/NavLink.vue"; -export default Vue.extend({ - name: "DropdownLink", - components: { NavLink }, - props: { - item: { type: Object, required: true }, - }, - data: () => ({ - open: false, - }), - computed: { - dropdownAriaLabel() { - return this.item.ariaLabel || this.item.text; - }, - iconPrefix() { - const { iconPrefix } = this.$themeConfig; - return iconPrefix === "" ? "" : iconPrefix || "icon-"; - }, - }, - watch: { - $route() { - this.open = false; - }, - }, - methods: { - setOpen(value) { - this.open = value; - }, - handleDropdown(event) { - const isTriggerByTab = event.detail === 0; - if (isTriggerByTab) - this.setOpen(!this.open); - }, - isLastItemOfArray(item, array) { - if (Array.isArray(array)) - return item === array[array.length - 1]; - return false; - }, - }, -}); -//# sourceMappingURL=DropdownLink.js.map \ No newline at end of file diff --git a/theme/components/Navbar/DropdownLink.js.map b/theme/components/Navbar/DropdownLink.js.map deleted file mode 100644 index e331738..0000000 --- a/theme/components/Navbar/DropdownLink.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DropdownLink.js","sourceRoot":"","sources":["DropdownLink.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,OAAO,MAAM,sCAAsC,CAAC;AAK3D,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,cAAc;IAEpB,UAAU,EAAE,EAAE,OAAO,EAAE;IAEvB,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,IAAI,EAAE,MAAoC,EAAE,QAAQ,EAAE,IAAI,EAAE;KACrE;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,IAAI,EAAE,KAAK;KACZ,CAAC;IAEF,QAAQ,EAAE;QACR,iBAAiB;YACf,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QAC/C,CAAC;QAED,UAAU;YACR,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;YAEzC,OAAO,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,OAAO,CAAC;QACxD,CAAC;KACF;IAED,KAAK,EAAE;QACL,MAAM;YACJ,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QACpB,CAAC;KACF;IAED,OAAO,EAAE;QACP,OAAO,CAAC,KAAc;YACpB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QACpB,CAAC;QAED,cAAc,CAAC,KAAiB;YAC9B,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;YAC1C,IAAI,cAAc;gBAAE,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/C,CAAC;QAED,iBAAiB,CACf,IAAsB,EACtB,KAAyB;YAEzB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBAAE,OAAO,IAAI,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAElE,OAAO,KAAK,CAAC;QACf,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Navbar/DropdownLink.vue b/theme/components/Navbar/DropdownLink.vue deleted file mode 100644 index 67ef8cc..0000000 --- a/theme/components/Navbar/DropdownLink.vue +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - {{ item.text }} - - - - - - - - - - - - {{ child.text }} - - - - - - - - - - - - - - - - - - diff --git a/theme/components/Navbar/LanguageDropdown.d.ts b/theme/components/Navbar/LanguageDropdown.d.ts deleted file mode 100644 index a07db60..0000000 --- a/theme/components/Navbar/LanguageDropdown.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import Vue from "vue"; -import type { NavBarConfigItem as ResovledNavbarConfigItem } from "@theme/utils/navbar"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Navbar/LanguageDropdown.js b/theme/components/Navbar/LanguageDropdown.js deleted file mode 100644 index 557c78d..0000000 --- a/theme/components/Navbar/LanguageDropdown.js +++ /dev/null @@ -1,63 +0,0 @@ -import Vue from "vue"; -import DropdownLink from "@theme/components/Navbar/DropdownLink.vue"; -import I18nIcon from "@theme/icons/I18nIcon.vue"; -import NavLink from "@theme/components/Navbar/NavLink.vue"; -import { getNavLinkItem } from "@theme/utils/navbar"; -export default Vue.extend({ - name: "LanguageDropdown", - components: { NavLink, DropdownLink }, - computed: { - dropdown() { - const { locales } = this.$site; - if (locales && Object.keys(locales).length > 1) { - const currentLink = this.$page.path; - const { routes } = this.$router.options; - const themeLocales = this.$themeConfig.locales || {}; - const languageDropdown = { - text: this.$themeLocaleConfig.selectText || "Languages", - ariaLabel: this.$themeLocaleConfig.ariaLabel || "Select language", - items: Object.keys(locales).map((path) => { - const locale = locales[path]; - const text = (themeLocales[path] && themeLocales[path].label) || - locale.lang || - "Unknown Language"; - let link; - // Stay on the current page - if (locale.lang === this.$lang) - link = currentLink; - else { - // Try to stay on the same page - link = currentLink.replace(this.$localeConfig.path, path); - // Fallback to homepage - if (!(routes || []).some((route) => route.path === link)) - link = path; - } - return { text, link }; - }), - }; - return getNavLinkItem(languageDropdown); - } - return false; - }, - }, - render(h) { - return this.dropdown - ? h("div", { class: "nav-links" }, [ - h("div", { class: "nav-item" }, [ - h(DropdownLink, { props: { item: this.dropdown } }, [ - h(I18nIcon, { - slot: "title", - style: { - width: "1rem", - height: "1rem", - verticalAlign: "middle", - marginLeft: "1rem", - }, - }), - ]), - ]), - ]) - : null; - }, -}); -//# sourceMappingURL=LanguageDropdown.js.map \ No newline at end of file diff --git a/theme/components/Navbar/LanguageDropdown.js.map b/theme/components/Navbar/LanguageDropdown.js.map deleted file mode 100644 index acd116f..0000000 --- a/theme/components/Navbar/LanguageDropdown.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"LanguageDropdown.js","sourceRoot":"","sources":["LanguageDropdown.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,YAAY,MAAM,2CAA2C,CAAC;AACrE,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,OAAO,MAAM,sCAAsC,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOrD,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,kBAAkB;IAExB,UAAU,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE;IAErC,QAAQ,EAAE;QACR,QAAQ;YACN,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YAE/B,IAAI,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC9C,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;gBACpC,MAAM,EAAE,MAAM,EAAE,GACd,IAAI,CAAC,OAGN,CAAC,OAAO,CAAC;gBACV,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,CAAC;gBACrD,MAAM,gBAAgB,GAAG;oBACvB,IAAI,EAAE,IAAI,CAAC,kBAAkB,CAAC,UAAU,IAAI,WAAW;oBACvD,SAAS,EAAE,IAA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C,QAAQ,EAAE,EAAE,EAAE;wBAClD,CAAC,CAAC,QAAQ,EAAE;4BACV,IAAI,EAAE,OAAO;4BACb,KAAK,EAAE;gCACL,KAAK,EAAE,MAAM;gCACb,MAAM,EAAE,MAAM;gCACd,aAAa,EAAE,QAAQ;gCACvB,UAAU,EAAE,MAAM;6BACnB;yBACF,CAAC;qBACH,CAAC;iBACH,CAAC;aACH,CAAC;YACJ,CAAC,CAAE,IAAyB,CAAC;IACjC,CAAC;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Navbar/NavLink.d.ts b/theme/components/Navbar/NavLink.d.ts deleted file mode 100644 index cc5fcc8..0000000 --- a/theme/components/Navbar/NavLink.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import Vue from "vue"; -import type { NavBarConfigItem } from "@theme/utils/navbar"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/Navbar/NavLink.js b/theme/components/Navbar/NavLink.js deleted file mode 100644 index f357530..0000000 --- a/theme/components/Navbar/NavLink.js +++ /dev/null @@ -1,59 +0,0 @@ -import Vue from "vue"; -import { ensureExt, isExternal, isMailto, isTel } from "@theme/utils/path"; -export default Vue.extend({ - name: "NavLink", - props: { - item: { type: Object, required: true }, - }, - computed: { - link() { - return ensureExt(this.item.link); - }, - iconPrefix() { - const { iconPrefix } = this.$themeConfig; - return iconPrefix === "" ? "" : iconPrefix || "icon-"; - }, - active() { - // link is home path - if ((this.$site.locales && - Object.keys(this.$site.locales).some((rootLink) => rootLink === this.link)) || - this.link === "/") - // exact match - return this.$route.path === this.link; - // inclusive match - return this.$route.path.startsWith(this.link); - }, - isNonHttpURI() { - return isMailto(this.link) || isTel(this.link); - }, - isBlankTarget() { - return this.target === "_blank"; - }, - isInternal() { - return !isExternal(this.link) && !this.isBlankTarget; - }, - target() { - if (this.isNonHttpURI) - return null; - if (this.item.target) - return this.item.target; - return isExternal(this.link) ? "_blank" : ""; - }, - rel() { - if (this.isNonHttpURI) - return null; - if (this.item.rel === false) - return null; - if (this.item.rel) - return this.item.rel; - return this.isBlankTarget ? "noopener noreferrer" : null; - }, - }, - methods: { - focusoutAction() { - // eslint-disable-next-line vue/require-explicit-emits - this.$emit("focusout"); - }, - }, -}); -//# sourceMappingURL=NavLink.js.map \ No newline at end of file diff --git a/theme/components/Navbar/NavLink.js.map b/theme/components/Navbar/NavLink.js.map deleted file mode 100644 index c3c284d..0000000 --- a/theme/components/Navbar/NavLink.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NavLink.js","sourceRoot":"","sources":["NavLink.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAK3E,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,SAAS;IAEf,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,IAAI,EAAE,MAAoC,EAAE,QAAQ,EAAE,IAAI,EAAE;KACrE;IAED,QAAQ,EAAE;QACR,IAAI;YACF,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAc,CAAC,CAAC;QAC7C,CAAC;QAED,UAAU;YACR,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;YAEzC,OAAO,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,OAAO,CAAC;QACxD,CAAC;QAED,MAAM;YACJ,oBAAoB;YACpB,IACE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO;gBACjB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAClC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,IAAI,CAAC,IAAI,CACrC,CAAC;gBACJ,IAAI,CAAC,IAAI,KAAK,GAAG;gBAEjB,cAAc;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} \ No newline at end of file diff --git a/theme/components/Navbar/NavLink.vue b/theme/components/Navbar/NavLink.vue deleted file mode 100644 index ff99fc9..0000000 --- a/theme/components/Navbar/NavLink.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - {{ item.text }} - - - - {{ item.text }} - - - - - - - diff --git a/theme/components/Navbar/NavLinks.d.ts b/theme/components/Navbar/NavLinks.d.ts deleted file mode 100644 index ff37fed..0000000 --- a/theme/components/Navbar/NavLinks.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import Vue from "vue"; -import type { NavBarConfigItem as ResovledNavbarConfigItem } from "@theme/utils/navbar"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Navbar/NavLinks.js b/theme/components/Navbar/NavLinks.js deleted file mode 100644 index 0b2ccd8..0000000 --- a/theme/components/Navbar/NavLinks.js +++ /dev/null @@ -1,18 +0,0 @@ -import Vue from "vue"; -import DropdownLink from "@theme/components/Navbar/DropdownLink.vue"; -import NavLink from "@theme/components/Navbar/NavLink.vue"; -import { getNavLinkItem } from "@theme/utils/navbar"; -export default Vue.extend({ - name: "NavLinks", - components: { - DropdownLink, - NavLink, - }, - computed: { - navLinks() { - const navbar = this.$themeLocaleConfig.nav || this.$themeConfig.nav || []; - return navbar.map((link) => getNavLinkItem(link)); - }, - }, -}); -//# sourceMappingURL=NavLinks.js.map \ No newline at end of file diff --git a/theme/components/Navbar/NavLinks.js.map b/theme/components/Navbar/NavLinks.js.map deleted file mode 100644 index 187c43c..0000000 --- a/theme/components/Navbar/NavLinks.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NavLinks.js","sourceRoot":"","sources":["NavLinks.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,YAAY,MAAM,2CAA2C,CAAC;AACrE,OAAO,OAAO,MAAM,sCAAsC,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,UAAU;IAEhB,UAAU,EAAE;QACV,YAAY;QACZ,OAAO;KACR;IAED,QAAQ,EAAE;QACR,QAAQ;YACN,MAAM,MAAM,GACV,IAAI,CAAC,kBAAkB,CAAC,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,CAAC;YAE7D,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;QACpD,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Navbar/NavLinks.vue b/theme/components/Navbar/NavLinks.vue deleted file mode 100644 index e2378b9..0000000 --- a/theme/components/Navbar/NavLinks.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - diff --git a/theme/components/Navbar/Navbar.d.ts b/theme/components/Navbar/Navbar.d.ts deleted file mode 100644 index 801f7d8..0000000 --- a/theme/components/Navbar/Navbar.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from "vue"; -import type { AlgoliaOption } from "@mr-hope/vuepress-types"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Navbar/Navbar.js b/theme/components/Navbar/Navbar.js deleted file mode 100644 index 401395e..0000000 --- a/theme/components/Navbar/Navbar.js +++ /dev/null @@ -1,92 +0,0 @@ -import Vue from "vue"; -import AlgoliaSearchBox from "@AlgoliaSearchBox"; -import LanguageDropdown from "@theme/components/Navbar/LanguageDropdown"; -import NavLinks from "@theme/components/Navbar/NavLinks.vue"; -import RepoLink from "@theme/components/Navbar/RepoLink.vue"; -import SearchBox from "@SearchBox"; -import SidebarButton from "@theme/components/Navbar/SidebarButton.vue"; -import ThemeColor from "@ThemeColor"; -let handler; -const css = (el, property) => { - // NOTE: Known bug, will return 'auto' if style value is 'auto' - const window = el.ownerDocument.defaultView; - // `null` means not to return pseudo styles - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - return window.getComputedStyle(el, null)[property]; -}; -export default Vue.extend({ - name: "Navbar", - components: { - AlgoliaSearchBox, - LanguageDropdown, - NavLinks, - RepoLink, - SearchBox, - SidebarButton, - ThemeColor, - }, - data: () => ({ - linksWrapMaxWidth: 0, - isMobile: false, - }), - computed: { - siteBrandTitle() { - return this.$site.title; - }, - canHideSiteBrandTitle() { - return (Boolean(this.siteBrandTitle) && - this.$themeConfig.hideSiteTitleonMobile !== false); - }, - siteBrandLogo() { - const { logo } = this.$themeConfig; - return logo ? this.$withBase(logo) : ""; - }, - siteBrandDarkLogo() { - const { darkLogo } = this.$themeConfig; - return darkLogo ? this.$withBase(darkLogo) : ""; - }, - algoliaConfig() { - return (this.$themeLocaleConfig.algolia || this.$themeConfig.algolia || false); - }, - isAlgoliaSearch() { - return Boolean(this.algoliaConfig && - this.algoliaConfig.apiKey && - this.algoliaConfig.indexName); - }, - canHide() { - const autoHide = this.$themeConfig.navAutoHide; - return autoHide !== "none" && (autoHide === "always" || this.isMobile); - }, - }, - mounted() { - // Refer to config.styl - const MOBILE_DESKTOP_BREAKPOINT = 719; - const NAVBAR_HORIZONTAL_PADDING = parseInt(css(this.$el, "paddingLeft")) + - parseInt(css(this.$el, "paddingRight")); - handler = () => { - if (document.documentElement.clientWidth < MOBILE_DESKTOP_BREAKPOINT) { - this.isMobile = true; - this.linksWrapMaxWidth = 0; - } - else { - this.isMobile = false; - this.linksWrapMaxWidth = - this.$el.offsetWidth - - NAVBAR_HORIZONTAL_PADDING - - ((this.$refs.siteInfo && - this.$refs.siteInfo.$el && - this.$refs.siteInfo.$el.offsetWidth) || - 0); - } - }; - handler(); - window.addEventListener("resize", handler); - window.addEventListener("orientationchange", handler); - }, - // eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle - beforeDestroy() { - window.removeEventListener("resize", handler); - window.removeEventListener("orientationchange", handler); - }, -}); -//# sourceMappingURL=Navbar.js.map \ No newline at end of file diff --git a/theme/components/Navbar/Navbar.js.map b/theme/components/Navbar/Navbar.js.map deleted file mode 100644 index 7fe125b..0000000 --- a/theme/components/Navbar/Navbar.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Navbar.js","sourceRoot":"","sources":["Navbar.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,gBAAgB,MAAM,mBAAmB,CAAC;AACjD,OAAO,gBAAgB,MAAM,2CAA2C,CAAC;AACzE,OAAO,QAAQ,MAAM,uCAAuC,CAAC;AAC7D,OAAO,QAAQ,MAAM,uCAAuC,CAAC;AAC7D,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,aAAa,MAAM,4CAA4C,CAAC;AACvE,OAAO,UAAU,MAAM,aAAa,CAAC;AAIrC,IAAI,OAAmB,CAAC;AAExB,MAAM,GAAG,GAAG,CACV,EAAW,EACX,QAQC,EACO,EAAE;IACV,+DAA+D;IAC/D,MAAM,MAAM,GAAG,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC;IAE5C,2CAA2C;IAC3C,oEAAoE;IACpE,OAAO,MAAO,CAAC,gBAAgB,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAW,CAAC;AAChE,CAAC,CAAC;AAEF,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,QAAQ;IAEd,UAAU,EAAE;QACV,gBAAgB;QAChB,gBAAgB;QAChB,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,aAAa;QACb,UAAU;KACX;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,iBAAiB,EAAE,CAAC;QACpB,QAAQ,EAAE,KAAK;KAChB,CAAC;IAEF,QAAQ,EAAE;QACR,cAAc;YACZ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;QAC1B,CAAC;QAED,qBAAqB;YACnB,OAAO,CACL,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC;gBAC5B,IAAI,CAAC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B,EAAE;gBACpE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACrB,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;aAC5B;iBAAM;gBACL,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;gBACtB,IAAI,CAAC,iBAAiB;oBACnB,IAAI,CAAC,GAAmB,CAAC,WAAW;wBACrC,yBAAyB;wBACzB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;4BAClB,IAAI,CAAC,KAAK,CAAC,QAAgB,CAAC,GAAG;4BAC9B,IAAI,CAAC,KAAK,CAAC,QAAgB,CAAC,GAAmB,CAAC,WAAW,CAAC;4BAC9D,CAAC,CAAC,CAAC;aACR;QACH,CAAC,CAAC;QAEF,OAAO,EAAE,CAAC;QACV,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC3C,MAAM,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAED,iEAAiE;IACjE,aAAa;QACX,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC9C,MAAM,CAAC,mBAAmB,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Navbar/Navbar.vue b/theme/components/Navbar/Navbar.vue deleted file mode 100644 index 138c461..0000000 --- a/theme/components/Navbar/Navbar.vue +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - {{ siteBrandTitle }} - - - - - - - - - - - - - - - - - - - - diff --git a/theme/components/Navbar/RepoLink.d.ts b/theme/components/Navbar/RepoLink.d.ts deleted file mode 100644 index 2e89396..0000000 --- a/theme/components/Navbar/RepoLink.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Navbar/RepoLink.js b/theme/components/Navbar/RepoLink.js deleted file mode 100644 index 67f5d84..0000000 --- a/theme/components/Navbar/RepoLink.js +++ /dev/null @@ -1,27 +0,0 @@ -import Vue from "vue"; -export default Vue.extend({ - name: "RepoLink", - computed: { - repoLink() { - const { repo } = this.$themeConfig; - if (repo) - return /^https?:/u.test(repo) ? repo : `https://github.com/${repo}`; - return ""; - }, - repoLabel() { - if (!this.repoLink) - return ""; - if (this.$themeConfig.repoLabel) - return this.$themeConfig.repoLabel; - const [repoHost] = /^https?:\/\/[^/]+/u.exec(this.repoLink) || [""]; - const platforms = ["GitHub", "GitLab", "Bitbucket"]; - for (let index = 0; index < platforms.length; index++) { - const platform = platforms[index]; - if (new RegExp(platform, "iu").test(repoHost)) - return platform; - } - return "Source"; - }, - }, -}); -//# sourceMappingURL=RepoLink.js.map \ No newline at end of file diff --git a/theme/components/Navbar/RepoLink.js.map b/theme/components/Navbar/RepoLink.js.map deleted file mode 100644 index 4ea3f90..0000000 --- a/theme/components/Navbar/RepoLink.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"RepoLink.js","sourceRoot":"","sources":["RepoLink.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,UAAU;IAEhB,QAAQ,EAAE;QACR,QAAQ;YACN,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;YAEnC,IAAI,IAAI;gBACN,OAAO,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,sBAAsB,IAAI,EAAE,CAAC;YAEtE,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,SAAS;YACP,IAAI,CAAC,IAAI,CAAC,QAAQ;gBAAE,OAAO,EAAE,CAAC;YAC9B,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS;gBAAE,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC;YAEpE,MAAM,CAAC,QAAQ,CAAC,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACpE,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;YAEpD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;gBACrD,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;gBAElC,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;oBAAE,OAAO,QAAQ,CAAC;aAChE;YAED,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Navbar/RepoLink.vue b/theme/components/Navbar/RepoLink.vue deleted file mode 100644 index 7e51ae6..0000000 --- a/theme/components/Navbar/RepoLink.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - - {{ repoLabel }} - - - - - - - diff --git a/theme/components/Navbar/SidebarButton.vue b/theme/components/Navbar/SidebarButton.vue deleted file mode 100644 index efe414e..0000000 --- a/theme/components/Navbar/SidebarButton.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - diff --git a/theme/components/Page.d.ts b/theme/components/Page.d.ts deleted file mode 100644 index a715de4..0000000 --- a/theme/components/Page.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import Anchor from "@theme/components/Anchor.vue"; -import type { PageHeader } from "@mr-hope/vuepress-types"; -import type { SidebarItem } from "@theme/utils/sidebar"; -declare const _default: import("vue/types/vue").ExtendedVue<{ - encryptPasswordConfig: Record; -} & { - checkPathPassword(password: string): void; -} & { - pathEncryptMatchKeys: string[]; - isPathEncrypted: boolean; -} & Record & { - encryptOptions: import("../types").EncryptOptions; -} & Anchor, { - password: string; -}, unknown, { - pagePassword: string; - pageDescrypted: boolean; -}, { - sidebarItems: SidebarItem[]; - headers: PageHeader[]; -}>; -export default _default; diff --git a/theme/components/Page.js b/theme/components/Page.js deleted file mode 100644 index 1e2fef5..0000000 --- a/theme/components/Page.js +++ /dev/null @@ -1,47 +0,0 @@ -import Anchor from "@theme/components/Anchor.vue"; -import Comment from "@Comment"; -import MyTransition from "@theme/components/MyTransition.vue"; -import PageInfo from "@mr-hope/vuepress-plugin-comment/lib/client/PageInfo.vue"; -import PageMeta from "@theme/components/PageMeta.vue"; -import PageNav from "@theme/components/PageNav.vue"; -import Password from "@theme/components/Password.vue"; -import { pathEncryptMixin } from "@theme/mixins/pathEncrypt"; -export default pathEncryptMixin.extend({ - name: "Page", - components: { - Anchor, - Comment, - MyTransition, - PageInfo, - PageMeta, - PageNav, - Password, - }, - props: { - sidebarItems: { - type: Array, - default: () => [], - }, - headers: { - type: Array, - default: () => [], - }, - }, - data: () => ({ - password: "", - }), - computed: { - pagePassword() { - const { password } = this.$frontmatter; - return typeof password === "number" - ? password.toString() - : typeof password === "string" - ? password - : ""; - }, - pageDescrypted() { - return this.password === this.pagePassword; - }, - }, -}); -//# sourceMappingURL=Page.js.map \ No newline at end of file diff --git a/theme/components/Page.js.map b/theme/components/Page.js.map deleted file mode 100644 index ad49cea..0000000 --- a/theme/components/Page.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Page.js","sourceRoot":"","sources":["Page.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAClD,OAAO,OAAO,MAAM,UAAU,CAAC;AAC/B,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAC9D,OAAO,QAAQ,MAAM,0DAA0D,CAAC;AAChF,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,OAAO,MAAM,+BAA+B,CAAC;AACpD,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAM7D,eAAe,gBAAgB,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,MAAM;IAEZ,UAAU,EAAE;QACV,MAAM;QACN,OAAO;QACP,YAAY;QACZ,QAAQ;QACR,QAAQ;QACR,OAAO;QACP,QAAQ;KACT;IAED,KAAK,EAAE;QACL,YAAY,EAAE;YACZ,IAAI,EAAE,KAAgC;YACtC,OAAO,EAAE,GAAkB,EAAE,CAAC,EAAE;SACjC;QACD,OAAO,EAAE;YACP,IAAI,EAAE,KAA+B;YACrC,OAAO,EAAE,GAAiB,EAAE,CAAC,EAAE;SAChC;KACF;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE,EAAE;KACb,CAAC;IAEF,QAAQ,EAAE;QACR,YAAY;YACV,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;YAEvC,OAAO,OAAO,QAAQ,KAAK,QAAQ;gBACjC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE;gBACrB,CAAC,CAAC,OAAO,QAAQ,KAAK,QAAQ;oBAC9B,CAAC,CAAC,QAAQ;oBACV,CAAC,CAAC,EAAE,CAAC;QACT,CAAC;QAED,cAAc;YACZ,OAAO,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY,CAAC;QAC7C,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Page.vue b/theme/components/Page.vue deleted file mode 100644 index aa43776..0000000 --- a/theme/components/Page.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/theme/components/PageFooter.d.ts b/theme/components/PageFooter.d.ts deleted file mode 100644 index ccf77e3..0000000 --- a/theme/components/PageFooter.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import Vue from "vue"; -import type { HopeFooterConfig } from "../types"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/PageFooter.js b/theme/components/PageFooter.js deleted file mode 100644 index f6037d2..0000000 --- a/theme/components/PageFooter.js +++ /dev/null @@ -1,36 +0,0 @@ -import Vue from "vue"; -import MediaLinks from "@theme/components/MediaLinks.vue"; -export default Vue.extend({ - name: "PageFooter", - components: { MediaLinks }, - computed: { - footerConfig() { - return this.$themeLocaleConfig.footer || this.$themeConfig.footer || {}; - }, - enable() { - const { copyrightText, footer, medialink } = this.$page.frontmatter; - return (footer !== false && - Boolean(copyrightText || footer || medialink || this.footerConfig.display)); - }, - footerContent() { - const { footer } = this.$page.frontmatter; - return footer === false - ? false - : typeof footer === "string" - ? footer - : this.footerConfig.content || ""; - }, - copyright() { - return this.$frontmatter.copyrightText === false - ? false - : this.$frontmatter.copyrightText || - (this.footerConfig.copyright === false - ? false - : this.footerConfig.copyright || - (this.$themeConfig.author - ? `Copyright © ${new Date().getFullYear()} ${this.$themeConfig.author}` - : "")); - }, - }, -}); -//# sourceMappingURL=PageFooter.js.map \ No newline at end of file diff --git a/theme/components/PageFooter.js.map b/theme/components/PageFooter.js.map deleted file mode 100644 index c5c0a99..0000000 --- a/theme/components/PageFooter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PageFooter.js","sourceRoot":"","sources":["PageFooter.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAI1D,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,YAAY;IAElB,UAAU,EAAE,EAAE,UAAU,EAAE;IAE1B,QAAQ,EAAE;QACR,YAAY;YACV,OAAO,IAAI,CAAC,kBAAkB,CAAC,MAAM,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,IAAI,EAAE,CAAC;QAC1E,CAAC;QAED,MAAM;YACJ,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;YAEpE,OAAO,CACL,MAAM,KAAK,KAAK;gBAChB,OAAO,CACL,aAAa,IAAI,MAAM,IAAI,SAAS,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAClE,CACF,CAAC;QACJ,CAAC;QAED,aAAa;YACX,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;YAE1C,OAAO,MAAM,KAAK,KAAK;gBACrB,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,OAAO,MAAM,KAAK,QAAQ;oBAC5B,CAAC,CAAC,MAAM;oBACR,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,CAAC;QACtC,CAAC;QAED,SAAS;YACP,OAAO,IAAI,CAAC,YAAY,CAAC,aAAa,KAAK,KAAK;gBAC9C,CAAC,CAAC,KAAK;gBACP,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,aAAa;oBAC7B,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,KAAK,KAAK;wBACpC,CAAC,CAAC,KAAK;wBACP,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS;4BAC3B,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM;gCACvB,CAAC,CAAC,eAAe,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,IACrC,IAAI,CAAC,YAAY,CAAC,MACpB,EAAE;gCACJ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrB,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/PageFooter.vue b/theme/components/PageFooter.vue deleted file mode 100644 index a7eda44..0000000 --- a/theme/components/PageFooter.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - diff --git a/theme/components/PageMeta.d.ts b/theme/components/PageMeta.d.ts deleted file mode 100644 index c51eb16..0000000 --- a/theme/components/PageMeta.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import Vue from "vue"; -import type { GitContributor } from "@mr-hope/vuepress-plugin-git"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/PageMeta.js b/theme/components/PageMeta.js deleted file mode 100644 index 332e894..0000000 --- a/theme/components/PageMeta.js +++ /dev/null @@ -1,64 +0,0 @@ -import Vue from "vue"; -import EditIcon from "@theme/icons/EditIcon.vue"; -import { endingSlashRE, outboundRE } from "@theme/utils/path"; -export default Vue.extend({ - name: "PageMeta", - components: { EditIcon }, - computed: { - i18n() { - return (this.$themeLocaleConfig.meta || { - contributor: "Contributors", - editLink: "Edit this page", - updateTime: "Last Updated", - }); - }, - contributors() { - return this.$page.frontmatter.contributor === false || - (this.$themeConfig.contributor === false && - !this.$page.frontmatter.contributor) - ? [] - : this.$page.contributors || []; - }, - contributorsText() { - return this.i18n.contributor; - }, - updateTime() { - return this.$page.frontmatter.contributor === false || - (this.$themeConfig.updateTime === false && - !this.$page.frontmatter.updateTime) - ? "" - : this.$page.updateTime || ""; - }, - updateTimeText() { - return this.i18n.updateTime; - }, - editLink() { - const showEditLink = this.$page.frontmatter.editLink || - (this.$themeConfig.editLinks !== false && - this.$page.frontmatter.editLink !== false); - const { repo, docsRepo } = this.$site.themeConfig; - if (showEditLink && (repo || docsRepo) && this.$page.relativePath) - return this.createEditLink(); - return false; - }, - editLinkText() { - return this.i18n.editLink; - }, - }, - methods: { - createEditLink() { - const { repo = "", docsRepo = repo, docsDir = "", docsBranch = "main", } = this.$themeConfig; - const bitbucket = /bitbucket.org/u; - if (bitbucket.test(docsRepo)) - return `${docsRepo.replace(endingSlashRE, "")}/src/${docsBranch}/${docsDir ? `${docsDir.replace(endingSlashRE, "")}/` : ""}${this.$page.relativePath}?mode=edit&spa=0&at=${docsBranch}&fileviewer=file-view-default`; - const gitlab = /gitlab.com/u; - if (gitlab.test(docsRepo)) - return `${docsRepo.replace(endingSlashRE, "")}/-/edit/${docsBranch}/${docsDir ? `${docsDir.replace(endingSlashRE, "")}/` : ""}${this.$page.relativePath}`; - const base = outboundRE.test(docsRepo) - ? docsRepo - : `https://github.com/${docsRepo}`; - return `${base.replace(endingSlashRE, "")}/edit/${docsBranch}/${docsDir ? `${docsDir.replace(endingSlashRE, "")}/` : ""}${this.$page.relativePath}`; - }, - }, -}); -//# sourceMappingURL=PageMeta.js.map \ No newline at end of file diff --git a/theme/components/PageMeta.js.map b/theme/components/PageMeta.js.map deleted file mode 100644 index fd834e7..0000000 --- a/theme/components/PageMeta.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PageMeta.js","sourceRoot":"","sources":["PageMeta.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK9D,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,UAAU;IAEhB,UAAU,EAAE,EAAE,QAAQ,EAAE;IAExB,QAAQ,EAAE;QACR,IAAI;YACF,OAAO,CACL,IAAI,CAAC,kBAAkB,CAAC,IAAI,IAAI;gBAC9B,WAAW,EAAE,cAAc;gBAC3B,QAAQ,EAAE,gBAAgB;gBAC1B,UAAU,EAAE,cAAc;aAC3B,CACF,CAAC;QACJ,CAAC;QAED,YAAY;YACV,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,KAAK,KAAK;gBACjD,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,KAAK,KAAK;oBACtC,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC;gBACtC,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC;QACpC,CAAC;QAED,gBAAgB;YACd,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;QAC/B,CAAC;QAED,UAAU;YACR,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,KAA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O,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EACvD,GACE,IAAI,CAAC,KAAK,CAAC,YACb,uBAAuB,UAAU,+BAA+B,CAAC;YAEnE,MAAM,MAAM,GAAG,aAAa,CAAC;YAC7B,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;gBACvB,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,WAAW,UAAU,IAChE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EACvD,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;YAE/B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC;gBACpC,CAAC,CAAC,QAAQ;gBACV,CAAC,CAAC,sBAAsB,QAAQ,EAAE,CAAC;YAErC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,SAAS,UAAU,IAC1D,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EACvD,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QAC/B,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/PageMeta.vue b/theme/components/PageMeta.vue deleted file mode 100644 index f8b799a..0000000 --- a/theme/components/PageMeta.vue +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - diff --git a/theme/components/PageNav.d.ts b/theme/components/PageNav.d.ts deleted file mode 100644 index 2e59ea0..0000000 --- a/theme/components/PageNav.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import Vue from "vue"; -import type { SidebarItem } from "@theme/utils/sidebar"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/PageNav.js b/theme/components/PageNav.js deleted file mode 100644 index 2dd7593..0000000 --- a/theme/components/PageNav.js +++ /dev/null @@ -1,64 +0,0 @@ -import Vue from "vue"; -import NextIcon from "@theme/icons/NextIcon.vue"; -import PrevIcon from "@theme/icons/PrevIcon.vue"; -import { resolvePath } from "@theme/utils/path"; -import { resolvePageforSidebar } from "@theme/utils/sidebar"; -const getSidebarItems = (items, result) => { - for (const item of items) - if (item.type === "group") - getSidebarItems((item.children || []), result); - else - result.push(item); -}; -const find = (page, items, offset) => { - const result = []; - getSidebarItems(items, result); - for (let i = 0; i < result.length; i++) { - const cur = result[i]; - if (cur.type === "page" && cur.path === decodeURIComponent(page.path)) - return result[i + offset]; - } - return false; -}; -const resolvePageLink = (linkType, { themeConfig, page, route, site, sidebarItems }) => { - const themeLinkConfig = - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion - themeConfig[`${linkType}Links`]; - const pageLinkConfig = page.frontmatter[linkType]; - if (themeLinkConfig === false || pageLinkConfig === false) - return false; - if (typeof pageLinkConfig === "string") - return resolvePageforSidebar(site.pages, resolvePath(pageLinkConfig, route.path)); - return find(page, sidebarItems, linkType === "prev" ? -1 : 1); -}; -export default Vue.extend({ - name: "PageNav", - components: { NextIcon, PrevIcon }, - props: { - sidebarItems: { - type: Array, - default: () => [], - }, - }, - computed: { - prev() { - return resolvePageLink("prev", { - sidebarItems: this.sidebarItems, - themeConfig: this.$themeConfig, - page: this.$page, - route: this.$route, - site: this.$site, - }); - }, - next() { - return resolvePageLink("next", { - sidebarItems: this.sidebarItems, - themeConfig: this.$themeConfig, - page: this.$page, - route: this.$route, - site: this.$site, - }); - }, - }, -}); -//# sourceMappingURL=PageNav.js.map \ No newline at end of file diff --git a/theme/components/PageNav.js.map b/theme/components/PageNav.js.map deleted file mode 100644 index 44a4dec..0000000 --- a/theme/components/PageNav.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PageNav.js","sourceRoot":"","sources":["PageNav.ts"],"names":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ACL,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/PageNav.vue b/theme/components/PageNav.vue deleted file mode 100644 index e097722..0000000 --- a/theme/components/PageNav.vue +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - {{ prev.title || prev.path }} - - - - - - {{ prev.title || prev.path }} - - - - - - {{ next.title || next.path }} - - - - - {{ next.title || next.path }} - - - - - - - - - - diff --git a/theme/components/Password.d.ts b/theme/components/Password.d.ts deleted file mode 100644 index 6a53856..0000000 --- a/theme/components/Password.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/Password.js b/theme/components/Password.js deleted file mode 100644 index 818b3a3..0000000 --- a/theme/components/Password.js +++ /dev/null @@ -1,31 +0,0 @@ -import { getDefaultLocale } from "@mr-hope/vuepress-shared"; -import Vue from "vue"; -export default Vue.extend({ - name: "Password", - props: { - page: { type: Boolean, default: false }, - }, - data: () => ({ - password: "", - hasTried: false, - }), - computed: { - isMainPage() { - return this.$frontmatter.home === true; - }, - encrypt() { - return this.$themeLocaleConfig.encrypt || getDefaultLocale().encrypt; - } - }, - methods: { - verify() { - this.hasTried = false; - // eslint-disable-next-line vue/require-explicit-emits - this.$emit("password-verify", this.password); - void Vue.nextTick().then(() => { - this.hasTried = true; - }); - }, - }, -}); -//# sourceMappingURL=Password.js.map \ No newline at end of file diff --git a/theme/components/Password.js.map b/theme/components/Password.js.map deleted file mode 100644 index dd3162e..0000000 --- a/theme/components/Password.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Password.js","sourceRoot":"","sources":["Password.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,GAAG,MAAM,KAAK,CAAC;AAItB,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,UAAU;IAEhB,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;KACxC;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,KAAK;KAChB,CAAC;IAEF,QAAQ,EAAE;QACR,UAAU;YACR,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,KAAK,IAAI,CAAC;QACzC,CAAC;QAED,OAAO;YACL,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,IAAI,gBAAgB,EAAE,CAAC,OAAO,CAAC;QACvE,CAAC;KACF;IAED,OAAO,EAAE;QACP,MAAM;YACJ,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,sDAAsD;YACtD,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAE7C,KAAK,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACvB,CAAC,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Password.vue b/theme/components/Password.vue deleted file mode 100644 index 42b045a..0000000 --- a/theme/components/Password.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - {{ hasTried ? encrypt.errorHint : encrypt.title }} - - - - OK - - - - - - - diff --git a/theme/components/Sidebar/DropdownTransition.d.ts b/theme/components/Sidebar/DropdownTransition.d.ts deleted file mode 100644 index 9622a35..0000000 --- a/theme/components/Sidebar/DropdownTransition.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Sidebar/DropdownTransition.js b/theme/components/Sidebar/DropdownTransition.js deleted file mode 100644 index 8620597..0000000 --- a/theme/components/Sidebar/DropdownTransition.js +++ /dev/null @@ -1,14 +0,0 @@ -import Vue from "vue"; -export default Vue.extend({ - name: "DropdownTransition", - methods: { - setHeight(items) { - // explicitly set height so that it can be transitioned - items.style.height = `${items.scrollHeight}px`; - }, - unsetHeight(items) { - items.style.height = ""; - }, - }, -}); -//# sourceMappingURL=DropdownTransition.js.map \ No newline at end of file diff --git a/theme/components/Sidebar/DropdownTransition.js.map b/theme/components/Sidebar/DropdownTransition.js.map deleted file mode 100644 index 945f581..0000000 --- a/theme/components/Sidebar/DropdownTransition.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DropdownTransition.js","sourceRoot":"","sources":["DropdownTransition.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,oBAAoB;IAE1B,OAAO,EAAE;QACP,SAAS,CAAC,KAAkB;YAC1B,uDAAuD;YACvD,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC,YAAY,IAAI,CAAC;QACjD,CAAC;QAED,WAAW,CAAC,KAAkB;YAC5B,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;QAC1B,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Sidebar/DropdownTransition.vue b/theme/components/Sidebar/DropdownTransition.vue deleted file mode 100644 index d310408..0000000 --- a/theme/components/Sidebar/DropdownTransition.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/theme/components/Sidebar/Sidebar.d.ts b/theme/components/Sidebar/Sidebar.d.ts deleted file mode 100644 index 524c351..0000000 --- a/theme/components/Sidebar/Sidebar.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Vue from "vue"; -import type { BlogOptions } from "@theme/types"; -import type { SidebarItem } from "@theme/utils/sidebar"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/Sidebar/Sidebar.js b/theme/components/Sidebar/Sidebar.js deleted file mode 100644 index 5426b6a..0000000 --- a/theme/components/Sidebar/Sidebar.js +++ /dev/null @@ -1,26 +0,0 @@ -import Vue from "vue"; -import BlogInfo from "@BlogInfo"; -import BloggerInfo from "@BloggerInfo"; -import SidebarNavLinks from "@theme/components/Sidebar/SidebarNavLinks.vue"; -import SidebarLinks from "@theme/components/Sidebar/SidebarLinks.vue"; -export default Vue.extend({ - name: "Sidebar", - components: { - BlogInfo, - BloggerInfo, - SidebarLinks, - SidebarNavLinks, - }, - props: { - items: { type: Array, required: true }, - }, - computed: { - blogConfig() { - return this.$themeConfig.blog || {}; - }, - sidebarDisplay() { - return this.blogConfig.sidebarDisplay || "none"; - }, - }, -}); -//# sourceMappingURL=Sidebar.js.map \ No newline at end of file diff --git a/theme/components/Sidebar/Sidebar.js.map b/theme/components/Sidebar/Sidebar.js.map deleted file mode 100644 index 67c8a57..0000000 --- a/theme/components/Sidebar/Sidebar.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["Sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,eAAe,MAAM,+CAA+C,CAAC;AAC5E,OAAO,YAAY,MAAM,4CAA4C,CAAC;AAMtE,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,SAAS;IAEf,UAAU,EAAE;QACV,QAAQ;QACR,WAAW;QACX,YAAY;QACZ,eAAe;KAChB;IAED,KAAK,EAAE;QACL,KAAK,EAAE,EAAE,IAAI,EAAE,KAAgC,EAAE,QAAQ,EAAE,IAAI,EAAE;KAClE;IAED,QAAQ,EAAE;QACR,UAAU;YACR,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,EAAE,CAAC;QACtC,CAAC;QAED,cAAc;YACZ,OAAO,IAAI,CAAC,UAAU,CAAC,cAAc,IAAI,MAAM,CAAC;QAClD,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Sidebar/Sidebar.vue b/theme/components/Sidebar/Sidebar.vue deleted file mode 100644 index 23528e7..0000000 --- a/theme/components/Sidebar/Sidebar.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - diff --git a/theme/components/Sidebar/SidebarDropdownLink.d.ts b/theme/components/Sidebar/SidebarDropdownLink.d.ts deleted file mode 100644 index 0a3ed06..0000000 --- a/theme/components/Sidebar/SidebarDropdownLink.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import Vue from "vue"; -import type { NavBarConfigItem } from "@theme/utils/navbar"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/Sidebar/SidebarDropdownLink.js b/theme/components/Sidebar/SidebarDropdownLink.js deleted file mode 100644 index 24cc80a..0000000 --- a/theme/components/Sidebar/SidebarDropdownLink.js +++ /dev/null @@ -1,38 +0,0 @@ -import Vue from "vue"; -import DropdownTransition from "@theme/components/Sidebar/DropdownTransition.vue"; -import NavLink from "@theme/components/Navbar/NavLink.vue"; -export default Vue.extend({ - name: "SidebarDropdownLink", - components: { NavLink, DropdownTransition }, - props: { - item: { type: Object, required: true }, - }, - data: () => ({ - open: false, - }), - computed: { - dropdownAriaLabel() { - return this.item.ariaLabel || this.item.text; - }, - iconPrefix() { - const { iconPrefix } = this.$themeConfig; - return iconPrefix === "" ? "" : iconPrefix || "icon-"; - }, - }, - watch: { - $route() { - this.open = false; - }, - }, - methods: { - setOpen(value) { - this.open = value; - }, - isLastItemOfArray(item, array) { - if (Array.isArray(array)) - return item === array[array.length - 1]; - return false; - }, - }, -}); -//# sourceMappingURL=SidebarDropdownLink.js.map \ No newline at end of file diff --git a/theme/components/Sidebar/SidebarDropdownLink.js.map b/theme/components/Sidebar/SidebarDropdownLink.js.map deleted file mode 100644 index 7e3ff6c..0000000 --- a/theme/components/Sidebar/SidebarDropdownLink.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SidebarDropdownLink.js","sourceRoot":"","sources":["SidebarDropdownLink.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,kBAAkB,MAAM,kDAAkD,CAAC;AAClF,OAAO,OAAO,MAAM,sCAAsC,CAAC;AAK3D,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,qBAAqB;IAE3B,UAAU,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE;IAE3C,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,IAAI,EAAE,MAAoC,EAAE,QAAQ,EAAE,IAAI,EAAE;KACrE;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,IAAI,EAAE,KAAK;KACZ,CAAC;IAEF,QAAQ,EAAE;QACR,iBAAiB;YACf,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QAC/C,CAAC;QAED,UAAU;YACR,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;YAEzC,OAAO,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,OAAO,CAAC;QACxD,CAAC;KACF;IAED,KAAK,EAAE;QACL,MAAM;YACJ,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QACpB,CAAC;KACF;IAED,OAAO,EAAE;QACP,OAAO,CAAC,KAAc;YACpB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QACpB,CAAC;QAED,iBAAiB,CACf,IAAsB,EACtB,KAAyB;YAEzB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;gBAAE,OAAO,IAAI,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAElE,OAAO,KAAK,CAAC;QACf,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Sidebar/SidebarDropdownLink.vue b/theme/components/Sidebar/SidebarDropdownLink.vue deleted file mode 100644 index 275b746..0000000 --- a/theme/components/Sidebar/SidebarDropdownLink.vue +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - {{ item.text }} - - - - - - - - - - - {{ child.text }} - - - - - - - - - - - - - - - - - - diff --git a/theme/components/Sidebar/SidebarGroup.d.ts b/theme/components/Sidebar/SidebarGroup.d.ts deleted file mode 100644 index efebc18..0000000 --- a/theme/components/Sidebar/SidebarGroup.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import Vue from "vue"; -import type { SidebarAutoItem, SidebarGroupItem } from "@theme/utils/sidebar"; -declare const _default: import("vue/types/vue").ExtendedVue boolean; -}, unknown, { - item: SidebarAutoItem | SidebarGroupItem; - open: boolean; - depth: number; -}>; -export default _default; diff --git a/theme/components/Sidebar/SidebarGroup.js b/theme/components/Sidebar/SidebarGroup.js deleted file mode 100644 index 87c3bee..0000000 --- a/theme/components/Sidebar/SidebarGroup.js +++ /dev/null @@ -1,32 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unsafe-member-access */ -import Vue from "vue"; -import DropdownTransition from "@theme/components/Sidebar/DropdownTransition.vue"; -import { isActive } from "@theme/utils/path"; -export default Vue.extend({ - name: "SidebarGroup", - components: { DropdownTransition }, - props: { - item: { - type: Object, - required: true, - }, - open: { type: Boolean }, - depth: { type: Number, required: true }, - }, - beforeCreate() { - // eslint-disable-next-line - this.$options.components.SidebarLinks = - // eslint-disable-next-line @typescript-eslint/no-var-requires - require("@theme/components/Sidebar/SidebarLinks.vue").default; - }, - methods: { - getIcon(icon) { - const { iconPrefix } = this.$themeConfig; - return this.$themeConfig.sidebarIcon !== false && icon - ? `${iconPrefix === "" ? "" : iconPrefix || "icon-"}${icon}` - : ""; - }, - isActive, - }, -}); -//# sourceMappingURL=SidebarGroup.js.map \ No newline at end of file diff --git a/theme/components/Sidebar/SidebarGroup.js.map b/theme/components/Sidebar/SidebarGroup.js.map deleted file mode 100644 index d0bcc70..0000000 --- a/theme/components/Sidebar/SidebarGroup.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SidebarGroup.js","sourceRoot":"","sources":["SidebarGroup.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,kBAAkB,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,cAAc;IAEpB,UAAU,EAAE,EAAE,kBAAkB,EAAE;IAElC,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,MAAsD;YAC5D,QAAQ,EAAE,IAAI;SACf;QACD,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;QACvB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;KACxC;IAED,YAAY;QACV,2BAA2B;QAC3B,IAAI,CAAC,QAAQ,CAAC,UAAW,CAAC,YAAY;YACpC,8DAA8D;YAC9D,OAAO,CAAC,4CAA4C,CAAC,CAAC,OAAO,CAAC;IAClE,CAAC;IAED,OAAO,EAAE;QACP,OAAO,CAAC,IAAwB;YAC9B,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC;YAEzC,OAAO,IAAI,CAAC,YAAY,CAAC,WAAW,KAAK,KAAK,IAAI,IAAI;gBACpD,CAAC,CAAC,GAAG,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,OAAO,GAAG,IAAI,EAAE;gBAC5D,CAAC,CAAC,EAAE,CAAC;QACT,CAAC;QAED,QAAQ;KACT;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Sidebar/SidebarGroup.vue b/theme/components/Sidebar/SidebarGroup.vue deleted file mode 100644 index fe812b7..0000000 --- a/theme/components/Sidebar/SidebarGroup.vue +++ /dev/null @@ -1,136 +0,0 @@ - - - - - {{ item.title }} - - - - - - {{ item.title }} - - - - - - - - - - - - diff --git a/theme/components/Sidebar/SidebarLink.d.ts b/theme/components/Sidebar/SidebarLink.d.ts deleted file mode 100644 index 65de639..0000000 --- a/theme/components/Sidebar/SidebarLink.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Sidebar/SidebarLink.js b/theme/components/Sidebar/SidebarLink.js deleted file mode 100644 index 2de851b..0000000 --- a/theme/components/Sidebar/SidebarLink.js +++ /dev/null @@ -1,137 +0,0 @@ -import Vue from "vue"; -import { hashRE, isActive } from "@theme/utils/path"; -import { groupSidebarHeaders } from "@theme/utils/sidebar"; -const renderIcon = (h, icon) => icon - ? h("i", { - class: ["iconfont", icon], - }) - : null; -const renderLink = (h, { icon = "", text, link, level, active }) => h("RouterLink", { - props: { - to: link, - activeClass: "", - exactActiveClass: "", - }, - class: { - active, - "sidebar-link": true, - [level ? `heading${level}` : ""]: level && level !== 2, - }, -}, [renderIcon(h, icon), text]); -const renderExternalLink = (h, { path, title = path }) => h("a", { - attrs: { - href: path, - target: "_blank", - rel: "noopener noreferrer", - }, - class: { "sidebar-link": true }, -}, [title, h("OutboundLink")]); -const renderChildren = (h, { children, path, route, maxDepth, depth = 1 }) => { - if (!children || depth > maxDepth) - return null; - return h("ul", { class: "sidebar-sub-headers" }, children.map((child) => { - const active = isActive(route, `${path}#${child.slug}`); - return h("li", { class: "sidebar-sub-header" }, [ - renderLink(h, { - text: child.title, - link: `${path}#${child.slug}`, - level: child.level, - active, - }), - renderChildren(h, { - children: child.children || false, - path, - route, - maxDepth, - depth: depth + 1, - }), - ]); - })); -}; -export default Vue.extend({ - name: "SidebarLink", - functional: true, - props: { - item: { - type: Object, - required: true, - }, - }, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - render(h, { parent: { $page, $route, $themeConfig, $themeLocaleConfig }, props }) { - const { item } = props; - // if the item can not be resolved - if (item.type === "error") - return null; - // external link - if (item.type === "external") - return renderExternalLink(h, item); - /* - * Use custom active class matching logic - * Due to edge case of paths ending with / + hash - */ - const selfActive = isActive($route, item.path); - /** whether the item is active */ - const active = - // if the item is a heading, then one of the children needs to be active - item.type === "header" - ? selfActive || - (item.children || []).some((child) => isActive($route, `${item.basePath}#${child.slug}`)) - : selfActive; - const pageMaxDepth = $page.frontmatter.sidebarDepth; - const localesMaxDepth = $themeLocaleConfig.sidebarDepth; - const themeMaxDepth = $themeConfig.sidebarDepth; - const maxDepth = typeof pageMaxDepth === "number" - ? pageMaxDepth - : typeof localesMaxDepth === "number" - ? localesMaxDepth - : typeof themeMaxDepth === "number" - ? themeMaxDepth - : 2; - // the item is a heading - if (item.type === "header") - return [ - renderLink(h, { - text: item.title || item.path, - link: item.path, - level: item.level, - active, - }), - renderChildren(h, { - children: item.children || false, - path: item.basePath, - route: $route, - maxDepth, - }), - ]; - const displayAllHeaders = $themeLocaleConfig.displayAllHeaders || - $themeConfig.displayAllHeaders; - const link = renderLink(h, { - icon: $themeConfig.sidebarIcon !== false && item.frontmatter.icon - ? `${$themeConfig.iconPrefix === "" - ? "" - : $themeConfig.iconPrefix || "icon-"}${item.frontmatter.icon}` - : "", - text: item.title || item.path, - link: item.path, - active, - }); - if ((active || displayAllHeaders) && - item.headers && - !hashRE.test(item.path)) { - const children = groupSidebarHeaders(item.headers); - return [ - link, - renderChildren(h, { - children, - path: item.path, - route: $route, - maxDepth, - }), - ]; - } - return link; - }, -}); -//# sourceMappingURL=SidebarLink.js.map \ No newline at end of file diff --git a/theme/components/Sidebar/SidebarLink.js.map b/theme/components/Sidebar/SidebarLink.js.map deleted file mode 100644 index b802033..0000000 --- a/theme/components/Sidebar/SidebarLink.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SidebarLink.js","sourceRoot":"","sources":["SidebarLink.ts"],"names":[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OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Sidebar/SidebarLink.vue b/theme/components/Sidebar/SidebarLink.vue deleted file mode 100644 index 1c9b14b..0000000 --- a/theme/components/Sidebar/SidebarLink.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - diff --git a/theme/components/Sidebar/SidebarLinks.d.ts b/theme/components/Sidebar/SidebarLinks.d.ts deleted file mode 100644 index 5530e39..0000000 --- a/theme/components/Sidebar/SidebarLinks.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import Vue from "vue"; -import type { PageComputed } from "@mr-hope/vuepress-types"; -import type { SidebarItem } from "@theme/utils/sidebar"; -declare const _default: import("vue/types/vue").ExtendedVue; -export default _default; diff --git a/theme/components/Sidebar/SidebarLinks.js b/theme/components/Sidebar/SidebarLinks.js deleted file mode 100644 index 2280328..0000000 --- a/theme/components/Sidebar/SidebarLinks.js +++ /dev/null @@ -1,55 +0,0 @@ -import Vue from "vue"; -import SidebarGroup from "@theme/components/Sidebar/SidebarGroup.vue"; -import SidebarLink from "@theme/components/Sidebar/SidebarLink.vue"; -import { isActive } from "@theme/utils/path"; -const descendantIsActive = (route, item) => { - if (item.type === "group") - return item.children.some((child) => { - if (child.type === "group") - return descendantIsActive(route, child); - return child.type === "page" && isActive(route, child.path); - }); - return false; -}; -const resolveOpenGroupIndex = (route, items) => { - for (let i = 0; i < items.length; i++) - if (descendantIsActive(route, items[i])) - return i; - return -1; -}; -export default Vue.extend({ - name: "SidebarLinks", - components: { SidebarGroup, SidebarLink }, - props: { - items: { - type: Array, - required: true, - }, - depth: { type: Number, required: true }, - }, - data: () => ({ - openGroupIndex: 0, - }), - watch: { - $route() { - this.refreshIndex(); - }, - }, - created() { - this.refreshIndex(); - }, - methods: { - refreshIndex() { - const index = resolveOpenGroupIndex(this.$route, this.items); - if (index > -1) - this.openGroupIndex = index; - }, - toggleGroup(index) { - this.openGroupIndex = index === this.openGroupIndex ? -1 : index; - }, - isActive(page) { - return isActive(this.$route, page.regularPath); - }, - }, -}); -//# sourceMappingURL=SidebarLinks.js.map \ No newline at end of file diff --git a/theme/components/Sidebar/SidebarLinks.js.map b/theme/components/Sidebar/SidebarLinks.js.map deleted file mode 100644 index 7093f5a..0000000 --- a/theme/components/Sidebar/SidebarLinks.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SidebarLinks.js","sourceRoot":"","sources":["SidebarLinks.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,WAAW,MAAM,2CAA2C,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAO7C,MAAM,kBAAkB,GAAG,CAAC,KAAY,EAAE,IAAiB,EAAW,EAAE;IACtE,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;QACvB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAsC,EAAE,EAAE;YACnE,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;gBAAE,OAAO,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAEpE,OAAO,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC;IAEL,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,KAAY,EAAE,KAAoB,EAAU,EAAE;IAC3E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE;QACnC,IAAI,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC;IAEpD,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC,CAAC;AAEF,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,cAAc;IAEpB,UAAU,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE;IAEzC,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,KAAgC;YACtC,QAAQ,EAAE,IAAI;SACf;QACD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;KACxC;IAED,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,cAAc,EAAE,CAAC;KAClB,CAAC;IAEF,KAAK,EAAE;QACL,MAAM;YACJ,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;KACF;IAED,OAAO;QACL,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,OAAO,EAAE;QACP,YAAY;YACV,MAAM,KAAK,GAAG,qBAAqB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YAE7D,IAAI,KAAK,GAAG,CAAC,CAAC;gBAAE,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC9C,CAAC;QAED,WAAW,CAAC,KAAa;YACvB,IAAI,CAAC,cAAc,GAAG,KAAK,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QACnE,CAAC;QAED,QAAQ,CAAC,IAAkB;YACzB,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QACjD,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Sidebar/SidebarLinks.vue b/theme/components/Sidebar/SidebarLinks.vue deleted file mode 100644 index 9771010..0000000 --- a/theme/components/Sidebar/SidebarLinks.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - diff --git a/theme/components/Sidebar/SidebarNavLinks.d.ts b/theme/components/Sidebar/SidebarNavLinks.d.ts deleted file mode 100644 index ff37fed..0000000 --- a/theme/components/Sidebar/SidebarNavLinks.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import Vue from "vue"; -import type { NavBarConfigItem as ResovledNavbarConfigItem } from "@theme/utils/navbar"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Sidebar/SidebarNavLinks.js b/theme/components/Sidebar/SidebarNavLinks.js deleted file mode 100644 index 85d633d..0000000 --- a/theme/components/Sidebar/SidebarNavLinks.js +++ /dev/null @@ -1,20 +0,0 @@ -import Vue from "vue"; -import RepoLink from "@theme/components/Navbar/RepoLink.vue"; -import SidebarDropdownLink from "@theme/components/Sidebar/SidebarDropdownLink.vue"; -import NavLink from "@theme/components/Navbar/NavLink.vue"; -import { getNavLinkItem } from "@theme/utils/navbar"; -export default Vue.extend({ - name: "SidebarNavLinks", - components: { - RepoLink, - SidebarDropdownLink, - NavLink, - }, - computed: { - navLinks() { - const navbar = this.$themeLocaleConfig.nav || this.$themeConfig.nav || []; - return navbar.map((link) => getNavLinkItem(link)); - }, - }, -}); -//# sourceMappingURL=SidebarNavLinks.js.map \ No newline at end of file diff --git a/theme/components/Sidebar/SidebarNavLinks.js.map b/theme/components/Sidebar/SidebarNavLinks.js.map deleted file mode 100644 index 1799f9d..0000000 --- a/theme/components/Sidebar/SidebarNavLinks.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"SidebarNavLinks.js","sourceRoot":"","sources":["SidebarNavLinks.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,QAAQ,MAAM,uCAAuC,CAAC;AAC7D,OAAO,mBAAmB,MAAM,mDAAmD,CAAC;AACpF,OAAO,OAAO,MAAM,sCAAsC,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,iBAAiB;IAEvB,UAAU,EAAE;QACV,QAAQ;QACR,mBAAmB;QACnB,OAAO;KACR;IAED,QAAQ,EAAE;QACR,QAAQ;YACN,MAAM,MAAM,GACV,IAAI,CAAC,kBAAkB,CAAC,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,CAAC;YAE7D,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;QACpD,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Sidebar/SidebarNavLinks.vue b/theme/components/Sidebar/SidebarNavLinks.vue deleted file mode 100644 index 74279bb..0000000 --- a/theme/components/Sidebar/SidebarNavLinks.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/theme/components/Theme/DarkmodeSwitch.d.ts b/theme/components/Theme/DarkmodeSwitch.d.ts deleted file mode 100644 index 05b3b72..0000000 --- a/theme/components/Theme/DarkmodeSwitch.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Theme/DarkmodeSwitch.js b/theme/components/Theme/DarkmodeSwitch.js deleted file mode 100644 index e14e1d4..0000000 --- a/theme/components/Theme/DarkmodeSwitch.js +++ /dev/null @@ -1,76 +0,0 @@ -import Vue from "vue"; -import AutoIcon from "@theme/icons/AutoIcon.vue"; -import DarkIcon from "@theme/icons/DarkIcon.vue"; -import LightIcon from "@theme/icons/LightIcon.vue"; -import { changeClass } from "@theme/utils/dom"; -export default Vue.extend({ - name: "DarkmodeSwitch", - components: { AutoIcon, DarkIcon, LightIcon }, - data: () => ({ - darkmode: "auto", - }), - computed: { - darkmodeConfig() { - return this.$themeConfig.darkmode || "auto-switch"; - }, - }, - mounted() { - this.darkmode = - localStorage.getItem("darkmode") || - "auto"; - if (this.darkmodeConfig === "auto-switch") - if (this.darkmode === "auto") - this.setDarkmode("auto"); - else - this.setDarkmode(this.darkmode); - else if (this.darkmodeConfig === "auto") - this.setDarkmode("auto"); - else if (this.darkmodeConfig === "switch") - this.setDarkmode(this.darkmode); - // disabled - else - this.setDarkmode("off"); - }, - methods: { - setDarkmode(status) { - if (status === "on") - this.toggleDarkmode(true); - else if (status === "off") - this.toggleDarkmode(false); - else { - const isDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches; - const isLightMode = window.matchMedia("(prefers-color-scheme: light)").matches; - window - .matchMedia("(prefers-color-scheme: dark)") - .addEventListener("change", (event) => { - if (event.matches) - this.toggleDarkmode(true); - }); - window - .matchMedia("(prefers-color-scheme: light)") - .addEventListener("change", (event) => { - if (event.matches) - this.toggleDarkmode(false); - }); - if (isDarkMode) - this.toggleDarkmode(true); - else if (isLightMode) - this.toggleDarkmode(false); - else { - const timeHour = new Date().getHours(); - this.toggleDarkmode(timeHour < 6 || timeHour >= 18); - } - } - this.darkmode = status; - localStorage.setItem("darkmode", status); - }, - toggleDarkmode(isDarkmode) { - const classes = document.body.classList; - if (isDarkmode) - changeClass(classes, ["theme-dark"], ["theme-light"]); - else - changeClass(classes, ["theme-light"], ["theme-dark"]); - }, - }, -}); -//# sourceMappingURL=DarkmodeSwitch.js.map \ No newline at end of file diff --git a/theme/components/Theme/DarkmodeSwitch.js.map b/theme/components/Theme/DarkmodeSwitch.js.map deleted file mode 100644 index 37a2e7a..0000000 --- a/theme/components/Theme/DarkmodeSwitch.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"DarkmodeSwitch.js","sourceRoot":"","sources":["DarkmodeSwitch.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,SAAS,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB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index 883d8c1..0000000 --- a/theme/components/Theme/DarkmodeSwitch.vue +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/theme/components/Theme/ThemeColor.d.ts b/theme/components/Theme/ThemeColor.d.ts deleted file mode 100644 index 0b66cbc..0000000 --- a/theme/components/Theme/ThemeColor.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Theme/ThemeColor.js b/theme/components/Theme/ThemeColor.js deleted file mode 100644 index fde1fe8..0000000 --- a/theme/components/Theme/ThemeColor.js +++ /dev/null @@ -1,17 +0,0 @@ -import Vue from "vue"; -import ClickOutside from "@theme/utils/click-outside"; -import ThemeOptions from "@theme/components/Theme/ThemeOptions.vue"; -export default Vue.extend({ - name: "ThemeColor", - directives: { "click-outside": ClickOutside }, - components: { ThemeOptions }, - data: () => ({ - showMenu: false, - }), - methods: { - clickOutside() { - this.showMenu = false; - }, - }, -}); -//# sourceMappingURL=ThemeColor.js.map \ No newline at end of file diff --git a/theme/components/Theme/ThemeColor.js.map b/theme/components/Theme/ThemeColor.js.map deleted file mode 100644 index 99e0a46..0000000 --- a/theme/components/Theme/ThemeColor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ThemeColor.js","sourceRoot":"","sources":["ThemeColor.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,YAAY,MAAM,0CAA0C,CAAC;AAEpE,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,YAAY;IAElB,UAAU,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE;IAE7C,UAAU,EAAE,EAAE,YAAY,EAAE;IAE5B,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE,KAAK;KAChB,CAAC;IAEF,OAAO,EAAE;QACP,YAAY;YACV,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACxB,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/components/Theme/ThemeColor.vue b/theme/components/Theme/ThemeColor.vue deleted file mode 100644 index f4b1d65..0000000 --- a/theme/components/Theme/ThemeColor.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/theme/components/Theme/ThemeOptions.d.ts b/theme/components/Theme/ThemeOptions.d.ts deleted file mode 100644 index c59a489..0000000 --- a/theme/components/Theme/ThemeOptions.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import Vue from "vue"; -interface ThemeColor { - /** Color list */ - list: string[]; - /** Color picker */ - picker: Record; -} -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/components/Theme/ThemeOptions.js b/theme/components/Theme/ThemeOptions.js deleted file mode 100644 index 2429029..0000000 --- a/theme/components/Theme/ThemeOptions.js +++ /dev/null @@ -1,56 +0,0 @@ -import Vue from "vue"; -import { getDefaultLocale } from "@mr-hope/vuepress-shared"; -import DarkmodeSwitch from "@theme/components/Theme/DarkmodeSwitch.vue"; -const defaultColorPicker = { - red: "#e74c3c", - blue: "#3498db", - green: "#3eaf7c", - orange: "#f39c12", - purple: "#8e44ad", -}; -export default Vue.extend({ - name: "ThemeOptions", - components: { DarkmodeSwitch }, - data: () => ({ - themeColor: {}, - isDarkmode: false, - }), - computed: { - text() { - return (this.$themeLocaleConfig.themeColor || getDefaultLocale().themeColor); - }, - themeColorEnabled() { - return this.$themeConfig.themeColor !== false; - }, - switchEnabled() { - return (this.$themeConfig.darkmode !== "disable" && - this.$themeConfig.darkmode !== "auto"); - }, - }, - mounted() { - const theme = localStorage.getItem("theme"); - this.themeColor = { - list: this.$themeConfig.themeColor - ? Object.keys(this.$themeConfig.themeColor) - : Object.keys(defaultColorPicker), - picker: this.$themeConfig.themeColor || defaultColorPicker, - }; - if (theme) - this.setTheme(theme); - }, - methods: { - setTheme(theme) { - const classes = document.body.classList; - const themes = this.themeColor.list.map((colorTheme) => `theme-${colorTheme}`); - if (!theme) { - localStorage.removeItem("theme"); - classes.remove(...themes); - return; - } - classes.remove(...themes.filter((themeclass) => themeclass !== `theme-${theme}`)); - classes.add(`theme-${theme}`); - localStorage.setItem("theme", theme); - }, - }, -}); -//# sourceMappingURL=ThemeOptions.js.map \ No newline at end of file diff --git a/theme/components/Theme/ThemeOptions.js.map b/theme/components/Theme/ThemeOptions.js.map deleted file mode 100644 index 09ff58b..0000000 --- a/theme/components/Theme/ThemeOptions.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ThemeOptions.js","sourceRoot":"","sources":["ThemeOptions.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,cAAc,MAAM,4CAA4C,CAAC;AAIxE,MAAM,kBAAkB,GAA2B;IACjD,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;CAClB,CAAC;AASF,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,cAAc;IAEpB,UAAU,EAAE,EAAE,cAAc,EAAE;IAE9B,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,UAAU,EAAE,EAAgB;QAE5B,UAAU,EAAE,KAAK;KAClB,CAAC;IAEF,QAAQ,EAAE;QACR,IAAI;YACF,OAAO,CACL,IAAI,CAAC,kBAAkB,CAAC,UAAU,IAAI,gBAAgB,EAAE,CAAC,UAAU,CACpE,CAAC;QACJ,CAAC;QAED,iBAAiB;YACf,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,KAAK,KAAK,CAAC;QAChD,CAAC;QAED,aAAa;YACX,OAAO,CACL,IAAI,CAAC,YAAY,CAAC,QAAQ,KA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--git a/theme/components/Theme/ThemeOptions.vue b/theme/components/Theme/ThemeOptions.vue deleted file mode 100644 index 7de56fb..0000000 --- a/theme/components/Theme/ThemeOptions.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/theme/icons/ArticleIcon.vue b/theme/icons/ArticleIcon.vue deleted file mode 100644 index 5de71ff..0000000 --- a/theme/icons/ArticleIcon.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/theme/icons/AutoIcon.vue b/theme/icons/AutoIcon.vue deleted file mode 100644 index e8ea2f5..0000000 --- a/theme/icons/AutoIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/theme/icons/BookIcon.vue b/theme/icons/BookIcon.vue deleted file mode 100644 index 639f44c..0000000 --- a/theme/icons/BookIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/theme/icons/DarkIcon.vue b/theme/icons/DarkIcon.vue deleted file mode 100644 index 361529e..0000000 --- a/theme/icons/DarkIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/theme/icons/EditIcon.vue b/theme/icons/EditIcon.vue deleted file mode 100644 index be914a9..0000000 --- a/theme/icons/EditIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/theme/icons/EmptyIcon.vue b/theme/icons/EmptyIcon.vue deleted file mode 100644 index 4ca299c..0000000 --- a/theme/icons/EmptyIcon.vue +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/theme/icons/I18nIcon.vue b/theme/icons/I18nIcon.vue deleted file mode 100644 index 8e4800e..0000000 --- a/theme/icons/I18nIcon.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - diff --git a/theme/icons/LightIcon.vue b/theme/icons/LightIcon.vue deleted file mode 100644 index 47e58df..0000000 --- a/theme/icons/LightIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/theme/icons/LinkIcon.vue b/theme/icons/LinkIcon.vue deleted file mode 100644 index 284bb2b..0000000 --- a/theme/icons/LinkIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/theme/icons/LockIcon.vue b/theme/icons/LockIcon.vue deleted file mode 100644 index c18232d..0000000 --- a/theme/icons/LockIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/theme/icons/NextIcon.vue b/theme/icons/NextIcon.vue deleted file mode 100644 index 16c8d4e..0000000 --- a/theme/icons/NextIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/theme/icons/Page404Icon.vue b/theme/icons/Page404Icon.vue deleted file mode 100644 index fb2aa1c..0000000 --- a/theme/icons/Page404Icon.vue +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/theme/icons/PresentationIcon.vue b/theme/icons/PresentationIcon.vue deleted file mode 100644 index 4c16144..0000000 --- a/theme/icons/PresentationIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/theme/icons/PrevIcon.vue b/theme/icons/PrevIcon.vue deleted file mode 100644 index fc01c8d..0000000 --- a/theme/icons/PrevIcon.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - - diff --git a/theme/icons/ProjectIcon.vue b/theme/icons/ProjectIcon.vue deleted file mode 100644 index 8802d25..0000000 --- a/theme/icons/ProjectIcon.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/theme/icons/StickyIcon.vue b/theme/icons/StickyIcon.vue deleted file mode 100644 index 60f2df4..0000000 --- a/theme/icons/StickyIcon.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Baidu.vue b/theme/icons/media/Baidu.vue deleted file mode 100644 index 0874f73..0000000 --- a/theme/icons/media/Baidu.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/theme/icons/media/Bitbucket.vue b/theme/icons/media/Bitbucket.vue deleted file mode 100644 index 5372752..0000000 --- a/theme/icons/media/Bitbucket.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/theme/icons/media/Dingding.vue b/theme/icons/media/Dingding.vue deleted file mode 100644 index fca038c..0000000 --- a/theme/icons/media/Dingding.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Discord.vue b/theme/icons/media/Discord.vue deleted file mode 100644 index 6a1f899..0000000 --- a/theme/icons/media/Discord.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Dribbble.vue b/theme/icons/media/Dribbble.vue deleted file mode 100644 index b4cc85f..0000000 --- a/theme/icons/media/Dribbble.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/theme/icons/media/Email.vue b/theme/icons/media/Email.vue deleted file mode 100644 index 45966eb..0000000 --- a/theme/icons/media/Email.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Evernote.vue b/theme/icons/media/Evernote.vue deleted file mode 100644 index 5bf0ac2..0000000 --- a/theme/icons/media/Evernote.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/theme/icons/media/Facebook.vue b/theme/icons/media/Facebook.vue deleted file mode 100644 index 72764d5..0000000 --- a/theme/icons/media/Facebook.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Flipboard.vue b/theme/icons/media/Flipboard.vue deleted file mode 100644 index 2251e25..0000000 --- a/theme/icons/media/Flipboard.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - diff --git a/theme/icons/media/Gitee.vue b/theme/icons/media/Gitee.vue deleted file mode 100644 index c259d04..0000000 --- a/theme/icons/media/Gitee.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Github.vue b/theme/icons/media/Github.vue deleted file mode 100644 index 9aa91c6..0000000 --- a/theme/icons/media/Github.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Gitlab.vue b/theme/icons/media/Gitlab.vue deleted file mode 100644 index cd46cc7..0000000 --- a/theme/icons/media/Gitlab.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - diff --git a/theme/icons/media/Gmail.vue b/theme/icons/media/Gmail.vue deleted file mode 100644 index 99b943e..0000000 --- a/theme/icons/media/Gmail.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/theme/icons/media/Instagram.vue b/theme/icons/media/Instagram.vue deleted file mode 100644 index 96c2ee0..0000000 --- a/theme/icons/media/Instagram.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/theme/icons/media/Lines.vue b/theme/icons/media/Lines.vue deleted file mode 100644 index 837ce8d..0000000 --- a/theme/icons/media/Lines.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Linkedin.vue b/theme/icons/media/Linkedin.vue deleted file mode 100644 index 729f94a..0000000 --- a/theme/icons/media/Linkedin.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Pinterest.vue b/theme/icons/media/Pinterest.vue deleted file mode 100644 index acd69e0..0000000 --- a/theme/icons/media/Pinterest.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Pocket.vue b/theme/icons/media/Pocket.vue deleted file mode 100644 index 24a5f38..0000000 --- a/theme/icons/media/Pocket.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/QQ.vue b/theme/icons/media/QQ.vue deleted file mode 100644 index f063f2d..0000000 --- a/theme/icons/media/QQ.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Qzone.vue b/theme/icons/media/Qzone.vue deleted file mode 100644 index c4f2244..0000000 --- a/theme/icons/media/Qzone.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Reddit.vue b/theme/icons/media/Reddit.vue deleted file mode 100644 index 90550cd..0000000 --- a/theme/icons/media/Reddit.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Rss.vue b/theme/icons/media/Rss.vue deleted file mode 100644 index 0ea8454..0000000 --- a/theme/icons/media/Rss.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Steam.vue b/theme/icons/media/Steam.vue deleted file mode 100644 index e71b9be..0000000 --- a/theme/icons/media/Steam.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Twitter.vue b/theme/icons/media/Twitter.vue deleted file mode 100644 index 74753ed..0000000 --- a/theme/icons/media/Twitter.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Wechat.vue b/theme/icons/media/Wechat.vue deleted file mode 100644 index 1bea947..0000000 --- a/theme/icons/media/Wechat.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/theme/icons/media/Weibo.vue b/theme/icons/media/Weibo.vue deleted file mode 100644 index 73864a2..0000000 --- a/theme/icons/media/Weibo.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/theme/icons/media/Whatsapp.vue b/theme/icons/media/Whatsapp.vue deleted file mode 100644 index 0074ded..0000000 --- a/theme/icons/media/Whatsapp.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Youtube.vue b/theme/icons/media/Youtube.vue deleted file mode 100644 index 0a570dd..0000000 --- a/theme/icons/media/Youtube.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/icons/media/Zhihu.vue b/theme/icons/media/Zhihu.vue deleted file mode 100644 index 25223f0..0000000 --- a/theme/icons/media/Zhihu.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/theme/index.d.ts b/theme/index.d.ts deleted file mode 100644 index f532be8..0000000 --- a/theme/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Context, PluginOptionAPI } from "@mr-hope/vuepress-types"; -import type { HopeNavBarConfig, HopeSideBarConfig, HopeThemeConfig, ResolvedHopeThemeConfig } from "./types"; -declare const themeAPI: { - (themeConfig: ResolvedHopeThemeConfig, ctx: Context): PluginOptionAPI; - config: (config: import("./types").HopeVuePressConfig) => import("./types").ResolvedHopeVuePressConfig; - themeConfig(themeConfig: HopeThemeConfig): HopeThemeConfig; - navbarConfig(navbarConfig: HopeNavBarConfig): HopeNavBarConfig; - sidebarConfig(sidebarConfig: HopeSideBarConfig): HopeSideBarConfig; -}; -export = themeAPI; diff --git a/theme/index.js b/theme/index.js deleted file mode 100644 index 45d08ed..0000000 --- a/theme/index.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -const alias_1 = require("./node/alias"); -const config_1 = require("./node/config"); -const eject_1 = require("./node/eject"); -const plugins_1 = require("./node/plugins"); -const blogAddtionalPages = [ - { - path: "/article/", - frontmatter: { layout: "Blog" }, - }, - { - path: "/star/", - frontmatter: { layout: "Blog" }, - }, - { - path: "/encrypt/", - frontmatter: { layout: "Blog" }, - }, - { - path: "/slide/", - frontmatter: { layout: "Blog" }, - }, - { - path: "/timeline/", - frontmatter: { layout: "Blog" }, - }, -]; -// Theme API. -const themeAPI = (themeConfig, ctx) => ({ - alias: (0, alias_1.getAlias)(themeConfig, ctx), - plugins: (0, plugins_1.getPluginConfig)(themeConfig), - additionalPages: themeConfig.blog === false ? [] : blogAddtionalPages, - extendCli: (cli) => { - cli - .command("eject-hope [targetDir]", "copy vuepress-theme-hope into .vuepress/theme for customization.") - .option("--debug", "eject in debug mode") - .action((dir) => { - void (0, eject_1.eject)(dir || "."); - }); - }, -}); -themeAPI.config = config_1.config; -// helper functions -themeAPI.themeConfig = (themeConfig) => themeConfig; -themeAPI.navbarConfig = (navbarConfig) => navbarConfig; -themeAPI.sidebarConfig = (sidebarConfig) => sidebarConfig; -module.exports = themeAPI; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/theme/index.js.map b/theme/index.js.map deleted file mode 100644 index 966d48d..0000000 --- a/theme/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AACA,wCAAwC;AACxC,0CAAuC;AACvC,wCAAqC;AACrC,4CAAiD;AAUjD,MAAM,kBAAkB,GAAG;IACzB;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;KAChC;IACD;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;KAChC;IACD;QACE,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;KAChC;IACD;QACE,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;KAChC;IACD;QACE,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;KAChC;CACF,CAAC;AAEF,aAAa;AACb,MAAM,QAAQ,GAAG,CACf,WAAoC,EACpC,GAAY,EACK,EAAE,CAAC,CAAC;IACrB,KAAK,EAAE,IAAA,gBAAQ,EAAC,WAAW,EAAE,GAAG,CAAC;IAEjC,OAAO,EAAE,IAAA,yBAAe,EAAC,WAAW,CAAC;IAErC,eAAe,EAAE,WAAW,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,kBAAkB;IAErE,SAAS,EAAE,CAAC,GAAQ,EAAQ,EAAE;QAC5B,GAAG;aACA,OAAO,CACN,wBAAwB,EACxB,kEAAkE,CACnE;aACA,MAAM,CAAC,SAAS,EAAE,qBAAqB,CAAC;aACxC,MAAM,CAAC,CAAC,GAAW,EAAE,EAAE;YACtB,KAAK,IAAA,aAAK,EAAC,GAAG,IAAI,GAAG,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACP,CAAC;CACF,CAAC,CAAC;AAEH,QAAQ,CAAC,MAAM,GAAG,eAAM,CAAC;AAEzB,mBAAmB;AACnB,QAAQ,CAAC,WAAW,GAAG,CAAC,WAA4B,EAAmB,EAAE,CACvE,WAAW,CAAC;AACd,QAAQ,CAAC,YAAY,GAAG,CAAC,YAA8B,EAAoB,EAAE,CAC3E,YAAY,CAAC;AACf,QAAQ,CAAC,aAAa,GAAG,CACvB,aAAgC,EACb,EAAE,CAAC,aAAa,CAAC;AAEtC,iBAAS,QAAQ,CAAC"} \ No newline at end of file diff --git a/theme/layouts/404.d.ts b/theme/layouts/404.d.ts deleted file mode 100644 index d6de04a..0000000 --- a/theme/layouts/404.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/layouts/404.js b/theme/layouts/404.js deleted file mode 100644 index a8bf65c..0000000 --- a/theme/layouts/404.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from "vue"; -import Common from "@theme/components/Common.vue"; -import Page404Icon from "@theme/icons/Page404Icon.vue"; -import { getDefaultLocale } from "@mr-hope/vuepress-shared"; -export default Vue.extend({ - name: "NotFound", - components: { - Common, - Page404Icon, - }, - computed: { - i18n() { - return this.$themeLocaleConfig.error404 || getDefaultLocale().error404; - }, - msg() { - return this.i18n.hint[Math.floor(Math.random() * this.i18n.hint.length)]; - }, - }, - methods: { - back() { - window.history.go(-1); - }, - }, -}); -//# sourceMappingURL=404.js.map \ No newline at end of file diff --git a/theme/layouts/404.js.map b/theme/layouts/404.js.map deleted file mode 100644 index 58872b2..0000000 --- a/theme/layouts/404.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"404.js","sourceRoot":"","sources":["404.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAClD,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,UAAU;IAEhB,UAAU,EAAE;QACV,MAAM;QACN,WAAW;KACZ;IAED,QAAQ,EAAE;QACR,IAAI;YACF,OAAO,IAAI,CAAC,kBAAkB,CAAC,QAAQ,IAAI,gBAAgB,EAAE,CAAC,QAAQ,CAAC;QACzE,CAAC;QAED,GAAG;YACD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3E,CAAC;KACF;IAED,OAAO,EAAE;QACP,IAAI;YACF,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/layouts/404.vue b/theme/layouts/404.vue deleted file mode 100644 index 16c2da2..0000000 --- a/theme/layouts/404.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - {{ i18n.back }} - {{ i18n.home }} - - - - - - - diff --git a/theme/layouts/Blog.d.ts b/theme/layouts/Blog.d.ts deleted file mode 100644 index 2f367e0..0000000 --- a/theme/layouts/Blog.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import BlogInfo from "@BlogInfo"; -declare const _default: import("vue/types/vue").ExtendedVue & { - globalEncryptPassword: string; -} & { - checkGlobalPassword(globalPassword: string): void; -} & { - isGlobalEncrypted: boolean; -} & { - encryptOptions: import("../types").EncryptOptions; -} & BlogInfo, unknown, unknown, unknown, Record>; -export default _default; diff --git a/theme/layouts/Blog.js b/theme/layouts/Blog.js deleted file mode 100644 index c0b2f00..0000000 --- a/theme/layouts/Blog.js +++ /dev/null @@ -1,17 +0,0 @@ -import BlogInfo from "@BlogInfo"; -import BlogPage from "@BlogPage"; -import Common from "@theme/components/Common.vue"; -import MyTransition from "@theme/components/MyTransition.vue"; -import { globalEncryptMixin } from "@theme/mixins/globalEncrypt"; -import { pathEncryptMixin } from "@theme/mixins/pathEncrypt"; -import Password from "@theme/components/Password.vue"; -export default globalEncryptMixin.extend(pathEncryptMixin).extend({ - components: { - BlogInfo, - BlogPage, - Common, - MyTransition, - Password, - }, -}); -//# sourceMappingURL=Blog.js.map \ No newline at end of file diff --git a/theme/layouts/Blog.js.map b/theme/layouts/Blog.js.map deleted file mode 100644 index bf47e85..0000000 --- a/theme/layouts/Blog.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Blog.js","sourceRoot":"","sources":["Blog.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAClD,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,QAAQ,MAAM,gCAAgC,CAAC;AAEtD,eAAe,kBAAkB,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC;IAChE,UAAU,EAAE;QACV,QAAQ;QACR,QAAQ;QACR,MAAM;QACN,YAAY;QACZ,QAAQ;KACT;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/layouts/Blog.vue b/theme/layouts/Blog.vue deleted file mode 100644 index f52e4dd..0000000 --- a/theme/layouts/Blog.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/theme/layouts/Layout.d.ts b/theme/layouts/Layout.d.ts deleted file mode 100644 index 65de639..0000000 --- a/theme/layouts/Layout.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/layouts/Layout.js b/theme/layouts/Layout.js deleted file mode 100644 index 6f7d476..0000000 --- a/theme/layouts/Layout.js +++ /dev/null @@ -1,37 +0,0 @@ -import Vue from "vue"; -import BlogInfo from "@BlogInfo"; -import BlogHome from "@BlogHome"; -import ContentBottom from "@ContentBottom"; -import ContentTop from "@ContentTop"; -import NavbarStart from "@NavbarStart"; -import NavbarCenter from "@NavbarCenter"; -import NavbarEnd from "@NavbarEnd"; -import PageBottom from "@PageBottom"; -import PageTop from "@PageTop"; -import SidebarBottom from "@SidebarBottom"; -import SidebarCenter from "@SidebarCenter"; -import SidebarTop from "@SidebarTop"; -import Common from "@theme/components/Common.vue"; -import Home from "@theme/components/Home.vue"; -import Page from "@theme/components/Page.vue"; -export default Vue.extend({ - name: "Layout", - components: { - BlogInfo, - BlogHome, - Common, - ContentBottom, - ContentTop, - Home, - NavbarCenter, - NavbarEnd, - NavbarStart, - Page, - PageBottom, - PageTop, - SidebarBottom, - SidebarCenter, - SidebarTop, - }, -}); -//# sourceMappingURL=Layout.js.map \ No newline at end of file diff --git a/theme/layouts/Layout.js.map b/theme/layouts/Layout.js.map deleted file mode 100644 index 0fdeda9..0000000 --- a/theme/layouts/Layout.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Layout.js","sourceRoot":"","sources":["Layout.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,OAAO,MAAM,UAAU,CAAC;AAC/B,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,MAAM,MAAM,8BAA8B,CAAC;AAClD,OAAO,IAAI,MAAM,4BAA4B,CAAC;AAC9C,OAAO,IAAI,MAAM,4BAA4B,CAAC;AAE9C,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,QAAQ;IAEd,UAAU,EAAE;QACV,QAAQ;QACR,QAAQ;QACR,MAAM;QACN,aAAa;QACb,UAAU;QACV,IAAI;QACJ,YAAY;QACZ,SAAS;QACT,WAAW;QACX,IAAI;QACJ,UAAU;QACV,OAAO;QACP,aAAa;QACb,aAAa;QACb,UAAU;KACX;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/layouts/Layout.vue b/theme/layouts/Layout.vue deleted file mode 100644 index d7fa464..0000000 --- a/theme/layouts/Layout.vue +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/theme/layouts/Slide.d.ts b/theme/layouts/Slide.d.ts deleted file mode 100644 index fb7bb35..0000000 --- a/theme/layouts/Slide.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Vue from "vue"; -declare const _default: import("vue/types/vue").ExtendedVue>; -export default _default; diff --git a/theme/layouts/Slide.js b/theme/layouts/Slide.js deleted file mode 100644 index 3e4a1ba..0000000 --- a/theme/layouts/Slide.js +++ /dev/null @@ -1,36 +0,0 @@ -import Vue from "vue"; -import ClickOutside from "@theme/utils/click-outside"; -import ThemeColor from "@theme/components/Theme/ThemeColor.vue"; -export default Vue.extend({ - name: "Slide", - components: { ThemeColor }, - directives: { "click-outside": ClickOutside }, - data: () => ({ - showMenu: false, - }), - // eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle - destroyed() { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - document.querySelector("html").classList.remove("reveal-full-page"); - document.body.classList.remove("reveal-viewport"); - document.body.style.removeProperty("--slide-width"); - document.body.style.removeProperty("--slide-height"); - }, - methods: { - toggle() { - this.showMenu = !this.showMenu; - }, - back() { - window.history.go(-1); - this.showMenu = false; - }, - home() { - void this.$router.push("/"); - this.showMenu = false; - }, - clickOutside() { - this.showMenu = false; - }, - }, -}); -//# sourceMappingURL=Slide.js.map \ No newline at end of file diff --git a/theme/layouts/Slide.js.map b/theme/layouts/Slide.js.map deleted file mode 100644 index 1a77951..0000000 --- a/theme/layouts/Slide.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Slide.js","sourceRoot":"","sources":["Slide.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,UAAU,MAAM,wCAAwC,CAAC;AAEhE,eAAe,GAAG,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,OAAO;IAEb,UAAU,EAAE,EAAE,UAAU,EAAE;IAE1B,UAAU,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE;IAE7C,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE,KAAK;KAChB,CAAC;IAEF,iEAAiE;IACjE,SAAS;QACP,oEAAoE;QACpE,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAE,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QACrE,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAClD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;QACpD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,EAAE;QACP,MAAM;YACJ,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACjC,CAAC;QAED,IAAI;YACF,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACxB,CAAC;QAED,IAAI;YACF,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC5B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACxB,CAAC;QAED,YAAY;YACV,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACxB,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/layouts/Slide.vue b/theme/layouts/Slide.vue deleted file mode 100644 index b608588..0000000 --- a/theme/layouts/Slide.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/theme/mixins/encrypt.d.ts b/theme/mixins/encrypt.d.ts deleted file mode 100644 index a6b605c..0000000 --- a/theme/mixins/encrypt.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import Vue from "vue"; -import type { EncryptOptions } from "../types"; -export declare const encryptBaseMixin: import("vue/types/vue").ExtendedVue>; diff --git a/theme/mixins/encrypt.js b/theme/mixins/encrypt.js deleted file mode 100644 index fb571d2..0000000 --- a/theme/mixins/encrypt.js +++ /dev/null @@ -1,9 +0,0 @@ -import Vue from "vue"; -export const encryptBaseMixin = Vue.extend({ - computed: { - encryptOptions() { - return this.$themeConfig.encrypt || {}; - }, - }, -}); -//# sourceMappingURL=encrypt.js.map \ No newline at end of file diff --git a/theme/mixins/encrypt.js.map b/theme/mixins/encrypt.js.map deleted file mode 100644 index 9c44a8c..0000000 --- a/theme/mixins/encrypt.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encrypt.js","sourceRoot":"","sources":["encrypt.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AAItB,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE;QACR,cAAc;YACZ,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,CAAC;QACzC,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/mixins/globalEncrypt.d.ts b/theme/mixins/globalEncrypt.d.ts deleted file mode 100644 index 7209703..0000000 --- a/theme/mixins/globalEncrypt.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { EncryptOptions } from "../types"; -export declare const globalEncryptMixin: import("vue/types/vue").ExtendedVue<{ - encryptOptions: EncryptOptions; -} & Record & import("vue").default, { - globalEncryptPassword: string; -}, { - checkGlobalPassword(globalPassword: string): void; -}, { - isGlobalEncrypted: boolean; -}, Record>; diff --git a/theme/mixins/globalEncrypt.js b/theme/mixins/globalEncrypt.js deleted file mode 100644 index a54ac25..0000000 --- a/theme/mixins/globalEncrypt.js +++ /dev/null @@ -1,37 +0,0 @@ -import { compareSync } from "bcryptjs"; -import { encryptBaseMixin } from "@theme/mixins/encrypt"; -export const globalEncryptMixin = encryptBaseMixin.extend({ - data: () => ({ - globalEncryptPassword: "", - }), - computed: { - isGlobalEncrypted() { - if (this.encryptOptions.status === "global" && - this.encryptOptions.global) { - const { global } = this.encryptOptions; - const globalPasswords = typeof global === "string" ? [global] : global; - // none of the password matches - return !globalPasswords.some((globalPassword) => compareSync(this.globalEncryptPassword, globalPassword)); - } - return false; - }, - }, - mounted() { - const globalPassword = localStorage.getItem("globalPassword"); - if (globalPassword) - this.globalEncryptPassword = globalPassword; - }, - methods: { - checkGlobalPassword(globalPassword) { - const { global } = this.encryptOptions; - const globalPasswords = typeof global === "string" ? [global] : global; - if ( - // some of the password matches - globalPasswords.some((password) => compareSync(globalPassword, password))) { - this.globalEncryptPassword = globalPassword; - localStorage.setItem("globalPassword", globalPassword); - } - }, - }, -}); -//# sourceMappingURL=globalEncrypt.js.map \ No newline at end of file diff --git a/theme/mixins/globalEncrypt.js.map b/theme/mixins/globalEncrypt.js.map deleted file mode 100644 index d00f028..0000000 --- a/theme/mixins/globalEncrypt.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"globalEncrypt.js","sourceRoot":"","sources":["globalEncrypt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,qBAAqB,EAAE,EAAE;KAC1B,CAAC;IAEF,QAAQ,EAAE;QACR,iBAAiB;YACf,IACE,IAAI,CAAC,cAAc,CAAC,MAAM,KAAK,QAAQ;gBACvC,IAAI,CAAC,cAAc,CAAC,MAAM,EAC1B;gBACA,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC;gBACvC,MAAM,eAAe,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;gBAEvE,+BAA+B;gBAC/B,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,EAAE,CAC9C,WAAW,CAAC,IAAI,CAAC,qBAAqB,EAAE,cAAc,CAAC,CACxD,CAAC;aACH;YAED,OAAO,KAAK,CAAC;QACf,CAAC;KACF;IAED,OAAO;QACL,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAE9D,IAAI,cAAc;YAAE,IAAI,CAAC,qBAAqB,GAAG,cAAc,CAAC;IAClE,CAAC;IAED,OAAO,EAAE;QACP,mBAAmB,CAAC,cAAsB;YACxC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,cAA0C,CAAC;YACnE,MAAM,eAAe,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAEvE;YACE,+BAA+B;YAC/B,eAAe,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAChC,WAAW,CAAC,cAAc,EAAE,QAAQ,CAAC,CACtC,EACD;gBACA,IAAI,CAAC,qBAAqB,GAAG,cAAc,CAAC;gBAC5C,YAAY,CAAC,OAAO,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;aACxD;QACH,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/mixins/pathEncrypt.d.ts b/theme/mixins/pathEncrypt.d.ts deleted file mode 100644 index e203202..0000000 --- a/theme/mixins/pathEncrypt.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { EncryptOptions } from "../types"; -export declare const pathEncryptMixin: import("vue/types/vue").ExtendedVue<{ - encryptOptions: EncryptOptions; -} & Record & import("vue").default, { - encryptPasswordConfig: Record; -}, { - checkPathPassword(password: string): void; -}, { - pathEncryptMatchKeys: string[]; - isPathEncrypted: boolean; -}, Record>; diff --git a/theme/mixins/pathEncrypt.js b/theme/mixins/pathEncrypt.js deleted file mode 100644 index 38344c7..0000000 --- a/theme/mixins/pathEncrypt.js +++ /dev/null @@ -1,46 +0,0 @@ -import { compareSync } from "bcryptjs"; -import { encryptBaseMixin } from "@theme/mixins/encrypt"; -import { getPathMatchedKeys } from "@theme/utils/encrypt"; -export const pathEncryptMixin = encryptBaseMixin.extend({ - data: () => ({ - encryptPasswordConfig: {}, - }), - computed: { - pathEncryptMatchKeys() { - return getPathMatchedKeys(this.encryptOptions, this.$route.path); - }, - isPathEncrypted() { - if (this.pathEncryptMatchKeys.length === 0) - return false; - const { config } = this.encryptOptions; - // none of the password matches - return this.pathEncryptMatchKeys.every((key) => { - const keyConfig = config[key]; - const hitPasswords = typeof keyConfig === "string" ? [keyConfig] : keyConfig; - return (!this.encryptPasswordConfig[key] || - hitPasswords.every((encryptPassword) => !compareSync(this.encryptPasswordConfig[key], encryptPassword))); - }); - }, - }, - mounted() { - const passwordConfig = localStorage.getItem("encryptConfig"); - if (passwordConfig) - this.encryptPasswordConfig = JSON.parse(passwordConfig); - }, - methods: { - checkPathPassword(password) { - const { config } = this.$themeConfig.encrypt; - for (const hitKey of this.pathEncryptMatchKeys) { - const hitPassword = config[hitKey]; - const hitPasswordList = typeof hitPassword === "string" ? [hitPassword] : hitPassword; - // some of the password matches - if (hitPasswordList.filter((encryptPassword) => compareSync(password, encryptPassword))) { - this.$set(this.encryptPasswordConfig, hitKey, password); - localStorage.setItem("encryptConfig", JSON.stringify(this.encryptPasswordConfig)); - break; - } - } - }, - }, -}); -//# sourceMappingURL=pathEncrypt.js.map \ No newline at end of file diff --git a/theme/mixins/pathEncrypt.js.map b/theme/mixins/pathEncrypt.js.map deleted file mode 100644 index fc8c146..0000000 --- a/theme/mixins/pathEncrypt.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pathEncrypt.js","sourceRoot":"","sources":["pathEncrypt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC;IACtD,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,qBAAqB,EAAE,EAA4B;KACpD,CAAC;IAEF,QAAQ,EAAE;QACR,oBAAoB;Y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AK,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;gBAEhE,+BAA+B;gBAC/B,IACE,eAAe,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,EAAE,CACzC,WAAW,CAAC,QAAQ,EAAE,eAAe,CAAC,CACvC,EACD;oBACA,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;oBACxD,YAAY,CAAC,OAAO,CAClB,eAAe,EACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAC3C,CAAC;oBAEF,MAAM;iBACP;aACF;QACH,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/mixins/star.d.ts b/theme/mixins/star.d.ts deleted file mode 100644 index 4125ecd..0000000 --- a/theme/mixins/star.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import Vue from "vue"; -import type { PageComputed } from "@mr-hope/vuepress-types"; -export declare const starMixin: import("vue/types/vue").ExtendedVue>; diff --git a/theme/mixins/star.js b/theme/mixins/star.js deleted file mode 100644 index 64271a8..0000000 --- a/theme/mixins/star.js +++ /dev/null @@ -1,12 +0,0 @@ -import Vue from "vue"; -import { filterArticle, sortArticle } from "@theme/utils/article"; -export const starMixin = Vue.extend({ - computed: { - $starArticles() { - const { pages } = this.$site; - // filter before sort - return sortArticle(filterArticle(pages, (page) => Boolean(page.frontmatter.star)), "star"); - }, - }, -}); -//# sourceMappingURL=star.js.map \ No newline at end of file diff --git a/theme/mixins/star.js.map b/theme/mixins/star.js.map deleted file mode 100644 index c43e507..0000000 --- a/theme/mixins/star.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"star.js","sourceRoot":"","sources":["star.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIlE,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC;IAClC,QAAQ,EAAE;QACR,aAAa;YACX,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YAE7B,qBAAqB;YACrB,OAAO,WAAW,CAChB,aAAa,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,EAC9D,MAAM,CACP,CAAC;QACJ,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/mixins/timeline.d.ts b/theme/mixins/timeline.d.ts deleted file mode 100644 index aa91fd6..0000000 --- a/theme/mixins/timeline.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import Vue from "vue"; -import type { PageComputed } from "@mr-hope/vuepress-types"; -export interface TimelineItem { - year: number; - articles: PageComputed[]; -} -export declare const timelineMixin: import("vue/types/vue").ExtendedVue>; diff --git a/theme/mixins/timeline.js b/theme/mixins/timeline.js deleted file mode 100644 index 5776a2a..0000000 --- a/theme/mixins/timeline.js +++ /dev/null @@ -1,30 +0,0 @@ -import Vue from "vue"; -import { filterArticle, getDate, sortArticle } from "@theme/utils/article"; -export const timelineMixin = Vue.extend({ - computed: { - $timelineItems() { - const { pages } = this.$site; - // filter before sort - return sortArticle(filterArticle(pages, (page) => Boolean(page.frontmatter.time || - page.frontmatter.date || - page.createTimeStamp) && page.frontmatter.timeline !== false)); - }, - /** Timeline list */ - $timeline() { - const timelineItems = []; - // filter before sort - this.$timelineItems.forEach((article) => { - const { frontmatter: { date, time = date }, createTimeStamp, } = article; - const [year, month, day] = getDate((time || createTimeStamp)); - if (year && month && day) { - if (!timelineItems[0] || timelineItems[0].year !== year) - timelineItems.unshift({ year, articles: [] }); - article.frontmatter.parsedDate = `${month}/${day}`; - timelineItems[0].articles.push(article); - } - }); - return timelineItems.reverse(); - }, - }, -}); -//# sourceMappingURL=timeline.js.map \ No newline at end of file diff --git a/theme/mixins/timeline.js.map b/theme/mixins/timeline.js.map deleted file mode 100644 index 2eb37a1..0000000 --- a/theme/mixins/timeline.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timeline.js","sourceRoot":"","sources":["timeline.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAS3E,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC,MAAM,CAAC;IACtC,QAAQ,EAAE;QACR,cAAc;YACZ,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YAE7B,qBAAqB;YACrB,OAAO,WAAW,CAChB,aAAa,CACX,KAAK,EACL,CAAC,IAAI,EAAE,EAAE,CACP,OAAO,CACL,IAAI,CAAC,WAAW,CAAC,IAAI;gBACnB,IAAI,CAAC,WAAW,CAAC,IAAI;gBACrB,IAAI,CAAC,eAAe,CACvB,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,KAAK,KAAK,CAC3C,CACF,CAAC;QACJ,CAAC;QAED,oBAAoB;QACpB,SAAS;YACP,MAAM,aAAa,GAAmB,EAAE,CAAC;YAEzC,qBAAqB;YACrB,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBACtC,MAAM,EACJ,WAAW,EAAE,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,EAClC,eAAe,GAChB,GAAG,OAAO,CAAC;gBACZ,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,GAAG,OAAO,CAChC,CAAC,IAAI,IAAI,eAAe,CAA2B,CACpD,CAAC;gBAEF,IAAI,IAAI,IAAI,KAAK,IAAI,GAAG,EAAE;oBACxB,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI;wBACrD,aAAa,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;oBAEhD,OAAO,CAAC,WAAW,CAAC,UAAU,GAAG,GAAG,KAAK,IAAI,GAAG,EAAE,CAAC;oBACnD,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;iBACzC;YACH,CAAC,CAAC,CAAC;YAEH,OAAO,aAAa,CAAC,OAAO,EAAE,CAAC;QACjC,CAAC;KACF;CACF,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/node/alias.d.ts b/theme/node/alias.d.ts deleted file mode 100644 index c91f783..0000000 --- a/theme/node/alias.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Context } from "@mr-hope/vuepress-types"; -import type { ResolvedHopeThemeConfig } from "../types"; -export declare const getAlias: (themeConfig: ResolvedHopeThemeConfig, ctx: Context) => Record; diff --git a/theme/node/alias.js b/theme/node/alias.js deleted file mode 100644 index 4a26a52..0000000 --- a/theme/node/alias.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getAlias = void 0; -const path_1 = require("path"); -const getAlias = (themeConfig, ctx) => { - const { siteConfig } = ctx; - // Resolve algolia - const isAlgoliaSearch = Boolean(themeConfig.algolia) || - Object.keys((siteConfig.locales && themeConfig.locales) || {}).some((base) => themeConfig.locales[base].algolia); - const blogEnabled = themeConfig.blog !== false; - const commentEnabled = themeConfig.comment && - themeConfig.comment.type && - themeConfig.comment.type !== "disable"; - const themeColorEnabled = !(themeConfig.themeColor === false && themeConfig.darkmode === "disable"); - const { custom = {} } = themeConfig; - const noopModule = "@mr-hope/vuepress-shared/lib/esm/noopModule"; - return { - "@AlgoliaSearchBox": isAlgoliaSearch - ? themeConfig.algoliaType === "full" - ? (0, path_1.resolve)(__dirname, "../components/AlgoliaSearch/Full.vue") - : (0, path_1.resolve)(__dirname, "../components/AlgoliaSearch/Dropdown.vue") - : noopModule, - "@BlogInfo": blogEnabled - ? (0, path_1.resolve)(__dirname, "../components/Blog/BlogInfo.vue") - : noopModule, - "@BloggerInfo": blogEnabled - ? (0, path_1.resolve)(__dirname, "../components/Blog/BloggerInfo.vue") - : noopModule, - "@BlogHome": blogEnabled - ? (0, path_1.resolve)(__dirname, "../components/Blog/BlogHome.vue") - : noopModule, - "@BlogPage": blogEnabled - ? (0, path_1.resolve)(__dirname, "../components/Blog/BlogPage.vue") - : noopModule, - "@ContentTop": custom.contentTop - ? (0, path_1.resolve)(ctx.sourceDir, ".vuepress", custom.contentTop) - : noopModule, - "@ContentBottom": custom.contentBottom - ? (0, path_1.resolve)(ctx.sourceDir, ".vuepress", custom.contentBottom) - : noopModule, - "@PageTop": custom.pageTop - ? (0, path_1.resolve)(ctx.sourceDir, ".vuepress", custom.pageTop) - : noopModule, - "@PageBottom": custom.pageBottom - ? (0, path_1.resolve)(ctx.sourceDir, ".vuepress", custom.pageBottom) - : noopModule, - "@Comment": commentEnabled - ? "@mr-hope/vuepress-plugin-comment/lib/client/Comment.vue" - : noopModule, - "@NavbarStart": custom.navbarStart - ? (0, path_1.resolve)(ctx.sourceDir, ".vuepress", custom.navbarStart) - : noopModule, - "@NavbarCenter": custom.navbarCenter - ? (0, path_1.resolve)(ctx.sourceDir, ".vuepress", custom.navbarCenter) - : noopModule, - "@NavbarEnd": custom.navbarEnd - ? (0, path_1.resolve)(ctx.sourceDir, ".vuepress", custom.navbarEnd) - : noopModule, - "@ThemeColor": themeColorEnabled - ? (0, path_1.resolve)(__dirname, "../components/Theme/ThemeColor.vue") - : noopModule, - "@SidebarTop": custom.sidebarTop - ? (0, path_1.resolve)(ctx.sourceDir, ".vuepress", custom.sidebarTop) - : noopModule, - "@SidebarCenter": custom.sidebarCenter - ? (0, path_1.resolve)(ctx.sourceDir, ".vuepress", custom.sidebarCenter) - : noopModule, - "@SidebarBottom": custom.sidebarBottom - ? (0, path_1.resolve)(ctx.sourceDir, ".vuepress", custom.sidebarBottom) - : noopModule, - }; -}; -exports.getAlias = getAlias; -//# sourceMappingURL=alias.js.map \ No newline at end of file diff --git a/theme/node/alias.js.map b/theme/node/alias.js.map deleted file mode 100644 index 3e5238c..0000000 --- a/theme/node/alias.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"alias.js","sourceRoot":"","sources":["alias.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAKxB,MAAM,QAAQ,GAAG,CACtB,WAAoC,EACpC,GAAY,EACY,EAAE;IAC1B,MAAM,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC;IAC3B,kBAAkB;IAClB,MAAM,eAAe,GACnB,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC;QAC5B,MAAM,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CACjE,CAAC,IAAI,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAC5C,CAAC;IAEJ,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,KAAK,KAAK,CAAC;IAC/C,MAAM,cAAc,GAClB,WAAW,CAAC,OAAO;QACnB,WAAW,CAAC,OAAO,CAAC,IAAI;QACxB,WAAW,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC;IAEzC,MAAM,iBAAiB,GAAG,CAAC,CACzB,WAAW,CAAC,UAAU,KAAK,KAAK,IAAI,WAAW,CAAC,QAAQ,KAAK,SAAS,CACvE,CAAC;IACF,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,WAAW,CAAC;IAEpC,MAAM,UAAU,GAAG,6CAA6C,CAAC;IAEjE,OAAO;QACL,mBAAmB,EAAE,eAAe;YAClC,CAAC,CAAC,WAAW,CAAC,WAAW,KAAK,MAAM;gBAClC,CAAC,CAAC,IAAA,cAAO,EAAC,SAAS,EAAE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,CAAC,UAAU;QACd,cAAc,EAAE,MAAM,CAAC,WAAW;YAChC,CAAC,CAAC,IAAA,cAAO,EAAC,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC;YACzD,CAAC,CAAC,UAAU;QACd,eAAe,EAAE,MAAM,CAAC,YAAY;YAClC,CAAC,CAAC,IAAA,cAAO,EAAC,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAC,YAAY,CAAC;YAC1D,CAAC,CAAC,UAAU;QACd,YAAY,EAAE,MAAM,CAAC,SAAS;YAC5B,CAAC,CAAC,IAAA,cAAO,EAAC,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAC,SAAS,CAAC;YACvD,CAAC,CAAC,UAAU;QACd,aAAa,EAAE,iBAAiB;YAC9B,CAAC,CAAC,IAAA,cAAO,EAAC,SAAS,EAAE,oCAAoC,CAAC;YAC1D,CAAC,CAAC,UAAU;QACd,aAAa,EAAE,MAAM,CAAC,UAAU;YAC9B,CAAC,CAAC,IAAA,cAAO,EAAC,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC;YACxD,CAAC,CAAC,UAAU;QACd,gBAAgB,EAAE,MAAM,CAAC,aAAa;YACpC,CAAC,CAAC,IAAA,cAAO,EAAC,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAC,aAAa,CAAC;YAC3D,CAAC,CAAC,UAAU;QACd,gBAAgB,EAAE,MAAM,CAAC,aAAa;YACpC,CAAC,CAAC,IAAA,cAAO,EAAC,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,CAAC,aAAa,CAAC;YAC3D,CAAC,CAAC,UAAU;KACf,CAAC;AACJ,CAAC,CAAC;AAhFW,QAAA,QAAQ,YAgFnB"} \ No newline at end of file diff --git a/theme/node/chunk-rename.d.ts b/theme/node/chunk-rename.d.ts deleted file mode 100644 index f7f26ef..0000000 --- a/theme/node/chunk-rename.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Plugin } from "@mr-hope/vuepress-types"; -import type { ChunkRenameOptions } from "../types"; -export declare const chunkRenamePlugin: Plugin; diff --git a/theme/node/chunk-rename.js b/theme/node/chunk-rename.js deleted file mode 100644 index 50b894b..0000000 --- a/theme/node/chunk-rename.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.chunkRenamePlugin = void 0; -const chunkRenamePlugin = ({ pageChunkName = ({ title = "", key }) => { - const chunkTitle = (title || "").replace(/[.&*?#\\/:"<>| ]/gu, ""); - return chunkTitle ? `page-${chunkTitle}` : `page-${key.slice(1)}`; -}, layoutChunkName = (layout) => `layout-${layout.componentName}`, }, context) => { - // override internal plugins - const plugins = []; - if (pageChunkName) { - plugins.push({ - name: "@vuepress/internal-page-components", - extendPageData(page) { - page._chunkName = pageChunkName(page); - }, - clientDynamicModules() { - const content = `export default {\n${context.pages - .filter(({ _filePath }) => _filePath) - .map((page) => { - const key = JSON.stringify(page.key); - const filePath = JSON.stringify(page._filePath); - const comment = page._chunkName - ? `/* webpackChunkName: ${JSON.stringify(page._chunkName)} */` - : ""; - return ` ${key}: () => import(${comment}${filePath})`; - }) - .join(",\n")} \n}`; - return { - dirname: "internal", - name: "page-components.js", - content, - }; - }, - }); - } - if (layoutChunkName) { - const { layoutComponentMap } = context.themeAPI; - for (const key in layoutComponentMap) { - const component = layoutComponentMap[key]; - component._chunkName = layoutChunkName(component); - } - plugins.push({ - name: "@vuepress/internal-layout-components", - clientDynamicModules() { - const { layoutComponentMap } = context.themeAPI; - const content = `export default {\n${Object.keys(layoutComponentMap) - .map((name) => { - const component = layoutComponentMap[name]; - const key = JSON.stringify(name); - const filePath = JSON.stringify(component.path); - const comment = component._chunkName - ? `/* webpackChunkName: ${JSON.stringify(component._chunkName)} */` - : ""; - return ` ${key}: () => import(${comment}${filePath})`; - }) - .join(",\n")} \n}`; - return { - dirname: "internal", - name: "layout-components.js", - content, - }; - }, - }); - } - return { - name: "chunk-rename", - plugins, - }; -}; -exports.chunkRenamePlugin = chunkRenamePlugin; -//# sourceMappingURL=chunk-rename.js.map \ No newline at end of file diff --git a/theme/node/chunk-rename.js.map b/theme/node/chunk-rename.js.map deleted file mode 100644 index 2993397..0000000 --- a/theme/node/chunk-rename.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"chunk-rename.js","sourceRoot":"","sources":["chunk-rename.ts"],"names":[],"mappings":";;;AAGO,MAAM,iBAAiB,GAA+B,CAC3D,EACE,aAAa,GAAG,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,EAAE,EAAU,EAAE;IAC9C,MAAM,UAAU,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;IAEnE,OAAO,UAAU,CAAC,CAAC,CAAC,QAAQ,UAAU,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AACpE,CAAC,EACD,eAAe,GAAG,CAAC,MAAM,EAAU,EAAE,CAAC,UAAU,MAAM,CAAC,aAAa,EAAE,GACvE,EACD,OAAO,EACP,EAAE;IACF,4BAA4B;IAC5B,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,IAAI,aAAa,EAAE;QACjB,OAAO,CAAC,IAAI,CAAC;YACX,IAAI,EAAE,oCAAoC;YAE1C,cAAc,CAAC,IAAI;gBACjB,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;YACxC,CAAC;YAED,oBAAoB;gBAClB,MAAM,OAAO,GAAG,qBAAqB,OAAO,CAAC,KAAK;qBAC/C,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,SAAS,CAAC;qBACpC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;oBACZ,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,C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,CAAC;oBAChD,MAAM,OAAO,GAAG,SAAS,CAAC,UAAU;wBAClC,CAAC,CAAC,wBAAwB,IAAI,CAAC,SAAS,CACpC,SAAS,CAAC,UAAU,CACrB,KAAK;wBACR,CAAC,CAAC,EAAE,CAAC;oBACP,OAAO,KAAK,GAAG,kBAAkB,OAAO,GAAG,QAAQ,GAAG,CAAC;gBACzD,CAAC,CAAC;qBACD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;gBAErB,OAAO;oBACL,OAAO,EAAE,UAAU;oBACnB,IAAI,EAAE,sBAAsB;oBAC5B,OAAO;iBACR,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;KACJ;IAED,OAAO;QACL,IAAI,EAAE,cAAc;QAEpB,OAAO;KACR,CAAC;AACJ,CAAC,CAAC;AArFW,QAAA,iBAAiB,qBAqF5B"} \ No newline at end of file diff --git a/theme/node/clean-url.d.ts b/theme/node/clean-url.d.ts deleted file mode 100644 index 38111ea..0000000 --- a/theme/node/clean-url.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Plugin } from "@mr-hope/vuepress-types"; -import type { CleanUrlOptions } from "../types"; -export declare const cleanUrlPlugin: Plugin; diff --git a/theme/node/clean-url.js b/theme/node/clean-url.js deleted file mode 100644 index 013353a..0000000 --- a/theme/node/clean-url.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.cleanUrlPlugin = void 0; -const cleanUrlPlugin = ({ normalSuffix = "", indexSuffix = "/", notFoundPath = "/404.html", }) => ({ - name: "clean-url", - extendPageData(page) { - const { regularPath, frontmatter = {} } = page; - if (!frontmatter.permalink) { - if (regularPath === "/404.html") - // path for 404 page - page.path = notFoundPath; - else if (regularPath.endsWith(".html")) - // normal path - // e.g. foo/bar.md -> foo/bar.html - page.path = `${regularPath.slice(0, -5)}${normalSuffix}`; - else if (regularPath.endsWith("/")) - // index path - // e.g. foo/index.md -> foo/ - page.path = `${regularPath.slice(0, -1)}${indexSuffix}`; - } - }, -}); -exports.cleanUrlPlugin = cleanUrlPlugin; -//# sourceMappingURL=clean-url.js.map \ No newline at end of file diff --git a/theme/node/clean-url.js.map b/theme/node/clean-url.js.map deleted file mode 100644 index 2741966..0000000 --- a/theme/node/clean-url.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"clean-url.js","sourceRoot":"","sources":["clean-url.ts"],"names":[],"mappings":";;;AAGO,MAAM,cAAc,GAA4B,CAAC,EACtD,YAAY,GAAG,EAAE,EACjB,WAAW,GAAG,GAAG,EACjB,YAAY,GAAG,WAAW,GAC3B,EAAE,EAAE,CAAC,CAAC;IACL,IAAI,EAAE,WAAW;IAEjB,cAAc,CAAC,IAAI;QACjB,MAAM,EAAE,WAAW,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC;QAE/C,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE;YAC1B,IAAI,WAAW,KAAK,WAAW;gBAC7B,oBAAoB;gBACpB,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;iBACtB,IAAI,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC;gBACpC,cAAc;gBACd,kCAAkC;gBAClC,IAAI,CAAC,IAAI,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,YAAY,EAAE,CAAC;iBACtD,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC;gBAChC,aAAa;gBACb,4BAA4B;gBAC5B,IAAI,CAAC,IAAI,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,WAAW,EAAE,CAAC;SAC3D;IACH,CAAC;CACF,CAAC,CAAC;AAxBU,QAAA,cAAc,kBAwBxB"} \ No newline at end of file diff --git a/theme/node/config.d.ts b/theme/node/config.d.ts deleted file mode 100644 index b85edc5..0000000 --- a/theme/node/config.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { HopeVuePressConfig, ResolvedHopeVuePressConfig } from "../types"; -export declare const config: (config: HopeVuePressConfig) => ResolvedHopeVuePressConfig; diff --git a/theme/node/config.js b/theme/node/config.js deleted file mode 100644 index ac1a366..0000000 --- a/theme/node/config.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.config = void 0; -const vuepress_shared_1 = require("@mr-hope/vuepress-shared"); -const locales_1 = require("./locales"); -const themeConfig_1 = require("./themeConfig"); -const defaultConfig = { - base: process.env.VuePress_BASE || "/", - temp: "./node_modules/.temp", - theme: "hope", - themeConfig: { locales: {} }, - evergreen: true, -}; -const getRootLang = (config) => { - var _a, _b; - // infer from siteLocale - const siteLocales = config.locales; - if ((siteLocales === null || siteLocales === void 0 ? void 0 : siteLocales["/"]) && (0, vuepress_shared_1.checkLang)((_a = siteLocales["/"]) === null || _a === void 0 ? void 0 : _a.lang)) - return siteLocales["/"].lang; - // infer from themeLocale - const themeLocales = config.locales; - if ((themeLocales === null || themeLocales === void 0 ? void 0 : themeLocales["/"]) && (0, vuepress_shared_1.checkLang)((_b = themeLocales["/"]) === null || _b === void 0 ? void 0 : _b.lang)) - return themeLocales["/"].lang; - (0, vuepress_shared_1.showLangError)("root"); - return "en-US"; -}; -const config = (config) => { - // merge default config - (0, vuepress_shared_1.deepAssignReverse)(defaultConfig, config); - const resolvedConfig = config; - const rootLang = getRootLang(resolvedConfig); - (0, themeConfig_1.resolveThemeConfig)(resolvedConfig.themeConfig, rootLang); - (0, locales_1.resolveLocales)(resolvedConfig, rootLang); - return resolvedConfig; -}; -exports.config = config; -//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/theme/node/config.js.map b/theme/node/config.js.map deleted file mode 100644 index 755849b..0000000 --- a/theme/node/config.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["config.ts"],"names":[],"mappings":";;;AAAA,8DAIkC;AAClC,uCAA2C;AAC3C,+C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CAAC;IAEzC,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;AAbW,QAAA,MAAM,UAajB"} \ No newline at end of file diff --git a/theme/node/eject.d.ts b/theme/node/eject.d.ts deleted file mode 100644 index 96ca604..0000000 --- a/theme/node/eject.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const eject: (dir: string) => Promise; diff --git a/theme/node/eject.js b/theme/node/eject.js deleted file mode 100644 index b863e38..0000000 --- a/theme/node/eject.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.eject = void 0; -const chalk_1 = require("chalk"); -const fs_extra_1 = require("fs-extra"); -const path_1 = require("path"); -// #region exclude-files -const EXCLUDED_FILES = [ - "__tests__", - ".npmignore", - "LICENSE", - "package.json", - "node_modules", - "README.md", - "readme.md", -]; -// #endregion exclude-files -const eject = async (dir) => { - try { - const sourceDir = (0, path_1.resolve)(__dirname, "../"); - const targetDir = (0, path_1.resolve)(process.cwd(), dir, ".vuepress/theme"); - await (0, fs_extra_1.copy)(sourceDir, targetDir, { - filter: (src) => { - return !EXCLUDED_FILES.includes((0, path_1.relative)(sourceDir, src)); - }, - }); - console.log(`Copied vuepress-theme-hope into ${(0, chalk_1.cyan)(targetDir)}.\n`); - } - catch (err) { - console.error((0, chalk_1.red)(err.stack || "")); - process.exitCode = 1; - } -}; -exports.eject = eject; -//# sourceMappingURL=eject.js.map \ No newline at end of file diff --git a/theme/node/eject.js.map b/theme/node/eject.js.map deleted file mode 100644 index 258f3ac..0000000 --- a/theme/node/eject.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"eject.js","sourceRoot":"","sources":["eject.ts"],"names":[],"mappings":";;;AAAA,iCAAkC;AAClC,uCAAgC;AAChC,+BAAyC;AAEzC,wBAAwB;AACxB,MAAM,cAAc,GAAG;IACrB,WAAW;IACX,YAAY;IACZ,SAAS;IACT,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;CACZ,CAAC;AACF,2BAA2B;AAEpB,MAAM,KAAK,GAAG,KAAK,EAAE,GAAW,EAAiB,EAAE;IACxD,IAAI;QACF,MAAM,SAAS,GAAG,IAAA,cAAO,EAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC5C,MAAM,SAAS,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,iBAAiB,CAAC,CAAC;QAEjE,MAAM,IAAA,eAAI,EAAC,SAAS,EAAE,SAAS,EAAE;YAC/B,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE;gBACd,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAA,eAAQ,EAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC;YAC5D,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,mCAAmC,IAAA,YAAI,EAAC,SAAS,CAAC,KAAK,CAAC,CAAC;KACtE;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,CAAC,KAAK,CAAC,IAAA,WAAG,EAAE,GAAa,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;QAC/C,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;KACtB;AACH,CAAC,CAAC;AAhBW,QAAA,KAAK,SAgBhB"} \ No newline at end of file diff --git a/theme/node/encrypt.d.ts b/theme/node/encrypt.d.ts deleted file mode 100644 index 93b8154..0000000 --- a/theme/node/encrypt.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { EncryptOptions } from "../types"; -export declare const resolveEncrypt: (encrypt: EncryptOptions) => void; diff --git a/theme/node/encrypt.js b/theme/node/encrypt.js deleted file mode 100644 index eab92fb..0000000 --- a/theme/node/encrypt.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resolveEncrypt = void 0; -const bcryptjs_1 = require("bcryptjs"); -const resolveEncrypt = (encrypt) => { - // handle global password - if (encrypt.global) - if (typeof encrypt.global === "string") - encrypt.global = (0, bcryptjs_1.hashSync)(encrypt.global, 10); - else if (Array.isArray(encrypt.global)) - encrypt.global = encrypt.global.map((globalPassword) => { - if (typeof globalPassword === "string") - return (0, bcryptjs_1.hashSync)(globalPassword, 10); - throw new Error(`[vuepress-theme-hope]: You config "themeConfig.encrypt.global", but your config is invalid. - - All password MUST be string. But we found one’s type is ${typeof globalPassword}. Please fix it!`); - }); - else - throw new Error(`[vuepress-theme-hope]: You are asking for global encryption but you provide invalid "global" config. - -Please check "global" in your "themeConfig.encrypt" config. It can be string or string[], but you are providing ${typeof encrypt.global}. Please fix it!`); - const passwordConfig = encrypt.config || {}; - Object.keys(passwordConfig).forEach((key) => { - const password = passwordConfig[key]; - if (typeof password === "string") - passwordConfig[key] = (0, bcryptjs_1.hashSync)(password, 10); - else if (Array.isArray(password)) - passwordConfig[key] = password.map((configPassword) => { - if (typeof configPassword === "string") - return (0, bcryptjs_1.hashSync)(configPassword, 10); - throw new Error(`[vuepress-theme-hope]: You config "themeConfig.encrypt.config", but your config is invalid. - -Key ${key}’s value MUST be string or string[]. But it’s type is ${typeof configPassword}. Please fix it!`); - }); - else - throw new Error(`[vuepress-theme-hope]: You config "themeConfig.encrypt.config", but your config is invalid. - -The value of key ${key} MUST be string or string[]. But not it’s ${typeof password}. Please fix it!`); - }); -}; -exports.resolveEncrypt = resolveEncrypt; -//# sourceMappingURL=encrypt.js.map \ No newline at end of file diff --git a/theme/node/encrypt.js.map b/theme/node/encrypt.js.map deleted file mode 100644 index 60909ca..0000000 --- a/theme/node/encrypt.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encrypt.js","sourceRoot":"","sources":["encrypt.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AAI7B,MAAM,cAAc,GAAG,CAAC,OAAuB,EAAQ,EAAE;IAC9D,yBAAyB;IACzB,IAAI,OAAO,CAAC,MAAM;QAChB,IAAI,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ;YACpC,OAAO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AEW,GAAG,6CAA6C,OAAO,QAAQ,kBAAkB,CAC7F,CAAC;IACN,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AA9CW,QAAA,cAAc,kBA8CzB"} \ No newline at end of file diff --git a/theme/node/locales.d.ts b/theme/node/locales.d.ts deleted file mode 100644 index 5456d8c..0000000 --- a/theme/node/locales.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HopeLang } from "@mr-hope/vuepress-shared"; -import type { ResolvedHopeVuePressConfig } from "../types"; -export declare const resolveLocales: (config: ResolvedHopeVuePressConfig, rootLang: HopeLang) => void; diff --git a/theme/node/locales.js b/theme/node/locales.js deleted file mode 100644 index 929a34a..0000000 --- a/theme/node/locales.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resolveLocales = void 0; -const vuepress_shared_1 = require("@mr-hope/vuepress-shared"); -const resolveLocales = (config, rootLang) => { - // ensure locales config - if (!config.locales) - config.locales = {}; - const { locales } = config; - // set locate for base - locales["/"] = Object.assign({ lang: rootLang }, (locales["/"] || {})); - // handle other languages - Object.keys(config.themeConfig.locales).forEach((path) => { - if (path === "/") - return; - locales[path] = Object.assign({ lang: (0, vuepress_shared_1.path2Lang)(path) }, (locales[path] || {})); - }); -}; -exports.resolveLocales = resolveLocales; -//# sourceMappingURL=locales.js.map \ No newline at end of file diff --git a/theme/node/locales.js.map b/theme/node/locales.js.map deleted file mode 100644 index 33e2f8b..0000000 --- a/theme/node/locales.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"locales.js","sourceRoot":"","sources":["locales.ts"],"names":[],"mappings":";;;AAAA,8DAAqD;AAK9C,MAAM,cAAc,GAAG,CAC5B,MAAkC,EAClC,QAAkB,EACZ,EAAE;IACR,wBAAwB;IACxB,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;IAEzC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAE3B,sBAAsB;IACtB,OAAO,CAAC,GAAG,CAAC,mBACV,IAAI,EAAE,QAAQ,IACX,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CACxB,CAAC;IAEF,yBAAyB;IACzB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACvD,IAAI,IAAI,KAAK,GAAG;YAAE,OAAO;QAEzB,OAAO,CAAC,IAAI,CAAC,mBAAK,IAAI,EAAE,IAAA,2BAAS,EAAC,IAAI,CAAC,IAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAE,CAAC;IACtE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AArBW,QAAA,cAAc,kBAqBzB"} \ No newline at end of file diff --git a/theme/node/plugins.d.ts b/theme/node/plugins.d.ts deleted file mode 100644 index 1cf246a..0000000 --- a/theme/node/plugins.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { PluginConfig } from "@mr-hope/vuepress-types"; -import type { ResolvedHopeThemeConfig } from "../types"; -export declare const getPluginConfig: (themeConfig: ResolvedHopeThemeConfig) => PluginConfig[]; diff --git a/theme/node/plugins.js b/theme/node/plugins.js deleted file mode 100644 index d0e158a..0000000 --- a/theme/node/plugins.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getPluginConfig = void 0; -const path_1 = require("path"); -const clean_url_1 = require("./clean-url"); -const chunk_rename_1 = require("./chunk-rename"); -const getPluginConfig = (themeConfig) => { - // set author for comment plugin - if (themeConfig.comment && themeConfig.author) - themeConfig.comment.author = themeConfig.author; - return [ - ["@mr-hope/comment", themeConfig.comment || true], - ["@mr-hope/components"], - ["@mr-hope/feed", themeConfig.feed], - ["@mr-hope/git", themeConfig.git], - ["@mr-hope/pwa", themeConfig.pwa], - ["@mr-hope/seo", themeConfig.seo], - ["@mr-hope/sitemap", themeConfig.sitemap], - [ - "@mr-hope/smooth-scroll", - themeConfig.smoothScroll === false - ? false - : typeof themeConfig.smoothScroll === "number" - ? { delay: themeConfig.smoothScroll } - : themeConfig.smoothScroll || { delay: 500 }, - ], - [ - "@vuepress/blog", - themeConfig.blog === false - ? false - : { - frontmatters: [ - { - id: "tag", - keys: ["tag", "tags"], - path: "/tag/", - layout: "Blog", - scopeLayout: "Blog", - }, - { - id: "category", - keys: ["category", "categories"], - path: "/category/", - layout: "Blog", - scopeLayout: "Blog", - }, - ], - }, - ], - ["@vuepress/last-updated", false], - "@vuepress/nprogress", - [ - "@vuepress/search", - { - searchMaxSuggestions: themeConfig.searchMaxSuggestions || 10, - }, - ], - ["active-hash", themeConfig.activeHash], - ["add-this", typeof themeConfig.addThis === "string"], - [ - "copyright", - typeof themeConfig.copyright === "object" - ? Object.assign({ minLength: 100, disable: themeConfig.copyright.status === "local", clipboardComponent: (0, path_1.resolve)(__dirname, "../components/Clipboard.vue") }, themeConfig.copyright) : false, - ], - ["md-enhance", themeConfig.mdEnhance || {}], - ["@mr-hope/copy-code", themeConfig.copyCode], - ["photo-swipe", themeConfig.photoSwipe], - [ - "typescript", - themeConfig.typescript - ? { - tsLoaderOptions: typeof themeConfig.typescript === "object" - ? themeConfig.typescript - : {}, - } - : false, - ], - [ - clean_url_1.cleanUrlPlugin, - themeConfig.cleanUrl === false - ? false - : themeConfig.cleanUrl || { normalSuffix: "/" }, - ], - [ - chunk_rename_1.chunkRenamePlugin, - themeConfig.chunkRename === false ? false : themeConfig.chunkRename, - ], - ]; -}; -exports.getPluginConfig = getPluginConfig; -//# sourceMappingURL=plugins.js.map \ No newline at end of file diff --git a/theme/node/plugins.js.map b/theme/node/plugins.js.map deleted file mode 100644 index 3087384..0000000 --- a/theme/node/plugins.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"plugins.js","sourceRoot":"","sources":["plugins.ts"],"names":[],"mappings":";;;AAAA,+BA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AC,WAAW,CAAC,WAAW;SACpE;KACF,CAAC;AACJ,CAAC,CAAC;AAlHW,QAAA,eAAe,mBAkH1B"} \ No newline at end of file diff --git a/theme/node/themeConfig.d.ts b/theme/node/themeConfig.d.ts deleted file mode 100644 index b7e7ec9..0000000 --- a/theme/node/themeConfig.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HopeLang } from "@mr-hope/vuepress-shared"; -import type { ResolvedHopeThemeConfig } from "../types"; -export declare const resolveThemeConfig: (themeConfig: ResolvedHopeThemeConfig, rootLang: HopeLang) => void; diff --git a/theme/node/themeConfig.js b/theme/node/themeConfig.js deleted file mode 100644 index 807466f..0000000 --- a/theme/node/themeConfig.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resolveThemeConfig = void 0; -const vuepress_shared_1 = require("@mr-hope/vuepress-shared"); -const encrypt_1 = require("./encrypt"); -const setThemeLocales = (themeConfig, rootLang) => { - const rootLangPath = (0, vuepress_shared_1.lang2Path)(rootLang); - // set locate for base - themeConfig.locales["/"] = Object.assign(Object.assign(Object.assign({}, (0, vuepress_shared_1.getLocale)(rootLang)), (themeConfig.locales[rootLangPath] || {})), (themeConfig.locales["/"] || {})); - // handle other languages - Object.keys(themeConfig.locales).forEach((path) => { - if (path === "/") - return; - const lang = (0, vuepress_shared_1.path2Lang)(path); - themeConfig.locales[path] = Object.assign(Object.assign({}, (0, vuepress_shared_1.getLocale)(lang)), themeConfig.locales[path]); - }); -}; -const resolveThemeConfig = (themeConfig, rootLang) => { - setThemeLocales(themeConfig, rootLang); - if (themeConfig.encrypt) - (0, encrypt_1.resolveEncrypt)(themeConfig.encrypt); -}; -exports.resolveThemeConfig = resolveThemeConfig; -//# sourceMappingURL=themeConfig.js.map \ No newline at end of file diff --git a/theme/node/themeConfig.js.map b/theme/node/themeConfig.js.map deleted file mode 100644 index 328e156..0000000 --- a/theme/node/themeConfig.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"themeConfig.js","sourceRoot":"","sources":["themeConfig.ts"],"names":[],"mappings":";;;AAAA,8DAA2E;AAC3E,uCAA2C;AAK3C,MAAM,eAAe,GAAG,CACtB,WAAoC,EACpC,QAAgB,EACV,EAAE;IACR,MAAM,YAAY,GAAG,IAAA,2BAAS,EAAC,QAAQ,CAAC,CAAC;IAEzC,sBAAsB;IACtB,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,iDACnB,IAAA,2BAAS,EAAC,QAAQ,CAAC,GACnB,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,GACzC,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CACpC,CAAC;IAEF,yBAAyB;IACzB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAChD,IAAI,IAAI,KAAK,GAAG;YAAE,OAAO;QAEzB,MAAM,IAAI,GAAG,IAAA,2BAAS,EAAC,IAAI,CAAC,CAAC;QAE7B,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,mCACpB,IAAA,2BAAS,EAAC,IAAI,CAAC,GACf,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAC7B,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEK,MAAM,kBAAkB,GAAG,CAChC,WAAoC,EACpC,QAAkB,EACZ,EAAE;IACR,eAAe,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAEvC,IAAI,WAAW,CAAC,OAAO;QAAE,IAAA,wBAAc,EAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAC/D,CAAC,CAAC;AAPW,QAAA,kBAAkB,sBAO7B"} \ No newline at end of file diff --git a/theme/styles/code/index.styl b/theme/styles/code/index.styl deleted file mode 100644 index 9d3aa9a..0000000 --- a/theme/styles/code/index.styl +++ /dev/null @@ -1,137 +0,0 @@ -{$contentClass} - code - color lighten($textColor, 20%) - padding 0.25rem 0.5rem - margin 0 - font-size 0.85em - background-color rgba(27,31,35,0.05) - border-radius 3px - .token - &.deleted - color #EC5975 - &.inserted - color $accentColor - -{$contentClass} - pre, pre[class*="language-"] - line-height 1.4 - padding 1.25rem 1.5rem - margin 0.85rem 0 - background-color $codeBgColor - border-radius 6px - overflow auto - code - color #fff - padding 0 - background-color transparent - border-radius 0 - -div[class*="language-"] - position relative - background-color $codeBgColor - border-radius 6px - .highlight-lines - user-select none - padding-top 1.3rem - position absolute - top 0 - left 0 - width 100% - line-height 1.4 - .highlighted - background-color rgba(0, 0, 0, 66%) - pre, pre[class*="language-"] - background transparent - position relative - z-index 1 - &::before - position absolute - z-index 3 - top 0.8em - right 1em - font-size 0.75rem - color rgba(255, 255, 255, 0.4) - &:not(.line-numbers-mode) - .line-numbers-wrapper - display none - &.line-numbers-mode - .highlight-lines .highlighted - position relative - &:before - content ' ' - position absolute - z-index 3 - left 0 - top 0 - display block - width $lineNumbersWrapperWidth - height 100% - background-color rgba(0, 0, 0, 66%) - pre - padding-left $lineNumbersWrapperWidth + 1 rem - vertical-align middle - .line-numbers-wrapper - position absolute - top 0 - width $lineNumbersWrapperWidth - text-align center - color rgba(255, 255, 255, 0.3) - padding 1.25rem 0 - line-height 1.4 - br - user-select none - .line-number - position relative - z-index 4 - user-select none - font-size 0.85em - &::after - content '' - position absolute - z-index 2 - top 0 - left 0 - width $lineNumbersWrapperWidth - height 100% - border-radius 6px 0 0 6px - border-right 1px solid rgba(0, 0, 0, 66%) - background-color $codeBgColor - - -for lang in $codeLang - div{'[class~="language-' + lang + '"]'} - &:before - content ('' + lang) - -div[class~="language-javascript"] - &:before - content "js" - -div[class~="language-typescript"] - &:before - content "ts" - -div[class~="language-markup"] - &:before - content "html" - -div[class~="language-markdown"] - &:before - content "md" - -div[class~="language-json"]:before - content "json" - -div[class~="language-ruby"]:before - content "rb" - -div[class~="language-python"]:before - content "py" - -div[class~="language-bash"]:before - content "sh" - -div[class~="language-php"]:before - content "php" - -@import '~prismjs/themes/prism-tomorrow.css' diff --git a/theme/styles/fonts/crimson.css b/theme/styles/fonts/crimson.css deleted file mode 100644 index b4ea77d..0000000 --- a/theme/styles/fonts/crimson.css +++ /dev/null @@ -1,7 +0,0 @@ -@font-face { - font-family: "Crimson"; - src: url(data:font/truetype;charset=utf-8;base64,AAEAAAANAIAAAwBQRkZUTYr5mwEAAAyMAAAAHEdERUYAKQATAAAMbAAAAB5PUy8yVsJ0MgAAAVgAAABgY21hcBiKDzgAAAHcAAABWGdhc3D//wADAAAMZAAAAAhnbHlmr+DBdQAAA1AAAAdsaGVhZBZwt+8AAADcAAAANmhoZWEFawEuAAABFAAAACRobXR4BksA9gAAAbgAAAAibG9jYQlsC24AAAM0AAAAHG1heHAAEQBZAAABOAAAACBuYW1lLaFDVAAACrwAAAFrcG9zdAC1AHoAAAwoAAAAPAABAAAAAQAAqBd2H18PPPUACwQAAAAAANqqufwAAAAA2qq5/AAb/9wB4QMeAAAACAACAAAAAAAAAAEAAAMs/ywAXAH9AAAAAAHhAAEAAAAAAAAAAAAAAAAAAAAEAAEAAAANAFkAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAH1AZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAIABgMAAAAAAAAAAAABEAAAAAAAAAAAAAAAUGZFZADAADAAOQMs/ywAXAMsANQAAAABAAAAAAMYAAAAAAAgAAEBpwAfAAAAAAFVAAAB/QAfAH0ALQA+ABsAPgAyACgAPgAxAAAAAAADAAAAAwAAABwAAQAAAAAAUgADAAEAAAAcAAQANgAAAAQABAABAAAAOf//AAAAL///AAAAAQAEAAAAAAADAAQABQAGAAcACAAJAAoACwAMAAABBgAAAQAAAAAAAAABAgAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAwQFBgcICQoLDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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zaW9uIDEuMDsgRm9udEVkaXRvciAodjEuMCkAAEMAcgBpAG0AcwBvAG4AAENyaW1zb24AAAACAAAAAAAAADIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAEwAUABUAFgAXABgAGQAaABsAHAAAAAH//wACAAEAAAAMAAAAFgAAAAIAAQADAAwAAQAEAAAAAgAAAAAAAAABAAAAANWkJwgAAAAA2qq5/AAAAADaqrn8) - format("truetype"); - font-weight: normal; - font-style: normal; -} diff --git a/theme/styles/index.styl b/theme/styles/index.styl deleted file mode 100644 index 5cde84c..0000000 --- a/theme/styles/index.styl +++ /dev/null @@ -1,6 +0,0 @@ -@require './normalize' -@require './prefer-color-scheme-config' -@require './theme' -@require './plugins/index' -@require './theme-color' -@require '~balloon-css/balloon.min.css' diff --git a/theme/styles/normalize.styl b/theme/styles/normalize.styl deleted file mode 100644 index 82e5afc..0000000 --- a/theme/styles/normalize.styl +++ /dev/null @@ -1,160 +0,0 @@ -@require '~@theme/styles/fonts/crimson.css' -@require '~@mr-hope/vuepress-shared/styles/wrapper' - -html, body - padding 0 - margin 0 - background var(--bgcolor) - -body - font-family Georgia Pro, Crimson, Georgia, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', STHeiti, 'Microsoft YaHei', SimSun, sans-serif - -webkit-font-smoothing antialiased - -moz-osx-font-smoothing grayscale - font-display optional - font-size 16px - color var(--text-color) - min-height 100vh - -webkit-tap-highlight-color transparent - -{$contentClass}:not(.custom) - @extend $wrapper - - > *:first-child - margin-top $navbarHeight - - a:hover - text-decoration underline - - // unknow container - p.demo - padding 1rem 1.5rem - border 1px solid #ddd - border-radius 4px - - img - max-width 100% - -{$contentClass}.custom - padding 0 - margin 0 - - img - max-width 100% - -a - font-weight 500 - color var(--accent-color) - text-decoration none - overflow-wrap break-word - -p a code - font-weight 400 - color var(--accent-color) - -kbd - background #eee - border solid 0.15rem #ddd - border-bottom solid 0.25rem #ddd - border-radius 0.15rem - padding 0 0.15em - -blockquote - font-size 1rem - color var(--light-grey) - border-left 0.2rem solid #dfe2e5 - margin 1rem 0 - padding 0.25rem 0 0.25rem 1rem - - & > p - margin 0 - -ul, ol - padding-left 1.2em - -strong - font-weight 600 - -h1, h2, h3, h4, h5, h6 - font-weight 500 - line-height 1.25 - - {$contentClass}:not(.custom) > & - margin-top 0.5rem - $navbarHeight - padding-top: ($navbarHeight + 1rem) - margin-bottom 0.5rem - - &:first-child - margin-top -3rem - margin-bottom 1rem - - + p, + pre, + .custom-block - margin-top 2rem - - &:hover .header-anchor - opacity 1 - -p - {$contentClass}:not(.custom) > &, {$contentClass}:not(.custom) > ul &, {$contentClass}:not(.custom) > ol & - text-align justify - word-break break-word - hyphens auto - overflow-wrap break-word - - @media (max-width $MQMobileNarrow) - text-align left - -h1 - font-size 2rem - -h2 - font-size 1.65rem - padding-bottom 0.3rem - border-bottom 1px solid var(--border-color) - -h3 - font-size 1.35rem - -a.header-anchor - font-size 0.85em - float left - margin-left -0.87em - padding-right 0.23em - margin-top 0.125em - opacity 0 - transition opacity 0.2s - - &:hover - text-decoration none - -code, kbd, .line-number - font-family source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace - -p, ul, ol - line-height 1.7 - -hr - border 0 - border-top 1px solid var(--border-color) - -table - border-collapse collapse - margin 1rem 0 - display block - overflow-x auto - -tr - border-top 1px solid #dfe2e5 - - &:nth-child(2n) - background #f6f8fa - -th, td - border 1px solid var(--grey14) - padding 0.6em 1em - -.theme-dark - tr:nth-child(2n) - background #252322 - - th, td - border 1px solid var(--grey12) diff --git a/theme/styles/palette.styl b/theme/styles/palette.styl deleted file mode 100644 index 66c6477..0000000 --- a/theme/styles/palette.styl +++ /dev/null @@ -1,56 +0,0 @@ -/* basic color */ -$accentColor ?= #3eaf7c -$textColor ?= #242424 -$darkTextColor ?= #9e9e9e -$bgColor ?= #fff -$darkBgColor ?= #1e1e1e -$bgColorLight ?= #f8f8f8 -$darkBgColorLight ?= #272727 -$bgColorBlur ?= rgba(255, 255, 255, 0.9) -$darkBgColorBlur ?= rgba(30, 30, 30, 0.9) -$borderColor ?= #eaecef -$darkBorderColor ?= #302d28 -$codeBgColor ?= #282c34 -$darkCodeBgColor ?= #282c34 -$arrowBgColor ?= #ccc -$darkArrowBgColor ?= #333 -/* colors provided by theme */ -$boxShadowColor ?= #f0f1f2 -$darkBoxShadowColor ?= #0f0e0d -$cardShadowColor ?= rgba(0, 0, 0, 0.15) -$darkCardShadowColor ?= rgba(0, 0, 0, 0.3) -/* * theme-color */ -$colorPicker ?= { - red: #e74c3c, - blue: #3498db, - green: #3eaf7c, - orange: #f39c12, - purple: #8e44ad -} -/* badge color */ -$badgeTipColor ?= #42b983 -$badgeWarningColor ?= darken(#ffe564, 35%) -$badgeErrorColor ?= #DA5961 -/* layout */ -$navbarHeight ?= 3.6rem -$navbarMobileHeight ?= 3.25rem -$navbarHorizontalPadding ?= 1.5rem -$navbarMobileHorizontalPadding ?= 1rem -$navbarVerticalPadding ?= 0.7rem -$navbarMobileVerticalPadding ?= 0.5rem -$sidebarWidth ?= 18rem -$mobileSidebarWidth ?= $sidebarWidth -$contentWidth ?= 820px -$homePageWidth ?= 960px -/* responsive breakpoints */ -$MQWide ?= 1440px // wide screen -$MQMedium ?= 1350px // medium screen -$MQNormal ?= 1280px // desktop -$MQNarrow ?= 959px // narrow desktop / iPad -$MQMobile ?= 719px // wide mobile -$MQMobileNarrow ?= 419px // narrow mobile -/* code block */ -$lineNumbersWrapperWidth ?= 2.5rem -$codeLang ?= js ts html md vue css sass scss less stylus go java c sh yaml py docker dockerfile makefile -/* content class */ -$contentClass ?= '.theme-default-content' diff --git a/theme/styles/plugins/index.styl b/theme/styles/plugins/index.styl deleted file mode 100644 index 60b584c..0000000 --- a/theme/styles/plugins/index.styl +++ /dev/null @@ -1,2 +0,0 @@ -@require './nprogress' -@require './search' diff --git a/theme/styles/plugins/nprogress.styl b/theme/styles/plugins/nprogress.styl deleted file mode 100644 index ca4d353..0000000 --- a/theme/styles/plugins/nprogress.styl +++ /dev/null @@ -1,12 +0,0 @@ - -for $themeColorName, $themeColor in $colorPicker - .theme-{$themeColorName} - #nprogress - .bar - background $themeColor - - .peg - box-shadow 0 0 10px $themeColor, 0 0 5px $themeColor - - .spinner-icon - border-color $themeColor diff --git a/theme/styles/plugins/search.styl b/theme/styles/plugins/search.styl deleted file mode 100644 index e2209ea..0000000 --- a/theme/styles/plugins/search.styl +++ /dev/null @@ -1,77 +0,0 @@ -.navbar - .search-box - height calc(2rem + 4px) - margin-left 0.25rem - - input - margin-top 1px - margin-bottom 1px - border-color transparent - border-radius 0.25em - - @media (max-width $MQMobile) - left 0 - background-color transparent - - @media (min-width $MQNarrow) - background-color #efeef4 - - &:focus - width 15rem - - &:focus - background-color var(--bgcolor) - border-color var(--accent-color) - - .theme-dark & - color var(--text-color) - background-color transparent - - @media (min-width $MQNarrow) - background-color lighten($darkBgColor, 10%) !important - border-color var(--border-color) - - &:focus - background-color lighten($darkBgColor, 10%) !important - - .theme-dark & - .suggestion - a - color darken($darkTextColor, 35%) - - &.focused - background #0c0b0a - - a - color var(--accent-color) - border-color var(--accent-color) - - .suggestions - border-color var(--border-color) - background var(--white) - - #docsearch button - background-color transparent - border-color transparent - border-radius 0.25em - - .mobile & - left 0 - background-color transparent - - @media (min-width $MQNarrow) - background-color #efeef4 - - &:focus - background-color var(--bgcolor) - border-color var(--accent-color) - - .theme-dark & - color var(--text-color) - - @media (min-width $MQNarrow) - background-color lighten($darkBgColor, 10%) !important - border-color var(--border-color) - - &:focus - background-color lighten($darkBgColor, 10%) !important diff --git a/theme/styles/prefer-color-scheme-config.styl b/theme/styles/prefer-color-scheme-config.styl deleted file mode 100644 index 4bd0a9f..0000000 --- a/theme/styles/prefer-color-scheme-config.styl +++ /dev/null @@ -1,64 +0,0 @@ -body - --text-color $textColor - --bgcolor $bgColor - --bgcolor-light $bgColorLight - --border-color $borderColor - --code-bgcolor $codeBgColor - --arrow-bgcolor $arrowBgColor - --box-shadow-color $boxShadowColor - --card-shadow-color $cardShadowColor - --text-color-l10 lighten($textColor, 10%) - --text-color-l20 lighten($textColor, 20%) - --text-color-l25 lighten($textColor, 25%) - --text-color-l40 lighten($textColor, 40%) - --black #000 - --dark-grey #666 - --light-grey #999 - --white #fff - --grey3 #333 - --grey12 #bbb - --grey14 #eee - -body.theme-light - --text-color $textColor - --bgcolor $bgColor - --bgcolor-light $bgColorLight - --bgcolor-blur $bgColorBlur - --border-color $borderColor - --code-bgcolor $codeBgColor - --arrow-bgcolor $arrowBgColor - --box-shadow-color $boxShadowColor - --card-shadow-color $cardShadowColor - --text-color-l10 lighten($textColor, 10%) - --text-color-l20 lighten($textColor, 20%) - --text-color-l25 lighten($textColor, 25%) - --text-color-l40 lighten($textColor, 40%) - --black #000 - --dark-grey #666 - --light-grey #999 - --white #fff - --grey3 #333 - --grey12 #bbb - --grey14 #eee - -body.theme-dark - --text-color $darkTextColor - --bgcolor $darkBgColor - --bgcolor-light $darkBgColorLight - --bgcolor-blur $darkBgColorBlur - --border-color $darkBorderColor - --code-bgcolor $darkCodeBgColor - --arrow-bgcolor $darkArrowBgColor - --box-shadow-color $darkBoxShadowColor - --card-shadow-color $darkCardShadowColor - --text-color-l10 lighten($darkTextColor, 10%) - --text-color-l20 lighten($darkTextColor, 20%) - --text-color-l25 lighten($darkTextColor, 25%) - --text-color-l40 lighten($darkTextColor, 40%) - --black #fff - --dark-grey #999 - --light-grey #666 - --white #000 - --grey3 #ccc - --grey12 #333 - --grey14 #111 diff --git a/theme/styles/theme-color.styl b/theme/styles/theme-color.styl deleted file mode 100644 index 170b296..0000000 --- a/theme/styles/theme-color.styl +++ /dev/null @@ -1,15 +0,0 @@ -body - --accent-color $accentColor - --accent-color-l10 lighten($accentColor, 10%) - --accent-color-d10 darken($accentColor, 10%) - --accent-color-a15 alpha($accentColor, 15%) - -theme-color($themeColor, $colorName) - body.theme-{$colorName} - --accent-color $themeColor - --accent-color-l10 lighten($themeColor, 10%) - --accent-color-d10 darken($themeColor, 10%) - --accent-color-a15 alpha($themeColor, 15%) - -for key, value in $colorPicker - theme-color(value, key) diff --git a/theme/styles/theme.styl b/theme/styles/theme.styl deleted file mode 100644 index e39b702..0000000 --- a/theme/styles/theme.styl +++ /dev/null @@ -1,28 +0,0 @@ -@require './code/index' - -.theme-container:not(.has-navbar) - {$contentClass}:not(.custom) > h1, h2, h3, h4, h5, h6 - margin-top 1.5rem - padding-top 0 - -// narrow mobile -@media (max-width $MQMobileNarrow) - h1 - font-size 1.7rem - - h2 - font-size 1.5rem - - h3 - font-size 1.3rem - - {$contentClass} - div[class*='language-'] - margin 0.85rem -1.5rem - border-radius 0 - -.iconfont - font-weight normal - -[aria-label][data-balloon-pos] - cursor help diff --git a/theme/types/declare.d.ts b/theme/types/declare.d.ts deleted file mode 100644 index a622d98..0000000 --- a/theme/types/declare.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -declare module "*.jpg" { - const path: string; - export default path; -} - -declare module "docsearch.js/dist/cdn/docsearch.min.js" { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const docsearch: any; - - export default docsearch; -} - -declare module "@AlgoliaSearchBox" { - import vue from "vue"; - - export default vue; -} - -declare module "@BlogHome" { - import vue from "vue"; - - export default vue; -} - -declare module "@BlogInfo" { - import vue from "vue"; - - export default vue; -} - -declare module "@BloggerInfo" { - import vue from "vue"; - - export default vue; -} - -declare module "@BlogPage" { - import vue from "vue"; - - export default vue; -} - -declare module "@Comment" { - import vue from "vue"; - - export default vue; -} - -declare module "@ContentTop" { - import vue from "vue"; - - export default vue; -} - -declare module "@ContentBottom" { - import vue from "vue"; - - export default vue; -} - -declare module "@NavbarStart" { - import vue from "vue"; - - export default vue; -} - -declare module "@NavbarCenter" { - import vue from "vue"; - - export default vue; -} - -declare module "@NavbarEnd" { - import vue from "vue"; - - export default vue; -} - -declare module "@PageTop" { - import vue from "vue"; - - export default vue; -} - -declare module "@PageInfo" { - import vue from "vue"; - - export default vue; -} - -declare module "@PageBottom" { - import vue from "vue"; - - export default vue; -} - -declare module "@Pagination" { - import vue from "vue"; - - export default vue; -} - -declare module "@SearchBox" { - import vue from "vue"; - - export default vue; -} - -declare module "@ThemeColor" { - import vue from "vue"; - - export default vue; -} - -declare module "@SearchBox" { - import vue from "vue"; - - export default vue; -} - -declare module "@SidebarTop" { - import vue from "vue"; - - export default vue; -} - -declare module "@SidebarCenter" { - import vue from "vue"; - - export default vue; -} - -declare module "@SidebarBottom" { - import vue from "vue"; - - export default vue; -} diff --git a/theme/types/extend.d.ts b/theme/types/extend.d.ts deleted file mode 100644 index 138ddad..0000000 --- a/theme/types/extend.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import { HopeThemeLocaleConfigItem } from "@mr-hope/vuepress-shared"; -import { - BlogMedia, - HopeThemeConfig, - HopeNavBarConfig, - HopeSideBarConfig, - HopeFooterConfig, -} from "./theme"; -import { PageInfotype } from "@mr-hope/vuepress-plugin-comment"; -import { FeedFrontmatterOption } from "@mr-hope/vuepress-plugin-feed"; -import { AlgoliaOption } from "@mr-hope/vuepress-types"; - -declare module "vue/types/vue" { - export interface Vue { - $category: any; - $tag: any; - $currentTag: any; - $currentCategory: any; - $pagination: any; - } -} - -declare module "@mr-hope/vuepress-types" { - interface PageFrontmatter { - icon?: string; - author?: string | false; - original?: boolean; - /** - * @deprecated - */ - date?: Date | string; - time?: Date | string; - category?: string; - tag?: string[]; - /** - * @deprecated - */ - tags?: string[]; - summary?: string; - sticky?: boolean | number; - star?: boolean | number; - article?: boolean; - timeline?: boolean; - password?: string | number; - image?: string; - copyright?: { - minLength?: number; - noCopy?: boolean; - noSelect?: boolean; - }; - feed?: FeedFrontmatterOption; - pageInfo?: PageInfotype[] | false; - visitor?: boolean; - breadcrumb?: boolean; - breadcrumbIcon?: boolean; - navbar?: boolean; - sidebar?: "auto" | boolean; - sidebarDepth?: number; - comment?: boolean; - editLink?: boolean; - contributor?: boolean; - updateTime?: boolean; - prev?: string | false; - next?: string | false; - footer?: string | boolean; - copyrightText?: string | false; - mediaLink?: BlogMedia; - search?: boolean; - backToTop?: boolean; - anchorDisplay?: boolean; - } - - interface I18nConfig extends Partial { - /** 导航栏链接 */ - nav?: HopeNavBarConfig; - /** 侧边栏配置 */ - sidebar?: HopeSideBarConfig; - /** 当前语言的 algolia 设置 */ - algolia?: AlgoliaOption; - /** 页脚设置 */ - footer?: HopeFooterConfig; - } - - // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface ThemeConfig extends HopeThemeConfig {} - - interface Page { - _chunkName?: string; - } - - interface ResolvedComponent { - _chunkName?: string; - } -} diff --git a/theme/types/index.d.ts b/theme/types/index.d.ts deleted file mode 100644 index c0e40ec..0000000 --- a/theme/types/index.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - HopeNavBarConfig, - HopeSideBarConfig, - HopeThemeConfig, - HopeVuePressConfig, - ResolvedHopeVuePressConfig, -} from "./theme"; -import "./declare"; -import "./extend"; - -export * from "./theme"; - -export const config: (config: HopeVuePressConfig) => ResolvedHopeVuePressConfig; - -export const themeConfig: (themeConfig: HopeThemeConfig) => HopeThemeConfig; -export const navbarConfig: (navbarConfig: HopeNavBarConfig) => HopeNavBarConfig; -export const sidebarConfig: ( - sidebarConfig: HopeSideBarConfig -) => HopeSideBarConfig; diff --git a/theme/types/theme/appearance.d.ts b/theme/types/theme/appearance.d.ts deleted file mode 100644 index ba6f2bc..0000000 --- a/theme/types/theme/appearance.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -export interface HopeThemeAppearanceConfig { - /** - * Algolia 搜索类型 - * - * Algolia Search Type - * - * @default 'dropdown' - */ - algoliaType?: "dropdown" | "full"; - - /** - * 图标前缀 - * - * Prefix of icon class - * - * @default 'icon-' - */ - iconPrefix?: string; - - /** - * 是否在移动视图下隐藏站点名称 - * - * Whether hide site title on mobile - * - * @default true - */ - hideSiteTitleonMobile?: boolean; - - /** - * 是否在导航栏显示仓库链接 - * - * Whether display repo link in navbar - * - * @default true - */ - repoDisplay?: boolean; - - /** - * 是否显示 ”全屏“ 按钮 - * - * Whether show fullscreen button in navbar - * - * @default true - */ - fullscreen?: boolean; - - /** - * 是否在侧边栏显示图标 - * - * Whether show icons in the sidebar - * - * @default true - */ - sidebarIcon?: boolean; - - /** - * 侧边栏嵌套的标题深度 - * - * Nested headings depth in sidebar - * - * @default 2 - */ - sidebarDepth?: number; - - /** - * 是否在路径导航显示图标 - * - * Whether display icon in breadcrumb - * - * @default true - */ - breadcrumbIcon?: boolean; - - /** - * 是否显示当前页面贡献者 - * - * Whether show contributors in each page - * - * @default true - */ - contributor?: boolean; - - /** - * 显示编辑本页链接 - * - * Whether show edit link on each page - * - * @default true - */ - editLinks?: boolean; - - /** - * 显示更新时间 - * - * Whether show update time on each page - * - * @default true - */ - updateTime?: boolean; - - /** - * 是否显示返回顶部按钮 - * - * 如果设置为数字,则该数字为触发临界值 (默认临界值为 300px) - * - * Wether display backto top button - * - * If it’s set with a number, then it will be the threshold - * - * @default true - */ - backToTop?: boolean | number; -} diff --git a/theme/types/theme/extends.d.ts b/theme/types/theme/extends.d.ts deleted file mode 100644 index ae9a1ce..0000000 --- a/theme/types/theme/extends.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { - NavBarConfigItem, - SideBarConfigItemObject, -} from "@mr-hope/vuepress-types"; - -/** vuepress-theme-hope 导航栏配置项 */ -export interface HopeNavBarConfigItem extends NavBarConfigItem { - /** 导航栏对应项的图标 */ - icon?: string; - /** 导航栏的路径前缀 */ - prefix?: string; - /** 导航栏下拉列表子项 */ - items?: HopeNavBarConfigItem[]; -} - -/** vuepress-theme-hope 导航栏配置 */ -export type HopeNavBarConfig = HopeNavBarConfigItem[] | false; - -/** vuepress-theme-hope 侧边栏配置对象 */ -export interface HopeSideBarConfigItemObject extends SideBarConfigItemObject { - /** 分组的图标 */ - icon?: string; - /** 当前分组的路径前缀 */ - prefix?: string; - /** 当前侧边栏的子项 */ - children: HopeSideBarConfigItem[]; - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - [props: string]: any; -} - -/** vuepress-theme-hope 侧边栏配置项 */ -export type HopeSideBarConfigItem = - | string - | string[] - | HopeSideBarConfigItemObject; - -/** vuepress-theme-hope 侧边栏配置 */ -export type HopeSideBarConfig = - | HopeSideBarConfigItem[] - | Record - | "auto" - | false; diff --git a/theme/types/theme/feature.d.ts b/theme/types/theme/feature.d.ts deleted file mode 100644 index 4a5bb16..0000000 --- a/theme/types/theme/feature.d.ts +++ /dev/null @@ -1,275 +0,0 @@ -/** - * 合法的媒体 - * - * media you can choose - */ -type BlogMedia = - | "Baidu" - | "Bitbucket" - | "Dingding" - | "Discord" - | "Dribbble" - | "Email" - | "Evernote" - | "Facebook" - | "Flipboard" - | "Gitee" - | "Github" - | "Gitlab" - | "Gmail" - | "Instagram" - | "Lines" - | "Linkedin" - | "Pinterest" - | "Pocket" - | "QQ" - | "Qzone" - | "Reddit" - | "Rss" - | "Steam" - | "Twitter" - | "Wechat" - | "Weibo" - | "Whatsapp" - | "Youtube" - | "Zhihu"; - -/** - * 博客选项 - * - * Blog configuration - */ -export type BlogOptions = { - /** - * 博主名称 - * - * Name of the Blogger, default is author - */ - name?: string; - - /** - * 博主头像,应为绝对路径 - * - * Blogger avator, must be an absolute path - */ - avatar?: string; - - /** - * 博主的个人介绍地址 - * - * Intro page about blogger - */ - intro?: string; - - /** - * 媒体链接配置 - * - * Media links configuration - * - * E.g. - * - * ```js - * { - * QQ: "http://wpa.qq.com/msgrd?v=3&uin=1178522294&site=qq&menu=yes", - * Qzone: "https://1178522294.qzone.qq.com/", - * Gmail: "mailto:zhangbowang1998@gmail.com", - * Zhihu: "https://www.zhihu.com/people/mister-hope", - * Steam: "https://steamcommunity.com/id/Mr-Hope/", - * Weibo: "https://weibo.com/misterhope", - * } - * ``` - */ - links?: Partial>; - - /** - * 是否剪裁头像为圆形形状 - * - * Whether cliping the avatar with round shape - * - * @default true - */ - roundAvatar?: boolean; - - /** - * 是否在侧边栏展示博主信息 - * - * Whether to display blogger info in sidebar - * - * @default 'none' - */ - sidebarDisplay?: "mobile" | "none" | "always"; - - /** - * 时间轴自定义文字 - * - * Custom text for timeline - * - * @default 'Yesterday once more' - */ - timeline?: string; - /** - * 每页的文章数量 - * - * Article number per page - * - * @default 10 - */ - perPage?: number; -}; - -/** - * 加密选项 - * - * Encrypt Options - */ -export interface EncryptOptions { - /** - * 功能状态 - * - * - `'global'` 意味着全局启用 - * - `'local'` 意味着全局禁用,可在页面内启用 - * - * Feature Status - * - * - `'global'` means enabled globally - * - `'local'` means disabled globally and can be enabled in pages - * - * @default 'local' - */ - status?: "global" | "local"; - /** - * 最高权限密码 - * - * Global passwords, which has the highest authority - */ - global?: string | string[]; - /** - * 加密配置 - * - * ```json - * { - * // 这会加密整个 guide 目录,并且两个密码都是可用的 - * "/guide/": ["1234", "5678"], - * // 这只会加密 config/page.html - * "/config/page.html": "1234" - * } - * ``` - * - * Encrypt Configuration - * - * E.g.: - * - * ```json - * { - * // This will encrypt the entire guide directory and both passwords will be available - * "/guide/": ["1234", "5678"], - * // this will only encrypt config/page.html - * "/config/page.html": "1234" - * } - * ``` - */ - config?: Record; -} - -/** 自定义布局配置 */ -export interface CustomOptions { - /** 页面顶部插槽 */ - pageTop?: string; - /** 文章内容顶部插槽 */ - contentTop?: string; - /** 文章内容底部插槽 */ - contentBottom?: string; - /** 页面底部插槽 */ - pageBottom?: string; - - /** 导航栏起始插槽 */ - navbarStart?: string; - /** 导航栏中部插槽 */ - navbarCenter?: string; - /** 导航栏结束插槽 */ - navbarEnd?: string; - - /** 侧边栏顶部插槽 */ - sidebarTop?: string; - /** 侧边栏中部插槽 */ - sidebarCenter?: string; - /** 侧边栏底部插槽 */ - sidebarBottom?: string; -} - -export interface HopeFeatureConfig { - /** - * 深色模式支持选项: - * - * - `'auto-switch'`: "关闭 | 自动 | 打开" 的三段式开关 (默认) - * - `'switch'`: "关闭 | 打开" 的切换式开关 - * - `'auto'`: 自动根据用户设备主题或当前时间决定是否应用深色模式 - * - `'disable'`: 禁用深色模式 - * - * Dark mode support options: - * - * - `'auto-switch'`: "off | automatic | on" three-stage switch (Default) - * - `'switch'`: "Close | Open" toggle switch - * - `'auto'`: Automatically decide whether to apply dark mode based on user device’s color-scheme or current time - * - `'disable'`: disable dark mode - * - * @default 'auto-switch' - */ - darkmode?: "auto-switch" | "auto" | "switch" | "disable"; - - /** - * 主题色选项配置。 - * - * Theme color configuration. - * - * E.g.: - * ```js - * { - * blue: '#2196f3', - * red: '#f26d6d', - * green: '#3eaf7c', - * orange: '#fb9b5f' - * } - * ``` - * - * @default { blue: '#2196f3', red: '#f26d6d', green: '#3eaf7c', orange: '#fb9b5f' } - */ - themeColor?: Record | false; - - /** - * 博客设置 - * - * Blog configuration - */ - blog?: BlogOptions | false; - - /** - * 加密设置 - * - * Encrypt Configuration - */ - encrypt?: EncryptOptions; - - /** - * 自定义组件设置 - */ - custom?: CustomOptions; - - /** - * 是否启用平滑滚动 - * - * Enable smooth scrolling feature - * - * @default true - */ - smoothScroll?: boolean; - - /** - * 每分钟的阅读字数 - * - * Reading speed of word per minute - * - * @default 300 - */ - wordPerminute?: number; -} diff --git a/theme/types/theme/index.d.ts b/theme/types/theme/index.d.ts deleted file mode 100644 index 06ef379..0000000 --- a/theme/types/theme/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { HopeThemeConfig, ResolvedHopeThemeConfig } from "./theme"; -import { SiteConfig } from "@mr-hope/vuepress-types"; - -export * from "./appearance"; -export * from "./extends"; -export * from "./feature"; -export * from "./layout"; -export * from "./locale"; -export * from "./plugin"; -export * from "./theme"; - -/** vuepress-theme-hope 项目配置 */ -export interface HopeVuePressConfig extends SiteConfig { - /** 自定义主题的配置 */ - themeConfig: HopeThemeConfig; -} - -/** 处理过的 vuepress-theme-hope 项目配置 */ -export interface ResolvedHopeVuePressConfig extends HopeVuePressConfig { - /** 使用的自定义主题 */ - theme: "hope"; - /** 自定义主题的配置 */ - themeConfig: ResolvedHopeThemeConfig; -} diff --git a/theme/types/theme/layout.d.ts b/theme/types/theme/layout.d.ts deleted file mode 100644 index f644436..0000000 --- a/theme/types/theme/layout.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { PageInfotype } from "@mr-hope/vuepress-plugin-comment"; -import { HopeNavBarConfig, HopeSideBarConfig } from "./extends"; - -/** - * 页脚配置 - * - * Footer Settings - */ -export interface HopeFooterConfig { - /** - * 页脚的默认内容,可输入 HTMLString - * - * The default content for the footer, can accept HTMLString. - */ - content?: string; - /** - * 默认的版权信息,设置为 `false` 来默认禁用它 - * - * The default copyright info, set it to `false` to disable it by default. - */ - copyright?: string | false; - /** - * 是否默认显示页脚 - * - * Whether to display footer by default - * - * @default false - */ - display?: boolean; -} - -export interface HopeLayoutConfig { - /** - * 导航栏配置 - * - * Navbar configuration - */ - nav?: HopeNavBarConfig; - - /** - * 是否禁用导航栏 - * - * Whether disable navbar - * - * @default false - */ - navbar?: boolean; - - /** - * 是否在向下滚动时自动隐藏导航栏 - * - * Whether to hide navbar when scrolling down - * - * @default 'mobile' - */ - navAutoHide?: "always" | "mobile" | "none"; - - /** - * 侧边栏配置 - * - * Sidebar configuration - */ - sidebar?: HopeSideBarConfig; - - /** - * 是否在桌面模式显示锚点标题 - * - * Whether display anchor in desktop mode - * - * @default true - */ - anchorDisplay?: boolean; - - /** - * 是否全局启用路径导航 - * - * Whether enable breadcrumb globally - * - * @default true - */ - breadcrumb?: boolean; - - /** - * 页面信息 - * - * Article information - * - * Avaliable Options: - * - * - `'author'`: Author - * - `'time'`: Writing Date - * - `'category'`: Category - * - `'tag'`: Tags - * - `'reading-time'`: Expect reading time - * - `'word'`: Word number for the article - * - `'visitor'`: Visitor Number - * - * @default ['author', 'visitor', 'time', 'category', 'tag', 'reading-time'] - */ - pageInfo?: PageInfotype[] | false; - - /** - * 页脚配置 - * - * Footer Configuration - */ - footer?: HopeFooterConfig; -} diff --git a/theme/types/theme/locale.d.ts b/theme/types/theme/locale.d.ts deleted file mode 100644 index be8077e..0000000 --- a/theme/types/theme/locale.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - HopeNavBarConfig, - HopeSideBarConfig, - HopeThemeLocaleConfigItem, -} from "@mr-hope/vuepress-shared"; -import { AlgoliaOption } from "@mr-hope/vuepress-types"; -import { HopeFooterConfig } from "./layout"; - -/** vuepress-theme-hope 多语言配置 */ -export interface HopeLangLocalesConfig - extends Partial { - /** 当前语言下的标题 */ - title?: string; - /** 当前语言下的描述 */ - description?: string; - /** 导航栏链接 */ - nav?: HopeNavBarConfig; - /** 侧边栏配置 */ - sidebar?: HopeSideBarConfig; - /** 当前语言的 algolia 设置 */ - algolia?: AlgoliaOption; - /** 页脚设置 */ - footer?: HopeFooterConfig; -} diff --git a/theme/types/theme/plugin.d.ts b/theme/types/theme/plugin.d.ts deleted file mode 100644 index b530d8c..0000000 --- a/theme/types/theme/plugin.d.ts +++ /dev/null @@ -1,235 +0,0 @@ -import { ActiveHashOptions } from "vuepress-plugin-active-hash"; -import { CommentOptions } from "@mr-hope/vuepress-plugin-comment"; -import { CopyCodeOptions } from "@mr-hope/vuepress-plugin-copy-code"; -import { FeedOptions } from "@mr-hope/vuepress-plugin-feed"; -import { GitOptions } from "@mr-hope/vuepress-plugin-git"; -import { MarkdownEnhanceOptions } from "vuepress-plugin-md-enhance"; -import { PWAOptions } from "@mr-hope/vuepress-plugin-pwa"; -import { PhotoSwipeOptions } from "vuepress-plugin-photo-swipe"; -import { SeoOptions } from "@mr-hope/vuepress-plugin-seo"; -import { SitemapOptions } from "@mr-hope/vuepress-plugin-sitemap"; -import { SmoothScrollOptions } from "@mr-hope/vuepress-plugin-smooth-scroll"; - -import type { Page, ResolvedComponent } from "@mr-hope/vuepress-types"; - -/** - * 重命名块选项 - * - * Options for renaming chunks - */ -export interface ChunkRenameOptions { - /** - * 页面块重命名选项。 默认情况下,所有页面块都将以页面标题命名。 - * - * Page Chunk Rename Option. By default, all page chunks will be named with page title. - */ - pageChunkName: ((page: Page) => string) | false; - - /** - * 布局块重命名选项。 默认情况下,所有布局块都将通过其组件名称来命名。 - * - * Layout Chunk Rename Option. By default, all the layout chunks will be named by their component name. - */ - layoutChunkName: ((layout: ResolvedComponent) => string) | false; -} - -/** - * Options for cleaning url suffix - */ -export interface CleanUrlOptions { - /** - * 普通页面后缀。此默认行为将为 `/a/b.md` 生成 `/a/b`。 - * - * Nornal Page suffix. This default behavior will generate `a/b.md` with `/a/b`. - * - * @default '' - */ - normalSuffix: string; - /** - * `index.md`,`readme.md` 和 `README.md` 的页面后缀。此默认行为将为 `a/readme.md` 生成 `/a/`。 - * - * Page suffix for `index.md`, `readme.md` and `README.md`. This default behavior will generate `a/readme.md` with `/a/`. - * - * @default '/' - */ - indexSuffix: string; - /** - * 未找到页面的链接 - * - * Link for not found pages - * - * @default './404.html' - */ - notFoundPath: string; -} - -/** - * 版权设置 - * - * Copyright Settings - */ -export interface HopeCopyrightConfig { - /** - * 功能状态 - * - * - `'global'` 意味着全局启用 - * - `'local'` 意味着全局禁用,可在页面内启用 - * - * Feature Status - * - * - `'global'` means enabled globally - * - `'local'` means disabled globally and can be enabled in pages - * - * @default 'global' - */ - status?: "global" | "local"; - /** - * 触发版权信息或禁止复制动作的最少字符数 - * - * The minimum text length that triggers the clipboard component or the noCopy effect - */ - minLength?: number; - /** - * 是否禁止复制 - * - * Whether to prohibit copying. - */ - noCopy?: boolean; - /** - * 是否禁止选中文字 - * - * Whether to prohibit selecting. - */ - noSelect?: boolean; -} - -interface HopeThemePluginConfig { - /** - * AddThis 的公共 ID - * @see http://vuepress-theme-hope.github.io/add-this/zh/config/ - * - * pubid for addthis - * @see http://vuepress-theme-hope.github.io/add-this/config/ - */ - addThis?: string; - - activeHash?: ActiveHashOptions | false; - - /** - * 评论插件配置 - * @see http://vuepress-theme-hope.github.io/comment/zh/config/ - * - * Comment plugin options - * @see http://vuepress-theme-hope.github.io/comment/config/ - */ - comment?: CommentOptions; - - /** - * chunk 重命名 - * - * @see https://vuepress-theme-hope.github.io/zh/config/theme/plugin/#chunkrename - * - * Chunk Rename - * @see https://vuepress-theme-hope.github.io/config/theme/plugin/#chunkrename - */ - - chunkRename?: ChunkRenameOptions | false; - - /** - * 清理插件配置 - * @see https://vuepress-theme-hope.github.io/zh/config/theme/plugin/#cleanurl - * - * Clean Url Config - * @see https://vuepress-theme-hope.github.io/config/theme/plugin/#cleanurl - */ - cleanUrl?: CleanUrlOptions | false; - - /** - * 代码复制插件配置 - * @see http://vuepress-theme-hope.github.io/copy-code/zh/config/ - * - * code copy plugin options - * @see http://vuepress-theme-hope.github.io/copy-code/config/ - */ - copyCode?: CopyCodeOptions | false; - - /** - * 版权设置 - * - * Copyright plugin options - */ - copyright?: HopeCopyrightConfig; - - /** - * Feed 插件配置 - * @see http://vuepress-theme-hope.github.io/feed/zh/config/ - * - * Feed plugin options - * @see http://vuepress-theme-hope.github.io/feed/config/ - */ - feed?: FeedOptions | false; - - /** - * Git 插件配置 - * @see http://vuepress-theme-hope.github.io/git/zh/ - * - * Git plugin options - * @see http://vuepress-theme-hope.github.io/git/ - */ - git?: GitOptions | false; - - /** - * Markdown 增强插件配置 - * @see http://vuepress-theme-hope.github.io/md-enhance/zh/config/ - * - * Markdown enhance plugin options - * @see http://vuepress-theme-hope.github.io/md-enhance/config/ - */ - mdEnhance?: MarkdownEnhanceOptions | false; - - /** - * PWA 插件配置 - * @see http://vuepress-theme-hope.github.io/pwa/zh/config/ - * - * PWA plugin options - * @see http://vuepress-theme-hope.github.io/pwa/config/ - */ - pwa?: PWAOptions | false; - - /** - * 图片预览插件配置 - * @see http://vuepress-theme-hope.github.io/photo-swipe/zh/config/ - * - * Photo Swipe plugin options - * @see http://vuepress-theme-hope.github.io/photo-swipe/config/ - */ - photoSwipe?: PhotoSwipeOptions | false; - - /** - * SEO 插件配置 - * @see http://vuepress-theme-hope.github.io/seo/zh/config/ - * - * SEO plugin options - * @see http://vuepress-theme-hope.github.io/seo/config/ - */ - seo?: SeoOptions | false; - - /** - * Sitemap 插件配置 - * @see http://vuepress-theme-hope.github.io/sitemap/zh/config/ - * - * Sitemap plugin options - * @see http://vuepress-theme-hope.github.io/sitemap/config/ - */ - sitemap?: SitemapOptions | false; - - smoothScrollOptions?: SmoothScrollOptions | number | false; - - /** - * ts-loader 选项 - * - * Options which will passed to ts-loader - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - typescript?: Record | boolean; -} diff --git a/theme/types/theme/theme.d.ts b/theme/types/theme/theme.d.ts deleted file mode 100644 index 03e5fdd..0000000 --- a/theme/types/theme/theme.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { AlgoliaOption, I18nConfig } from "@mr-hope/vuepress-types"; -import { HopeThemeAppearanceConfig } from "./appearance"; -import { HopeFeatureConfig } from "./feature"; -import { HopeLayoutConfig } from "./layout"; -import { HopeLangLocalesConfig } from "./locale"; -import { HopeThemePluginConfig } from "./plugin"; - -/** vuepress-theme-hope 主题配置 */ -export interface HopeThemeConfig - extends HopeThemeAppearanceConfig, - HopeFeatureConfig, - HopeLayoutConfig, - HopeThemePluginConfig { - /** 导航栏 Logo,应为绝对路径 */ - logo?: string; - /** - * 暗黑模式下 logo - * - * Logo Image under darkmode - */ - darkLogo?: string; - /** 显示所有页面的标题链接 */ - displayAllHeaders?: boolean; - /** 是否启用默认的搜索框 */ - search?: boolean; - /** 搜索框占位符 */ - searchPlaceholder?: string; - /** 默认搜索框显示的搜索结果数量 */ - searchMaxSuggestions?: number; - /** Algolia 搜索配置 */ - algolia?: AlgoliaOption; - /** 所有页面的 下一篇 链接 */ - nextLinks?: boolean; - /** 所有页面的 上一篇 链接 */ - prevLinks?: boolean; - /** 项目仓库地址 */ - repo?: string; - /** 仓库标签文字 */ - repoLabel?: string; - /** 文档所属仓库 */ - docsRepo?: string; - /** 文档所属文件夹 */ - docsDir?: string; - /** 文档所属分支 */ - docsBranch?: string; - - /** - * 多语言配置 - * - * i18n config - */ - locales?: Record; - - /** 站点地址 */ - hostname?: string; - - /** - * 文章显示的默认作者 - * - * The default author of the article - */ - author?: string; -} - -/** 处理后的 vuepress-theme-hope 主题配置 */ -export interface ResolvedHopeThemeConfig extends HopeThemeConfig { - /** 侧边栏深度 */ - sidebarDepth: number; - /** 图标 FontClass 前缀 */ - iconPrefix: string; - /** 多语言配置 */ - locales: Record; - /** 页脚配置 */ - footer: HopeFooterConfig; - /** 显示编辑本页链接 */ - editLinks: boolean; -} diff --git a/theme/utils/article.d.ts b/theme/utils/article.d.ts deleted file mode 100644 index 17f1b5b..0000000 --- a/theme/utils/article.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { PageComputed } from "@mr-hope/vuepress-types"; -export declare const getDate: (date: string | number | Date) => (number | undefined)[]; -export declare const compareDate: (dataA: Date | number | string | undefined, dataB: Date | number | string | undefined) => number; -export declare const filterArticle: (pages: PageComputed[], filterFunc?: ((page: PageComputed) => boolean) | undefined) => PageComputed[]; -export declare const sortArticle: (pages: PageComputed[], compareKey?: "sticky" | "star" | undefined) => PageComputed[]; -export declare const generatePagination: (pages: PageComputed[], perPage?: number) => PageComputed[][]; diff --git a/theme/utils/article.js b/theme/utils/article.js deleted file mode 100644 index a737eb1..0000000 --- a/theme/utils/article.js +++ /dev/null @@ -1,91 +0,0 @@ -import * as dayjs from "dayjs"; -export const getDate = (date) => { - const time = dayjs(date instanceof Date || typeof date === "number" ? date : date.trim()); - if (time.isValid()) { - const year = time.year(); - const month = time.month() + 1; - const date = time.date(); - const hour = time.hour(); - const minute = time.minute(); - const second = time.second(); - const millisecond = time.millisecond(); - if ((hour === 8 || hour === 0) && - minute === 0 && - second === 0 && - millisecond === 0) - return [year, month, date, undefined, undefined, undefined]; - return [year, month, date, hour, minute, second]; - } - const pattern = /(?:(\d+)[/-](\d+)[/-](\d+))?\s*(?:(\d+):(\d+)(?::(\d+))?)?/u; - const [, year, month, day, hour, minute, second] = pattern.exec(date.trim()) || []; - const getNumber = (a) => typeof a === "undefined" ? undefined : Number(a); - const getYear = (yearNumber) => yearNumber && yearNumber < 100 ? yearNumber + 2000 : yearNumber; - const getSecond = (secondNumber) => hour && minute && !second ? 0 : secondNumber; - return [ - getYear(getNumber(year)), - getNumber(month), - getNumber(day), - getNumber(hour), - getNumber(minute), - getSecond(getNumber(second)), - ]; -}; -export const compareDate = (dataA, dataB) => { - if (!dataA) - return 1; - if (!dataB) - return -1; - const compare = (a, b) => { - if (a.length === 0) - return 0; - if (typeof b[0] === "undefined") - return typeof a[0] === "undefined" || a[0] === 0 ? 0 : -1; - if (typeof a[0] === "undefined") - return b[0] === 0 ? 0 : 1; - if (b[0] - a[0] === 0) { - a.shift(); - b.shift(); - return compare(a, b); - } - return b[0] - a[0]; - }; - return compare(getDate(dataA), getDate(dataB)); -}; -export const filterArticle = (pages, filterFunc) => pages.filter((page) => { - const { frontmatter: { article, blogpage, home }, title, } = page; - return (typeof title !== "undefined" && - blogpage !== true && - home !== true && - article !== false && - (!filterFunc || filterFunc(page))); -}); -export const sortArticle = (pages, compareKey) => pages.slice(0).sort((prev, next) => { - if (compareKey) { - const prevKey = prev.frontmatter[compareKey]; - const nextKey = next.frontmatter[compareKey]; - if (prevKey && nextKey && prevKey !== nextKey) - return Number(nextKey) - Number(prevKey); - if (prevKey && !nextKey) - return -1; - if (!prevKey && nextKey) - return 1; - } - const prevTime = prev.frontmatter.time || prev.frontmatter.date || prev.createTimeStamp; - const nextTime = next.frontmatter.time || next.frontmatter.date || next.createTimeStamp; - return compareDate(prevTime, nextTime); -}); -export const generatePagination = (pages, perPage = 10) => { - const result = []; - let index = 0; - while (index < pages.length) { - const paginationPage = []; - for (let i = 0; i < perPage; i++) - if (index < pages.length) { - paginationPage.push(pages[index]); - index += 1; - } - result.push(paginationPage); - } - return result; -}; -//# sourceMappingURL=article.js.map \ No newline at end of file diff --git a/theme/utils/article.js.map b/theme/utils/article.js.map deleted file mode 100644 index e6e1ff5..0000000 --- a/theme/utils/article.js.map +++ /dev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C,CAAC;gBAClC,KAAK,IAAI,CAAC,CAAC;aACZ;QAEH,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;KAC7B;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/utils/click-outside.d.ts b/theme/utils/click-outside.d.ts deleted file mode 100644 index 5fcfb62..0000000 --- a/theme/utils/click-outside.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { DirectiveOptions, VNode } from "vue"; -import type { DirectiveBinding } from "vue/types/options"; -declare type Event = TouchEvent | MouseEvent; -interface PopupHtmlElement extends HTMLElement { - $vueClickOutside?: { - callback: (event: Event) => void; - handler: (event: Event) => void; - }; -} -declare type PopupDirectiveFunction = (el: PopupHtmlElement, binding: DirectiveBinding, vnode: VNode, oldVnode: VNode) => void; -export declare const bind: PopupDirectiveFunction; -export declare const update: PopupDirectiveFunction; -export declare const unbind: PopupDirectiveFunction; -declare const _default: DirectiveOptions; -export default _default; diff --git a/theme/utils/click-outside.js b/theme/utils/click-outside.js deleted file mode 100644 index 2c5c337..0000000 --- a/theme/utils/click-outside.js +++ /dev/null @@ -1,72 +0,0 @@ -const validate = (binding) => { - if (typeof binding.value !== "function") { - console.warn("[Vue-click-outside:] provided expression", binding.expression, "is not a function."); - return false; - } - return true; -}; -const isPopup = (popupItem, elements) => { - if (!popupItem || !elements) - return false; - for (let i = 0, len = elements.length; i < len; i++) - try { - if (popupItem.contains(elements[i])) - return true; - if (elements[i].contains(popupItem)) - return false; - } - catch (err) { - return false; - } - return false; -}; -const isServer = (vNode) => typeof vNode.componentInstance !== "undefined" && - vNode.componentInstance.$isServer; -export const bind = (el, binding, vNode) => { - if (!validate(binding)) - return; - // Define Handler and cache it on the element - const handler = (event) => { - if (!vNode.context) - return; - // Some components may have related popup item, on which we shall prevent the click outside event handler. - // eslint-disable-next-line - const elements = - // eslint-disable-next-line - event.path || - (event.composedPath ? event.composedPath() : []); - if (elements && elements.length > 0) - elements.unshift(event.target); - if (el.contains(event.target) || - // eslint-disable-next-line - isPopup(vNode.context.popupItem, elements)) - return; - if (el.$vueClickOutside) - el.$vueClickOutside.callback(event); - }; - // Add Event Listeners - el.$vueClickOutside = { - handler, - callback: binding.value, - }; - const clickHandler = "ontouchstart" in document.documentElement ? "touchstart" : "click"; - if (!isServer(vNode)) - document.addEventListener(clickHandler, handler); -}; -export const update = (el, binding) => { - if (validate(binding) && el.$vueClickOutside) - el.$vueClickOutside.callback = binding.value; -}; -export const unbind = (el, _binding, vNode) => { - // Remove Event Listeners - const clickHandler = "ontouchstart" in document.documentElement ? "touchstart" : "click"; - if (!isServer(vNode) && el.$vueClickOutside) - document.removeEventListener(clickHandler, el.$vueClickOutside.handler); - delete el.$vueClickOutside; -}; -export default { - bind, - update, - unbind, -}; -//# sourceMappingURL=click-outside.js.map \ No newline at end of file diff --git a/theme/utils/click-outside.js.map b/theme/utils/click-outside.js.map deleted file mode 100644 index 4d8d409..0000000 --- a/theme/utils/click-outside.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"click-outside.js","sourceRoot":"","sources":["click-outside.ts"],"names":[],"mappings":"AAmBA,MAAM,QAAQ,GAAG,CAAC,OAAyB,EAAW,EAAE;IACtD,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,UAAU,EAAE;QACvC,OAAO,CAAC,IAAI,CACV,0CAA0C,EAC1C,OAAO,CAAC,UAAU,EAClB,oBAAoB,CACrB,CAAC;QAEF,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,SAAe,EAAE,QAAgB,EAAW,EAAE;IAC7D,IAAI,CAAC,SAAS,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;QACjD,IAAI;YACF,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KAAK,CAAC,CAAC;IAC/D,CAAC,CAAC;IAEF,sBAAsB;IACtB,EAAE,CAAC,gBAAgB,GAAG;QACpB,OAAO;QACP,QAAQ,EAAE,OAAO,CAAC,KAA+B;KAClD,CAAC;IACF,MAAM,YAAY,GAChB,cAAc,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC;IACtE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,QAAQ,CAAC,gBAAgB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAA2B,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE;IAC5D,IAAI,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,gBAAgB;QAC1C,EAAE,CAAC,gBAAgB,CAAC,QAAQ,GAAG,OAAO,CAAC,KAA+B,CAAC;AAC3E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAA2B,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IACpE,yBAAyB;IACzB,MAAM,YAAY,GAChB,cAAc,IAAI,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC;IACtE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,gBAAgB;QACzC,QAAQ,CAAC,mBAAmB,CAAC,YAAY,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC1E,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC7B,CAAC,CAAC;AAEF,eAAe;IACb,IAAI;IACJ,MAAM;IACN,MAAM;CACa,CAAC"} \ No newline at end of file diff --git a/theme/utils/color.d.ts b/theme/utils/color.d.ts deleted file mode 100644 index fe9f9e2..0000000 --- a/theme/utils/color.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default class Color { - type: "hex" | "rgb"; - red: number; - green: number; - blue: number; - alpha: number; - constructor(type: "hex" | "rgb", red: number, green: number, blue: number, alpha?: number); - static fromHex(color: string): Color; - static fromRGB(color: string): Color; - static getColor(colorString: string): Color; - toString(): string; - adjust(item: "red" | "green" | "blue" | "alpha", amount: number): void; - darken(amount: number): Color; - lighten(amount: number): Color; -} diff --git a/theme/utils/color.js b/theme/utils/color.js deleted file mode 100644 index 4cbd25f..0000000 --- a/theme/utils/color.js +++ /dev/null @@ -1,89 +0,0 @@ -export default class Color { - constructor(type, red, green, blue, alpha = 1) { - this.type = type; - this.red = red; - this.green = green; - this.blue = blue; - this.alpha = alpha; - } - static fromHex(color) { - const parseHex = (colorString) => parseInt(colorString, 16); - const parseAlpha = (colorString, total) => Math.round((parseHex(colorString) * 100) / total) / 100; - if (color.length === 4) - return new Color("hex", parseHex(color[1]) * 17, parseHex(color[2]) * 17, parseHex(color[3]) * 17); - if (color.length === 5) - return new Color("hex", parseHex(color[1]) * 17, parseHex(color[2]) * 17, parseHex(color[3]) * 17, parseAlpha(color[4], 15)); - if (color.length === 7) - return new Color("hex", parseHex(color.substring(1, 3)), parseHex(color.substring(3, 5)), parseHex(color.substring(5, 7))); - return new Color("hex", parseHex(color.substring(1, 3)), parseHex(color.substring(3, 5)), parseHex(color.substring(5, 7)), parseAlpha(color.substring(7, 9), 255)); - } - // From RGB or RGBA - static fromRGB(color) { - // eslint-disable-next-line @typescript-eslint/naming-convention - const RGBAPattern = /rgba\((.+)?,(.+)?,(.+)?,(.+)?\)/u; - // eslint-disable-next-line @typescript-eslint/naming-convention - const RGBPattern = /rgb\((.+)?,(.+)?,(.+)?\)/u; - const fromRGB = (colorString) => colorString.includes("%") - ? (Number(colorString.trim().substring(0, colorString.trim().length - 1)) / - 100) * - 256 - - 1 - : Number(colorString.trim()); - const rgbaResult = RGBAPattern.exec(color); - if (rgbaResult) - return new Color("rgb", fromRGB(rgbaResult[1]), fromRGB(rgbaResult[2]), fromRGB(rgbaResult[3]), Number(rgbaResult[4] || 1)); - const rgbResult = RGBPattern.exec(color); - if (rgbResult) - return new Color("rgb", fromRGB(rgbResult[1]), fromRGB(rgbResult[2]), fromRGB(rgbResult[3])); - throw new Error(`Can not handle color: ${color}`); - } - static getColor(colorString) { - if (colorString.startsWith("#")) - return this.fromHex(colorString); - return this.fromRGB(colorString); - } - toString() { - if (this.type === "hex" && this.alpha === 1) { - const toHex = (color) => color < 10 - ? color.toString() - : color === 10 - ? "a" - : color === 11 - ? "b" - : color === 12 - ? "c" - : color === 13 - ? "d" - : color === 14 - ? "e" - : "f"; - if (this.red % 17 === 0 && this.green % 17 === 0 && this.blue % 17 === 0) - return `#${toHex(this.red / 17)}${toHex(this.green / 17)}${toHex(this.blue / 17)}`; - const getHex = (color) => toHex((color - (color % 16)) / 16) + toHex(color % 16); - return `#${getHex(this.red)}${getHex(this.green)}${getHex(this.blue)}`; - } - return this.alpha === 1 - ? `rgb(${this.red},${this.green},${this.blue})` - : `rgba(${this.red},${this.green},${this.blue},${this.alpha})`; - } - adjust(item, amount) { - const result = Math.round(this[item] * amount); - if (item === "alpha") - this.alpha = result < 0 ? 0 : result > 1 ? 1 : result; - else - this[item] = result < 0 ? 0 : result > 255 ? 255 : result; - } - darken(amount) { - this.adjust("red", 1 - amount); - this.adjust("green", 1 - amount); - this.adjust("blue", 1 - amount); - return this; - } - lighten(amount) { - this.adjust("red", 1 + amount); - this.adjust("green", 1 + amount); - this.adjust("blue", 1 + amount); - return this; - } -} -//# sourceMappingURL=color.js.map \ No newline at end of file diff --git a/theme/utils/color.js.map b/theme/utils/color.js.map deleted file mode 100644 index 664e934..0000000 --- a/theme/utils/color.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"color.js","sourceRoot":"","sources":["color.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,KAAK;IACxB,YACS,IAAmB,EACnB,GAAW,EACX,KAAa,EACb,IAAY,EACZ,QAAQ,CAAC;QAJT,SAAI,G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AC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;;YACvE,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;IACjE,CAAC;IAEM,MAAM,CAAC,MAAc;QAC1B,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;QAEhC,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,OAAO,CAAC,MAAc;QAC3B,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;QAEhC,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file diff --git a/theme/utils/dom.d.ts b/theme/utils/dom.d.ts deleted file mode 100644 index 0a9bf2d..0000000 --- a/theme/utils/dom.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Change DOM classes - * - * @param domClass DOM classlist - * @param insert class to insert - * @param remove class to remove - */ -export declare const changeClass: (domClass: DOMTokenList, insert: string[], remove: string[]) => void; diff --git a/theme/utils/dom.js b/theme/utils/dom.js deleted file mode 100644 index 8834d1e..0000000 --- a/theme/utils/dom.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Change DOM classes - * - * @param domClass DOM classlist - * @param insert class to insert - * @param remove class to remove - */ -export const changeClass = (domClass, insert, remove) => { - const oldClasses = []; - domClass.remove(...remove); - domClass.forEach((classname) => { - oldClasses.push(classname); - }); - domClass.value = ""; - domClass.add(...insert, ...oldClasses); -}; -//# sourceMappingURL=dom.js.map \ No newline at end of file diff --git a/theme/utils/dom.js.map b/theme/utils/dom.js.map deleted file mode 100644 index 334e8fb..0000000 --- a/theme/utils/dom.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dom.js","sourceRoot":"","sources":["dom.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,QAAsB,EACtB,MAAgB,EAChB,MAAgB,EACV,EAAE;IACR,MAAM,UAAU,GAAa,EAAE,CAAC;IAEhC,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;QAC7B,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC;IACpB,QAAQ,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,GAAG,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/utils/encrypt.d.ts b/theme/utils/encrypt.d.ts deleted file mode 100644 index e2ac6ba..0000000 --- a/theme/utils/encrypt.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { EncryptOptions } from "../types"; -export declare const getPathMatchedKeys: (encryptOptions: EncryptOptions | undefined, path: string) => string[]; -export declare const getPathEncryptStatus: (encryptOptions: EncryptOptions | undefined, passwordConfig: Record, path: string) => boolean; diff --git a/theme/utils/encrypt.js b/theme/utils/encrypt.js deleted file mode 100644 index 2474ee9..0000000 --- a/theme/utils/encrypt.js +++ /dev/null @@ -1,18 +0,0 @@ -export const getPathMatchedKeys = (encryptOptions, path) => encryptOptions && typeof encryptOptions.config === "object" - ? Object.keys(encryptOptions.config) - .filter((key) => path.startsWith(key)) - .sort((a, b) => b.length - a.length) - : []; -export const getPathEncryptStatus = (encryptOptions, passwordConfig, path) => { - const hitKeys = getPathMatchedKeys(encryptOptions, path); - if (hitKeys.length !== 0) { - const { config } = encryptOptions; - return !hitKeys.some((key) => { - const keyConfig = config[key]; - const hitPasswords = typeof keyConfig === "string" ? [keyConfig] : keyConfig; - return hitPasswords.some((password) => passwordConfig[key] === password); - }); - } - return false; -}; -//# sourceMappingURL=encrypt.js.map \ No newline at end of file diff --git a/theme/utils/encrypt.js.map b/theme/utils/encrypt.js.map deleted file mode 100644 index 374ba6d..0000000 --- a/theme/utils/encrypt.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"encrypt.js","sourceRoot":"","sources":["encrypt.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,cAA0C,EAC1C,IAAY,EACF,EAAE,CACZ,cAAc,IAAI,OAAO,cAAc,CAAC,MAAM,KAAK,QAAQ;IACzD,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;SAC/B,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;SACrC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,CAAC,CAAC,EAAE,CAAC;AAET,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,cAA0C,EAC1C,cAAsC,EACtC,IAAY,EACH,EAAE;IACX,MAAM,OAAO,GAAG,kBAAkB,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;IAEzD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,MAAM,EAAE,MAAM,EAAE,GAAG,cAA0C,CAAC;QAE9D,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;YAC3B,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YAC9B,MAAM,YAAY,GAChB,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAE1D,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,QAAQ,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/utils/groupHeader.d.ts b/theme/utils/groupHeader.d.ts deleted file mode 100644 index 406694b..0000000 --- a/theme/utils/groupHeader.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { PageHeader } from "@mr-hope/vuepress-types"; -export interface SidebarHeader extends PageHeader { - children?: PageHeader[]; -} -/** Group lower level headings under h2 children */ -export declare const groupHeaders: (headers: PageHeader[]) => SidebarHeader[]; diff --git a/theme/utils/groupHeader.js b/theme/utils/groupHeader.js deleted file mode 100644 index 3607614..0000000 --- a/theme/utils/groupHeader.js +++ /dev/null @@ -1,18 +0,0 @@ -/** Group lower level headings under h2 children */ -export const groupHeaders = (headers) => { - const headerscopy = headers.map((header) => (Object.assign({}, header))); - let lastH2; - // group other headings under h2 headings - headerscopy.forEach((header) => { - if (header.level === 2) - lastH2 = header; - else if (lastH2) { - if (!lastH2.children) - lastH2.children = []; - lastH2.children.push(header); - } - }); - // filter only h2 headings - return headerscopy.filter((header) => header.level === 2); -}; -//# sourceMappingURL=groupHeader.js.map \ No newline at end of file diff --git a/theme/utils/groupHeader.js.map b/theme/utils/groupHeader.js.map deleted file mode 100644 index a08fffb..0000000 --- a/theme/utils/groupHeader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"groupHeader.js","sourceRoot":"","sources":["groupHeader.ts"],"names":[],"mappings":"AAMA,mDAAmD;AACnD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAqB,EAAmB,EAAE;IACrE,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,mBAAM,MAAM,EAAG,CAAC,CAAC;IAC7D,IAAI,MAAqB,CAAC;IAE1B,yCAAyC;IACzC,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QAC7B,IAAI,MAAM,CAAC,KAAK,KAAK,CAAC;YAAE,MAAM,GAAG,MAAM,CAAC;aACnC,IAAI,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,CAAC,QAAQ;gBAAE,MAAM,CAAC,QAAQ,GAAG,EAAE,CAAC;YAC3C,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC9B;IACH,CAAC,CAAC,CAAC;IAEH,0BAA0B;IAC1B,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC;AAC5D,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/utils/navbar.d.ts b/theme/utils/navbar.d.ts deleted file mode 100644 index 637a1c3..0000000 --- a/theme/utils/navbar.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { HopeNavBarConfigItem } from "../types"; -export interface NavBarConfigItem extends HopeNavBarConfigItem { - type: "link" | "links"; - items: NavBarConfigItem[]; -} -export declare const getNavLinkItem: (navbarLink: HopeNavBarConfigItem, beforeprefix?: string) => NavBarConfigItem; diff --git a/theme/utils/navbar.js b/theme/utils/navbar.js deleted file mode 100644 index 41b0be6..0000000 --- a/theme/utils/navbar.js +++ /dev/null @@ -1,19 +0,0 @@ -export const getNavLinkItem = (navbarLink, beforeprefix = "") => { - var _a; - const prefix = beforeprefix + (navbarLink.prefix || ""); - const navbarItem = Object.assign({}, navbarLink); - if (prefix) { - if (navbarItem.link !== undefined) - navbarItem.link = prefix + navbarItem.link; - delete navbarItem.prefix; - } - if ((_a = navbarItem.items) === null || _a === void 0 ? void 0 : _a.length) - Object.assign(navbarItem, { - type: "links", - items: navbarItem.items.map((item) => getNavLinkItem(item, prefix)), - }); - else - navbarItem.type = "link"; - return navbarItem; -}; -//# sourceMappingURL=navbar.js.map \ No newline at end of file diff --git a/theme/utils/navbar.js.map b/theme/utils/navbar.js.map deleted file mode 100644 index f2e1590..0000000 --- a/theme/utils/navbar.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"navbar.js","sourceRoot":"","sources":["navbar.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,UAAgC,EAChC,YAAY,GAAG,EAAE,EACC,EAAE;;IACpB,MAAM,MAAM,GAAG,YAAY,GAAG,CAAC,UAAU,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAExD,MAAM,UAAU,qBACX,UAAU,CACd,CAAC;IAEF,IAAI,MAAM,EAAE;QACV,IAAI,UAAU,CAAC,IAAI,KAAK,SAAS;YAC/B,UAAU,CAAC,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC;QAC7C,OAAO,UAAU,CAAC,MAAM,CAAC;KAC1B;IAED,IAAI,MAAA,UAAU,CAAC,KAAK,0CAAE,MAAM;QAC1B,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE;YACxB,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;SACpE,CAAC,CAAC;;QACA,UAAU,CAAC,IAAI,GAAG,MAAM,CAAC;IAE9B,OAAO,UAA8B,CAAC;AACxC,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/utils/navigate.d.ts b/theme/utils/navigate.d.ts deleted file mode 100644 index 6c0b4f2..0000000 --- a/theme/utils/navigate.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type VueRouter from "vue-router"; -import type { Route } from "vue-router"; -/** - * @param url navigate link - * @param router router - * @param route current route - */ -export declare const navigate: (url: string, router: VueRouter, route: Route) => void; diff --git a/theme/utils/navigate.js b/theme/utils/navigate.js deleted file mode 100644 index 83bd8a1..0000000 --- a/theme/utils/navigate.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @param url navigate link - * @param router router - * @param route current route - */ -export const navigate = (url, router, route) => { - if (url) - if (url.startsWith("/")) { - // Inner absolute path - if (route.path !== url) - void router.push(url); - } - else if (url.startsWith("http://") || - url.startsWith("https://") || - url.startsWith("mailto:")) { - // Outter url - if (window) - window.open(url); - } - else { - // Inner relative path - const base = route.path.slice(0, route.path.lastIndexOf("/")); - void router.push(`${base}/${encodeURI(url)}`); - } -}; -//# sourceMappingURL=navigate.js.map \ No newline at end of file diff --git a/theme/utils/navigate.js.map b/theme/utils/navigate.js.map deleted file mode 100644 index db5ed33..0000000 --- a/theme/utils/navigate.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"navigate.js","sourceRoot":"","sources":["navigate.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,GAAW,EACX,MAAiB,EACjB,KAAY,EACN,EAAE;IACR,IAAI,GAAG;QACL,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YACvB,sBAAsB;YACtB,IAAI,KAAK,CAAC,IAAI,KAAK,GAAG;gBAAE,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC/C;aAAM,IACL,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC;YACzB,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC;YAC1B,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EACzB;YACA,aAAa;YACb,IAAI,MAAM;gBAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC9B;aAAM;YACL,sBAAsB;YACtB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YAE9D,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;SAC/C;AACL,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/utils/path.d.ts b/theme/utils/path.d.ts deleted file mode 100644 index 77712d9..0000000 --- a/theme/utils/path.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { Route } from "vue-router"; -export declare const hashRE: RegExp; -export declare const extRE: RegExp; -export declare const endingSlashRE: RegExp; -export declare const outboundRE: RegExp; -/** Remove hash and ext in a link */ -export declare const normalize: (path: string) => string; -export declare const getHash: (path: string) => string | void; -/** Judge whether a path is external */ -export declare const isExternal: (path: string) => boolean; -/** Judge whether a path is `mailto:` link */ -export declare const isMailto: (path: string) => boolean; -/** Judge whether a path is `tel:` link */ -export declare const isTel: (path: string) => boolean; -export declare const ensureExt: (path: string) => string; -export declare const ensureEndingSlash: (path: string) => string; -/** Judge whether a route match a link */ -export declare const isActive: (route: Route, path: string) => boolean; -/** - * @param path links being resolved - * @param base deploy base - * @param append whether append directly - */ -export declare const resolvePath: (path: string, base: string, append?: boolean | undefined) => string; diff --git a/theme/utils/path.js b/theme/utils/path.js deleted file mode 100644 index 4fee3fc..0000000 --- a/theme/utils/path.js +++ /dev/null @@ -1,83 +0,0 @@ -export const hashRE = /#.*$/u; -export const extRE = /\.(md|html)$/u; -export const endingSlashRE = /\/$/u; -export const outboundRE = /^[a-z]+:/iu; -/** Remove hash and ext in a link */ -export const normalize = (path) => decodeURI(path).replace(hashRE, "").replace(extRE, ""); -export const getHash = (path) => { - const match = hashRE.exec(path); - if (match) - return match[0]; - return ""; -}; -/** Judge whether a path is external */ -export const isExternal = (path) => outboundRE.test(path); -/** Judge whether a path is `mailto:` link */ -export const isMailto = (path) => path.startsWith("mailto:"); -/** Judge whether a path is `tel:` link */ -export const isTel = (path) => path.startsWith("tel:"); -export const ensureExt = (path) => { - // do not resolve external links - if (isExternal(path)) - return path; - const hashMatch = hashRE.exec(path); - const hash = hashMatch ? hashMatch[0] : ""; - const normalized = normalize(path); - // do not resolve links ending with `/` - if (normalized.endsWith("/")) - return path; - // add `.html` ext - return `${normalized}.html${hash}`; -}; -export const ensureEndingSlash = (path) => /(\.html|\/)$/u.test(path) ? path : `${path}/`; -/** Judge whether a route match a link */ -export const isActive = (route, path) => { - const routeHash = decodeURIComponent(route.hash); - const linkHash = getHash(path); - // compare the hash only if the link has a hash - if (linkHash && routeHash !== linkHash) - return false; - const routePath = normalize(route.path); - const pagePath = normalize(path); - return routePath === pagePath; -}; -/** - * @param path links being resolved - * @param base deploy base - * @param append whether append directly - */ -export const resolvePath = (path, base, append) => { - // do not resolve external links - if (isExternal(path)) - return path; - const firstChar = path.charAt(0); - // do not resolve absolute links - if (firstChar === "/") - return path; - // if link is hash or query string, add with base - if (firstChar === "?" || firstChar === "#") - return `${base}${path}`; - // base links stack - const stack = base.split("/"); - /* - * remove trailing segment if: - * - not appending - * - appending to trailing slash (last segment is empty) - */ - if (!append || !stack[stack.length - 1]) - stack.pop(); - // resolve relative path - const segments = path.replace(/^\//u, "").split("/"); - for (let i = 0; i < segments.length; i++) { - const segment = segments[i]; - if (segment === "..") - stack.pop(); - else if (segment !== ".") - stack.push(segment); - } - // ensure leading slash - if (stack[0] !== "") - stack.unshift(""); - return stack.join("/"); -}; -//# sourceMappingURL=path.js.map \ No newline at end of file diff --git a/theme/utils/path.js.map b/theme/utils/path.js.map deleted file mode 100644 index 24bbf55..0000000 --- a/theme/utils/path.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"path.js","sourceRoot":"","sources":["path.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAG,OAAO,CAAC;AAC9B,MAAM,CAAC,MAAM,KAAK,GAA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GAAG;QAAE,OAAO,GAAG,IAAI,GAAG,IAAI,EAAE,CAAC;IAEpE,mBAAmB;IACnB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE9B;;;;OAIG;IACH,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAAE,KAAK,CAAC,GAAG,EAAE,CAAC;IAErD,wBAAwB;IACxB,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACxC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC5B,IAAI,OAAO,KAAK,IAAI;YAAE,KAAK,CAAC,GAAG,EAAE,CAAC;aAC7B,IAAI,OAAO,KAAK,GAAG;YAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAC/C;IAED,uBAAuB;IACvB,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,EAAE;QAAE,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAEvC,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC,CAAC"} \ No newline at end of file diff --git a/theme/utils/sidebar.d.ts b/theme/utils/sidebar.d.ts deleted file mode 100644 index 865445a..0000000 --- a/theme/utils/sidebar.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { PageComputed, SiteData } from "@mr-hope/vuepress-types"; -import type { SidebarHeader } from "./groupHeader"; -export type { SidebarHeader } from "./groupHeader"; -export interface SidebarHeaderItem extends SidebarHeader { - type: "header"; - basePath: string; - path: string; -} -export interface SidebarAutoItem { - type: "group"; - /** Group title */ - title: string; - /** Page Icon */ - icon?: string; - /** Titles in page */ - children: SidebarHeaderItem[]; - collapsable: false; - path: ""; -} -export declare const groupSidebarHeaders: (headers: import("@mr-hope/vuepress-types").PageHeader[]) => SidebarHeader[]; -export interface SidebarExternalItem { - title?: string; - icon?: string; - type: "external"; - path: string; -} -export interface SidebarPageItem extends PageComputed { - type: "page"; - icon?: string; - path: string; -} -export interface SidebarGroupItem { - type: "group"; - title: string; - /** @default true */ - collapsable?: boolean; - /** @default 1 */ - sidebarDepth?: number; - icon?: string; - prefix?: string; - children: SidebarItem[]; - [props: string]: unknown; -} -export interface SidebarErrorItem { - type: "error"; - path: string; -} -/** sidebarConfig merged with pageObject */ -export declare const resolvePageforSidebar: (pages: PageComputed[], path: string) => SidebarPageItem | SidebarExternalItem | SidebarErrorItem; -export declare type SidebarItem = SidebarAutoItem | SidebarErrorItem | SidebarExternalItem | SidebarGroupItem | SidebarPageItem; -export declare const getSidebarItems: (page: PageComputed, site: SiteData, localePath: string) => SidebarItem[]; diff --git a/theme/utils/sidebar.js b/theme/utils/sidebar.js deleted file mode 100644 index e7d0fea..0000000 --- a/theme/utils/sidebar.js +++ /dev/null @@ -1,91 +0,0 @@ -import { groupHeaders } from "./groupHeader"; -import { ensureEndingSlash, ensureExt, isExternal, normalize, resolvePath, } from "./path"; -export const groupSidebarHeaders = groupHeaders; -const resolveSidebarHeaders = (page) => { - const headers = page.headers ? groupSidebarHeaders(page.headers) : []; - return [ - { - type: "group", - collapsable: false, - title: page.title, - icon: page.frontmatter.icon, - path: "", - children: headers.map((header) => (Object.assign(Object.assign({}, header), { type: "header", basePath: page.path, path: `${page.path}#${header.slug}`, children: header.children }))), - }, - ]; -}; -const findMatchingSidebarConfig = (regularPath, config) => { - // return directly as array-type config is the moest simple config - if (Array.isArray(config)) - return { - base: "/", - config, - }; - // find matching config - for (const base in config) - if (ensureEndingSlash(regularPath).startsWith(encodeURI(base))) - return { - base, - config: config[base], - }; - console.warn(`${regularPath} do not have valid sidebar config`); - return false; -}; -/** sidebarConfig merged with pageObject */ -export const resolvePageforSidebar = (pages, path) => { - // if it is external link - if (isExternal(path)) - return { - type: "external", - path, - }; - const realPath = normalize(path); - // find matches in all pages - for (const page of pages) - if (normalize(page.regularPath) === realPath) - // return sidebarConfig merged with pageObject - return Object.assign(Object.assign({}, page), { type: "page", path: ensureExt(page.path) }); - console.error(`Sidebar: "${realPath}" has no matching page`); - return { type: "error", path: realPath }; -}; -const resolve = (prefix, path, base) => resolvePath(`${prefix}${path}`, base); -/** - * @param sidebarConfigItem config item being resolved - * @param pages pages Object - * @param base sidebar base - */ -const resolveSidebarItem = (sidebarConfigItem, pages, base, prefix = "") => { - // resolve and return directly - if (typeof sidebarConfigItem === "string") - return resolvePageforSidebar(pages, resolve(prefix, sidebarConfigItem, base)); - // custom title with format `['path', 'customTitle']` - if (Array.isArray(sidebarConfigItem)) - return Object.assign(resolvePageforSidebar(pages, resolve(prefix, sidebarConfigItem[0], base)), { title: sidebarConfigItem[1] }); - const children = sidebarConfigItem.children || []; - // item do not have children - if (children.length === 0 && sidebarConfigItem.path) - // cover title - return Object.assign(resolvePageforSidebar(pages, resolve(prefix, sidebarConfigItem.path, base)), { title: sidebarConfigItem.title }); - // resolve children recursively then return - return Object.assign(Object.assign({}, sidebarConfigItem), { type: "group", path: sidebarConfigItem.path - ? resolve(prefix, sidebarConfigItem.path, base) - : "", children: children.map((child) => resolveSidebarItem(child, pages, base, `${prefix}${sidebarConfigItem.prefix || ""}`)), collapsable: sidebarConfigItem.collapsable !== false }); -}; -export const getSidebarItems = (page, site, localePath) => { - const { themeConfig, pages } = site; - const localeConfig = localePath && themeConfig.locales - ? themeConfig.locales[localePath] || themeConfig - : themeConfig; - const sidebarConfig = localeConfig.sidebar || themeConfig.sidebar; - // auto generate sidebar through headings - if (page.frontmatter.sidebar === "auto" || sidebarConfig === "auto") - return resolveSidebarHeaders(page); - // sidebar is disabled - if (!sidebarConfig) - return []; - const result = findMatchingSidebarConfig(page.regularPath, sidebarConfig); - return result - ? result.config.map((item) => resolveSidebarItem(item, pages, result.base)) - : []; -}; -//# sourceMappingURL=sidebar.js.map \ No newline at end of file diff --git a/theme/utils/sidebar.js.map b/theme/utils/sidebar.js.map deleted file mode 100644 index ff54f30..0000000 --- a/theme/utils/sidebar.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"sidebar.js","sourceRoot":"","sources":["sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,GACZ,MAAM,QAAQ,CAAC;AA0BhB,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAEhD,MAAM,qBAAqB,GAAG,CAAC,IAAkB,EAAqB,EAAE;IACtE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEtE,OAAO;QACL;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,KAAK;YAClB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YAC3B,IAAI,EAAE,EAAE;YACR,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAoB,CAAC,MAAM,EAAE,EAAE,CAAC,iCAChD,MAAM,KACT,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,IAAI,CAAC,IAAI,EACnB,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE,EACnC,QAAQ,EAAE,MAAM,CAAC,QAAQ,IACzB,CAAC;SACJ;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAChC,WAAmB,EACnB,MAAyE,EACd,EAAE;IAC7D,kEAAkE;IAClE,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QACv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ACD,WAAW,EAAE,iBAAiB,CAAC,WAAW,KAAK,KAAK,IACpD;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAkB,EAClB,IAAc,EACd,UAAkB,EACH,EAAE;IACjB,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACpC,MAAM,YAAY,GAChB,UAAU,IAAI,WAAW,CAAC,OAAO;QAC/B,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,WAAW;QAChD,CAAC,CAAC,WAAW,CAAC;IAElB,MAAM,aAAa,GACjB,YAAY,CAAC,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC;IAE9C,yCAAyC;IACzC,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,KAAK,MAAM,IAAI,aAAa,KAAK,MAAM;QACjE,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAErC,sBAAsB;IACtB,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAE9B,MAAM,MAAM,GAAG,yBAAyB,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAE1E,OAAO,MAAM;QACX,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3E,CAAC,CAAC,EAAE,CAAC;AACT,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/workbox-cc3410a0.js b/workbox-cc3410a0.js similarity index 100% rename from dist/workbox-cc3410a0.js rename to workbox-cc3410a0.js diff --git a/dist/workbox-cc3410a0.js.map b/workbox-cc3410a0.js.map similarity index 100% rename from dist/workbox-cc3410a0.js.map rename to workbox-cc3410a0.js.map
- -
{{ feature.details }}
- - - - {{ prev.title || prev.path }} - - - - - - {{ prev.title || prev.path }} - - - - - - {{ next.title || next.path }} - - - - - {{ next.title || next.path }} - - - -
- - {{ item.title }} - -