@portosaur/theme 0.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 (76) hide show
  1. package/README.md +13 -0
  2. package/assets/img/icon-old.png +0 -0
  3. package/assets/img/icon.png +0 -0
  4. package/assets/img/project-blank.png +0 -0
  5. package/assets/img/social-card.jpeg +0 -0
  6. package/assets/img/svg/icon-blog.svg +2 -0
  7. package/assets/img/svg/icon-close.svg +3 -0
  8. package/assets/img/svg/icon-dock.svg +4 -0
  9. package/assets/img/svg/icon-link.svg +5 -0
  10. package/assets/img/svg/icon-note.svg +2 -0
  11. package/assets/img/svg/icon-popup.svg +1 -0
  12. package/assets/img/svg/icon-save.svg +5 -0
  13. package/assets/img/svg/icon.svg +240 -0
  14. package/assets/img/svg/project-blank.svg +140 -0
  15. package/assets/sample-resume.pdf +0 -0
  16. package/package.json +41 -0
  17. package/plugins/README.md +8 -0
  18. package/src/index.d.ts +11 -0
  19. package/src/index.mjs +14 -0
  20. package/src/plugins/theme.mjs +13 -0
  21. package/theme/DocCategoryGeneratedIndexPage/index.jsx +15 -0
  22. package/theme/MDXComponents.jsx +19 -0
  23. package/theme/README.md +9 -0
  24. package/theme/Root.jsx +11 -0
  25. package/theme/components/AboutSection/index.jsx +264 -0
  26. package/theme/components/AboutSection/styles.module.css +309 -0
  27. package/theme/components/ContactSection/index.jsx +188 -0
  28. package/theme/components/ContactSection/styles.module.css +343 -0
  29. package/theme/components/ExperienceSection/index.jsx +119 -0
  30. package/theme/components/ExperienceSection/styles.module.css +183 -0
  31. package/theme/components/HeroSection/index.jsx +198 -0
  32. package/theme/components/HeroSection/styles.module.css +484 -0
  33. package/theme/components/NavArrow/index.jsx +124 -0
  34. package/theme/components/NavArrow/styles.module.css +107 -0
  35. package/theme/components/NoteIndex/index.jsx +182 -0
  36. package/theme/components/NoteIndex/styles.module.css +167 -0
  37. package/theme/components/Preview/components/FeedbackStates.jsx +200 -0
  38. package/theme/components/Preview/components/FileTabs.jsx +41 -0
  39. package/theme/components/Preview/components/PreviewContent.jsx +104 -0
  40. package/theme/components/Preview/components/PreviewHeader.jsx +411 -0
  41. package/theme/components/Preview/components/Triggers/Pv.jsx +253 -0
  42. package/theme/components/Preview/components/Triggers/SrcPv.jsx +55 -0
  43. package/theme/components/Preview/components/Triggers/index.jsx +2 -0
  44. package/theme/components/Preview/components/ViewerWindow.jsx +489 -0
  45. package/theme/components/Preview/hooks/useAdaptiveSizing.jsx +90 -0
  46. package/theme/components/Preview/hooks/useDeepLinkHash.jsx +24 -0
  47. package/theme/components/Preview/hooks/useDockLayout.jsx +86 -0
  48. package/theme/components/Preview/hooks/useFileFetch.jsx +38 -0
  49. package/theme/components/Preview/hooks/useTouchZoom.jsx +98 -0
  50. package/theme/components/Preview/index.jsx +3 -0
  51. package/theme/components/Preview/renderers/CodeRenderer.jsx +124 -0
  52. package/theme/components/Preview/renderers/ImageRenderer.jsx +74 -0
  53. package/theme/components/Preview/renderers/PdfRenderer.jsx +93 -0
  54. package/theme/components/Preview/renderers/WebRenderer.jsx +59 -0
  55. package/theme/components/Preview/state/index.jsx +177 -0
  56. package/theme/components/Preview/styles.module.css +776 -0
  57. package/theme/components/Preview/utils/index.jsx +62 -0
  58. package/theme/components/ProjectsSection/index.jsx +790 -0
  59. package/theme/components/ProjectsSection/styles.module.css +900 -0
  60. package/theme/components/SocialLinks/index.jsx +115 -0
  61. package/theme/components/SocialLinks/styles.module.css +57 -0
  62. package/theme/components/Tooltip/index.jsx +104 -0
  63. package/theme/components/Tooltip/styles.module.css +168 -0
  64. package/theme/config/iconMappings.jsx +427 -0
  65. package/theme/config/prism.jsx +72 -0
  66. package/theme/config/sidebar.jsx +11 -0
  67. package/theme/css/bootstrap.css +5 -0
  68. package/theme/css/catppuccin.css +618 -0
  69. package/theme/css/custom.css +253 -0
  70. package/theme/css/tasks.css +874 -0
  71. package/theme/hooks/useScrollReveal.jsx +20 -0
  72. package/theme/pages/index.jsx +104 -0
  73. package/theme/pages/notes.jsx +131 -0
  74. package/theme/pages/tasks.jsx +989 -0
  75. package/theme/utils/HashNavigation.jsx +185 -0
  76. package/theme/utils/updateTitle.jsx +65 -0
@@ -0,0 +1,20 @@
1
+ import { useState, useEffect, useRef } from "react";
2
+ export default function useScrollReveal(options = { threshold: 0.05 }) {
3
+ const [isVisible, setIsVisible] = useState(false);
4
+ const elementRef = useRef(null);
5
+ useEffect(() => {
6
+ const observer = new IntersectionObserver(([entry]) => {
7
+ setIsVisible(entry.isIntersecting);
8
+ }, options);
9
+ const currentElement = elementRef.current;
10
+ if (currentElement) {
11
+ observer.observe(currentElement);
12
+ }
13
+ return () => {
14
+ if (currentElement) {
15
+ observer.unobserve(currentElement);
16
+ }
17
+ };
18
+ }, [options]);
19
+ return [elementRef, isVisible];
20
+ }
@@ -0,0 +1,104 @@
1
+ import Layout from "@theme/Layout";
2
+ import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
3
+ import UpdateTitle from "../utils/updateTitle.js";
4
+ import HeroSection from "../components/HeroSection/index.js";
5
+ import AboutSection from "../components/AboutSection/index.js";
6
+ import ProjectsSection from "../components/ProjectsSection/index.js";
7
+ import ContactSection from "../components/ContactSection/index.js";
8
+ import ExperienceSection from "../components/ExperienceSection/index.js";
9
+ import NavArrow from "../components/NavArrow/index.js";
10
+ export default function Home() {
11
+ const { siteConfig } = useDocusaurusContext();
12
+
13
+ const sectionTitles = {
14
+ me: `Home | ${siteConfig.title}`,
15
+ about: `About Me | ${siteConfig.title}`,
16
+ projects: `Projects | ${siteConfig.title}`,
17
+ experience: `Experience | ${siteConfig.title}`,
18
+ contact: `Contact | ${siteConfig.title}`,
19
+ };
20
+ const customStyles = `
21
+ /* For future */
22
+ `;
23
+ return jsxDEV_7x81h0kn(
24
+ Layout,
25
+ {
26
+ title: "Me",
27
+ description: "My portfolio website",
28
+ children: [
29
+ jsxDEV_7x81h0kn(
30
+ "style",
31
+ { children: customStyles },
32
+ undefined,
33
+ false,
34
+ undefined,
35
+ this,
36
+ ),
37
+ jsxDEV_7x81h0kn(
38
+ UpdateTitle,
39
+ { sections: sectionTitles, defaultTitle: siteConfig.title },
40
+ undefined,
41
+ false,
42
+ undefined,
43
+ this,
44
+ ),
45
+ jsxDEV_7x81h0kn(
46
+ "main",
47
+ {
48
+ children: [
49
+ jsxDEV_7x81h0kn(
50
+ HeroSection,
51
+ { id: "me" },
52
+ undefined,
53
+ false,
54
+ undefined,
55
+ this,
56
+ ),
57
+ jsxDEV_7x81h0kn(
58
+ AboutSection,
59
+ { id: "about" },
60
+ undefined,
61
+ false,
62
+ undefined,
63
+ this,
64
+ ),
65
+ jsxDEV_7x81h0kn(
66
+ ProjectsSection,
67
+ { id: "projects" },
68
+ undefined,
69
+ false,
70
+ undefined,
71
+ this,
72
+ ),
73
+ jsxDEV_7x81h0kn(
74
+ ExperienceSection,
75
+ { id: "experience" },
76
+ undefined,
77
+ false,
78
+ undefined,
79
+ this,
80
+ ),
81
+ jsxDEV_7x81h0kn(
82
+ ContactSection,
83
+ { id: "contact" },
84
+ undefined,
85
+ false,
86
+ undefined,
87
+ this,
88
+ ),
89
+ jsxDEV_7x81h0kn(NavArrow, {}, undefined, false, undefined, this),
90
+ ],
91
+ },
92
+ undefined,
93
+ true,
94
+ undefined,
95
+ this,
96
+ ),
97
+ ],
98
+ },
99
+ undefined,
100
+ true,
101
+ undefined,
102
+ this,
103
+ );
104
+ }
@@ -0,0 +1,131 @@
1
+ import Layout from "@theme/Layout";
2
+ import NoteCards from "../components/NoteIndex/index.js";
3
+ import { usePluginData } from "@docusaurus/useGlobalData";
4
+ import NavArrow from "../components/NavArrow/index.js";
5
+ import HashNavigation from "../utils/HashNavigation.js";
6
+ const style = {
7
+ notesContainer: { padding: "2rem 0", maxWidth: "1200px", margin: "0 auto" },
8
+ pageTitle: {
9
+ fontSize: "2.5rem",
10
+ textAlign: "center",
11
+ marginBottom: "0.5rem",
12
+ color: "var(--ifm-color-primary)",
13
+ animation: "slideUp 0.5s ease-out forwards",
14
+ },
15
+ pageDescription: {
16
+ fontSize: "0.9rem",
17
+ textAlign: "center",
18
+ color: "var(--ifm-font-color-tertiary)",
19
+ marginBottom: "2rem",
20
+ animation: "slideUp 0.5s ease-out 0.2s forwards",
21
+ },
22
+ "@keyframes slideUp": {
23
+ from: { opacity: 0, transform: "translateY(20px)" },
24
+ to: { opacity: 1, transform: "translateY(0)" },
25
+ },
26
+ "@media (prefers-reduced-motion: reduce)": {
27
+ notesContainer: { animation: "none !important" },
28
+ pageTitle: { animation: "none !important" },
29
+ pageDescription: { animation: "none !important", opacity: 1 },
30
+ },
31
+ };
32
+ export default function Notes() {
33
+ const { path: docsBasePath } = usePluginData(
34
+ "docusaurus-plugin-content-docs",
35
+ );
36
+ const pathName = docsBasePath.replace("/", "");
37
+ const pageTitle = pathName.charAt(0).toUpperCase() + pathName.slice(1);
38
+ return jsxDEV_7x81h0kn(
39
+ Layout,
40
+ {
41
+ title: pageTitle,
42
+ description: `My ${pageTitle}`,
43
+ children: jsxDEV_7x81h0kn(
44
+ "main",
45
+ {
46
+ style: style.notesContainer,
47
+ children: jsxDEV_7x81h0kn(
48
+ "div",
49
+ {
50
+ className: "container",
51
+ children: [
52
+ jsxDEV_7x81h0kn(
53
+ "header",
54
+ {
55
+ className: "text-center mb-4",
56
+ children: [
57
+ jsxDEV_7x81h0kn(
58
+ "h1",
59
+ { style: style.pageTitle, children: "My Notes" },
60
+ undefined,
61
+ false,
62
+ undefined,
63
+ this,
64
+ ),
65
+ jsxDEV_7x81h0kn(
66
+ "p",
67
+ {
68
+ style: style.pageDescription,
69
+ children:
70
+ "A collection of my self written notes & reference guides",
71
+ },
72
+ undefined,
73
+ false,
74
+ undefined,
75
+ this,
76
+ ),
77
+ ],
78
+ },
79
+ undefined,
80
+ true,
81
+ undefined,
82
+ this,
83
+ ),
84
+ jsxDEV_7x81h0kn(
85
+ NoteCards,
86
+ {},
87
+ undefined,
88
+ false,
89
+ undefined,
90
+ this,
91
+ ),
92
+ jsxDEV_7x81h0kn(
93
+ NavArrow,
94
+ {},
95
+ undefined,
96
+ false,
97
+ undefined,
98
+ this,
99
+ ),
100
+ jsxDEV_7x81h0kn(
101
+ HashNavigation,
102
+ {
103
+ elementPrefix: "note-",
104
+ elementSelector: ".note-card",
105
+ effectDuration: 6000,
106
+ },
107
+ undefined,
108
+ false,
109
+ undefined,
110
+ this,
111
+ ),
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
+ }