portosaurus 3.0.2 → 4.0.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 (60) hide show
  1. package/README.md +26 -126
  2. package/bin/portosaurus.mjs +8 -0
  3. package/package.json +6 -3
  4. package/src/assets/img/icon.png +0 -0
  5. package/src/assets/img/{icon.svg → svg/icon.svg} +35 -37
  6. package/src/assets/img/svg/project-blank.svg +140 -0
  7. package/src/assets/sample-resume.pdf +0 -0
  8. package/src/cli/build.mjs +2 -5
  9. package/src/cli/dev.mjs +27 -5
  10. package/src/cli/init.mjs +6 -12
  11. package/src/cli/schema.mjs +211 -0
  12. package/src/core/buildDocuConfig.mjs +305 -188
  13. package/src/core/constants.mjs +7 -1
  14. package/src/template/config.yml +150 -0
  15. package/src/template/notes/welcome.mdx +6 -0
  16. package/src/template/package.json +3 -3
  17. package/src/theme/MDXComponents.js +0 -1
  18. package/src/theme/components/AboutSection/index.js +32 -17
  19. package/src/theme/components/AboutSection/styles.module.css +151 -344
  20. package/src/theme/components/ContactSection/index.js +23 -14
  21. package/src/theme/components/ContactSection/styles.module.css +19 -8
  22. package/src/theme/components/ExperienceSection/index.js +12 -5
  23. package/src/theme/components/HeroSection/index.js +4 -3
  24. package/src/theme/components/HeroSection/styles.module.css +17 -16
  25. package/src/theme/components/NavArrow/index.js +114 -0
  26. package/src/theme/components/NavArrow/styles.module.css +107 -0
  27. package/src/theme/components/NoteIndex/index.js +66 -95
  28. package/src/theme/components/NoteIndex/styles.module.css +85 -89
  29. package/src/theme/components/Preview/components/FeedbackStates.js +3 -1
  30. package/src/theme/components/Preview/components/PreviewContent.js +91 -0
  31. package/src/theme/components/Preview/components/PreviewHeader.js +41 -33
  32. package/src/theme/components/Preview/components/Triggers/Pv.js +129 -72
  33. package/src/theme/components/Preview/components/ViewerWindow.js +198 -234
  34. package/src/theme/components/Preview/hooks/useAdaptiveSizing.js +115 -0
  35. package/src/theme/components/Preview/hooks/useDeepLinkHash.js +18 -23
  36. package/src/theme/components/Preview/hooks/useDockLayout.js +48 -8
  37. package/src/theme/components/Preview/hooks/useTouchZoom.js +118 -0
  38. package/src/theme/components/Preview/renderers/CodeRenderer.js +64 -25
  39. package/src/theme/components/Preview/state/index.js +70 -17
  40. package/src/theme/components/Preview/styles.module.css +181 -45
  41. package/src/theme/components/Preview/utils/index.js +11 -10
  42. package/src/theme/components/ProjectsSection/index.js +138 -148
  43. package/src/theme/components/ProjectsSection/styles.module.css +178 -112
  44. package/src/theme/components/SocialLinks/index.js +9 -7
  45. package/src/theme/components/Tooltip/index.js +31 -20
  46. package/src/theme/components/Tooltip/styles.module.css +101 -38
  47. package/src/theme/config/iconMappings.js +2 -0
  48. package/src/theme/css/custom.css +72 -0
  49. package/src/theme/hooks/useScrollReveal.js +30 -0
  50. package/src/theme/pages/index.js +7 -27
  51. package/src/theme/pages/notes.js +2 -2
  52. package/src/theme/pages/tasks.js +12 -11
  53. package/src/utils/cliUtils.mjs +23 -51
  54. package/src/utils/configUtils.mjs +95 -84
  55. package/src/utils/systemUtils.mjs +171 -0
  56. package/src/template/config.js +0 -68
  57. package/src/theme/components/ScrollToTop/index.js +0 -95
  58. package/src/theme/components/ScrollToTop/styles.module.css +0 -97
  59. package/src/theme/config/metaTags.js +0 -21
  60. /package/src/template/{.nojekyll → static/.nojekyll} +0 -0
@@ -1,14 +1,19 @@
1
1
  import path from "path";
2
2
  import { fileURLToPath } from "url";
3
+ import { loadPkg } from "../utils/systemUtils.mjs";
3
4
 
4
5
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
6
 
6
7
  /**
7
8
  * The absolute path to the Portosaurus package root.
8
- * Calculated relative to this file's location in src/utils/
9
9
  */
10
10
  export const PortoRoot = path.resolve(__dirname, "../../");
11
11
 
12
+ /**
13
+ * The Portosaurus package.json content.
14
+ */
15
+ export const PortoPkg = loadPkg(PortoRoot);
16
+
12
17
  /**
13
18
  * Common paths inside the framework
14
19
  */
@@ -18,4 +23,5 @@ export const Paths = {
18
23
  theme: path.join(PortoRoot, "src/theme"),
19
24
  core: path.join(PortoRoot, "src/core"),
20
25
  plugins: path.join(PortoRoot, "src/plugins"),
26
+ utils: path.join(PortoRoot, "src/utils"),
21
27
  };
@@ -0,0 +1,150 @@
1
+ # yaml-language-server: $schema=https://soymadip.github.io/portosaurus/configSchema.json
2
+ # Portosaurus Project Configuration
3
+ # This file is filled with example values
4
+ # Check Config Docs: https://soymadip.is-a.dev/portosaurus/guide/config
5
+
6
+ # Site Metadata & SEO
7
+ site:
8
+ title: "Your Name"
9
+ tagline: "Short description about you, your passion, your goals etc."
10
+
11
+ favicon: "{{portoRoot}}/src/assets/img/svg/icon.svg"
12
+ social_card: "{{portoRoot}}/src/assets/img/social-card.jpeg"
13
+
14
+ # Auto set if deploying in Github/GitLab Pages
15
+ url: "auto"
16
+ path: "auto"
17
+
18
+ # UI/UX & Theme Behavior
19
+ theme:
20
+ appearance:
21
+ dark_mode: true
22
+ disable_switch: false
23
+
24
+ navigation:
25
+ collapsable_sidebar: true
26
+ hide_navbar_on_scroll: true
27
+
28
+ # Page Content & Sections
29
+ home_page:
30
+ hero:
31
+ title: null # Fallback to {{site.title}}
32
+ profession: "Your Profession"
33
+ desc: null # Fallback to {{site.tagline}}
34
+ profile_pic: null # Fallback to {{site.favicon}}
35
+
36
+ social:
37
+ - name: "LinkedIn"
38
+ url: "https://www.linked.com/in/yourusername"
39
+
40
+ - name: "GitHub"
41
+ icon: "githubalt"
42
+ url: "https://github.com/yourusername"
43
+
44
+ - name: "Telegram"
45
+ url: "https://t.me/yourusername"
46
+
47
+ about:
48
+ enable: true
49
+ image: null # Fallback to {{home_page.hero.profile_pic}}
50
+ bio:
51
+ - "I'm a {{home_page.hero.profession}} who loves turning ideas into reality."
52
+ - "With a background in computer science and a passion for design, I bridge the gap between aesthetics and functionality."
53
+ - "Also I am interested in Your interest1, interest2 etc etc......"
54
+ skills:
55
+ - "skill 1"
56
+ - "skill 2"
57
+ - "skill 3"
58
+ resume: "{{portoRoot}}/src/assets/sample-resume.pdf"
59
+
60
+ project_shelf:
61
+ enable: true
62
+ projects:
63
+ - title: "Your Awesome Project"
64
+ icon: null
65
+ state: "active" # options: active, completed, maintenance, paused, archived, planned
66
+ desc: "A brief description of what this project does and the tech used."
67
+ tags: ["tag1", "tag2", "tag3", "tag4", "tag5", "tag6", "tag7"]
68
+ website: "https://example.com"
69
+ repo: "https://github.com/yourname/project1"
70
+
71
+ - title: "Your Awesome Project 2"
72
+ icon: "{{portoRoot}}/src/assets/img/svg/icon.svg"
73
+ bg: "#5c8f2d"
74
+ tags: ["tag1", "tag2", "tag3", "tag4", "tag5", "tag6", "tag7"]
75
+ featured: true
76
+ state: "completed"
77
+ desc: "A brief description of what this project does and the tech used."
78
+ website: "https://example.com"
79
+ repo: "https://github.com/yourname/project2"
80
+ demo: "https://example.com/demo"
81
+
82
+ - title: "Your Awesome Project 3"
83
+ icon: "https://github.com/soymadip/KireiSakura-Kit/blob/main/Assets/icon.png?raw=true"
84
+ bg: "#aa47be"
85
+ state: "completed"
86
+ desc: "A brief description of what this project does and the tech used."
87
+ website: "https://example.com"
88
+ repo: "https://github.com/yourname/project2"
89
+ demo: "https://example.com/demo"
90
+
91
+ experience:
92
+ enable: false
93
+ list:
94
+ - company: "Tech Solutions Inc."
95
+ role: "Senior Developer"
96
+ duration: "2022 - Present"
97
+ desc: "Leading the frontend team in building a high-performance dashboard."
98
+
99
+ # Reach me out section
100
+ social:
101
+ enable: true
102
+ links:
103
+ - name: "Email"
104
+ desc: "Send me an email"
105
+ url: "mailto:yourname@example.com"
106
+
107
+ - name: "LinkedIn"
108
+ desc: "Connect on LinkedIn"
109
+ url: "https://linkedin.com/in/yourusername"
110
+
111
+ - name: "Telegram"
112
+ desc: "Reach me on Telegram"
113
+ url: "https://t.me/yourusername"
114
+
115
+ - name: "Discord"
116
+ desc: "Become my friend"
117
+ url: "https://discord.com/users/yourid"
118
+
119
+ - name: "Twitter"
120
+ desc: "Find me on Twitter"
121
+ url: "https://twitter.com/yourusername"
122
+
123
+ - name: "GitLab"
124
+ desc: "View my GitLab profile"
125
+ url: "https://gitlab.com/yourusername"
126
+
127
+ - name: "Anilist"
128
+ desc: "If you are otaku, check out!"
129
+ url: "https://anilist.co/user/yourusername"
130
+
131
+ tasks:
132
+ enable: true
133
+ list:
134
+ - title: "Build the future"
135
+ status: "done"
136
+ desc: "Implementing the core framework."
137
+
138
+ # Functional Tools
139
+ tools:
140
+ link_shortener:
141
+ enable: false
142
+ deploy_path: "/l"
143
+ short_links:
144
+ "example": "https://example.com"
145
+
146
+ # Custom variables for use in your content as {{custom.key}}
147
+ custom:
148
+ twitter: "@yourhandle"
149
+ github: "yourname"
150
+ linkedin: "yourname"
@@ -1,3 +1,9 @@
1
+ ---
2
+ id: "welcome-to-notes"
3
+ author: "Portosaurus"
4
+ description: "Welcome to the notes section"
5
+ ---
6
+
1
7
  # Welcome
2
8
 
3
9
  Welcome to your notes! Add markdown or MDX files in this `notes/` directory.
@@ -3,9 +3,9 @@
3
3
  "version": "0.0.1",
4
4
  "private": true,
5
5
  "scripts": {
6
- "dev": "portosaurus dev",
7
- "start": "portosaurus start",
8
- "build": "portosaurus build",
6
+ "dev": "$npm_execpath install && portosaurus dev",
7
+ "start": "$npm_execpath install && portosaurus start",
8
+ "build": "$npm_execpath install && portosaurus build",
9
9
  "serve": "portosaurus serve"
10
10
  },
11
11
  "dependencies": {
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import MDXComponents from "@docusaurus/theme-classic/lib/theme/MDXComponents";
3
2
  import Details from "@theme/Details";
4
3
  import Tabs from "@theme/Tabs";
@@ -1,4 +1,7 @@
1
1
  import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
2
+ import useScrollReveal from "../../hooks/useScrollReveal";
3
+ import { FaDownload } from "react-icons/fa";
4
+ import { Pv } from "../Preview/index.js";
2
5
  import styles from "./styles.module.css";
3
6
 
4
7
  export default function AboutSection({ id, className }) {
@@ -6,63 +9,75 @@ export default function AboutSection({ id, className }) {
6
9
  const { customFields } = siteConfig;
7
10
  const aboutMe = customFields.aboutMe || {};
8
11
 
12
+ if (aboutMe.enable === false) return null;
13
+
14
+ const [sectionRef, isVisible] = useScrollReveal();
15
+
9
16
  return (
10
17
  <div
11
18
  id={id}
12
- className={`${styles.aboutSection} ${className || ""}`}
19
+ ref={sectionRef}
20
+ className={`${styles.aboutSection} ${isVisible ? "is-visible" : ""} ${className || ""}`}
13
21
  role="region"
14
22
  aria-label="About me section"
15
23
  >
16
24
  <div className={styles.aboutContainer}>
17
25
  <div className={styles.aboutHeader}>
18
- <h2 className={styles.aboutHeading}>{"About Me"}</h2>
26
+ <h2 className={styles.aboutHeading}>
27
+ {aboutMe.heading || "About Me"}
28
+ </h2>
19
29
  </div>
20
30
 
21
31
  <div className={styles.aboutContent}>
22
- <div className={styles.aboutBio}>
32
+ <div className={styles.aboutCard}>
23
33
  <div className={styles.bioImageContainer}>
24
34
  {aboutMe.image && (
25
35
  <div className={styles.imageWrapper}>
26
36
  <img
27
37
  src={aboutMe.image}
28
- alt="About Me"
38
+ alt={aboutMe.name || "About Me"}
29
39
  className={styles.aboutImage}
30
- loading="lazy"
31
40
  />
32
41
  </div>
33
42
  )}
43
+ {aboutMe.resume && (
44
+ <div className={styles.resumeContainer}>
45
+ <Pv href={aboutMe.resume} title="My Resume">
46
+ <span className={styles.resumeButton}>
47
+ <FaDownload /> View Resume
48
+ </span>
49
+ </Pv>
50
+ </div>
51
+ )}
34
52
  </div>
35
53
 
36
54
  <div className={styles.bioTextContainer}>
37
55
  <div className={styles.bioText}>
38
- {Array.isArray(aboutMe.description) ? (
39
- aboutMe.description.map((paragraph, index) => (
56
+ {Array.isArray(aboutMe.bio) ? (
57
+ aboutMe.bio.map((paragraph, index) => (
40
58
  <p key={index} className={styles.aboutParagraph}>
41
59
  {paragraph}
42
60
  </p>
43
61
  ))
44
62
  ) : (
45
- <p className={styles.aboutParagraph}>
46
- {aboutMe.description || "Information about me goes here."}
47
- </p>
63
+ <p className={styles.aboutParagraph}>{aboutMe.bio}</p>
48
64
  )}
49
65
  </div>
50
66
 
51
67
  {aboutMe.skills && aboutMe.skills.length > 0 && (
52
68
  <div className={styles.skillsContainer}>
53
- <h3 className={styles.skillsTitle} id="skills-heading">
54
- My Skills
69
+ <h3 className={styles.skillsTitle}>
70
+ {aboutMe.skillsHeading || "My Skills"}
55
71
  </h3>
56
- <div className={styles.skillsGrid} role="list">
72
+ <div className={styles.skillsGrid}>
57
73
  {aboutMe.skills.map((skill, index) => (
58
- <div
74
+ <span
59
75
  key={index}
60
- className={styles.skillBadge}
61
- role="listitem"
76
+ className={styles.skillTag}
62
77
  style={{ animationDelay: `${index * 0.05}s` }}
63
78
  >
64
79
  {skill}
65
- </div>
80
+ </span>
66
81
  ))}
67
82
  </div>
68
83
  </div>