portosaurus 2.0.2 → 2.1.0

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 (91) hide show
  1. package/bin/portosaurus.mjs +14 -327
  2. package/package.json +16 -11
  3. package/src/cli/build.mjs +43 -0
  4. package/src/cli/dev.mjs +31 -0
  5. package/src/cli/init.mjs +135 -0
  6. package/src/cli/serve.mjs +30 -0
  7. package/src/core/buildDocuConfig.mjs +664 -0
  8. package/src/core/{themePlugin.mjs → plugins/themePlugin.mjs} +1 -1
  9. package/src/template/.github/workflows/deploy.yml +52 -0
  10. package/src/template/.nojekyll +0 -0
  11. package/src/template/README.md +58 -0
  12. package/src/template/blog/authors.yml +1 -1
  13. package/src/template/blog/welcome.md +1 -1
  14. package/src/template/config.js +40 -23
  15. package/src/template/package.json +20 -0
  16. package/src/template/static/img/svg/icon-blog.svg +2 -0
  17. package/src/template/static/img/svg/icon-note.svg +2 -0
  18. package/src/{components → theme/components}/AboutSection/index.js +22 -13
  19. package/src/{components → theme/components}/AboutSection/styles.module.css +59 -48
  20. package/src/{components → theme/components}/ContactSection/index.js +31 -24
  21. package/src/{components → theme/components}/ContactSection/styles.module.css +31 -26
  22. package/src/{components → theme/components}/ExperienceSection/index.js +12 -7
  23. package/src/{components → theme/components}/ExperienceSection/styles.module.css +23 -20
  24. package/src/{components → theme/components}/HeroSection/index.js +9 -11
  25. package/src/{components → theme/components}/HeroSection/styles.module.css +44 -32
  26. package/src/{components → theme/components}/NoteIndex/index.js +10 -3
  27. package/src/{components → theme/components}/Preview/components/PreviewHeader.js +14 -8
  28. package/src/{components → theme/components}/Preview/components/Triggers/Pv.js +32 -7
  29. package/src/{components → theme/components}/Preview/components/Triggers/SrcPv.js +1 -5
  30. package/src/theme/components/Preview/index.js +3 -0
  31. package/src/{components → theme/components}/ProjectsSection/index.js +279 -224
  32. package/src/{components → theme/components}/ProjectsSection/styles.module.css +21 -17
  33. package/src/{components → theme/components}/ScrollToTop/index.js +18 -21
  34. package/src/{components → theme/components}/ScrollToTop/styles.module.css +10 -9
  35. package/src/theme/components/SocialLinks/index.js +125 -0
  36. package/src/{components → theme/components}/SocialLinks/styles.module.css +9 -7
  37. package/src/{components → theme/components}/Tooltip/index.js +4 -1
  38. package/src/theme/config/iconMappings.js +465 -0
  39. package/src/theme/config/metaTags.js +239 -0
  40. package/src/theme/config/prism.js +179 -0
  41. package/src/theme/config/sidebar.js +17 -0
  42. package/src/{css → theme/css}/bootstrap.css +0 -1
  43. package/src/theme/css/catppuccin.css +618 -0
  44. package/src/{css → theme/css}/custom.css +3 -9
  45. package/src/{css → theme/css}/tasks.css +43 -37
  46. package/src/theme/{MDXComponents.js → overrides/MDXComponents.js} +3 -3
  47. package/src/theme/{Root.js → overrides/Root.js} +2 -4
  48. package/src/{pages → theme/pages}/index.js +23 -39
  49. package/src/theme/pages/notes.js +83 -0
  50. package/src/{pages → theme/pages}/tasks.js +115 -56
  51. package/src/{core/client-utils → theme/utils}/HashNavigation.js +60 -49
  52. package/src/{core/client-utils → theme/utils}/updateTitle.js +21 -25
  53. package/src/{core/build-utils → utils/build}/cssUtils.mjs +5 -3
  54. package/src/{core/build-utils → utils/build}/generateFavicon.mjs +44 -12
  55. package/src/{core/build-utils → utils/build}/generateRobotsTxt.mjs +4 -3
  56. package/src/{core/build-utils → utils/build}/iconExtractor.mjs +7 -3
  57. package/src/utils/build/imageDownloader.mjs +159 -0
  58. package/src/{core/build-utils → utils/build}/imageProcessor.mjs +5 -6
  59. package/src/utils/helpers.mjs +153 -0
  60. package/src/utils/logger.mjs +53 -0
  61. package/src/utils/packageManager.mjs +88 -0
  62. package/src/components/Preview/index.js +0 -3
  63. package/src/components/SocialLinks/index.js +0 -130
  64. package/src/config/iconMappings.js +0 -329
  65. package/src/config/metaTags.js +0 -240
  66. package/src/config/prism.js +0 -179
  67. package/src/config/sidebar.js +0 -20
  68. package/src/core/build-utils/imageDownloader.mjs +0 -98
  69. package/src/core/createDocuConf.mjs +0 -490
  70. package/src/core/defaults.mjs +0 -67
  71. package/src/core/logger.mjs +0 -17
  72. package/src/core/packageManager.mjs +0 -72
  73. package/src/css/catppuccin.css +0 -632
  74. package/src/pages/notes.js +0 -87
  75. /package/src/template/notes/{welcome.md → welcome.mdx} +0 -0
  76. /package/src/{components → theme/components}/NoteIndex/styles.module.css +0 -0
  77. /package/src/{components → theme/components}/Preview/components/FeedbackStates.js +0 -0
  78. /package/src/{components → theme/components}/Preview/components/FileTabs.js +0 -0
  79. /package/src/{components → theme/components}/Preview/components/Triggers/index.js +0 -0
  80. /package/src/{components → theme/components}/Preview/components/ViewerWindow.js +0 -0
  81. /package/src/{components → theme/components}/Preview/hooks/useDeepLinkHash.js +0 -0
  82. /package/src/{components → theme/components}/Preview/hooks/useDockLayout.js +0 -0
  83. /package/src/{components → theme/components}/Preview/hooks/useFileFetch.js +0 -0
  84. /package/src/{components → theme/components}/Preview/renderers/CodeRenderer.js +0 -0
  85. /package/src/{components → theme/components}/Preview/renderers/ImageRenderer.js +0 -0
  86. /package/src/{components → theme/components}/Preview/renderers/PdfRenderer.js +0 -0
  87. /package/src/{components → theme/components}/Preview/renderers/WebRenderer.js +0 -0
  88. /package/src/{components → theme/components}/Preview/state/index.js +0 -0
  89. /package/src/{components → theme/components}/Preview/styles.module.css +0 -0
  90. /package/src/{components → theme/components}/Preview/utils/index.js +0 -0
  91. /package/src/{components → theme/components}/Tooltip/styles.module.css +0 -0
@@ -8,7 +8,6 @@
8
8
  This Page is completely Vibe coded. No code except small tweaks is written by me.
9
9
  */
10
10
 
11
-
12
11
  /* Tasks page container */
13
12
  .tasks-container {
14
13
  display: flex;
@@ -85,11 +84,12 @@
85
84
  background-color: var(--ifm-color-emphasis-500);
86
85
  padding: 2px 4px;
87
86
  border-radius: 3px;
88
- color: var(--ifm-color-primary)
87
+ color: var(--ifm-color-primary);
89
88
  }
90
89
 
91
90
  /* Tasks intro and footer sections */
92
- .tasks-intro, .tasks-footer {
91
+ .tasks-intro,
92
+ .tasks-footer {
93
93
  padding: 1rem;
94
94
  margin: 1.5rem 0;
95
95
  border-radius: var(--ifm-card-border-radius);
@@ -226,8 +226,14 @@
226
226
  }
227
227
 
228
228
  @keyframes fadeIn {
229
- from { opacity: 0.7; transform: translateY(5px); }
230
- to { opacity: 1; transform: translateY(0); }
229
+ from {
230
+ opacity: 0.7;
231
+ transform: translateY(5px);
232
+ }
233
+ to {
234
+ opacity: 1;
235
+ transform: translateY(0);
236
+ }
231
237
  }
232
238
 
233
239
  /* Media queries for responsive tabs */
@@ -235,17 +241,17 @@
235
241
  .task-tabs {
236
242
  grid-template-columns: repeat(2, 1fr);
237
243
  }
238
-
244
+
239
245
  .task-tab {
240
246
  padding: 0.75rem 0.5rem;
241
247
  font-size: 0.9rem;
242
248
  }
243
-
249
+
244
250
  .task-tab-icon {
245
251
  font-size: 1rem;
246
252
  margin-right: 0.3rem;
247
253
  }
248
-
254
+
249
255
  .task-tab-count {
250
256
  min-width: 1rem;
251
257
  min-height: 1rem;
@@ -253,7 +259,7 @@
253
259
  height: 1rem;
254
260
  font-size: 0.6rem;
255
261
  }
256
-
262
+
257
263
  .task-tab-content {
258
264
  padding: 1rem;
259
265
  }
@@ -280,19 +286,19 @@
280
286
  .task-tabs {
281
287
  grid-template-columns: repeat(1, 1fr);
282
288
  }
283
-
289
+
284
290
  .task-tab {
285
291
  flex-direction: row;
286
292
  justify-content: flex-start;
287
293
  text-align: left;
288
294
  padding: 0.75rem 1rem;
289
295
  }
290
-
296
+
291
297
  .task-tab-icon {
292
298
  margin-right: 0.5rem;
293
299
  margin-bottom: 0;
294
300
  }
295
-
301
+
296
302
  .task-tab-label {
297
303
  margin-right: 0.5rem;
298
304
  margin-bottom: 0;
@@ -426,15 +432,13 @@
426
432
  background-color: var(--ifm-color-emphasis-100);
427
433
  }
428
434
 
429
-
430
435
  /* Responsive table adjustments */
431
436
  @media (max-width: 768px) {
432
-
433
437
  .task-table-container th,
434
438
  .task-table-container td {
435
439
  padding: 0.5rem;
436
440
  }
437
-
441
+
438
442
  .task-table-container table {
439
443
  font-size: 0.9rem;
440
444
  }
@@ -495,7 +499,7 @@
495
499
 
496
500
  .badge-priority-low {
497
501
  background-color: var(--ifm-color-success-darker);
498
- color:var(--ifm-color-emphasis-700) ;
502
+ color: var(--ifm-color-emphasis-700);
499
503
  }
500
504
 
501
505
  /* Icon styling */
@@ -755,7 +759,8 @@
755
759
  border-right: 1px solid var(--ifm-color-emphasis-200);
756
760
  }
757
761
 
758
- .task-cell-status, .task-cell-priority {
762
+ .task-cell-status,
763
+ .task-cell-priority {
759
764
  display: flex;
760
765
  align-items: center;
761
766
  justify-content: center;
@@ -766,17 +771,17 @@
766
771
  .task-tabs {
767
772
  grid-template-columns: repeat(2, 1fr);
768
773
  }
769
-
774
+
770
775
  .task-tab {
771
776
  padding: 0.75rem 0.5rem;
772
777
  font-size: 0.9rem;
773
778
  }
774
-
779
+
775
780
  .task-tab-icon {
776
781
  font-size: 1rem;
777
782
  margin-right: 0.3rem;
778
783
  }
779
-
784
+
780
785
  .task-tab-count {
781
786
  min-width: 1rem;
782
787
  min-height: 1rem;
@@ -784,23 +789,23 @@
784
789
  height: 1rem;
785
790
  font-size: 0.6rem;
786
791
  }
787
-
792
+
788
793
  .task-tab-content {
789
794
  padding: 1rem;
790
795
  }
791
-
796
+
792
797
  .task-list-header {
793
798
  grid-template-columns: 100px 1fr 100px;
794
799
  }
795
-
800
+
796
801
  .task-row {
797
802
  grid-template-columns: 100px 1fr 100px;
798
803
  }
799
-
804
+
800
805
  .task-empty-state {
801
806
  padding: 2rem 1rem;
802
807
  }
803
-
808
+
804
809
  .tasks-container {
805
810
  padding: 0 0.5rem;
806
811
  }
@@ -811,29 +816,30 @@
811
816
  grid-template-columns: 80px 1fr 80px;
812
817
  font-size: 0.7rem;
813
818
  }
814
-
819
+
815
820
  .task-row {
816
821
  grid-template-columns: 80px 1fr 80px;
817
822
  }
818
-
819
- .task-cell-status, .task-cell-priority {
823
+
824
+ .task-cell-status,
825
+ .task-cell-priority {
820
826
  padding: 0.5rem 0.25rem;
821
827
  }
822
-
828
+
823
829
  .badge {
824
830
  padding: 0.25rem 0.5rem;
825
831
  font-size: 0.7rem;
826
832
  }
827
-
833
+
828
834
  .badge-icon {
829
835
  margin-right: 0.2rem;
830
836
  font-size: 0.7rem;
831
837
  }
832
-
838
+
833
839
  .task-title {
834
840
  font-size: 1rem;
835
841
  }
836
-
842
+
837
843
  .task-description {
838
844
  font-size: 0.75rem;
839
845
  }
@@ -843,24 +849,24 @@
843
849
  .task-tabs {
844
850
  grid-template-columns: repeat(2, 1fr);
845
851
  }
846
-
852
+
847
853
  .task-tab {
848
854
  padding: 0.5rem;
849
855
  font-size: 0.8rem;
850
856
  }
851
-
857
+
852
858
  .task-tab-icon {
853
859
  margin-right: 0.3rem;
854
860
  }
855
-
861
+
856
862
  .task-tab-label {
857
863
  margin-right: 0.3rem;
858
864
  }
859
-
865
+
860
866
  .task-tab-count {
861
867
  font-size: 0.55rem;
862
868
  }
863
-
869
+
864
870
  .stats-container {
865
871
  grid-template-columns: 1fr 1fr;
866
872
  gap: 0.75rem;
@@ -4,9 +4,9 @@ import Details from "@theme/Details";
4
4
  import Tabs from "@theme/Tabs";
5
5
  import TabItem from "@theme/TabItem";
6
6
 
7
- import { Pv, SrcPv } from "@site/src/components/Preview/index.js";
8
- import Tooltip from "@site/src/components/Tooltip/index.js";
9
- import NoteCards, { TopicList } from "@site/src/components/NoteIndex/index.js";
7
+ import { Pv, SrcPv } from "../components/Preview/index.js";
8
+ import Tooltip from "../components/Tooltip/index.js";
9
+ import NoteCards, { TopicList } from "../components/NoteIndex/index.js";
10
10
 
11
11
  const components = {
12
12
  ...MDXComponents,
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import BrowserOnly from "@docusaurus/BrowserOnly";
3
3
  import OriginalRoot from "@theme-original/Root";
4
- import { PreviewProvider, ViewerWindow } from "@site/src/components/Preview/index.js";
4
+ import { PreviewProvider, ViewerWindow } from "../components/Preview/index.js";
5
5
 
6
6
  /**
7
7
  * Wraps Docusaurus's original Root (which provides ColorModeProvider, etc.)
@@ -12,9 +12,7 @@ export default function Root({ children }) {
12
12
  <PreviewProvider>
13
13
  <OriginalRoot>
14
14
  {children}
15
- <BrowserOnly>
16
- {() => <ViewerWindow />}
17
- </BrowserOnly>
15
+ <BrowserOnly>{() => <ViewerWindow />}</BrowserOnly>
18
16
  </OriginalRoot>
19
17
  </PreviewProvider>
20
18
  );
@@ -1,15 +1,14 @@
1
1
  import Layout from "@theme/Layout";
2
2
  import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
3
- import UpdateTitle from '@site/src/core/client-utils/updateTitle.js';
3
+ import UpdateTitle from "../utils/updateTitle.js";
4
4
 
5
5
  // Import components
6
- import HeroSection from "@site/src/components/HeroSection/index.js";
7
- import AboutSection from "@site/src/components/AboutSection/index.js";
8
- import ProjectsSection from "@site/src/components/ProjectsSection/index.js";
9
- import ContactSection from "@site/src/components/ContactSection/index.js";
10
- import ExperienceSection from "@site/src/components/ExperienceSection/index.js";
11
- import ScrollToTop from "@site/src/components/ScrollToTop/index.js";
12
-
6
+ import HeroSection from "../components/HeroSection/index.js";
7
+ import AboutSection from "../components/AboutSection/index.js";
8
+ import ProjectsSection from "../components/ProjectsSection/index.js";
9
+ import ContactSection from "../components/ContactSection/index.js";
10
+ import ExperienceSection from "../components/ExperienceSection/index.js";
11
+ import ScrollToTop from "../components/ScrollToTop/index.js";
13
12
 
14
13
  export default function Home() {
15
14
  const { siteConfig } = useDocusaurusContext();
@@ -21,48 +20,35 @@ export default function Home() {
21
20
  const experience = customFields.experience || {};
22
21
 
23
22
  const sectionTitles = {
24
- 'me': `Home | ${siteConfig.title}`,
25
- 'about': `About Me | ${siteConfig.title}`,
26
- 'projects': `Projects | ${siteConfig.title}`,
27
- 'experience': `Experience | ${siteConfig.title}`,
28
- 'contact': `Contact | ${siteConfig.title}`
23
+ me: `Home | ${siteConfig.title}`,
24
+ about: `About Me | ${siteConfig.title}`,
25
+ projects: `Projects | ${siteConfig.title}`,
26
+ experience: `Experience | ${siteConfig.title}`,
27
+ contact: `Contact | ${siteConfig.title}`,
29
28
  };
30
-
29
+
31
30
  const customStyles = `
32
31
  /* For future */
33
32
  `;
34
33
 
35
-
36
34
  return (
37
- <Layout
38
- title="Me"
39
- description="My portfolio website"
40
- >
35
+ <Layout title="Me" description="My portfolio website">
41
36
  {/* Custom styles */}
42
37
  <style>{customStyles}</style>
43
-
44
- <UpdateTitle
45
- sections={sectionTitles}
46
- defaultTitle={siteConfig.title}
47
- />
48
38
 
49
- <main>
39
+ <UpdateTitle sections={sectionTitles} defaultTitle={siteConfig.title} />
50
40
 
41
+ <main>
51
42
  {/* Hero Section */}
52
- <HeroSection
53
- id="me"
54
- />
43
+ <HeroSection id="me" />
55
44
 
56
45
  {/* About Section */}
57
- {(aboutMe.enable !== false) && (
58
- <AboutSection
59
- id="about"
60
- title="About Me"
61
- />
46
+ {aboutMe.enable !== false && (
47
+ <AboutSection id="about" title="About Me" />
62
48
  )}
63
49
 
64
50
  {/* Projects Section */}
65
- {(projects.enable !== false) && (
51
+ {projects.enable !== false && (
66
52
  <ProjectsSection
67
53
  id="projects"
68
54
  title="My Projects"
@@ -71,7 +57,7 @@ export default function Home() {
71
57
  )}
72
58
 
73
59
  {/* Experience Section */}
74
- {(experience.enable !== false) && (
60
+ {experience.enable !== false && (
75
61
  <ExperienceSection
76
62
  id="experience"
77
63
  title="Experience"
@@ -80,7 +66,7 @@ export default function Home() {
80
66
  )}
81
67
 
82
68
  {/* Contact Section */}
83
- {(socialLinks.enable !== false) && (
69
+ {socialLinks.enable !== false && (
84
70
  <ContactSection
85
71
  id="contact"
86
72
  title="Get In Touch"
@@ -89,9 +75,7 @@ export default function Home() {
89
75
  )}
90
76
 
91
77
  {/* Scroll to top button */}
92
- <ScrollToTop
93
- hideDelay={3500}
94
- />
78
+ <ScrollToTop hideDelay={3500} />
95
79
  </main>
96
80
  </Layout>
97
81
  );
@@ -0,0 +1,83 @@
1
+ import Layout from "@theme/Layout";
2
+ import NoteCards from "../components/NoteIndex/index.js";
3
+ import { usePluginData } from "@docusaurus/useGlobalData";
4
+ import ScrollToTop from "../components/ScrollToTop/index.js";
5
+ import HashNavigation from "../utils/HashNavigation.js";
6
+
7
+ const style = {
8
+ notesContainer: {
9
+ padding: "2rem 0",
10
+ maxWidth: "1200px",
11
+ margin: "0 auto",
12
+ },
13
+
14
+ pageTitle: {
15
+ fontSize: "2.5rem",
16
+ textAlign: "center",
17
+ marginBottom: "0.5rem",
18
+ color: "var(--ifm-color-primary)",
19
+ animation: "slideUp 0.5s ease-out forwards",
20
+ },
21
+
22
+ pageDescription: {
23
+ fontSize: "0.9rem",
24
+ textAlign: "center",
25
+ color: "var(--ifm-font-color-tertiary)",
26
+ marginBottom: "2rem",
27
+ animation: "slideUp 0.5s ease-out 0.2s forwards",
28
+ },
29
+
30
+ "@keyframes slideUp": {
31
+ from: {
32
+ opacity: 0,
33
+ transform: "translateY(20px)",
34
+ },
35
+ to: {
36
+ opacity: 1,
37
+ transform: "translateY(0)",
38
+ },
39
+ },
40
+
41
+ "@media (prefers-reduced-motion: reduce)": {
42
+ notesContainer: {
43
+ animation: "none !important",
44
+ },
45
+ pageTitle: {
46
+ animation: "none !important",
47
+ },
48
+ pageDescription: {
49
+ animation: "none !important",
50
+ opacity: 1,
51
+ },
52
+ },
53
+ };
54
+
55
+ export default function Notes() {
56
+ const { path: docsBasePath } = usePluginData(
57
+ "docusaurus-plugin-content-docs",
58
+ );
59
+ const pathName = docsBasePath.replace("/", "");
60
+ const pageTitle = pathName.charAt(0).toUpperCase() + pathName.slice(1);
61
+
62
+ return (
63
+ <Layout title={pageTitle} description={`My ${pageTitle}`}>
64
+ <main style={style.notesContainer}>
65
+ <div className="container">
66
+ <header className="text-center mb-4">
67
+ <h1 style={style.pageTitle}>My Notes</h1>
68
+ <p style={style.pageDescription}>
69
+ A collection of my self written notes & reference guides
70
+ </p>
71
+ </header>
72
+ <NoteCards />
73
+ <ScrollToTop />
74
+ <HashNavigation
75
+ elementPrefix="note-"
76
+ elementSelector=".note-card"
77
+ effectDuration={6000}
78
+ />
79
+ </div>
80
+ </main>
81
+ </Layout>
82
+ );
83
+ }