@bbki.ng/site 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/.github/workflows/deploy.yml +44 -0
  2. package/.husky/pre-commit +4 -0
  3. package/.prettierignore +1 -0
  4. package/.prettierrc.json +1 -0
  5. package/.rush/temp/shrinkwrap-deps.json +908 -0
  6. package/CODE_OF_CONDUCT.md +45 -0
  7. package/CONTRIBUTING.md +11 -0
  8. package/LICENSE +21 -0
  9. package/README.md +21 -0
  10. package/index.html +33 -0
  11. package/jest.config.js +15 -0
  12. package/package.json +69 -0
  13. package/postcss.config.cjs +6 -0
  14. package/public/Logo.svg +9 -0
  15. package/public/apple-touch-icon.png +0 -0
  16. package/public/favicon-16x16.png +0 -0
  17. package/public/favicon-32x32.png +0 -0
  18. package/public/favicon.ico +0 -0
  19. package/public/favicon.svg +9 -0
  20. package/public/pwa-192x192.png +0 -0
  21. package/public/pwa-512x512.png +0 -0
  22. package/public/robots.txt +2 -0
  23. package/src/__test__/utils/index.test.ts +90 -0
  24. package/src/app.tsx +97 -0
  25. package/src/articles/anti-logic.mdx +61 -0
  26. package/src/articles/bbking-manual.mdx +88 -0
  27. package/src/articles/black-river.mdx +8 -0
  28. package/src/articles/cooldown.mdx +12 -0
  29. package/src/articles/fall.mdx +8 -0
  30. package/src/articles/img.mdx +104 -0
  31. package/src/articles/index.ts +35 -0
  32. package/src/articles/loading.mdx +129 -0
  33. package/src/articles/major-cold.mdx +14 -0
  34. package/src/articles/men-without-women.mdx +19 -0
  35. package/src/articles/movie-day.mdx +15 -0
  36. package/src/articles/now.mdx +15 -0
  37. package/src/articles/projects.mdx +9 -0
  38. package/src/articles/quote.mdx +27 -0
  39. package/src/articles/spring-cooldown.mdx +7 -0
  40. package/src/articles/spring-rain.mdx +9 -0
  41. package/src/articles/travel.mdx +21 -0
  42. package/src/articles/warming-up.mdx +10 -0
  43. package/src/articles/web-burnning.mdx +10 -0
  44. package/src/auth_required.tsx +17 -0
  45. package/src/components/Spinner.tsx +33 -0
  46. package/src/components/article/index.tsx +31 -0
  47. package/src/components/aspect_ratio_box/index.tsx +29 -0
  48. package/src/components/blur_cover/index.tsx +28 -0
  49. package/src/components/book_list/index.tsx +50 -0
  50. package/src/components/comment/index.tsx +70 -0
  51. package/src/components/comment/use_cusdis_event.ts +37 -0
  52. package/src/components/corner_prompt_box/index.tsx +63 -0
  53. package/src/components/disabled_text/index.tsx +23 -0
  54. package/src/components/fade_out_cover/index.tsx +37 -0
  55. package/src/components/footer/footer_links.ts +13 -0
  56. package/src/components/footer/index.tsx +21 -0
  57. package/src/components/hotkey_nav/index.tsx +50 -0
  58. package/src/components/img_list/index.tsx +43 -0
  59. package/src/components/index.tsx +27 -0
  60. package/src/components/movie_list/index.tsx +50 -0
  61. package/src/components/my_suspense.tsx +14 -0
  62. package/src/components/progress_bar/index.tsx +31 -0
  63. package/src/components/reload_prompt/index.tsx +36 -0
  64. package/src/components/stickers/index.tsx +46 -0
  65. package/src/components/table_skeleton/index.tsx +40 -0
  66. package/src/components/tags/index.tsx +52 -0
  67. package/src/components/video_player/index.tsx +81 -0
  68. package/src/components/with_wrapper/index.tsx +13 -0
  69. package/src/constants/cusdis.ts +6 -0
  70. package/src/constants/index.ts +16 -0
  71. package/src/constants/photo_projects.ts +54 -0
  72. package/src/constants/photos.ts +270 -0
  73. package/src/constants/routes.ts +24 -0
  74. package/src/constants/video_logs.ts +16 -0
  75. package/src/demo/DemoBox.tsx +15 -0
  76. package/src/demo/ImgDemo.tsx +34 -0
  77. package/src/demo/SpinnerDemo.tsx +17 -0
  78. package/src/global/mdx.d.ts +8 -0
  79. package/src/global_loading_state_provider.tsx +27 -0
  80. package/src/hooks/index.ts +15 -0
  81. package/src/hooks/useScrollToTop.ts +24 -0
  82. package/src/hooks/useTransitionCls.ts +36 -0
  83. package/src/hooks/use_img_loading.ts +16 -0
  84. package/src/hooks/use_pathname.ts +6 -0
  85. package/src/hooks/use_paths.ts +30 -0
  86. package/src/hooks/use_projects.ts +56 -0
  87. package/src/hooks/use_route_name.ts +7 -0
  88. package/src/hooks/use_supa_session.ts +30 -0
  89. package/src/hooks/use_uploader.ts +34 -0
  90. package/src/hooks/use_video_controls.ts +71 -0
  91. package/src/main.css +156 -0
  92. package/src/main.tsx +19 -0
  93. package/src/pages/cover/index.tsx +10 -0
  94. package/src/pages/extensions/png/consts.ts +9 -0
  95. package/src/pages/extensions/png/index.tsx +41 -0
  96. package/src/pages/extensions/png/png_projects.tsx +63 -0
  97. package/src/pages/extensions/txt/article.tsx +26 -0
  98. package/src/pages/extensions/txt/consts.ts +8 -0
  99. package/src/pages/extensions/txt/index.tsx +21 -0
  100. package/src/pages/index.tsx +14 -0
  101. package/src/pages/login/index.tsx +33 -0
  102. package/src/pages/now/index.tsx +7 -0
  103. package/src/pages/tags/index.tsx +28 -0
  104. package/src/pages/tags/tag_result.tsx +19 -0
  105. package/src/swr.tsx +18 -0
  106. package/src/types/articles.ts +6 -0
  107. package/src/types/color.ts +21 -0
  108. package/src/types/cusdis.ts +4 -0
  109. package/src/types/oss.ts +15 -0
  110. package/src/types/path.ts +11 -0
  111. package/src/types/photo.ts +17 -0
  112. package/src/types/supabase.ts +9 -0
  113. package/src/utils/index.ts +143 -0
  114. package/src/utils/tags.ts +21 -0
  115. package/tailwind.config.cjs +10 -0
  116. package/tsconfig.json +24 -0
  117. package/vite.config.ts +108 -0
@@ -0,0 +1,44 @@
1
+ name: Deploy bbki.ng's changes
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ jobs:
7
+ version:
8
+ runs-on: ubuntu-latest
9
+ if: "!startsWith(github.event.head_commit.message, 'bump')"
10
+ steps:
11
+ - uses: actions/checkout@v2
12
+ with:
13
+ token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
14
+ - run: git config --global user.name 'bbki.ng'
15
+ - run: git config --global user.email 'b@bbki.ng'
16
+ - run: npm version patch -m "bump %s"
17
+ - run: git push
18
+
19
+ builds:
20
+ runs-on: ubuntu-latest
21
+ if: "startsWith(github.event.head_commit.message, 'bump')"
22
+ steps:
23
+ - uses: actions/checkout@v1
24
+ - name: Install Node.js
25
+ uses: actions/setup-node@v1
26
+ with:
27
+ node-version: "14.18.0"
28
+ - name: Install Yarn
29
+ run: npm install -g yarn
30
+ - name: Install dependencies
31
+ run: yarn install
32
+ - name: Run tests
33
+ run: yarn test
34
+ - name: Run build task
35
+ run: yarn build
36
+ - name: Deploy to Server
37
+ uses: easingthemes/ssh-deploy@main
38
+ env:
39
+ SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
40
+ SOURCE: "dist/"
41
+ REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
42
+ REMOTE_USER: ${{ secrets.REMOTE_USER }}
43
+ TARGET: ${{ secrets.REMOTE_TARGET }}
44
+ EXCLUDE: "/dist/, /node_modules/"
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npx pretty-quick --staged
@@ -0,0 +1 @@
1
+ *.mdx
@@ -0,0 +1 @@
1
+ {}