@portosaur/theme 0.1.4 → 0.2.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 (31) hide show
  1. package/package.json +10 -3
  2. package/src/plugins/theme.mjs +2 -0
  3. package/theme/DocCategoryGeneratedIndexPage/index.jsx +4 -10
  4. package/theme/MDXComponents.jsx +1 -1
  5. package/theme/Root.jsx +1 -1
  6. package/theme/components/AboutSection/index.jsx +89 -249
  7. package/theme/components/ContactSection/index.jsx +72 -153
  8. package/theme/components/ExperienceSection/index.jsx +35 -106
  9. package/theme/components/HeroSection/index.jsx +64 -186
  10. package/theme/components/NavArrow/index.jsx +38 -55
  11. package/theme/components/NoteIndex/index.jsx +50 -116
  12. package/theme/components/Preview/components/FeedbackStates.jsx +45 -190
  13. package/theme/components/Preview/components/FileTabs.jsx +17 -24
  14. package/theme/components/Preview/components/PreviewContent.jsx +37 -62
  15. package/theme/components/Preview/components/PreviewHeader.jsx +146 -380
  16. package/theme/components/Preview/components/Triggers/Pv.jsx +50 -78
  17. package/theme/components/Preview/components/Triggers/SrcPv.jsx +16 -47
  18. package/theme/components/Preview/components/Triggers/index.jsx +2 -2
  19. package/theme/components/Preview/components/ViewerWindow.jsx +160 -268
  20. package/theme/components/Preview/index.jsx +3 -3
  21. package/theme/components/Preview/renderers/CodeRenderer.jsx +81 -109
  22. package/theme/components/Preview/renderers/ImageRenderer.jsx +30 -67
  23. package/theme/components/Preview/renderers/PdfRenderer.jsx +31 -52
  24. package/theme/components/Preview/renderers/WebRenderer.jsx +18 -32
  25. package/theme/components/Preview/state/index.jsx +46 -30
  26. package/theme/components/ProjectsSection/index.jsx +278 -573
  27. package/theme/components/SocialLinks/index.jsx +43 -55
  28. package/theme/components/Tooltip/index.jsx +28 -39
  29. package/theme/pages/index.jsx +23 -87
  30. package/theme/pages/notes.jsx +26 -104
  31. package/theme/pages/tasks.jsx +220 -903
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portosaur/theme",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "Theme components for Portosaur - React components, static assets etc.",
5
5
  "license": "GPL-3.0-only",
6
6
  "author": "soymadip",
@@ -30,12 +30,19 @@
30
30
  "@docusaurus/core": "^3.10.1",
31
31
  "@docusaurus/plugin-pwa": "^3.10.1",
32
32
  "@docusaurus/preset-classic": "^3.10.1",
33
- "@portosaur/core": "^0.1.4",
33
+ "@easyops-cn/docusaurus-search-local": "^0.55.1",
34
+ "@portosaur/core": "^0.2.0",
34
35
  "chalk": "^5.6.2",
35
36
  "clsx": "^2.1.1",
36
37
  "favicons": "^7.2.0",
37
38
  "framer-motion": "^12.38.0",
39
+ "prism-react-renderer": "^2.4.1",
38
40
  "react": "^18.3.1",
39
- "react-dom": "^18.3.1"
41
+ "react-dom": "^18.3.1",
42
+ "react-icons": "^5.6.0",
43
+ "react-pdf": "^10.4.1",
44
+ "react-rnd": "^10.5.3",
45
+ "react-slick": "^0.31.0",
46
+ "slick-carousel": "^1.8.1"
40
47
  }
41
48
  }
@@ -6,6 +6,8 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
6
6
  export default function themePlugin(_context, options) {
7
7
  return {
8
8
  name: "portosaur-theme",
9
+
10
+ // Registers Portosaur component overrides (swizzle targets).
9
11
  getThemePath() {
10
12
  return options.themeDir || path.resolve(__dirname, "../../theme");
11
13
  },
@@ -1,15 +1,9 @@
1
1
  import DocCategoryGeneratedIndexPage from "@theme-original/DocCategoryGeneratedIndexPage";
2
- import NoteCards from "@porto/theme/components/NoteIndex/index.js";
2
+ import NoteCards from "@portosaur/theme/theme/components/NoteIndex/index.jsx";
3
+
3
4
  export default function DocCategoryGeneratedIndexPageWrapper(props) {
4
5
  if (props.categoryGeneratedIndex?.title === "Notes") {
5
- return jsxDEV_7x81h0kn(NoteCards, {}, undefined, false, undefined, this);
6
+ return <NoteCards />;
6
7
  }
7
- return jsxDEV_7x81h0kn(
8
- DocCategoryGeneratedIndexPage,
9
- { ...props },
10
- undefined,
11
- false,
12
- undefined,
13
- this,
14
- );
8
+ return <DocCategoryGeneratedIndexPage {...props} />;
15
9
  }
@@ -1,4 +1,4 @@
1
- import MDXComponents from "@docusaurus/theme-classic/lib/theme/MDXComponents";
1
+ import MDXComponents from "@theme-original/MDXComponents";
2
2
  import Details from "@theme/Details";
3
3
  import Tabs from "@theme/Tabs";
4
4
  import TabItem from "@theme/TabItem";
package/theme/Root.jsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import BrowserOnly from "@docusaurus/BrowserOnly";
2
- import { PreviewProvider, ViewerWindow } from "./components/Preview/index.js";
2
+ import { PreviewProvider, ViewerWindow } from "./components/Preview/index.jsx";
3
3
 
4
4
  export default function Root({ children }) {
5
5
  return (
@@ -1,264 +1,104 @@
1
1
  import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
2
2
  import useScrollReveal from "../../hooks/useScrollReveal";
3
3
  import { FaDownload } from "react-icons/fa";
4
- import { Pv } from "../Preview/index.js";
4
+ import { Pv } from "../Preview/index.jsx";
5
5
  import useBrokenLinks from "@docusaurus/useBrokenLinks";
6
6
  import styles from "./styles.module.css";
7
+
7
8
  export default function AboutSection({ id, className }) {
8
9
  const { siteConfig } = useDocusaurusContext();
9
10
  const brokenLinks = useBrokenLinks();
11
+
10
12
  if (id) {
11
13
  brokenLinks.collectAnchor(id);
12
14
  }
15
+
13
16
  const { customFields } = siteConfig;
14
- const aboutMe = customFields.aboutMe || {};
15
- if (aboutMe.enable === false) return null;
17
+ const aboutMe = customFields.aboutSection || {};
18
+
19
+ if (aboutMe.enable === false) {
20
+ return null;
21
+ }
22
+
16
23
  const [sectionRef, isVisible] = useScrollReveal();
17
- return jsxDEV_7x81h0kn(
18
- "div",
19
- {
20
- id,
21
- ref: sectionRef,
22
- className: `${styles.aboutSection} ${isVisible ? "is-visible" : ""} ${className || ""}`,
23
- role: "region",
24
- "aria-label": "About me section",
25
- children: jsxDEV_7x81h0kn(
26
- "div",
27
- {
28
- className: styles.aboutContainer,
29
- children: [
30
- jsxDEV_7x81h0kn(
31
- "div",
32
- {
33
- className: styles.aboutHeader,
34
- children: jsxDEV_7x81h0kn(
35
- "h2",
36
- {
37
- className: styles.aboutHeading,
38
- children: aboutMe.heading || "About Me",
39
- },
40
- undefined,
41
- false,
42
- undefined,
43
- this,
44
- ),
45
- },
46
- undefined,
47
- false,
48
- undefined,
49
- this,
50
- ),
51
- jsxDEV_7x81h0kn(
52
- "div",
53
- {
54
- className: styles.aboutContent,
55
- children: jsxDEV_7x81h0kn(
56
- "div",
57
- {
58
- className: styles.aboutCard,
59
- children: [
60
- jsxDEV_7x81h0kn(
61
- "div",
62
- {
63
- className: styles.bioImageContainer,
64
- children: [
65
- aboutMe.image &&
66
- jsxDEV_7x81h0kn(
67
- "div",
68
- {
69
- className: styles.imageWrapper,
70
- children: jsxDEV_7x81h0kn(
71
- "img",
72
- {
73
- src: aboutMe.image,
74
- alt: aboutMe.name || "About Me",
75
- className: styles.aboutImage,
76
- },
77
- undefined,
78
- false,
79
- undefined,
80
- this,
81
- ),
82
- },
83
- undefined,
84
- false,
85
- undefined,
86
- this,
87
- ),
88
- aboutMe.resume &&
89
- jsxDEV_7x81h0kn(
90
- "div",
91
- {
92
- className: styles.resumeContainer,
93
- children: jsxDEV_7x81h0kn(
94
- Pv,
95
- {
96
- href: aboutMe.resume,
97
- title: "My Resume",
98
- children: jsxDEV_7x81h0kn(
99
- "span",
100
- {
101
- className: styles.resumeButton,
102
- children: [
103
- jsxDEV_7x81h0kn(
104
- FaDownload,
105
- {},
106
- undefined,
107
- false,
108
- undefined,
109
- this,
110
- ),
111
- " View Resume",
112
- ],
113
- },
114
- undefined,
115
- true,
116
- undefined,
117
- this,
118
- ),
119
- },
120
- undefined,
121
- false,
122
- undefined,
123
- this,
124
- ),
125
- },
126
- undefined,
127
- false,
128
- undefined,
129
- this,
130
- ),
131
- ],
132
- },
133
- undefined,
134
- true,
135
- undefined,
136
- this,
137
- ),
138
- jsxDEV_7x81h0kn(
139
- "div",
140
- {
141
- className: styles.bioTextContainer,
142
- children: [
143
- jsxDEV_7x81h0kn(
144
- "div",
145
- {
146
- className: styles.bioText,
147
- children: Array.isArray(aboutMe.bio)
148
- ? aboutMe.bio.map((paragraph, index) =>
149
- jsxDEV_7x81h0kn(
150
- "p",
151
- {
152
- className: styles.aboutParagraph,
153
- children: paragraph,
154
- },
155
- index,
156
- false,
157
- undefined,
158
- this,
159
- ),
160
- )
161
- : jsxDEV_7x81h0kn(
162
- "p",
163
- {
164
- className: styles.aboutParagraph,
165
- children: aboutMe.bio,
166
- },
167
- undefined,
168
- false,
169
- undefined,
170
- this,
171
- ),
172
- },
173
- undefined,
174
- false,
175
- undefined,
176
- this,
177
- ),
178
- aboutMe.skills &&
179
- aboutMe.skills.length > 0 &&
180
- jsxDEV_7x81h0kn(
181
- "div",
182
- {
183
- className: styles.skillsContainer,
184
- children: [
185
- jsxDEV_7x81h0kn(
186
- "h3",
187
- {
188
- className: styles.skillsTitle,
189
- children:
190
- aboutMe.skillsHeading || "My Skills",
191
- },
192
- undefined,
193
- false,
194
- undefined,
195
- this,
196
- ),
197
- jsxDEV_7x81h0kn(
198
- "div",
199
- {
200
- className: styles.skillsGrid,
201
- children: aboutMe.skills.map(
202
- (skill, index) =>
203
- jsxDEV_7x81h0kn(
204
- "span",
205
- {
206
- className: styles.skillTag,
207
- style: {
208
- animationDelay: `${index * 0.05}s`,
209
- },
210
- children: skill,
211
- },
212
- index,
213
- false,
214
- undefined,
215
- this,
216
- ),
217
- ),
218
- },
219
- undefined,
220
- false,
221
- undefined,
222
- this,
223
- ),
224
- ],
225
- },
226
- undefined,
227
- true,
228
- undefined,
229
- this,
230
- ),
231
- ],
232
- },
233
- undefined,
234
- true,
235
- undefined,
236
- this,
237
- ),
238
- ],
239
- },
240
- undefined,
241
- true,
242
- undefined,
243
- this,
244
- ),
245
- },
246
- undefined,
247
- false,
248
- undefined,
249
- this,
250
- ),
251
- ],
252
- },
253
- undefined,
254
- true,
255
- undefined,
256
- this,
257
- ),
258
- },
259
- undefined,
260
- false,
261
- undefined,
262
- this,
24
+
25
+ return (
26
+ <div
27
+ id={id}
28
+ ref={sectionRef}
29
+ className={`${styles.aboutSection} ${isVisible ? "is-visible" : ""} ${className || ""}`}
30
+ role="region"
31
+ aria-label="About me section"
32
+ >
33
+ <div className={styles.aboutContainer}>
34
+ {/* Heading */}
35
+ <div className={styles.aboutHeader}>
36
+ <h2 className={styles.aboutHeading}>
37
+ {aboutMe.heading || "About Me"}
38
+ </h2>
39
+ </div>
40
+
41
+ {/* Content */}
42
+ <div className={styles.aboutContent}>
43
+ <div className={styles.aboutCard}>
44
+ {/* Image + Resume */}
45
+ <div className={styles.bioImageContainer}>
46
+ {aboutMe.image && (
47
+ <div className={styles.imageWrapper}>
48
+ <img
49
+ src={aboutMe.image}
50
+ alt={aboutMe.name || "About Me"}
51
+ className={styles.aboutImage}
52
+ />
53
+ </div>
54
+ )}
55
+ {aboutMe.resume && (
56
+ <div className={styles.resumeContainer}>
57
+ <Pv href={aboutMe.resume} title="My Resume">
58
+ <span className={styles.resumeButton}>
59
+ <FaDownload /> View Resume
60
+ </span>
61
+ </Pv>
62
+ </div>
63
+ )}
64
+ </div>
65
+
66
+ {/* Bio + Skills */}
67
+ <div className={styles.bioTextContainer}>
68
+ <div className={styles.bioText}>
69
+ {Array.isArray(aboutMe.bio) ? (
70
+ aboutMe.bio.map((paragraph, index) => (
71
+ <p key={index} className={styles.aboutParagraph}>
72
+ {paragraph}
73
+ </p>
74
+ ))
75
+ ) : (
76
+ <p className={styles.aboutParagraph}>{aboutMe.bio}</p>
77
+ )}
78
+ </div>
79
+
80
+ {aboutMe.skills && aboutMe.skills.length > 0 && (
81
+ <div className={styles.skillsContainer}>
82
+ <h3 className={styles.skillsTitle}>
83
+ {aboutMe.skillsHeading || "My Skills"}
84
+ </h3>
85
+ <div className={styles.skillsGrid}>
86
+ {aboutMe.skills.map((skill, index) => (
87
+ <span
88
+ key={index}
89
+ className={styles.skillTag}
90
+ style={{ animationDelay: `${index * 0.05}s` }}
91
+ >
92
+ {skill}
93
+ </span>
94
+ ))}
95
+ </div>
96
+ </div>
97
+ )}
98
+ </div>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ </div>
263
103
  );
264
104
  }