@portosaur/theme 0.1.5 → 0.3.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.
- package/package.json +12 -3
- package/src/plugins/theme.mjs +2 -0
- package/theme/DocCategoryGeneratedIndexPage/index.jsx +4 -10
- package/theme/MDXComponents.jsx +3 -2
- package/theme/Root.jsx +1 -1
- package/theme/components/AboutSection/index.jsx +89 -249
- package/theme/components/ContactSection/index.jsx +72 -153
- package/theme/components/ExperienceSection/index.jsx +35 -106
- package/theme/components/HeroSection/index.jsx +64 -186
- package/theme/components/Indent/index.jsx +10 -0
- package/theme/components/NavArrow/index.jsx +38 -55
- package/theme/components/NoteCards/index.jsx +110 -0
- package/theme/components/Preview/components/FeedbackStates.jsx +45 -190
- package/theme/components/Preview/components/FileTabs.jsx +17 -24
- package/theme/components/Preview/components/PreviewContent.jsx +37 -62
- package/theme/components/Preview/components/PreviewHeader.jsx +146 -380
- package/theme/components/Preview/components/Triggers/Pv.jsx +50 -78
- package/theme/components/Preview/components/Triggers/SrcPv.jsx +16 -47
- package/theme/components/Preview/components/Triggers/index.jsx +2 -2
- package/theme/components/Preview/components/ViewerWindow.jsx +160 -268
- package/theme/components/Preview/index.jsx +3 -3
- package/theme/components/Preview/renderers/CodeRenderer.jsx +81 -109
- package/theme/components/Preview/renderers/ImageRenderer.jsx +30 -67
- package/theme/components/Preview/renderers/PdfRenderer.jsx +31 -52
- package/theme/components/Preview/renderers/WebRenderer.jsx +18 -32
- package/theme/components/Preview/state/index.jsx +46 -30
- package/theme/components/ProjectsSection/index.jsx +278 -573
- package/theme/components/ScrollToTop/index.jsx +93 -0
- package/theme/components/ScrollToTop/styles.module.css +97 -0
- package/theme/components/SocialLinks/index.jsx +43 -55
- package/theme/components/Tooltip/index.jsx +85 -43
- package/theme/components/Tooltip/styles.module.css +13 -3
- package/theme/components/TopicList/index.jsx +31 -0
- package/theme/css/animations.css +61 -0
- package/theme/css/custom.css +16 -253
- package/theme/css/overrides/base.css +37 -0
- package/theme/css/overrides/footer.css +14 -0
- package/theme/css/overrides/markdown.css +62 -0
- package/theme/css/overrides/navbar.css +37 -0
- package/theme/css/overrides/pagination.css +64 -0
- package/theme/css/overrides/search.css +28 -0
- package/theme/css/{catppuccin.css → overrides/variables.css} +1 -1
- package/theme/pages/index.jsx +25 -87
- package/theme/pages/notes.jsx +27 -104
- package/theme/pages/tasks.jsx +293 -904
- package/theme/components/NoteIndex/index.jsx +0 -182
- package/theme/css/bootstrap.css +0 -5
- /package/theme/components/{NoteIndex → NoteCards}/styles.module.css +0 -0
- /package/theme/css/{tasks.css → tasks.module.css} +0 -0
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import useBaseUrl from "@docusaurus/useBaseUrl";
|
|
2
|
-
import { usePluginData } from "@docusaurus/useGlobalData";
|
|
3
|
-
import Link from "@docusaurus/Link";
|
|
4
|
-
import { FaBook, FaChevronRight } from "react-icons/fa";
|
|
5
|
-
import Tooltip from "../Tooltip/index.js";
|
|
6
|
-
import { iconMap } from "../../config/iconMappings.js";
|
|
7
|
-
import DocCardList from "@theme/DocCardList";
|
|
8
|
-
import styles from "./styles.module.css";
|
|
9
|
-
function useNotes() {
|
|
10
|
-
const context = require.context(`@site/notes`, true, /index\.mdx?$|\.mdx?$/);
|
|
11
|
-
return context
|
|
12
|
-
.keys()
|
|
13
|
-
.filter((path) => {
|
|
14
|
-
if (path === "./index.md" || path === "./index.mdx") return false;
|
|
15
|
-
const pathParts = path.split("/");
|
|
16
|
-
const isTopLevelFile =
|
|
17
|
-
pathParts.length === 2 && !path.match(/index\.mdx?$/);
|
|
18
|
-
const isTopLevelDir =
|
|
19
|
-
pathParts.length === 3 && path.match(/index\.mdx?$/);
|
|
20
|
-
return isTopLevelFile || isTopLevelDir;
|
|
21
|
-
})
|
|
22
|
-
.map((path) => {
|
|
23
|
-
const { frontMatter } = context(path);
|
|
24
|
-
const pathParts = path.split("/");
|
|
25
|
-
const isTopLevelFile = pathParts.length === 2;
|
|
26
|
-
const fileSlug = isTopLevelFile
|
|
27
|
-
? path.replace("./", "").replace(/\.mdx?$/, "")
|
|
28
|
-
: pathParts[1];
|
|
29
|
-
const slug = frontMatter.slug || frontMatter.id || fileSlug;
|
|
30
|
-
const rawTitle = frontMatter.title || frontMatter.language || fileSlug;
|
|
31
|
-
const title = rawTitle.charAt(0).toUpperCase() + rawTitle.slice(1);
|
|
32
|
-
const language = frontMatter.language
|
|
33
|
-
? frontMatter.language
|
|
34
|
-
.toLowerCase()
|
|
35
|
-
.replace(/ /g, "")
|
|
36
|
-
.replace(/[\s-]/g, "")
|
|
37
|
-
: slug.toLowerCase() || title.toLowerCase();
|
|
38
|
-
return {
|
|
39
|
-
title,
|
|
40
|
-
language,
|
|
41
|
-
slug,
|
|
42
|
-
desc: frontMatter.desc || "",
|
|
43
|
-
position: frontMatter.sidebar_position || 999,
|
|
44
|
-
};
|
|
45
|
-
})
|
|
46
|
-
.sort((a, b) => a.position - b.position);
|
|
47
|
-
}
|
|
48
|
-
function NoteCard({ title, language, slug, desc, index, docsBasePath }) {
|
|
49
|
-
const noteUrl = useBaseUrl(`${docsBasePath}/${slug}`);
|
|
50
|
-
const { icon: Icon = FaBook, color = "var(--ifm-color-primary)" } =
|
|
51
|
-
iconMap[language] || iconMap[title.toLowerCase()] || {};
|
|
52
|
-
const tooltipContent = desc ? desc : null;
|
|
53
|
-
const cardInner = jsxDEV_7x81h0kn(
|
|
54
|
-
Link,
|
|
55
|
-
{
|
|
56
|
-
to: noteUrl,
|
|
57
|
-
className: styles.noteCard,
|
|
58
|
-
style: { "--card-index": index, "--note-color": color },
|
|
59
|
-
"aria-label": `Read note: ${title}`,
|
|
60
|
-
children: [
|
|
61
|
-
jsxDEV_7x81h0kn(
|
|
62
|
-
"div",
|
|
63
|
-
{
|
|
64
|
-
className: styles.iconWrapper,
|
|
65
|
-
children: jsxDEV_7x81h0kn(
|
|
66
|
-
Icon,
|
|
67
|
-
{ className: styles.noteIcon },
|
|
68
|
-
undefined,
|
|
69
|
-
false,
|
|
70
|
-
undefined,
|
|
71
|
-
this,
|
|
72
|
-
),
|
|
73
|
-
},
|
|
74
|
-
undefined,
|
|
75
|
-
false,
|
|
76
|
-
undefined,
|
|
77
|
-
this,
|
|
78
|
-
),
|
|
79
|
-
jsxDEV_7x81h0kn(
|
|
80
|
-
"div",
|
|
81
|
-
{
|
|
82
|
-
className: styles.cardContent,
|
|
83
|
-
children: jsxDEV_7x81h0kn(
|
|
84
|
-
"h3",
|
|
85
|
-
{ className: styles.noteTitle, children: title },
|
|
86
|
-
undefined,
|
|
87
|
-
false,
|
|
88
|
-
undefined,
|
|
89
|
-
this,
|
|
90
|
-
),
|
|
91
|
-
},
|
|
92
|
-
undefined,
|
|
93
|
-
false,
|
|
94
|
-
undefined,
|
|
95
|
-
this,
|
|
96
|
-
),
|
|
97
|
-
jsxDEV_7x81h0kn(
|
|
98
|
-
FaChevronRight,
|
|
99
|
-
{ className: styles.mobileChevron },
|
|
100
|
-
undefined,
|
|
101
|
-
false,
|
|
102
|
-
undefined,
|
|
103
|
-
this,
|
|
104
|
-
),
|
|
105
|
-
],
|
|
106
|
-
},
|
|
107
|
-
undefined,
|
|
108
|
-
true,
|
|
109
|
-
undefined,
|
|
110
|
-
this,
|
|
111
|
-
);
|
|
112
|
-
return tooltipContent
|
|
113
|
-
? jsxDEV_7x81h0kn(
|
|
114
|
-
Tooltip,
|
|
115
|
-
{
|
|
116
|
-
msg: tooltipContent,
|
|
117
|
-
position: "top",
|
|
118
|
-
underline: false,
|
|
119
|
-
gap: -8,
|
|
120
|
-
children: cardInner,
|
|
121
|
-
},
|
|
122
|
-
undefined,
|
|
123
|
-
false,
|
|
124
|
-
undefined,
|
|
125
|
-
this,
|
|
126
|
-
)
|
|
127
|
-
: cardInner;
|
|
128
|
-
}
|
|
129
|
-
export default function NoteCards() {
|
|
130
|
-
const notes = useNotes();
|
|
131
|
-
const { path: docsBasePath } = usePluginData(
|
|
132
|
-
"docusaurus-plugin-content-docs",
|
|
133
|
-
);
|
|
134
|
-
if (!notes.length) return null;
|
|
135
|
-
return jsxDEV_7x81h0kn(
|
|
136
|
-
"div",
|
|
137
|
-
{
|
|
138
|
-
className: styles.notesGrid,
|
|
139
|
-
role: "list",
|
|
140
|
-
children: notes.map((note, index) =>
|
|
141
|
-
jsxDEV_7x81h0kn(
|
|
142
|
-
NoteCard,
|
|
143
|
-
{ ...note, index, docsBasePath },
|
|
144
|
-
note.slug,
|
|
145
|
-
false,
|
|
146
|
-
undefined,
|
|
147
|
-
this,
|
|
148
|
-
),
|
|
149
|
-
),
|
|
150
|
-
},
|
|
151
|
-
undefined,
|
|
152
|
-
false,
|
|
153
|
-
undefined,
|
|
154
|
-
this,
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
export function TopicList({
|
|
158
|
-
desc = "Click on the links below to explore the topics.",
|
|
159
|
-
style = { marginTop: "-2.5rem", marginBottom: "2.5rem", textAlign: "center" },
|
|
160
|
-
}) {
|
|
161
|
-
return jsxDEV_7x81h0kn(
|
|
162
|
-
"div",
|
|
163
|
-
{
|
|
164
|
-
style,
|
|
165
|
-
children: [
|
|
166
|
-
jsxDEV_7x81h0kn(
|
|
167
|
-
"p",
|
|
168
|
-
{ dangerouslySetInnerHTML: { __html: desc } },
|
|
169
|
-
undefined,
|
|
170
|
-
false,
|
|
171
|
-
undefined,
|
|
172
|
-
this,
|
|
173
|
-
),
|
|
174
|
-
jsxDEV_7x81h0kn(DocCardList, {}, undefined, false, undefined, this),
|
|
175
|
-
],
|
|
176
|
-
},
|
|
177
|
-
undefined,
|
|
178
|
-
true,
|
|
179
|
-
undefined,
|
|
180
|
-
this,
|
|
181
|
-
);
|
|
182
|
-
}
|
package/theme/css/bootstrap.css
DELETED
|
File without changes
|
|
File without changes
|