Rewrite
6
.eslintignore
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
.husky
|
||||||
|
.vscode
|
||||||
|
node_modules
|
||||||
|
public
|
||||||
|
dist
|
||||||
|
.yarn
|
23
.eslintrc.js
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
module.exports = {
|
||||||
|
env: {
|
||||||
|
node: true,
|
||||||
|
es2022: true,
|
||||||
|
browser: true,
|
||||||
|
},
|
||||||
|
extends: ["eslint:recommended", "plugin:astro/recommended"],
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: "latest",
|
||||||
|
sourceType: "module",
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ["*.astro"],
|
||||||
|
parser: "astro-eslint-parser",
|
||||||
|
parserOptions: {
|
||||||
|
parser: "@typescript-eslint/parser",
|
||||||
|
extraFileExtensions: [".astro"],
|
||||||
|
},
|
||||||
|
rules: {},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
39
.gitignore
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
# build output
|
||||||
|
dist/
|
||||||
|
.output/
|
||||||
|
dist.zip
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# logs
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
|
||||||
|
|
||||||
|
# environment variables
|
||||||
|
.env
|
||||||
|
.env.production
|
||||||
|
|
||||||
|
# macOS-specific files
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# ignore .astro directory
|
||||||
|
.astro
|
||||||
|
|
||||||
|
# ignore Jampack cache files
|
||||||
|
.jampack/
|
||||||
|
|
||||||
|
# yarn
|
||||||
|
.yarn/*
|
||||||
|
!.yarn/patches
|
||||||
|
!.yarn/plugins
|
||||||
|
!.yarn/releases
|
||||||
|
!.yarn/sdks
|
||||||
|
!.yarn/versions
|
||||||
|
.pnp.*
|
||||||
|
|
||||||
|
# blog
|
||||||
|
src/content/blog
|
4
.husky/pre-commit
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
. "$(dirname -- "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx lint-staged
|
5
.idea/.gitignore
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
125
.idea/.workspace.xml.~1614e1ad
generated
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AutoImportSettings">
|
||||||
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
|
</component>
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="001707ae-acae-4d7f-8b81-ae30629b8118" name="Changes" comment="" />
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="FileTemplateManagerImpl">
|
||||||
|
<option name="RECENT_TEMPLATES">
|
||||||
|
<list>
|
||||||
|
<option value="CSS File" />
|
||||||
|
<option value="JavaScript File" />
|
||||||
|
<option value="Astro Component" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectColorInfo">{
|
||||||
|
"associatedIndex": 8
|
||||||
|
}</component>
|
||||||
|
<component name="ProjectId" id="2gyJYMuj2FYRcYSjxshnxqqMAxs" />
|
||||||
|
<component name="ProjectViewState">
|
||||||
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
|
<option name="showLibraryContents" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent">{
|
||||||
|
"keyToString": {
|
||||||
|
"JavaScript Debug.localhost:4321.executor": "Run",
|
||||||
|
"Node.js.Unnamed.executor": "Run",
|
||||||
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"last_opened_file_path": "/home/massive/Dev/website/src/pages/contact",
|
||||||
|
"list.type.of.created.stylesheet": "CSS",
|
||||||
|
"node.js.detected.package.eslint": "true",
|
||||||
|
"node.js.detected.package.tslint": "true",
|
||||||
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
|
"nodejs_package_manager_path": "npm",
|
||||||
|
"npm.build.executor": "Run",
|
||||||
|
"npm.dev --host.executor": "Run",
|
||||||
|
"npm.dev.executor": "Run",
|
||||||
|
"settings.editor.selected.configurable": "watcher.settings",
|
||||||
|
"ts.external.directory.path": "/home/massive/Dev/website/node_modules/typescript/lib",
|
||||||
|
"vue.rearranger.settings.migration": "true"
|
||||||
|
}
|
||||||
|
}</component>
|
||||||
|
<component name="RecentsManager">
|
||||||
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
|
<recent name="$PROJECT_DIR$/src/pages/contact" />
|
||||||
|
<recent name="$PROJECT_DIR$/public" />
|
||||||
|
<recent name="$PROJECT_DIR$/src/content/pages" />
|
||||||
|
<recent name="$PROJECT_DIR$/src/pages" />
|
||||||
|
<recent name="$PROJECT_DIR$/public/assets" />
|
||||||
|
</key>
|
||||||
|
<key name="MoveFile.RECENT_KEYS">
|
||||||
|
<recent name="$PROJECT_DIR$" />
|
||||||
|
</key>
|
||||||
|
</component>
|
||||||
|
<component name="RunManager" selected="npm.dev">
|
||||||
|
<configuration name="build" type="js.build_tools.npm" nameIsGenerated="true">
|
||||||
|
<package-json value="$PROJECT_DIR$/package.json" />
|
||||||
|
<command value="run" />
|
||||||
|
<scripts>
|
||||||
|
<script value="build" />
|
||||||
|
</scripts>
|
||||||
|
<node-interpreter value="project" />
|
||||||
|
<envs />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<configuration name="dev" type="js.build_tools.npm" nameIsGenerated="true">
|
||||||
|
<package-json value="$PROJECT_DIR$/package.json" />
|
||||||
|
<command value="run" />
|
||||||
|
<scripts>
|
||||||
|
<script value="dev" />
|
||||||
|
</scripts>
|
||||||
|
<node-interpreter value="project" />
|
||||||
|
<envs />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<list>
|
||||||
|
<item itemvalue="npm.build" />
|
||||||
|
<item itemvalue="npm.dev" />
|
||||||
|
</list>
|
||||||
|
</component>
|
||||||
|
<component name="SharedIndexes">
|
||||||
|
<attachedChunks>
|
||||||
|
<set>
|
||||||
|
<option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-WS-241.17011.90" />
|
||||||
|
</set>
|
||||||
|
</attachedChunks>
|
||||||
|
</component>
|
||||||
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="001707ae-acae-4d7f-8b81-ae30629b8118" name="Changes" comment="" />
|
||||||
|
<created>1716663930272</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1716663930272</updated>
|
||||||
|
<workItem from="1716663931436" duration="8820000" />
|
||||||
|
<workItem from="1716711982151" duration="4548000" />
|
||||||
|
<workItem from="1716722994034" duration="1057000" />
|
||||||
|
<workItem from="1716752557400" duration="3447000" />
|
||||||
|
<workItem from="1716834371444" duration="12421000" />
|
||||||
|
<workItem from="1716881546273" duration="6394000" />
|
||||||
|
<workItem from="1717097685944" duration="5772000" />
|
||||||
|
<workItem from="1717183825428" duration="5319000" />
|
||||||
|
<workItem from="1717700345223" duration="5114000" />
|
||||||
|
<workItem from="1718037090569" duration="12037000" />
|
||||||
|
<workItem from="1718132719188" duration="6719000" />
|
||||||
|
<workItem from="1718313002958" duration="2163000" />
|
||||||
|
<workItem from="1720095094533" duration="5678000" />
|
||||||
|
<workItem from="1720103228993" duration="231000" />
|
||||||
|
<workItem from="1720103468928" duration="6739000" />
|
||||||
|
<workItem from="1720210527152" duration="8062000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
<option name="version" value="3" />
|
||||||
|
</component>
|
||||||
|
</project>
|
125
.idea/.workspace.xml.~3f6cc896
generated
Normal file
|
@ -0,0 +1,125 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AutoImportSettings">
|
||||||
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
|
</component>
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="001707ae-acae-4d7f-8b81-ae30629b8118" name="Changes" comment="" />
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="FileTemplateManagerImpl">
|
||||||
|
<option name="RECENT_TEMPLATES">
|
||||||
|
<list>
|
||||||
|
<option value="CSS File" />
|
||||||
|
<option value="JavaScript File" />
|
||||||
|
<option value="Astro Component" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectColorInfo">{
|
||||||
|
"associatedIndex": 8
|
||||||
|
}</component>
|
||||||
|
<component name="ProjectId" id="2gyJYMuj2FYRcYSjxshnxqqMAxs" />
|
||||||
|
<component name="ProjectViewState">
|
||||||
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
|
<option name="showLibraryContents" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent">{
|
||||||
|
"keyToString": {
|
||||||
|
"JavaScript Debug.localhost:4321.executor": "Run",
|
||||||
|
"Node.js.Unnamed.executor": "Run",
|
||||||
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"last_opened_file_path": "/home/massive/Dev/website/src/pages/contact",
|
||||||
|
"list.type.of.created.stylesheet": "CSS",
|
||||||
|
"node.js.detected.package.eslint": "true",
|
||||||
|
"node.js.detected.package.tslint": "true",
|
||||||
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
|
"nodejs_package_manager_path": "npm",
|
||||||
|
"npm.build.executor": "Run",
|
||||||
|
"npm.dev --host.executor": "Run",
|
||||||
|
"npm.dev.executor": "Run",
|
||||||
|
"settings.editor.selected.configurable": "watcher.settings",
|
||||||
|
"ts.external.directory.path": "/home/massive/Dev/website/node_modules/typescript/lib",
|
||||||
|
"vue.rearranger.settings.migration": "true"
|
||||||
|
}
|
||||||
|
}</component>
|
||||||
|
<component name="RecentsManager">
|
||||||
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
|
<recent name="$PROJECT_DIR$/src/pages/contact" />
|
||||||
|
<recent name="$PROJECT_DIR$/public" />
|
||||||
|
<recent name="$PROJECT_DIR$/src/content/pages" />
|
||||||
|
<recent name="$PROJECT_DIR$/src/pages" />
|
||||||
|
<recent name="$PROJECT_DIR$/public/assets" />
|
||||||
|
</key>
|
||||||
|
<key name="MoveFile.RECENT_KEYS">
|
||||||
|
<recent name="$PROJECT_DIR$" />
|
||||||
|
</key>
|
||||||
|
</component>
|
||||||
|
<component name="RunManager" selected="npm.dev">
|
||||||
|
<configuration name="build" type="js.build_tools.npm" nameIsGenerated="true">
|
||||||
|
<package-json value="$PROJECT_DIR$/package.json" />
|
||||||
|
<command value="run" />
|
||||||
|
<scripts>
|
||||||
|
<script value="build" />
|
||||||
|
</scripts>
|
||||||
|
<node-interpreter value="project" />
|
||||||
|
<envs />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<configuration name="dev" type="js.build_tools.npm" nameIsGenerated="true">
|
||||||
|
<package-json value="$PROJECT_DIR$/package.json" />
|
||||||
|
<command value="run" />
|
||||||
|
<scripts>
|
||||||
|
<script value="dev" />
|
||||||
|
</scripts>
|
||||||
|
<node-interpreter value="project" />
|
||||||
|
<envs />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<list>
|
||||||
|
<item itemvalue="npm.build" />
|
||||||
|
<item itemvalue="npm.dev" />
|
||||||
|
</list>
|
||||||
|
</component>
|
||||||
|
<component name="SharedIndexes">
|
||||||
|
<attachedChunks>
|
||||||
|
<set>
|
||||||
|
<option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-WS-241.17011.90" />
|
||||||
|
</set>
|
||||||
|
</attachedChunks>
|
||||||
|
</component>
|
||||||
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="001707ae-acae-4d7f-8b81-ae30629b8118" name="Changes" comment="" />
|
||||||
|
<created>1716663930272</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1716663930272</updated>
|
||||||
|
<workItem from="1716663931436" duration="8820000" />
|
||||||
|
<workItem from="1716711982151" duration="4548000" />
|
||||||
|
<workItem from="1716722994034" duration="1057000" />
|
||||||
|
<workItem from="1716752557400" duration="3447000" />
|
||||||
|
<workItem from="1716834371444" duration="12421000" />
|
||||||
|
<workItem from="1716881546273" duration="6394000" />
|
||||||
|
<workItem from="1717097685944" duration="5772000" />
|
||||||
|
<workItem from="1717183825428" duration="5319000" />
|
||||||
|
<workItem from="1717700345223" duration="5114000" />
|
||||||
|
<workItem from="1718037090569" duration="12037000" />
|
||||||
|
<workItem from="1718132719188" duration="6719000" />
|
||||||
|
<workItem from="1718313002958" duration="2163000" />
|
||||||
|
<workItem from="1720095094533" duration="5678000" />
|
||||||
|
<workItem from="1720103228993" duration="231000" />
|
||||||
|
<workItem from="1720103468928" duration="6739000" />
|
||||||
|
<workItem from="1720210527152" duration="8062000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
<option name="version" value="3" />
|
||||||
|
</component>
|
||||||
|
</project>
|
58
.idea/codeStyles/Project.xml
generated
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<option name="LINE_SEPARATOR" value=" " />
|
||||||
|
<HTMLCodeStyleSettings>
|
||||||
|
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
||||||
|
</HTMLCodeStyleSettings>
|
||||||
|
<JSCodeStyleSettings version="0">
|
||||||
|
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
||||||
|
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
||||||
|
<option name="FORCE_QUOTE_STYlE" value="true" />
|
||||||
|
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
||||||
|
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
||||||
|
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
||||||
|
</JSCodeStyleSettings>
|
||||||
|
<TypeScriptCodeStyleSettings version="0">
|
||||||
|
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
||||||
|
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
||||||
|
<option name="FORCE_QUOTE_STYlE" value="true" />
|
||||||
|
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
||||||
|
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
||||||
|
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
||||||
|
</TypeScriptCodeStyleSettings>
|
||||||
|
<VueCodeStyleSettings>
|
||||||
|
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
||||||
|
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
||||||
|
</VueCodeStyleSettings>
|
||||||
|
<codeStyleSettings language="HTML">
|
||||||
|
<option name="SOFT_MARGINS" value="80" />
|
||||||
|
<indentOptions>
|
||||||
|
<option name="INDENT_SIZE" value="2" />
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||||
|
<option name="TAB_SIZE" value="2" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
|
<codeStyleSettings language="JavaScript">
|
||||||
|
<option name="SOFT_MARGINS" value="80" />
|
||||||
|
<indentOptions>
|
||||||
|
<option name="INDENT_SIZE" value="2" />
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||||
|
<option name="TAB_SIZE" value="2" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
|
<codeStyleSettings language="TypeScript">
|
||||||
|
<option name="SOFT_MARGINS" value="80" />
|
||||||
|
<indentOptions>
|
||||||
|
<option name="INDENT_SIZE" value="2" />
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||||
|
<option name="TAB_SIZE" value="2" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
|
<codeStyleSettings language="Vue">
|
||||||
|
<option name="SOFT_MARGINS" value="80" />
|
||||||
|
<indentOptions>
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
5
.idea/codeStyles/codeStyleConfig.xml
generated
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||||
|
</state>
|
||||||
|
</component>
|
23
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
<inspection_tool class="HtmlUnknownTag" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="myValues">
|
||||||
|
<value>
|
||||||
|
<list size="8">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="nobr" />
|
||||||
|
<item index="1" class="java.lang.String" itemvalue="noembed" />
|
||||||
|
<item index="2" class="java.lang.String" itemvalue="comment" />
|
||||||
|
<item index="3" class="java.lang.String" itemvalue="noscript" />
|
||||||
|
<item index="4" class="java.lang.String" itemvalue="embed" />
|
||||||
|
<item index="5" class="java.lang.String" itemvalue="script" />
|
||||||
|
<item index="6" class="java.lang.String" itemvalue="Navbar.Burger" />
|
||||||
|
<item index="7" class="java.lang.String" itemvalue="Navbar.Menu" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
<option name="myCustomValuesEnabled" value="true" />
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
8
.idea/modules.xml
generated
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/website.iml" filepath="$PROJECT_DIR$/.idea/website.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/vcs.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
4
.idea/watcherTasks.xml
generated
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectTasksOptions" suppressed-tasks="Sass;SCSS" />
|
||||||
|
</project>
|
12
.idea/website.iml
generated
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
140
.idea/workspace.sync-conflict-20240924-210748-XVD6GGL.xml
generated
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AutoImportSettings">
|
||||||
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
|
</component>
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="001707ae-acae-4d7f-8b81-ae30629b8118" name="Changes" comment="" />
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="FileTemplateManagerImpl">
|
||||||
|
<option name="RECENT_TEMPLATES">
|
||||||
|
<list>
|
||||||
|
<option value="CSS File" />
|
||||||
|
<option value="JavaScript File" />
|
||||||
|
<option value="Astro Component" />
|
||||||
|
<option value="TypeScript File" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectColorInfo">{
|
||||||
|
"associatedIndex": 8
|
||||||
|
}</component>
|
||||||
|
<component name="ProjectId" id="2gyJYMuj2FYRcYSjxshnxqqMAxs" />
|
||||||
|
<component name="ProjectViewState">
|
||||||
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
|
<option name="showLibraryContents" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent">{
|
||||||
|
"keyToString": {
|
||||||
|
"JavaScript Debug.localhost:4321.executor": "Run",
|
||||||
|
"Node.js.Unnamed.executor": "Run",
|
||||||
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"last_opened_file_path": "/home/massive/Dev/website/src/content/blog",
|
||||||
|
"list.type.of.created.stylesheet": "CSS",
|
||||||
|
"node.js.detected.package.eslint": "true",
|
||||||
|
"node.js.detected.package.tslint": "true",
|
||||||
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
|
"nodejs_package_manager_path": "npm",
|
||||||
|
"npm.build.executor": "Run",
|
||||||
|
"npm.dev --host.executor": "Run",
|
||||||
|
"npm.dev.executor": "Run",
|
||||||
|
"settings.editor.selected.configurable": "watcher.settings",
|
||||||
|
"ts.external.directory.path": "/home/massive/Dev/website/node_modules/typescript/lib",
|
||||||
|
"vue.rearranger.settings.migration": "true"
|
||||||
|
}
|
||||||
|
}</component>
|
||||||
|
<component name="RecentsManager">
|
||||||
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
|
<recent name="$PROJECT_DIR$/src/content/blog" />
|
||||||
|
<recent name="$PROJECT_DIR$/src/pages" />
|
||||||
|
<recent name="$PROJECT_DIR$/src/pages/contact" />
|
||||||
|
<recent name="$PROJECT_DIR$/public" />
|
||||||
|
<recent name="$PROJECT_DIR$/src/content/pages" />
|
||||||
|
</key>
|
||||||
|
<key name="MoveFile.RECENT_KEYS">
|
||||||
|
<recent name="$PROJECT_DIR$/public/assets" />
|
||||||
|
<recent name="$PROJECT_DIR$" />
|
||||||
|
</key>
|
||||||
|
</component>
|
||||||
|
<component name="RunManager" selected="npm.build">
|
||||||
|
<configuration name="build" type="js.build_tools.npm" nameIsGenerated="true">
|
||||||
|
<package-json value="$PROJECT_DIR$/package.json" />
|
||||||
|
<command value="run" />
|
||||||
|
<scripts>
|
||||||
|
<script value="build" />
|
||||||
|
</scripts>
|
||||||
|
<node-interpreter value="project" />
|
||||||
|
<envs />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<configuration name="dev" type="js.build_tools.npm" nameIsGenerated="true">
|
||||||
|
<package-json value="$PROJECT_DIR$/package.json" />
|
||||||
|
<command value="run" />
|
||||||
|
<scripts>
|
||||||
|
<script value="dev" />
|
||||||
|
</scripts>
|
||||||
|
<node-interpreter value="project" />
|
||||||
|
<envs />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<list>
|
||||||
|
<item itemvalue="npm.build" />
|
||||||
|
<item itemvalue="npm.dev" />
|
||||||
|
</list>
|
||||||
|
</component>
|
||||||
|
<component name="SharedIndexes">
|
||||||
|
<attachedChunks>
|
||||||
|
<set>
|
||||||
|
<option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-WS-241.17011.90" />
|
||||||
|
</set>
|
||||||
|
</attachedChunks>
|
||||||
|
</component>
|
||||||
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="001707ae-acae-4d7f-8b81-ae30629b8118" name="Changes" comment="" />
|
||||||
|
<created>1716663930272</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1716663930272</updated>
|
||||||
|
<workItem from="1716663931436" duration="8820000" />
|
||||||
|
<workItem from="1716711982151" duration="4548000" />
|
||||||
|
<workItem from="1716722994034" duration="1057000" />
|
||||||
|
<workItem from="1716752557400" duration="3447000" />
|
||||||
|
<workItem from="1716834371444" duration="12421000" />
|
||||||
|
<workItem from="1716881546273" duration="6394000" />
|
||||||
|
<workItem from="1717097685944" duration="5772000" />
|
||||||
|
<workItem from="1717183825428" duration="5319000" />
|
||||||
|
<workItem from="1717700345223" duration="5114000" />
|
||||||
|
<workItem from="1718037090569" duration="12037000" />
|
||||||
|
<workItem from="1718132719188" duration="6719000" />
|
||||||
|
<workItem from="1718313002958" duration="2163000" />
|
||||||
|
<workItem from="1720095094533" duration="5678000" />
|
||||||
|
<workItem from="1720103228993" duration="231000" />
|
||||||
|
<workItem from="1720103468928" duration="6739000" />
|
||||||
|
<workItem from="1720210527152" duration="8062000" />
|
||||||
|
<workItem from="1720810701145" duration="6508000" />
|
||||||
|
<workItem from="1721114353574" duration="9589000" />
|
||||||
|
<workItem from="1721201074971" duration="13333000" />
|
||||||
|
<workItem from="1721682868864" duration="3726000" />
|
||||||
|
<workItem from="1721728352517" duration="17607000" />
|
||||||
|
<workItem from="1721808118785" duration="52668000" />
|
||||||
|
<workItem from="1722537806385" duration="1080000" />
|
||||||
|
<workItem from="1722591971234" duration="8060000" />
|
||||||
|
<workItem from="1722926793892" duration="1858000" />
|
||||||
|
<workItem from="1722930171277" duration="3925000" />
|
||||||
|
<workItem from="1723123796550" duration="1901000" />
|
||||||
|
<workItem from="1723125710139" duration="7928000" />
|
||||||
|
<workItem from="1723285063430" duration="5988000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
<option name="version" value="3" />
|
||||||
|
</component>
|
||||||
|
</project>
|
4
.markdownlint.json
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"MD033": false,
|
||||||
|
"MD013": false
|
||||||
|
}
|
2
.npmrc
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# Expose Astro dependencies for `pnpm` users
|
||||||
|
shamefully-hoist=true
|
13
.prettierignore
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# Ignore everything
|
||||||
|
/*
|
||||||
|
|
||||||
|
# Except these files & folders
|
||||||
|
!/src
|
||||||
|
!/public
|
||||||
|
!/.github
|
||||||
|
!tsconfig.json
|
||||||
|
!astro.config.ts
|
||||||
|
!package.json
|
||||||
|
!.prettierrc
|
||||||
|
!.eslintrc.js
|
||||||
|
!README.md
|
20
.prettierrc
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"arrowParens": "avoid",
|
||||||
|
"semi": true,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"printWidth": 80,
|
||||||
|
"singleQuote": false,
|
||||||
|
"jsxSingleQuote": false,
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"endOfLine": "lf",
|
||||||
|
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": "*.astro",
|
||||||
|
"options": {
|
||||||
|
"parser": "astro"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
687
LICENSE
Normal file
|
@ -0,0 +1,687 @@
|
||||||
|
==== Original license for the AstroPaper Theme Code ====
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2023 Sat Naing
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
===== License for all the changes implemented by MassiveBox =====
|
||||||
|
|
||||||
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU Affero General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works, specifically designed to ensure
|
||||||
|
cooperation with the community in the case of network server software.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
our General Public Licenses are intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
Developers that use our General Public Licenses protect your rights
|
||||||
|
with two steps: (1) assert copyright on the software, and (2) offer
|
||||||
|
you this License which gives you legal permission to copy, distribute
|
||||||
|
and/or modify the software.
|
||||||
|
|
||||||
|
A secondary benefit of defending all users' freedom is that
|
||||||
|
improvements made in alternate versions of the program, if they
|
||||||
|
receive widespread use, become available for other developers to
|
||||||
|
incorporate. Many developers of free software are heartened and
|
||||||
|
encouraged by the resulting cooperation. However, in the case of
|
||||||
|
software used on network servers, this result may fail to come about.
|
||||||
|
The GNU General Public License permits making a modified version and
|
||||||
|
letting the public access it on a server without ever releasing its
|
||||||
|
source code to the public.
|
||||||
|
|
||||||
|
The GNU Affero General Public License is designed specifically to
|
||||||
|
ensure that, in such cases, the modified source code becomes available
|
||||||
|
to the community. It requires the operator of a network server to
|
||||||
|
provide the source code of the modified version running there to the
|
||||||
|
users of that server. Therefore, public use of a modified version, on
|
||||||
|
a publicly accessible server, gives the public access to the source
|
||||||
|
code of the modified version.
|
||||||
|
|
||||||
|
An older license, called the Affero General Public License and
|
||||||
|
published by Affero, was designed to accomplish similar goals. This is
|
||||||
|
a different license, not a version of the Affero GPL, but Affero has
|
||||||
|
released a new version of the Affero GPL which permits relicensing under
|
||||||
|
this license.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, if you modify the
|
||||||
|
Program, your modified version must prominently offer all users
|
||||||
|
interacting with it remotely through a computer network (if your version
|
||||||
|
supports such interaction) an opportunity to receive the Corresponding
|
||||||
|
Source of your version by providing access to the Corresponding Source
|
||||||
|
from a network server at no charge, through some standard or customary
|
||||||
|
means of facilitating copying of software. This Corresponding Source
|
||||||
|
shall include the Corresponding Source for any work covered by version 3
|
||||||
|
of the GNU General Public License that is incorporated pursuant to the
|
||||||
|
following paragraph.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the work with which it is combined will remain governed by version
|
||||||
|
3 of the GNU General Public License.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU Affero General Public License from time to time. Such new versions
|
||||||
|
will be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU Affero General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU Affero General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU Affero General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU Affero General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer
|
||||||
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
|
interface could display a "Source" link that leads users to an archive
|
||||||
|
of the code. There are many ways you could offer source, and different
|
||||||
|
solutions will be better for different programs; see section 13 for the
|
||||||
|
specific requirements.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
53
README.md
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
# MassiveBox's Website
|
||||||
|
|
||||||
|
A statically generated website and blog, built with [Astro](https://astro.build/) and based on the
|
||||||
|
[Astro Paper](https://astro-paper.pages.dev/) theme.
|
||||||
|
|
||||||
|
Check it out at [massive.box](https://massive.box).
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
```shell
|
||||||
|
npm install
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
In order to compile the site, run
|
||||||
|
```shell
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
The website will be built to the `./dist` folder.
|
||||||
|
|
||||||
|
## Blogging with Joplin
|
||||||
|
|
||||||
|
You can use Joplin to write and manageyour blog posts, instead of just placing the Markdown files in the
|
||||||
|
`src/content/blog` folder.
|
||||||
|
|
||||||
|
1. Install [Joplin](https://joplinapp.org/)
|
||||||
|
2. Start the Web Clipper Service: Tools > Options > Web Clipper > Start Web Clipper Service
|
||||||
|
3. Run `npm run joplin`
|
||||||
|
4. Allow the request for an API token on the Joplin app
|
||||||
|
|
||||||
|
The script will look for a notebook named `Blog`. It will then download all notes from that notebook, alongside their
|
||||||
|
attachments, and place them in the `src/content/blog` folder.
|
||||||
|
|
||||||
|
You can embed attachments in your notes, and they will work normally in the blog.
|
||||||
|
You might need to restart the development server after running the Joplin script.
|
||||||
|
|
||||||
|
In order, to have an ogImage (also known as article cover):
|
||||||
|
1. Add the image to the note, and change the alt text to `ogImage`. It will look like this:
|
||||||
|
```
|
||||||
|

|
||||||
|
```
|
||||||
|
2. Copy the attachment ID (in this example, it's `0f409e2b6faf44e48c5c0d99453d02c0`)
|
||||||
|
3. Paste it in your frontmatter like this:
|
||||||
|
```
|
||||||
|
ogImage: ./0f409e2b6faf44e48c5c0d99453d02c0
|
||||||
|
```
|
||||||
|
Note the `.` (dot) instead of `:` (colon)!
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The original [Astro Paper](https://github.com/satnaing/astro-paper) is licensed under the MIT License, Copyright © 2025
|
||||||
|
[Sat Naing](https://github.com/satnaing).
|
||||||
|
Any change to the original code is licensed under the AGPLv3 License, Copyright © 2025 MassiveBox.
|
36
astro.config.ts
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
import { defineConfig } from "astro/config";
|
||||||
|
import react from "@astrojs/react";
|
||||||
|
import remarkToc from "remark-toc";
|
||||||
|
import remarkCollapse from "remark-collapse";
|
||||||
|
import sitemap from "@astrojs/sitemap";
|
||||||
|
import { SITE } from "./src/config";
|
||||||
|
import "@iconify-json/fa6-solid";
|
||||||
|
|
||||||
|
import icon from "astro-icon";
|
||||||
|
|
||||||
|
// https://astro.build/config
|
||||||
|
export default defineConfig({
|
||||||
|
site: SITE.website,
|
||||||
|
integrations: [
|
||||||
|
react(), sitemap(),
|
||||||
|
icon({include: {
|
||||||
|
'fa6-solid': ["*"],
|
||||||
|
'simple-icons': ["*"]
|
||||||
|
}})
|
||||||
|
],
|
||||||
|
markdown: {
|
||||||
|
remarkPlugins: [remarkToc, [remarkCollapse, {
|
||||||
|
test: "Table of contents"
|
||||||
|
}]],
|
||||||
|
shikiConfig: {
|
||||||
|
theme: "one-dark-pro",
|
||||||
|
wrap: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
vite: {
|
||||||
|
optimizeDeps: {
|
||||||
|
exclude: ["@resvg/resvg-js"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scopedStyleStrategy: "where",
|
||||||
|
});
|
50
custom.scss
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
$main-color: #001440;
|
||||||
|
$main-color-dark: #071022;
|
||||||
|
|
||||||
|
$navbar-background-color: $main-color !important;
|
||||||
|
$bulma-hover-background-l-delta: 0;
|
||||||
|
|
||||||
|
|
||||||
|
@import "bulma/sass";
|
||||||
|
|
||||||
|
@mixin default-page-content-spacing {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 46rem;
|
||||||
|
padding: 3rem 1rem 1rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#main-content {
|
||||||
|
@include default-page-content-spacing;
|
||||||
|
margin: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.navbar {
|
||||||
|
padding-left: 5vw;
|
||||||
|
padding-right: 5vw;
|
||||||
|
height: 10vh;
|
||||||
|
min-height: 65px;
|
||||||
|
}
|
||||||
|
nav.navbar * {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
a.navbar-item:hover, a.navbar-item:active, a.navbar-item:focus {
|
||||||
|
background-color: #05122e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-background-main { background-color: $main-color; }
|
||||||
|
|
||||||
|
|
||||||
|
@media (max-width: 1023px) {
|
||||||
|
nav.navbar {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
height: 8vh;
|
||||||
|
}
|
||||||
|
.navbar-brand {
|
||||||
|
padding-left: 6px;
|
||||||
|
padding-right: 6px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
11
docker-compose.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: node:18
|
||||||
|
ports:
|
||||||
|
- 4321:4321
|
||||||
|
working_dir: /app
|
||||||
|
command: npm run dev -- --host 0.0.0.0
|
||||||
|
volumes:
|
||||||
|
- ./:/app
|
14195
package-lock.json
generated
Normal file
71
package.json
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
{
|
||||||
|
"name": "website",
|
||||||
|
"version": "4.2.0",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "astro dev --host",
|
||||||
|
"start": "astro dev",
|
||||||
|
"build": "astro check && astro build && jampack ./dist",
|
||||||
|
"preview": "astro preview",
|
||||||
|
"sync": "astro sync",
|
||||||
|
"astro": "astro",
|
||||||
|
"format:check": "prettier --check . --plugin=prettier-plugin-astro",
|
||||||
|
"format": "prettier --write . --plugin=prettier-plugin-astro",
|
||||||
|
"cz": "cz",
|
||||||
|
"prepare": "husky install",
|
||||||
|
"lint": "eslint .",
|
||||||
|
"joplin": "node src/utils/joplin.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@astrojs/check": "^0.7.0",
|
||||||
|
"@astrojs/rss": "^4.0.2",
|
||||||
|
"@iconify-json/fa6-brands": "^1.1.19",
|
||||||
|
"@iconify-json/simple-icons": "^1.1.105",
|
||||||
|
"@resvg/resvg-js": "^2.6.0",
|
||||||
|
"astro": "^4.2.1",
|
||||||
|
"astro-icon": "^1.1.0",
|
||||||
|
"bulma": "^1.0.1",
|
||||||
|
"fuse.js": "^7.0.0",
|
||||||
|
"github-slugger": "^2.0.0",
|
||||||
|
"marked": "^13.0.2",
|
||||||
|
"react-bulma-components": "^4.1.0",
|
||||||
|
"remark-collapse": "^0.1.2",
|
||||||
|
"remark-toc": "^9.0.0",
|
||||||
|
"sass": "^1.77.2",
|
||||||
|
"satori": "^0.10.11",
|
||||||
|
"tailwindcss": "^3.4.1",
|
||||||
|
"typescript": "^5.4.5"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@astrojs/react": "^3.0.9",
|
||||||
|
"@astrojs/sitemap": "^3.0.5",
|
||||||
|
"@astrojs/tailwind": "^5.1.0",
|
||||||
|
"@divriots/jampack": "^0.23.2",
|
||||||
|
"@iconify-json/fa6-solid": "^1.1.21",
|
||||||
|
"@tailwindcss/typography": "^0.5.10",
|
||||||
|
"@types/github-slugger": "^1.3.0",
|
||||||
|
"@types/react": "^18.2.48",
|
||||||
|
"@typescript-eslint/parser": "^6.19.0",
|
||||||
|
"astro-eslint-parser": "^0.16.2",
|
||||||
|
"commitizen": "^4.3.0",
|
||||||
|
"cz-conventional-changelog": "^3.3.0",
|
||||||
|
"eslint": "^8.56.0",
|
||||||
|
"eslint-plugin-astro": "^0.31.3",
|
||||||
|
"husky": "^8.0.3",
|
||||||
|
"lint-staged": "^15.2.0",
|
||||||
|
"prettier": "^3.2.4",
|
||||||
|
"prettier-plugin-astro": "^0.13.0",
|
||||||
|
"prettier-plugin-tailwindcss": "^0.5.11",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dom": "^18.2.0"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"commitizen": {
|
||||||
|
"path": "./node_modules/cz-conventional-changelog"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.{js,jsx,ts,tsx,md,mdx,json,astro}": [
|
||||||
|
"prettier --write --plugin=prettier-plugin-astro"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
BIN
public/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
public/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
public/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
public/assets/icon-28.webp
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
public/assets/icon-64.webp
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
public/assets/icon-nobg-small.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
public/assets/maurizio.jpg
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
public/assets/spinning-mobile.webp
Normal file
After Width: | Height: | Size: 1.8 MiB |
BIN
public/assets/spinning.webp
Normal file
After Width: | Height: | Size: 1.2 MiB |
9
public/browserconfig.xml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<browserconfig>
|
||||||
|
<msapplication>
|
||||||
|
<tile>
|
||||||
|
<square150x150logo src="/mstile-150x150.png"/>
|
||||||
|
<TileColor>#050732</TileColor>
|
||||||
|
</tile>
|
||||||
|
</msapplication>
|
||||||
|
</browserconfig>
|
BIN
public/favicon-16x16.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
public/favicon-32x32.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
public/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
13
public/favicon.svg
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 36 36">
|
||||||
|
<path fill="#000" d="M22.25 4h-8.5a1 1 0 0 0-.96.73l-5.54 19.4a.5.5 0 0 0 .62.62l5.05-1.44a2 2 0 0 0 1.38-1.4l3.22-11.66a.5.5 0 0 1 .96 0l3.22 11.67a2 2 0 0 0 1.38 1.39l5.05 1.44a.5.5 0 0 0 .62-.62l-5.54-19.4a1 1 0 0 0-.96-.73Z"/>
|
||||||
|
<path fill="url(#gradient)" d="M18 28a7.63 7.63 0 0 1-5-2c-1.4 2.1-.35 4.35.6 5.55.14.17.41.07.47-.15.44-1.8 2.93-1.22 2.93.6 0 2.28.87 3.4 1.72 3.81.34.16.59-.2.49-.56-.31-1.05-.29-2.46 1.29-3.25 3-1.5 3.17-4.83 2.5-6-.67.67-2.6 2-5 2Z"/>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="gradient" x1="16" x2="16" y1="32" y2="24" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#000"/>
|
||||||
|
<stop offset="1" stop-color="#000" stop-opacity="0"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<style>
|
||||||
|
@media (prefers-color-scheme:dark){:root{filter:invert(100%)}}
|
||||||
|
</style>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 873 B |
BIN
public/mstile-150x150.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/og.webp
Normal file
After Width: | Height: | Size: 42 KiB |
36
public/safari-pinned-tab.svg
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||||
|
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||||
|
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="1024.000000pt" height="1024.000000pt" viewBox="0 0 1024.000000 1024.000000"
|
||||||
|
preserveAspectRatio="xMidYMid meet">
|
||||||
|
<metadata>
|
||||||
|
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||||
|
</metadata>
|
||||||
|
<g transform="translate(0.000000,1024.000000) scale(0.100000,-0.100000)"
|
||||||
|
fill="#000000" stroke="none">
|
||||||
|
<path d="M5020 10218 c-109 -27 -410 -108 -445 -119 -16 -5 -100 -30 -185 -55
|
||||||
|
-287 -84 -730 -241 -915 -324 -27 -12 -59 -26 -70 -30 -183 -76 -469 -219
|
||||||
|
-698 -349 -211 -119 -514 -320 -732 -484 -88 -67 -165 -126 -171 -131 -6 -6
|
||||||
|
-26 -22 -44 -36 -18 -14 -38 -29 -44 -35 -6 -5 -51 -44 -101 -85 -183 -152
|
||||||
|
-378 -333 -665 -618 -135 -133 -253 -257 -263 -275 -28 -54 -200 -699 -241
|
||||||
|
-907 -7 -33 -56 -279 -62 -305 -2 -10 -6 -35 -9 -55 -3 -20 -8 -47 -10 -60 -6
|
||||||
|
-30 -22 -130 -30 -185 -3 -22 -8 -51 -10 -65 -3 -14 -7 -50 -10 -80 -3 -30 -8
|
||||||
|
-66 -10 -80 -2 -14 -6 -52 -9 -85 -3 -33 -9 -85 -12 -115 -30 -293 -35 -870
|
||||||
|
-9 -1130 2 -19 6 -69 9 -110 4 -41 8 -91 11 -110 3 -19 7 -55 10 -80 10 -94
|
||||||
|
38 -301 50 -370 3 -14 12 -65 21 -115 70 -404 274 -1216 322 -1282 11 -15 139
|
||||||
|
-145 285 -288 278 -273 298 -293 442 -420 50 -44 92 -83 95 -86 4 -4 271 -225
|
||||||
|
330 -272 8 -7 60 -46 115 -88 592 -445 1189 -765 1920 -1029 427 -154 1174
|
||||||
|
-366 1255 -356 44 6 484 122 650 172 213 64 418 131 569 186 727 261 1361 604
|
||||||
|
1941 1047 85 65 221 172 230 181 3 3 32 28 65 55 118 98 168 142 340 299 157
|
||||||
|
142 583 567 608 606 13 19 33 71 46 115 31 109 121 444 127 475 3 14 14 59 24
|
||||||
|
101 16 62 51 216 76 334 43 204 105 581 120 735 2 25 6 61 9 80 2 19 7 71 11
|
||||||
|
115 4 44 8 94 10 110 7 69 16 371 16 515 0 155 -11 480 -17 490 -1 3 -6 52
|
||||||
|
-10 109 -3 57 -8 111 -10 120 -1 9 -6 48 -9 86 -4 39 -11 95 -16 125 -5 30
|
||||||
|
-11 76 -15 103 -9 77 -53 324 -81 458 -14 68 -27 133 -29 144 -50 240 -213
|
||||||
|
856 -242 911 -15 29 -408 426 -568 574 -185 171 -375 336 -510 443 -33 27 -76
|
||||||
|
61 -95 76 -19 16 -69 54 -110 84 -41 31 -79 60 -85 64 -25 21 -156 112 -277
|
||||||
|
192 -582 386 -1201 671 -1988 915 -80 25 -170 51 -200 60 -30 8 -87 24 -126
|
||||||
|
35 -159 46 -431 114 -464 116 -19 1 -69 -6 -110 -17z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
19
public/site.webmanifest
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"name": "MassiveBox",
|
||||||
|
"short_name": "MassiveBox",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-192x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/android-chrome-512x512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"theme_color": "#050732",
|
||||||
|
"background_color": "#050732",
|
||||||
|
"display": "standalone"
|
||||||
|
}
|
76
public/toggle-theme.js
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
const primaryColorScheme = ""; // "light" | "dark"
|
||||||
|
|
||||||
|
// Get theme data from local storage
|
||||||
|
const currentTheme = localStorage.getItem("theme");
|
||||||
|
|
||||||
|
function getPreferTheme() {
|
||||||
|
// return theme value in local storage if it is set
|
||||||
|
if (currentTheme) return currentTheme;
|
||||||
|
|
||||||
|
// return primary color scheme if it is set
|
||||||
|
if (primaryColorScheme) return primaryColorScheme;
|
||||||
|
|
||||||
|
// return user device's prefer color scheme
|
||||||
|
return window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||||
|
? "dark"
|
||||||
|
: "light";
|
||||||
|
}
|
||||||
|
|
||||||
|
let themeValue = getPreferTheme();
|
||||||
|
|
||||||
|
function setPreference() {
|
||||||
|
localStorage.setItem("theme", themeValue);
|
||||||
|
reflectPreference();
|
||||||
|
}
|
||||||
|
|
||||||
|
function reflectPreference() {
|
||||||
|
document.firstElementChild.setAttribute("data-theme", themeValue);
|
||||||
|
|
||||||
|
document.querySelector("#theme-btn")?.setAttribute("aria-label", themeValue);
|
||||||
|
|
||||||
|
// Get a reference to the body element
|
||||||
|
const body = document.body;
|
||||||
|
|
||||||
|
// Check if the body element exists before using getComputedStyle
|
||||||
|
if (body) {
|
||||||
|
// Get the computed styles for the body element
|
||||||
|
const computedStyles = window.getComputedStyle(body);
|
||||||
|
|
||||||
|
// Get the background color property
|
||||||
|
const bgColor = computedStyles.backgroundColor;
|
||||||
|
|
||||||
|
// Set the background color in <meta theme-color ... />
|
||||||
|
document
|
||||||
|
.querySelector("meta[name='theme-color']")
|
||||||
|
?.setAttribute("content", bgColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// set early so no page flashes / CSS is made aware
|
||||||
|
reflectPreference();
|
||||||
|
|
||||||
|
window.onload = () => {
|
||||||
|
function setThemeFeature() {
|
||||||
|
// set on load so screen readers can get the latest value on the button
|
||||||
|
reflectPreference();
|
||||||
|
|
||||||
|
// now this script can find and listen for clicks on the control
|
||||||
|
document.querySelector("#theme-btn")?.addEventListener("click", () => {
|
||||||
|
themeValue = themeValue === "light" ? "dark" : "light";
|
||||||
|
setPreference();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
setThemeFeature();
|
||||||
|
|
||||||
|
// Runs on view transitions navigation
|
||||||
|
document.addEventListener("astro:after-swap", setThemeFeature);
|
||||||
|
};
|
||||||
|
|
||||||
|
// sync with system changes
|
||||||
|
window
|
||||||
|
.matchMedia("(prefers-color-scheme: dark)")
|
||||||
|
.addEventListener("change", ({ matches: isDark }) => {
|
||||||
|
themeValue = isDark ? "dark" : "light";
|
||||||
|
setPreference();
|
||||||
|
});
|
1
remark-collapse.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
declare module 'remark-collapse';
|
58
src/components/BlogCard.astro
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
---
|
||||||
|
import Datetime from "./Datetime.astro";
|
||||||
|
import { Card, Heading } from "react-bulma-components";
|
||||||
|
import { slugifyStr } from '../utils/slugify.js';
|
||||||
|
import { SITE } from '../config.js';
|
||||||
|
import Tag from "./Tag.astro";
|
||||||
|
|
||||||
|
interface Frontmatter {
|
||||||
|
title: string;
|
||||||
|
pubDatetime: Date | string;
|
||||||
|
modDatetime?: Date | null | string;
|
||||||
|
description: string;
|
||||||
|
ogImage?: string | object;
|
||||||
|
tags: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
href?: string;
|
||||||
|
frontmatter: Frontmatter;
|
||||||
|
secHeading?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { href, frontmatter } = Astro.props;
|
||||||
|
|
||||||
|
function getOgImageUrl(frontmatter: Frontmatter): string {
|
||||||
|
if (typeof frontmatter.ogImage === 'string') {
|
||||||
|
return frontmatter.ogImage !== ''
|
||||||
|
? frontmatter.ogImage
|
||||||
|
: SITE.ogImage;
|
||||||
|
}
|
||||||
|
if (typeof frontmatter.ogImage === 'object' && 'src' in frontmatter.ogImage) {
|
||||||
|
return (frontmatter.ogImage as { src: string }).src;
|
||||||
|
}
|
||||||
|
return SITE.ogImage;
|
||||||
|
}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<a href={href}>
|
||||||
|
<Card className={"view-transition-" + slugifyStr(frontmatter.title) + " mb-3" } >
|
||||||
|
<div class="card-image">
|
||||||
|
<figure class="image">
|
||||||
|
<img
|
||||||
|
src={getOgImageUrl(frontmatter)}
|
||||||
|
alt="Article image preview"
|
||||||
|
onerror='this.onerror = null; this.src="./og.webp"'
|
||||||
|
fetchpriority="low"
|
||||||
|
/>
|
||||||
|
</figure>
|
||||||
|
</div>
|
||||||
|
<Card.Content>
|
||||||
|
<Heading size={3}>{frontmatter.title}</Heading>
|
||||||
|
{frontmatter.tags.map(tag => <Tag tag={slugifyStr(tag)} />)}
|
||||||
|
<Datetime pubDatetime={frontmatter.pubDatetime} modDatetime={frontmatter.modDatetime} className="mb-1" />
|
||||||
|
<p>{frontmatter.description}</p>
|
||||||
|
</Card.Content>
|
||||||
|
</Card>
|
||||||
|
</a>
|
72
src/components/Breadcrumbs.astro
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
---
|
||||||
|
// Remove current url path and remove trailing slash if exists
|
||||||
|
const currentUrlPath = Astro.url.pathname.replace(/\/+$/, "");
|
||||||
|
|
||||||
|
// Get url array from path
|
||||||
|
// eg: /tags/tailwindcss => ['tags', 'tailwindcss']
|
||||||
|
const breadcrumbList = currentUrlPath.split("/").slice(1);
|
||||||
|
|
||||||
|
// if breadcrumb is Home > Posts > 1 <etc>
|
||||||
|
// replace Posts with Posts (page number)
|
||||||
|
breadcrumbList[0] === "blog" &&
|
||||||
|
breadcrumbList.splice(0, 2, `Posts (page ${breadcrumbList[1] || 1})`);
|
||||||
|
|
||||||
|
// if breadcrumb is Home > Tags > [tag] > [page] <etc>
|
||||||
|
// replace [tag] > [page] with [tag] (page number)
|
||||||
|
breadcrumbList[0] === "tags" &&
|
||||||
|
!isNaN(Number(breadcrumbList[2])) &&
|
||||||
|
breadcrumbList.splice(
|
||||||
|
1,
|
||||||
|
3,
|
||||||
|
`${breadcrumbList[1]} ${
|
||||||
|
Number(breadcrumbList[2]) === 1 ? "" : "(page " + breadcrumbList[2] + ")"
|
||||||
|
}`
|
||||||
|
);
|
||||||
|
---
|
||||||
|
|
||||||
|
<nav class="breadcrumb" aria-label="breadcrumb">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
<span aria-hidden="true">»</span>
|
||||||
|
</li>
|
||||||
|
{
|
||||||
|
breadcrumbList.map((breadcrumb, index) =>
|
||||||
|
index + 1 === breadcrumbList.length ? (
|
||||||
|
<li>
|
||||||
|
<span
|
||||||
|
class={`${index > 0 ? "lowercase" : "capitalize"}`}
|
||||||
|
aria-current="page"
|
||||||
|
>
|
||||||
|
{/* make the last part lowercase in Home > Tags > some-tag */}
|
||||||
|
{decodeURIComponent(breadcrumb)}
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
) : (
|
||||||
|
<li>
|
||||||
|
<a href={`/${breadcrumb}/`}>{breadcrumb}</a>
|
||||||
|
<span aria-hidden="true">»</span>
|
||||||
|
</li>
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.breadcrumb {
|
||||||
|
@apply mx-auto mb-1 mt-8 w-full max-w-3xl px-4;
|
||||||
|
}
|
||||||
|
.breadcrumb ul li {
|
||||||
|
@apply inline;
|
||||||
|
}
|
||||||
|
.breadcrumb ul li a {
|
||||||
|
@apply capitalize opacity-70;
|
||||||
|
}
|
||||||
|
.breadcrumb ul li span {
|
||||||
|
@apply opacity-70;
|
||||||
|
}
|
||||||
|
.breadcrumb ul li:not(:last-child) a {
|
||||||
|
@apply hover:opacity-100;
|
||||||
|
}
|
||||||
|
</style>
|
28
src/components/Datetime.astro
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
import { LOCALE } from "@config";
|
||||||
|
import { Icon } from "astro-icon/components";
|
||||||
|
export interface Props {
|
||||||
|
modDatetime?: string | null | Date;
|
||||||
|
pubDatetime: string | Date;
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { modDatetime, pubDatetime, className = "" } = Astro.props;
|
||||||
|
|
||||||
|
function formatToMonthDayYear(timeString: string | Date) {
|
||||||
|
const date = new Date(timeString);
|
||||||
|
return date.toLocaleDateString(LOCALE.langTag, {
|
||||||
|
year: 'numeric',
|
||||||
|
month: 'long',
|
||||||
|
day: 'numeric'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class={ className }>
|
||||||
|
<Icon name="fa6-solid:calendar-days" title="Published" class="mr-1" /> <span>{ formatToMonthDayYear(pubDatetime) }</span>
|
||||||
|
{ modDatetime && modDatetime > pubDatetime && (
|
||||||
|
<Icon name="fa6-solid:pencil" title="Modified" class="ml-2 mr-1" /> <span>{ formatToMonthDayYear(modDatetime) } </span>
|
||||||
|
) }
|
||||||
|
</div>
|
27
src/components/Footer.astro
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
import { Footer as BulmaFooter, Container } from 'react-bulma-components';
|
||||||
|
import { Icon } from 'astro-icon/components'
|
||||||
|
|
||||||
|
const currentYear = new Date().getFullYear();
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
noMarginTop?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { noMarginTop = false } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<BulmaFooter style={{"marginTop": `${noMarginTop ? "0px" : "3rem"}`}}>
|
||||||
|
<Container>
|
||||||
|
<p style="text-align: center">
|
||||||
|
© { currentYear } MassiveBox<br>
|
||||||
|
<a href="https://git.massive.box/massivebox/website" target="_blank" rel="noopener noreferrer">Source Code</a> | <a href="https://status.massive.box" target="_blank" rel="noopener noreferrer">Server Status</a> | <a href="/pages/www-legal">Privacy & Legal</a>
|
||||||
|
</p>
|
||||||
|
</Container>
|
||||||
|
</BulmaFooter>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
a {
|
||||||
|
color: grey;
|
||||||
|
}
|
||||||
|
</style>
|
45
src/components/Header.astro
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
---
|
||||||
|
import { Navbar } from "react-bulma-components"
|
||||||
|
import { Icon } from 'astro-icon/components'
|
||||||
|
---
|
||||||
|
|
||||||
|
<Navbar id="navbar">
|
||||||
|
<Navbar.Brand>
|
||||||
|
<Navbar.Item href="/">
|
||||||
|
<img src="/assets/icon-64.webp" alt="Navigation bar logo" style="width: auto">
|
||||||
|
<div style="width: 15px"></div>
|
||||||
|
<p class="is-size-4"><b><i>MassiveBox</i></b></p>
|
||||||
|
</Navbar.Item>
|
||||||
|
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navMenu">
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
<span aria-hidden="true"></span>
|
||||||
|
</a>
|
||||||
|
</Navbar.Brand>
|
||||||
|
|
||||||
|
<Navbar.Menu id="navMenu">
|
||||||
|
<Navbar.Container align="right">
|
||||||
|
<Navbar.Item href="/"><span class="icon-text"><span class="icon"><Icon name="fa6-solid:house" /></span><span>Home</span></span></Navbar.Item>
|
||||||
|
<Navbar.Item href="/about"><span class="icon-text"><span class="icon"><Icon name="fa6-solid:user" /></span><span>About</span></span></Navbar.Item>
|
||||||
|
<Navbar.Item href="/blog"><span class="icon-text"><span class="icon"><Icon name="fa6-solid:rss" /></span><span>Blog</span></span></Navbar.Item>
|
||||||
|
<Navbar.Item id="theme-btn"><span class="icon-text"><span class="icon"><Icon name="fa6-solid:lightbulb" /></span><span class="is-hidden-desktop">Toggle Theme</span></span></Navbar.Item>
|
||||||
|
</Navbar.Container>
|
||||||
|
</Navbar.Menu>
|
||||||
|
</Navbar>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
|
||||||
|
$navbarBurgers.forEach( el => {
|
||||||
|
el.addEventListener('click', () => {
|
||||||
|
const target = el.dataset.target;
|
||||||
|
const $target = document.getElementById(target);
|
||||||
|
el.classList.toggle('is-active');
|
||||||
|
if($target != null) {
|
||||||
|
$target.classList.toggle('is-active');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
12
src/components/Hr.astro
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
export interface Props {
|
||||||
|
noPadding?: boolean;
|
||||||
|
ariaHidden?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { noPadding = false, ariaHidden = true } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class={`max-w-3xl mx-auto ${noPadding ? "px-0" : "px-4"}`}>
|
||||||
|
<hr class="border-skin-line" aria-hidden={ariaHidden} />
|
||||||
|
</div>
|
33
src/components/LinkButton.astro
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
---
|
||||||
|
export interface Props {
|
||||||
|
href: string;
|
||||||
|
className?: string;
|
||||||
|
ariaLabel?: string;
|
||||||
|
title?: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { href, className, ariaLabel, title, disabled = false } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
{
|
||||||
|
disabled ? (
|
||||||
|
<span
|
||||||
|
class={`group inline-block ${className}`}
|
||||||
|
aria-label={ariaLabel}
|
||||||
|
title={title}
|
||||||
|
aria-disabled={disabled}
|
||||||
|
>
|
||||||
|
<slot />
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<a
|
||||||
|
{href}
|
||||||
|
class={`group inline-block hover:text-skin-accent ${className}`}
|
||||||
|
aria-label={ariaLabel}
|
||||||
|
title={title}
|
||||||
|
>
|
||||||
|
<slot />
|
||||||
|
</a>
|
||||||
|
)
|
||||||
|
}
|
12
src/components/Matomo.astro
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<script is:inline>
|
||||||
|
var _paq = _paq || [];
|
||||||
|
_paq.push(["trackPageView"]), _paq.push(["enableLinkTracking"]),
|
||||||
|
function() {
|
||||||
|
_paq.push(["setTrackerUrl", "//stats.massive.box/sjprfvo.php"]);
|
||||||
|
_paq.push(["setSiteId", "1"]);
|
||||||
|
_paq.push(['disableAlwaysUseSendBeacon', 'true']);
|
||||||
|
var a = document, r = a.createElement("script"), s = a.getElementsByTagName("script")[0];
|
||||||
|
r.async = !0, r.defer = !0, r.src = "//stats.massive.box/fauqtkg.php", s.parentNode.insertBefore(r, s)
|
||||||
|
}();
|
||||||
|
</script>
|
||||||
|
<noscript><img src="//stats.massive.box/sjprfvo.php?dzp=1&opl=1" /></noscript>
|
55
src/components/Pagination.astro
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
---
|
||||||
|
import LinkButton from "./LinkButton.astro";
|
||||||
|
import { Icon } from 'astro-icon/components'
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
currentPage: number;
|
||||||
|
totalPages: number;
|
||||||
|
prevUrl: string;
|
||||||
|
nextUrl: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { currentPage, totalPages, prevUrl, nextUrl } = Astro.props;
|
||||||
|
|
||||||
|
const prev = currentPage > 1 ? "" : "disabled";
|
||||||
|
const next = currentPage < totalPages ? "" : "disabled";
|
||||||
|
---
|
||||||
|
|
||||||
|
{
|
||||||
|
totalPages > 1 && (
|
||||||
|
<nav class="pagination-wrapper" aria-label="Pagination">
|
||||||
|
<LinkButton
|
||||||
|
disabled={prev === "disabled"}
|
||||||
|
href={prevUrl}
|
||||||
|
className={`mr-4 select-none ${prev}`}
|
||||||
|
ariaLabel="Previous"
|
||||||
|
>
|
||||||
|
<Icon name="fa6-solid:arrow-left" />
|
||||||
|
Prev
|
||||||
|
</LinkButton>
|
||||||
|
{currentPage} / {totalPages}
|
||||||
|
<LinkButton
|
||||||
|
disabled={next === "disabled"}
|
||||||
|
href={nextUrl}
|
||||||
|
className={`ml-4 select-none ${next}`}
|
||||||
|
ariaLabel="Next"
|
||||||
|
>
|
||||||
|
Next
|
||||||
|
<Icon name="fa6-solid:arrow-right" />
|
||||||
|
</LinkButton>
|
||||||
|
</nav>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.pagination-wrapper {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
.disabled {
|
||||||
|
@apply pointer-events-none select-none opacity-50 hover:text-skin-base group-hover:fill-skin-base;
|
||||||
|
}
|
||||||
|
.disabled-svg {
|
||||||
|
group-hover: !fill-skin-base;
|
||||||
|
}
|
||||||
|
</style>
|
65
src/components/ShareLinks.astro
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
---
|
||||||
|
import LinkButton from "./LinkButton.astro";
|
||||||
|
import { Icon } from "astro-icon/components";
|
||||||
|
|
||||||
|
|
||||||
|
const URL = Astro.url;
|
||||||
|
|
||||||
|
const shareLinks = [
|
||||||
|
{
|
||||||
|
name: "WhatsApp",
|
||||||
|
href: "https://wa.me/?text=",
|
||||||
|
icon: "simple-icons:whatsapp",
|
||||||
|
linkTitle: `Share this post via WhatsApp`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Facebook",
|
||||||
|
href: "https://www.facebook.com/sharer.php?u=",
|
||||||
|
icon: "simple-icons:facebook",
|
||||||
|
linkTitle: `Share this post on Facebook`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Twitter/X",
|
||||||
|
href: "https://twitter.com/intent/tweet?url=",
|
||||||
|
icon: "simple-icons:x",
|
||||||
|
linkTitle: `Tweet this post`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Telegram",
|
||||||
|
href: "https://t.me/share/url?url=",
|
||||||
|
icon: "simple-icons:telegram",
|
||||||
|
linkTitle: `Share this post via Telegram`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pinterest",
|
||||||
|
href: "https://pinterest.com/pin/create/button/?url=",
|
||||||
|
icon: "simple-icons:pinterest",
|
||||||
|
linkTitle: `Share this post on Pinterest`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Mail",
|
||||||
|
href: "mailto:?subject=See%20this%20post&body=",
|
||||||
|
icon: "fa6-solid:envelope",
|
||||||
|
linkTitle: `Share this post via email`,
|
||||||
|
},
|
||||||
|
] as const;
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class={`social-icons`}>
|
||||||
|
<span class="italic">Share this post on:</span>
|
||||||
|
<div class="text-center">
|
||||||
|
{
|
||||||
|
shareLinks.map(social => (
|
||||||
|
<LinkButton
|
||||||
|
href={`${social.href + URL}`}
|
||||||
|
className="link-button"
|
||||||
|
title={social.linkTitle}
|
||||||
|
>
|
||||||
|
<Icon name={ social.icon } title={social.linkTitle} />
|
||||||
|
</LinkButton>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
41
src/components/Socials.astro
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
---
|
||||||
|
import { SOCIALS } from "@config";
|
||||||
|
import { Icon } from "astro-icon/components";
|
||||||
|
---
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
{
|
||||||
|
SOCIALS.map(social => (
|
||||||
|
<td>
|
||||||
|
<a href={social.href} target="_blank" rel="noopener noreferrer">
|
||||||
|
<Icon name={social.icon} title={social.name} class="icon has-text-white" />
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
table { width: 100% }
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
|
||||||
|
max-width: 55px;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
flex-shrink: 1;
|
||||||
|
|
||||||
|
padding: 0 6px 0 6px;
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
24
src/components/Tag.astro
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
export interface Props {
|
||||||
|
tag: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { tag } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
<a
|
||||||
|
href={`/tags/${tag}/`}
|
||||||
|
transition:name={tag}
|
||||||
|
>
|
||||||
|
#<span>{tag}</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
a {
|
||||||
|
color: grey;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
</style>
|
51
src/config.ts
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
import type { GiteaProfile, Site, SocialObjects } from "./types";
|
||||||
|
|
||||||
|
export const SITE: Site = {
|
||||||
|
website: "https://massive.box/", // replace this with your deployed domain
|
||||||
|
author: "MassiveBox",
|
||||||
|
desc: "MassiveBox is a free time developer and FOSS enthusiast. This is his website.",
|
||||||
|
title: "MassiveBox",
|
||||||
|
ogImage: "/og.webp",
|
||||||
|
lightAndDarkMode: true,
|
||||||
|
postPerPage: 3,
|
||||||
|
scheduledPostMargin: 15 * 60 * 1000, // 15 minutes
|
||||||
|
issoLocation: "https://isso.massive.box/", // empty to disable comments
|
||||||
|
};
|
||||||
|
|
||||||
|
export const LOCALE = {
|
||||||
|
lang: "en", // html lang code. Set this empty and default will be "en"
|
||||||
|
langTag: ["en-EN"], // BCP 47 Language Tags. Set this empty [] to use the environment default
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export const SOCIALS: SocialObjects = [
|
||||||
|
{
|
||||||
|
icon: "fa6-solid:envelope",
|
||||||
|
href: "/email",
|
||||||
|
name: "E-Mail"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "simple-icons:matrix",
|
||||||
|
href: "https://matrix.to/#/@massivebox:massivebox.net",
|
||||||
|
name: "Matrix",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "simple-icons:telegram",
|
||||||
|
href: "https://t.me/massivebox",
|
||||||
|
name: "Telegram",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "simple-icons:forgejo",
|
||||||
|
href: "https://git.massive.box/massivebox",
|
||||||
|
name: "Forgejo (Git hosting)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "simple-icons:bluesky",
|
||||||
|
href: "https://bsky.app/profile/massive.box",
|
||||||
|
name: "Bluesky",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: "fa6-solid:key",
|
||||||
|
href: "https://keyoxide.org/box@massive.box",
|
||||||
|
name: "Keyoxide",
|
||||||
|
}
|
||||||
|
];
|
21
src/content/config.ts
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
import { SITE } from "@config";
|
||||||
|
import { defineCollection, z } from "astro:content";
|
||||||
|
|
||||||
|
const blog = defineCollection({
|
||||||
|
type: "content",
|
||||||
|
schema: ({ image }) =>
|
||||||
|
z.object({
|
||||||
|
author: z.string().default(SITE.author),
|
||||||
|
pubDatetime: z.date(),
|
||||||
|
modDatetime: z.date().optional().nullable(),
|
||||||
|
title: z.string(),
|
||||||
|
featured: z.boolean().optional(),
|
||||||
|
draft: z.boolean().optional(),
|
||||||
|
tags: z.array(z.string()).default(["others"]),
|
||||||
|
ogImage: image().optional(),
|
||||||
|
description: z.string(),
|
||||||
|
canonicalURL: z.string().optional(),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
export const collections = { blog };
|
2
src/env.d.ts
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/// <reference path="../.astro/types.d.ts" />
|
||||||
|
/// <reference types="astro/client" />
|
130
src/layouts/Layout.astro
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
---
|
||||||
|
import { LOCALE, SITE } from "@config";
|
||||||
|
import "../../custom.scss";
|
||||||
|
import Matomo from "../components/Matomo.astro";
|
||||||
|
|
||||||
|
const googleSiteVerification = import.meta.env.PUBLIC_GOOGLE_SITE_VERIFICATION;
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
pageTitle?: string;
|
||||||
|
title?: string;
|
||||||
|
author?: string;
|
||||||
|
description?: string;
|
||||||
|
ogImage?: string;
|
||||||
|
canonicalURL?: string;
|
||||||
|
pubDatetime?: Date;
|
||||||
|
modDatetime?: Date | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const {
|
||||||
|
pageTitle = "Home",
|
||||||
|
title = pageTitle + " - " +SITE.title,
|
||||||
|
author = SITE.author,
|
||||||
|
description = SITE.desc,
|
||||||
|
ogImage = SITE.ogImage,
|
||||||
|
canonicalURL = new URL(Astro.url.pathname, Astro.site).href,
|
||||||
|
pubDatetime,
|
||||||
|
modDatetime,
|
||||||
|
} = Astro.props;
|
||||||
|
|
||||||
|
const socialImageURL = new URL(
|
||||||
|
ogImage ?? SITE.ogImage ?? "og.png",
|
||||||
|
Astro.url.origin
|
||||||
|
).href;
|
||||||
|
---
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html
|
||||||
|
lang=`${LOCALE.lang ?? "en"}`
|
||||||
|
>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
<link rel="canonical" href={canonicalURL} />
|
||||||
|
<meta name="generator" content={Astro.generator} />
|
||||||
|
|
||||||
|
<!-- General Meta Tags -->
|
||||||
|
<title>{title}</title>
|
||||||
|
<meta name="title" content={title} />
|
||||||
|
<meta name="description" content={description} />
|
||||||
|
<meta name="author" content={author} />
|
||||||
|
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||||
|
|
||||||
|
<!-- Open Graph / Facebook -->
|
||||||
|
<meta property="og:title" content={title} />
|
||||||
|
<meta property="og:description" content={description} />
|
||||||
|
<meta property="og:url" content={canonicalURL} />
|
||||||
|
<meta property="og:image" content={socialImageURL} />
|
||||||
|
|
||||||
|
<!-- Article Published/Modified time -->
|
||||||
|
{
|
||||||
|
pubDatetime && (
|
||||||
|
<meta
|
||||||
|
property="article:published_time"
|
||||||
|
content={pubDatetime.toISOString()}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
modDatetime && (
|
||||||
|
<meta
|
||||||
|
property="article:modified_time"
|
||||||
|
content={modDatetime.toISOString()}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
<!-- Twitter -->
|
||||||
|
<meta property="twitter:card" content="summary_large_image" />
|
||||||
|
<meta property="twitter:url" content={canonicalURL} />
|
||||||
|
<meta property="twitter:title" content={title} />
|
||||||
|
<meta property="twitter:description" content={description} />
|
||||||
|
<meta property="twitter:image" content={socialImageURL} />
|
||||||
|
|
||||||
|
<!-- Icons -->
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||||
|
<link rel="manifest" href="/site.webmanifest">
|
||||||
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
|
||||||
|
<meta name="msapplication-TileColor" content="#050732">
|
||||||
|
<meta name="theme-color" content="#050732">
|
||||||
|
|
||||||
|
{
|
||||||
|
// If PUBLIC_GOOGLE_SITE_VERIFICATION is set in the environment variable,
|
||||||
|
// include google-site-verification tag in the heading
|
||||||
|
// Learn more: https://support.google.com/webmasters/answer/9008080#meta_tag_verification&zippy=%2Chtml-tag
|
||||||
|
googleSiteVerification && (
|
||||||
|
<meta
|
||||||
|
name="google-site-verification"
|
||||||
|
content={googleSiteVerification}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
<!-- ViewTransitions /-->
|
||||||
|
|
||||||
|
<script is:inline src="/toggle-theme.js"></script>
|
||||||
|
|
||||||
|
<Matomo />
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<slot />
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body { max-width: 100%; overflow-x: hidden; }
|
||||||
|
</style>
|
40
src/layouts/Main.astro
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
---
|
||||||
|
import { Heading } from "react-bulma-components"
|
||||||
|
|
||||||
|
interface StringTitleProp {
|
||||||
|
pageTitle?: string;
|
||||||
|
pageDesc?: string;
|
||||||
|
fullWidth?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ArrayTitleProp {
|
||||||
|
pageTitle?: [string, string];
|
||||||
|
titleTransition: string;
|
||||||
|
pageDesc?: string;
|
||||||
|
fullWidth?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type Props = StringTitleProp | ArrayTitleProp;
|
||||||
|
|
||||||
|
const { props } = Astro;
|
||||||
|
let maxWidth = props.fullWidth ? "84rem" : "" ;
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<main id="main-content" style={{ maxWidth: maxWidth }}>
|
||||||
|
{
|
||||||
|
"titleTransition" in props ? (
|
||||||
|
<Heading>
|
||||||
|
{ props.pageTitle?.[0] }
|
||||||
|
<span transition:name={props.titleTransition}>
|
||||||
|
{ props.pageTitle?.[1] }
|
||||||
|
</span>
|
||||||
|
</Heading>
|
||||||
|
) : (
|
||||||
|
<Heading>{ props.pageTitle }</Heading>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
<p class="my-2">{ props.pageDesc }</p>
|
||||||
|
<slot />
|
||||||
|
</main>
|
||||||
|
|
29
src/layouts/PageLayout.astro
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
import { SITE } from "@config";
|
||||||
|
import Breadcrumbs from "@components/Breadcrumbs.astro";
|
||||||
|
import Footer from "@components/Footer.astro";
|
||||||
|
import Header from "@components/Header.astro";
|
||||||
|
import Layout from "./Layout.astro";
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
frontmatter: {
|
||||||
|
title: string;
|
||||||
|
description?: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const { frontmatter } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout title={`${frontmatter.title} | ${SITE.title}`}>
|
||||||
|
<Header activeNav="about" />
|
||||||
|
<main id="main-content">
|
||||||
|
<section id="about" class="prose mb-28 max-w-3xl prose-img:border-0">
|
||||||
|
<h1 class="title mb-3">{frontmatter.title}</h1>
|
||||||
|
<div class="content">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
129
src/layouts/PostDetails.astro
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
---
|
||||||
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
import Header from "@components/Header.astro";
|
||||||
|
import Footer from "@components/Footer.astro";
|
||||||
|
import Tag from "@components/Tag.astro";
|
||||||
|
import Datetime from "@components/Datetime.astro";
|
||||||
|
import type { CollectionEntry } from "astro:content";
|
||||||
|
import { slugifyStr } from "@utils/slugify";
|
||||||
|
import ShareLinks from "@components/ShareLinks.astro";
|
||||||
|
import { SITE } from "@config";
|
||||||
|
import { Icon } from 'astro-icon/components'
|
||||||
|
import { Level, Button } from "react-bulma-components"
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
post: CollectionEntry<"blog">;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { post } = Astro.props;
|
||||||
|
|
||||||
|
const {
|
||||||
|
title,
|
||||||
|
author,
|
||||||
|
description,
|
||||||
|
ogImage,
|
||||||
|
canonicalURL,
|
||||||
|
pubDatetime,
|
||||||
|
modDatetime,
|
||||||
|
tags,
|
||||||
|
} = post.data;
|
||||||
|
|
||||||
|
const { Content } = await post.render();
|
||||||
|
|
||||||
|
const ogImageUrl = typeof ogImage === "string" ? ogImage : ogImage?.src;
|
||||||
|
const ogUrl = new URL(
|
||||||
|
ogImageUrl ?? `/assets/og.webp`,
|
||||||
|
Astro.url.origin
|
||||||
|
).href;
|
||||||
|
|
||||||
|
const layoutProps = {
|
||||||
|
title: `${title} | ${SITE.title}`,
|
||||||
|
author,
|
||||||
|
description,
|
||||||
|
pubDatetime,
|
||||||
|
modDatetime,
|
||||||
|
canonicalURL,
|
||||||
|
ogImage: ogUrl,
|
||||||
|
scrollSmooth: true,
|
||||||
|
};
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout {...layoutProps}>
|
||||||
|
<Header />
|
||||||
|
|
||||||
|
<main id="main-content">
|
||||||
|
|
||||||
|
<h1 transition:name={slugifyStr(title)} class="title">{title}</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<Datetime
|
||||||
|
pubDatetime={pubDatetime}
|
||||||
|
modDatetime={modDatetime}
|
||||||
|
className="my-1"
|
||||||
|
/>
|
||||||
|
|
||||||
|
{
|
||||||
|
ogImage && <img src={ogImageUrl} alt="Cover image">
|
||||||
|
}
|
||||||
|
|
||||||
|
<ul class="mb-4">
|
||||||
|
{
|
||||||
|
tags.map(tag => <Tag tag={slugifyStr(tag)} />)
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<article id="article" role="article">
|
||||||
|
<div class="content">
|
||||||
|
<Content />
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<Level className="my-4" breakpoint="mobile">
|
||||||
|
<Level.Side>
|
||||||
|
<Button id="back-to-top">
|
||||||
|
<Icon name="fa6-solid:arrow-up" />
|
||||||
|
<span class="ml-2">Back to Top</span>
|
||||||
|
</Button>
|
||||||
|
</Level.Side>
|
||||||
|
<Level.Side align="right">
|
||||||
|
<ShareLinks />
|
||||||
|
</Level.Side>
|
||||||
|
</Level>
|
||||||
|
|
||||||
|
{
|
||||||
|
SITE.issoLocation != "" && (
|
||||||
|
<p><span class="is-size-3"><b>Comments</b></span> (<a target="_blank" rel="noopener noreferrer" href="/pages/blog-legal#comments-rules">rules</a>, <a target="_blank" rel="noopener noreferrer" href="/pages/blog-legal#comments-privacy">privacy</a>)</p>
|
||||||
|
<script is:inline data-isso={ SITE.issoLocation } src={ SITE.issoLocation + "/js/embed.min.js" } async></script>
|
||||||
|
<div id="isso-thread"><noscript>You need to enable JavaScript to see and post comments.</noscript></div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
</main>
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
||||||
|
|
||||||
|
<script is:inline>
|
||||||
|
|
||||||
|
function addHeadingLinks() {
|
||||||
|
let headings = Array.from(document.querySelectorAll("h2, h3, h4, h5, h6"));
|
||||||
|
for (let heading of headings) {
|
||||||
|
heading.classList.add("group");
|
||||||
|
let link = document.createElement("a");
|
||||||
|
link.innerText = "#";
|
||||||
|
link.className = "ml-2";
|
||||||
|
link.href = "#" + heading.id;
|
||||||
|
link.ariaHidden = "true";
|
||||||
|
heading.appendChild(link);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
addHeadingLinks();
|
||||||
|
|
||||||
|
function backToTop() {
|
||||||
|
document.querySelector("#back-to-top")?.addEventListener("click", () => {
|
||||||
|
document.body.scrollTop = 0; // For Safari
|
||||||
|
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
|
||||||
|
});
|
||||||
|
}
|
||||||
|
backToTop();
|
||||||
|
|
||||||
|
</script>
|
47
src/layouts/Posts.astro
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
---
|
||||||
|
import type { CollectionEntry } from "astro:content";
|
||||||
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
import Main from "@layouts/Main.astro";
|
||||||
|
import Header from "@components/Header.astro";
|
||||||
|
import Footer from "@components/Footer.astro";
|
||||||
|
import Pagination from "@components/Pagination.astro";
|
||||||
|
import BlogCard from "../components/BlogCard.astro";
|
||||||
|
import { Button } from "react-bulma-components";
|
||||||
|
import { Icon } from "astro-icon/components";
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
currentPage: number;
|
||||||
|
totalPages: number;
|
||||||
|
paginatedPosts: CollectionEntry<"blog">[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const { currentPage, totalPages, paginatedPosts} = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout pageTitle="Blog">
|
||||||
|
<Header activeNav="blog" />
|
||||||
|
<Main pageTitle="Blog" pageDesc="All the articles I've posted.">
|
||||||
|
<a href="/rss.xml">
|
||||||
|
<Button className="mb-5">
|
||||||
|
<Icon name="fa6-solid:rss" />
|
||||||
|
<span class="ml-2">RSS Feed</span>
|
||||||
|
</Button>
|
||||||
|
</a>
|
||||||
|
<div>
|
||||||
|
{
|
||||||
|
paginatedPosts.map(({ data, slug }) => (
|
||||||
|
<BlogCard href={`/blog/${slug}/`} frontmatter={data} />
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</Main>
|
||||||
|
|
||||||
|
<Pagination
|
||||||
|
{currentPage}
|
||||||
|
{totalPages}
|
||||||
|
prevUrl={`/blog${currentPage - 1 !== 1 ? "/" + (currentPage - 1) : ""}/`}
|
||||||
|
nextUrl={`/blog/${currentPage + 1}/`}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
49
src/layouts/TagPosts.astro
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
---
|
||||||
|
import { type CollectionEntry } from "astro:content";
|
||||||
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
import Main from "@layouts/Main.astro";
|
||||||
|
import Header from "@components/Header.astro";
|
||||||
|
import Footer from "@components/Footer.astro";
|
||||||
|
import BlogCard from "../components/BlogCard.astro";
|
||||||
|
import Pagination from "@components/Pagination.astro";
|
||||||
|
import { SITE } from "@config";
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
currentPage: number;
|
||||||
|
totalPages: number;
|
||||||
|
paginatedPosts: CollectionEntry<"blog">[];
|
||||||
|
tag: string;
|
||||||
|
tagName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { currentPage, totalPages, paginatedPosts, tag, tagName } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout title={`Tag: ${tagName} | ${SITE.title}`}>
|
||||||
|
<Header activeNav="tags" />
|
||||||
|
<Main
|
||||||
|
pageTitle={[`Tag:`, `${tagName}`]}
|
||||||
|
titleTransition={tag}
|
||||||
|
pageDesc={`All the articles with the tag "${tagName}".`}
|
||||||
|
>
|
||||||
|
<h1 slot="title" transition:name={tag}>{`Tag:${tag}`}</h1>
|
||||||
|
<ul>
|
||||||
|
{
|
||||||
|
paginatedPosts.map(({ data, slug }) => (
|
||||||
|
<BlogCard href={`/posts/${slug}/`} frontmatter={data} />
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
</Main>
|
||||||
|
|
||||||
|
<Pagination
|
||||||
|
{currentPage}
|
||||||
|
{totalPages}
|
||||||
|
prevUrl={`/tags/${tag}${
|
||||||
|
currentPage - 1 !== 1 ? "/" + (currentPage - 1) : ""
|
||||||
|
}/`}
|
||||||
|
nextUrl={`/tags/${tag}/${currentPage + 1}/`}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Footer noMarginTop={totalPages > 1} />
|
||||||
|
</Layout>
|
35
src/pages/404.astro
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
---
|
||||||
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
import Header from "@components/Header.astro";
|
||||||
|
import Footer from "@components/Footer.astro";
|
||||||
|
import LinkButton from "@components/LinkButton.astro";
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout pageTitle="404 Not Found">
|
||||||
|
<Header />
|
||||||
|
|
||||||
|
<main id="main-content">
|
||||||
|
<div class="not-found-wrapper">
|
||||||
|
<h1 aria-label="404 Not Found" class="title is-1" style="font-size: 9rem;">404</h1>
|
||||||
|
<span aria-hidden="true" class="mb-3">¯\_(ツ)_/¯</span>
|
||||||
|
<p class="subtitle is-4">Page Not Found</p>
|
||||||
|
<LinkButton
|
||||||
|
href="/"
|
||||||
|
className="my-6 text-lg underline decoration-dashed underline-offset-8"
|
||||||
|
>
|
||||||
|
Go back home
|
||||||
|
</LinkButton>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.not-found-wrapper {
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
</style>
|
29
src/pages/about.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
layout: layouts/PageLayout.astro
|
||||||
|
title: "About"
|
||||||
|
---
|
||||||
|
|
||||||
|
Hello! I'm Matteo.
|
||||||
|
|
||||||
|
I've always loved programming, FOSS and decentralized systems. I'm currently a student at University of Brescia.
|
||||||
|
|
||||||
|
Over the years, I have developed a variety of personal projects, including:
|
||||||
|
- [This website](/) ([git](https://git.massive.box/massivebox/website)), built with the Astro framework and Bulma CSS,
|
||||||
|
- [EcoDash](https://ecodash.massive.box/) ([git](https://git.massive.box/massivebox/ecodash)), the extensible
|
||||||
|
dashboard for environmental transparency,
|
||||||
|
- [Go CatPrinter](https://git.massive.box/massivebox/go-catprinter), a Go library that uses a reverse-engineered
|
||||||
|
proprietary protocol to communicate with some cheap Bluetooth Low Energy thermal printers,
|
||||||
|
- [RetroFW JilJil](https://git.massive.box/massivebox/retrofw-jiljil), the port of an abandonware game to the RetroFW
|
||||||
|
operating system for MIPSel-based handheld consoles, written in C with SDL1,
|
||||||
|
- And many more! Check out my [Forgejo](https://git.massive.box/massivebox), [Codeberg](https://codeberg.org/massivebox)
|
||||||
|
and [GitHub](https://github.com/massivebox) profiles to get an idea of what I like working on.
|
||||||
|
|
||||||
|
I also run a server, which is currently powering this website and other services. You can see its status
|
||||||
|
[here](https://status.massive.box/), and a report on how much energy it consumes [here](https://ecodash.massive.box/).
|
||||||
|
It runs on Proxmox Virtual Environment.
|
||||||
|
|
||||||
|
You can find contact me with any of the links in the [homepage](/). If you're looking for my PGP key, take a look
|
||||||
|
[here](/email).
|
||||||
|
You can find my character's art, as well as branding kit, [here](https://cloud.massive.box/published/art).
|
||||||
|
|
||||||
|
Thanks for checking out my website!
|
41
src/pages/blog/[slug]/index.astro
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
---
|
||||||
|
import { type CollectionEntry, getCollection } from "astro:content";
|
||||||
|
import Posts from "@layouts/Posts.astro";
|
||||||
|
import PostDetails from "@layouts/PostDetails.astro";
|
||||||
|
import getSortedPosts from "@utils/getSortedPosts";
|
||||||
|
import getPageNumbers from "@utils/getPageNumbers";
|
||||||
|
import getPagination from "@utils/getPagination";
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
post: CollectionEntry<"blog">;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getStaticPaths() {
|
||||||
|
const posts = await getCollection("blog", ({ data }) => !data.draft);
|
||||||
|
|
||||||
|
const postResult = posts.map(post => ({
|
||||||
|
params: { slug: post.slug },
|
||||||
|
props: { post },
|
||||||
|
}));
|
||||||
|
|
||||||
|
const pagePaths = getPageNumbers(posts.length).map(pageNum => ({
|
||||||
|
params: { slug: String(pageNum) },
|
||||||
|
}));
|
||||||
|
|
||||||
|
return [...postResult, ...pagePaths];
|
||||||
|
}
|
||||||
|
|
||||||
|
const { slug } = Astro.params;
|
||||||
|
const { post } = Astro.props;
|
||||||
|
|
||||||
|
const posts = await getCollection("blog");
|
||||||
|
|
||||||
|
const sortedPosts = getSortedPosts(posts);
|
||||||
|
|
||||||
|
const pagination = getPagination({
|
||||||
|
posts: sortedPosts,
|
||||||
|
page: slug,
|
||||||
|
});
|
||||||
|
---
|
||||||
|
|
||||||
|
{post ? <PostDetails post={post} /> : <Posts {...pagination} />}
|
18
src/pages/blog/index.astro
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
import { getCollection } from "astro:content";
|
||||||
|
import Posts from "@layouts/Posts.astro";
|
||||||
|
import getSortedPosts from "@utils/getSortedPosts";
|
||||||
|
import getPagination from "@utils/getPagination";
|
||||||
|
|
||||||
|
const posts = await getCollection("blog");
|
||||||
|
|
||||||
|
const sortedPosts = getSortedPosts(posts);
|
||||||
|
|
||||||
|
const pagination = getPagination({
|
||||||
|
posts: sortedPosts,
|
||||||
|
page: 1,
|
||||||
|
isIndex: true,
|
||||||
|
});
|
||||||
|
---
|
||||||
|
|
||||||
|
<Posts {...pagination} />
|
31
src/pages/email/human.astro
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
---
|
||||||
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
import Header from "@components/Header.astro";
|
||||||
|
import Footer from "@components/Footer.astro";
|
||||||
|
import Main from "@layouts/Main.astro";
|
||||||
|
import { Icon } from 'astro-icon/components'
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout pageTitle="Contact Me">
|
||||||
|
<Header />
|
||||||
|
|
||||||
|
<Main pageTitle="E-Mail and OpenPGP" pageDesc="It wasn't that hard of a captcha, right?" fullWidth={true}>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<Icon name="fa6-solid:envelope" /> <b>Email:</b> <a href="mailto:box@massive.box" target="_blank" rel="noopener noreferrer">box@massive.box</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<Icon name="fa6-solid:fingerprint" /> <b>OpenPGP Fingerprint:</b> <code>9ED497F5C43FDA462AF084BC9B74D3A59181947D</code>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<Icon name="fa6-solid:id-card" /> <b>OpenPGP Key ID:</b> <code>9B74D3A59181947D</code>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<Icon name="fa6-solid:key" /> <b>OpenPGP Key:</b> available via WKD or <a href="https://massive.box/.well-known/openpgpkey/hu/a9ckpi3nw8sjwfz4hf1tq9nbti87ccmi">direct URL</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</Main>
|
||||||
|
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
22
src/pages/email/index.astro
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
---
|
||||||
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
import Header from "@components/Header.astro";
|
||||||
|
import Footer from "@components/Footer.astro";
|
||||||
|
import { Button } from "react-bulma-components"
|
||||||
|
import Main from "@layouts/Main.astro";
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout pageTitle="Contact Me">
|
||||||
|
<Header />
|
||||||
|
|
||||||
|
<Main pageTitle="E-Mail and OpenPGP" pageDesc="In this page you can find my email and OpenPGP key." fullWidth={true}>
|
||||||
|
<p><b>Riddle Time:</b> Are you a robot?</p>
|
||||||
|
<!-- This is just a place to add a little easteregg, I know it's not a real captcha! -->
|
||||||
|
<Button.Group className="mt-2">
|
||||||
|
<Button color="success" renderAs="a" href="/email/robot">Yes</Button>
|
||||||
|
<Button color="danger" renderAs="a" href="/email/human">No</Button>
|
||||||
|
</Button.Group>
|
||||||
|
</Main>
|
||||||
|
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
21
src/pages/email/robot.astro
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
import Header from "@components/Header.astro";
|
||||||
|
import Footer from "@components/Footer.astro";
|
||||||
|
import { Button } from "react-bulma-components"
|
||||||
|
import Main from "@layouts/Main.astro";
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout pageTitle="You're a robot!">
|
||||||
|
<Header />
|
||||||
|
|
||||||
|
<Main fullWidth={true}>
|
||||||
|
<img src="/assets/maurizio.jpg" alt="A tabby cat laying on a chair, looking at you menacingly">
|
||||||
|
<p style="margin-top: 0.5rem; margin-bottom: 0.5rem"><a href="https://t.me/ilgattomaurizio" target="_blank" rel="noopener noreferrer">Gatto Maurizio</a> doesn't look happy about you being a robot.</p>
|
||||||
|
<Button.Group>
|
||||||
|
<Button color="success" renderAs="a" href="/email">I'm not a robot anymore, Maurizio please spare me</Button>
|
||||||
|
</Button.Group>
|
||||||
|
</Main>
|
||||||
|
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
54
src/pages/index.astro
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
---
|
||||||
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
import Header from "@components/Header.astro";
|
||||||
|
import Socials from "../components/Socials.astro";
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<Header />
|
||||||
|
|
||||||
|
<main id="main" class="is-justify-content-center is-background-main">
|
||||||
|
|
||||||
|
<div style="max-width: 100vw;">
|
||||||
|
<img src="assets/spinning.webp" alt="Spinning MassiveBox icon" class="spinning is-hidden-under-800">
|
||||||
|
<img src="assets/spinning-mobile.webp" alt="Spinning MassiveBox icon" class="spinning is-hidden-over-800">
|
||||||
|
<div class="mr-10 ml-10">
|
||||||
|
<Socials />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
</Layout>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.spinning {
|
||||||
|
max-width: 800px;
|
||||||
|
flex-shrink: 1;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
#main {
|
||||||
|
height: 90vh;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
#main * {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-hidden-over-800 { display: none; }
|
||||||
|
.is-hidden-under-800 { display: block; }
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
.is-hidden-over-800 { display: block; }
|
||||||
|
.is-hidden-under-800 { display: none; }
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1023px) {
|
||||||
|
#main {
|
||||||
|
height: 92vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
31
src/pages/pages/blog-legal.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
---
|
||||||
|
layout: layouts/PageLayout.astro
|
||||||
|
title: "Blog Legal"
|
||||||
|
---
|
||||||
|
|
||||||
|
This blog is not a newspaper as it is updated without any periodicity. It can not, therefore, be considered an editorial product under Italian Law n° 62 of 7.03.2001 or similiar international laws.
|
||||||
|
|
||||||
|
I am not responsible for the content of comments and external sites linked in the blog.
|
||||||
|
|
||||||
|
Unless specifically stated otherwise, all Content in the blog except for the comments is licensed under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/).
|
||||||
|
|
||||||
|
## Referral Links Disclosure
|
||||||
|
|
||||||
|
As of right now, there are no referral links in the blog. This page will be updated if this changes.
|
||||||
|
|
||||||
|
## Comments Privacy
|
||||||
|
|
||||||
|
All data you submit via comments will be visible to any other visitor of the site. Comments are stored on my server, located in Italy. They will be sent once to me as a transactional mail via [Brevo](https://brevo.com) for notification and moderation purposes. Read their privacy policy [here](https://www.brevo.com/legal/privacypolicy/).
|
||||||
|
|
||||||
|
Comments are stored forever on my server, unless they are deleted. If the comment software doesn't show the delete button for a comment you made in the past and want to be deleted, contact me at [legal@massive.box](mailto:legal@massive.box). You will need to show that you're the original poster in some way, like using the same email address you submitted the content with.
|
||||||
|
|
||||||
|
## Comments Rules
|
||||||
|
|
||||||
|
All comments must respect the following rules:
|
||||||
|
|
||||||
|
- No spam
|
||||||
|
- No NSFW content
|
||||||
|
- No illegal content under Italian laws
|
||||||
|
- No personal insults, doxxing, violence threats etc.
|
||||||
|
|
||||||
|
I reserve the ultimate right to delete comments at any time, for any reason, without any warning.
|
17
src/pages/pages/unknown-subdomain.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
---
|
||||||
|
layout: layouts/PageLayout.astro
|
||||||
|
title: "Unknown subdomain"
|
||||||
|
---
|
||||||
|
|
||||||
|
You have ended up on this page because you've opened a non-configured subdomain.
|
||||||
|
|
||||||
|
I've been changing some server-side things as of lately, so if you think this is a mistake, please
|
||||||
|
[let me know](/email).
|
||||||
|
|
||||||
|
If you've just typed something random before my domain and ended up here, good for you! And for me, since I won't have
|
||||||
|
to fix another 404 page.
|
||||||
|
|
||||||
|
You can continue browsing at:
|
||||||
|
- [The homepage](/)
|
||||||
|
- [Status page](https://status.massive.box)
|
||||||
|
- [A random lynx photo](https://api.tinyfox.dev/img?animal=lynx)
|
24
src/pages/pages/www-legal.md
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
layout: layouts/PageLayout.astro
|
||||||
|
title: "Website Legal Notice"
|
||||||
|
---
|
||||||
|
|
||||||
|
This page is the place to find information on how your data is treated on this website, and what you can do with it.
|
||||||
|
|
||||||
|
## Related documents
|
||||||
|
|
||||||
|
- [Blog Legal Notice](/pages/blog-legal)
|
||||||
|
|
||||||
|
## Privacy policy
|
||||||
|
|
||||||
|
This website uses logs, which include information like IP addresses, requested paths and other HTTP request information to prevent abuse and find technical error.
|
||||||
|
|
||||||
|
This data is exclusively stored in my server which operates in Italy. It's never sent to any third party.
|
||||||
|
|
||||||
|
Logs can be preserved for up to 3 months. If you want to be removed from log files as per the GDPR, contact me at [legal@massive.box](mailto:legal@massive.box).
|
||||||
|
|
||||||
|
## Terms of service
|
||||||
|
|
||||||
|
It's forbidden to use the website for any illegal activities. If you find a bug which allows attackers to exploit the website for this purpose, contact me at [webmaster@massive.box](mailto:webmaster@massive.box).
|
||||||
|
|
||||||
|
The website is presented as-is, without any warranty. I reserve the ultimate right to block access to the website at any point for any reason to anyone without any warning.
|
14
src/pages/robots.txt.ts
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import type { APIRoute } from "astro";
|
||||||
|
import { SITE } from "@config";
|
||||||
|
|
||||||
|
const robots = `
|
||||||
|
User-agent: *
|
||||||
|
Allow: /
|
||||||
|
|
||||||
|
Sitemap: ${new URL("sitemap-index.xml", SITE.website).href}
|
||||||
|
`.trim();
|
||||||
|
|
||||||
|
export const GET: APIRoute = () =>
|
||||||
|
new Response(robots, {
|
||||||
|
headers: { "Content-Type": "text/plain" },
|
||||||
|
});
|
20
src/pages/rss.xml.ts
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
import rss from "@astrojs/rss";
|
||||||
|
import { getCollection } from "astro:content";
|
||||||
|
import getSortedPosts from "@utils/getSortedPosts";
|
||||||
|
import { SITE } from "@config";
|
||||||
|
|
||||||
|
export async function GET() {
|
||||||
|
const posts = await getCollection("blog");
|
||||||
|
const sortedPosts = getSortedPosts(posts);
|
||||||
|
return rss({
|
||||||
|
title: SITE.title,
|
||||||
|
description: SITE.desc,
|
||||||
|
site: SITE.website,
|
||||||
|
items: sortedPosts.map(({ data, slug }) => ({
|
||||||
|
link: `posts/${slug}/`,
|
||||||
|
title: data.title,
|
||||||
|
description: data.description,
|
||||||
|
pubDate: new Date(data.modDatetime ?? data.pubDatetime),
|
||||||
|
})),
|
||||||
|
});
|
||||||
|
}
|
28
src/pages/search.astro
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
import { getCollection } from "astro:content";
|
||||||
|
import { SITE } from "@config";
|
||||||
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
import Main from "@layouts/Main.astro";
|
||||||
|
import Header from "@components/Header.astro";
|
||||||
|
import Footer from "@components/Footer.astro";
|
||||||
|
import getSortedPosts from "@utils/getSortedPosts";
|
||||||
|
|
||||||
|
// Retrieve all published articles
|
||||||
|
const posts = await getCollection("blog", ({ data }) => !data.draft);
|
||||||
|
const sortedPosts = getSortedPosts(posts);
|
||||||
|
|
||||||
|
// List of items to search in
|
||||||
|
const searchList = sortedPosts.map(({ data, slug }) => ({
|
||||||
|
title: data.title,
|
||||||
|
description: data.description,
|
||||||
|
data,
|
||||||
|
slug,
|
||||||
|
}));
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout title={`Search | ${SITE.title}`}>
|
||||||
|
<Header activeNav="search" />
|
||||||
|
<Main pageTitle="Search" pageDesc="Search any article ...">
|
||||||
|
</Main>
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
44
src/pages/tags/[tag]/[page].astro
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
---
|
||||||
|
import { type CollectionEntry, getCollection } from "astro:content";
|
||||||
|
import TagPosts from "@layouts/TagPosts.astro";
|
||||||
|
import getUniqueTags from "@utils/getUniqueTags";
|
||||||
|
import getPostsByTag from "@utils/getPostsByTag";
|
||||||
|
import getPageNumbers from "@utils/getPageNumbers";
|
||||||
|
import getPagination from "@utils/getPagination";
|
||||||
|
|
||||||
|
export interface Props {
|
||||||
|
post: CollectionEntry<"blog">;
|
||||||
|
tag: string;
|
||||||
|
tagName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getStaticPaths() {
|
||||||
|
const posts = await getCollection("blog");
|
||||||
|
|
||||||
|
const tags = getUniqueTags(posts);
|
||||||
|
|
||||||
|
return tags.flatMap(({ tag, tagName }) => {
|
||||||
|
const tagPosts = getPostsByTag(posts, tag);
|
||||||
|
const totalPages = getPageNumbers(tagPosts.length);
|
||||||
|
|
||||||
|
return totalPages.map(page => ({
|
||||||
|
params: { tag, page },
|
||||||
|
props: { tag, tagName },
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const { page } = Astro.params;
|
||||||
|
const { tag, tagName } = Astro.props;
|
||||||
|
|
||||||
|
const posts = await getCollection("blog", ({ data }) => !data.draft);
|
||||||
|
|
||||||
|
const postsByTag = getPostsByTag(posts, tag);
|
||||||
|
|
||||||
|
const pagination = getPagination({
|
||||||
|
posts: postsByTag,
|
||||||
|
page,
|
||||||
|
});
|
||||||
|
---
|
||||||
|
|
||||||
|
<TagPosts {...pagination} {tag} {tagName} />
|
32
src/pages/tags/[tag]/index.astro
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
---
|
||||||
|
import { getCollection } from "astro:content";
|
||||||
|
import TagPosts from "@layouts/TagPosts.astro";
|
||||||
|
import getPostsByTag from "@utils/getPostsByTag";
|
||||||
|
import getPagination from "@utils/getPagination";
|
||||||
|
import getUniqueTags from "@utils/getUniqueTags";
|
||||||
|
|
||||||
|
export async function getStaticPaths() {
|
||||||
|
const posts = await getCollection("blog");
|
||||||
|
|
||||||
|
const tags = getUniqueTags(posts);
|
||||||
|
|
||||||
|
return tags.map(({ tag, tagName }) => {
|
||||||
|
return {
|
||||||
|
params: { tag },
|
||||||
|
props: { tag, tagName, posts },
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const { tag, tagName, posts } = Astro.props;
|
||||||
|
|
||||||
|
const postsByTag = getPostsByTag(posts, tag);
|
||||||
|
|
||||||
|
const pagination = getPagination({
|
||||||
|
posts: postsByTag,
|
||||||
|
page: 1,
|
||||||
|
isIndex: true,
|
||||||
|
});
|
||||||
|
---
|
||||||
|
|
||||||
|
<TagPosts {...pagination} {tag} {tagName} />
|
24
src/pages/tags/index.astro
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
import { getCollection } from "astro:content";
|
||||||
|
import Header from "@components/Header.astro";
|
||||||
|
import Footer from "@components/Footer.astro";
|
||||||
|
import Layout from "@layouts/Layout.astro";
|
||||||
|
import Main from "@layouts/Main.astro";
|
||||||
|
import Tag from "@components/Tag.astro";
|
||||||
|
import getUniqueTags from "@utils/getUniqueTags";
|
||||||
|
import { SITE } from "@config";
|
||||||
|
|
||||||
|
const posts = await getCollection("blog");
|
||||||
|
|
||||||
|
let tags = getUniqueTags(posts);
|
||||||
|
---
|
||||||
|
|
||||||
|
<Layout title={`Tags | ${SITE.title}`}>
|
||||||
|
<Header activeNav="tags" />
|
||||||
|
<Main pageTitle="Tags" pageDesc="All the tags used in posts.">
|
||||||
|
<ul>
|
||||||
|
{tags.map(({ tag }) => <Tag {tag} />)}
|
||||||
|
</ul>
|
||||||
|
</Main>
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
32
src/types.ts
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
export type Site = {
|
||||||
|
website: string;
|
||||||
|
author: string;
|
||||||
|
desc: string;
|
||||||
|
title: string;
|
||||||
|
ogImage: string;
|
||||||
|
lightAndDarkMode: boolean;
|
||||||
|
postPerPage: number;
|
||||||
|
scheduledPostMargin: number;
|
||||||
|
issoLocation: string,
|
||||||
|
};
|
||||||
|
|
||||||
|
export type GiteaProfile = {
|
||||||
|
host: string;
|
||||||
|
username: string;
|
||||||
|
name: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type GiteaRepo = {
|
||||||
|
url: string,
|
||||||
|
username: string,
|
||||||
|
name: string,
|
||||||
|
description: string,
|
||||||
|
language: string,
|
||||||
|
lastUpdated: Date,
|
||||||
|
};
|
||||||
|
|
||||||
|
export type SocialObjects = {
|
||||||
|
icon: string;
|
||||||
|
href: string;
|
||||||
|
name: string;
|
||||||
|
}[];
|
14
src/utils/getPageNumbers.ts
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import { SITE } from "@config";
|
||||||
|
|
||||||
|
const getPageNumbers = (numberOfPosts: number) => {
|
||||||
|
const numberOfPages = numberOfPosts / Number(SITE.postPerPage);
|
||||||
|
|
||||||
|
let pageNumbers: number[] = [];
|
||||||
|
for (let i = 1; i <= Math.ceil(numberOfPages); i++) {
|
||||||
|
pageNumbers = [...pageNumbers, i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return pageNumbers;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default getPageNumbers;
|
35
src/utils/getPagination.ts
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
import { SITE } from "@config";
|
||||||
|
import getPageNumbers from "./getPageNumbers";
|
||||||
|
|
||||||
|
interface GetPaginationProps<T> {
|
||||||
|
posts: T;
|
||||||
|
page: string | number;
|
||||||
|
isIndex?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const getPagination = <T>({
|
||||||
|
posts,
|
||||||
|
page,
|
||||||
|
isIndex = false,
|
||||||
|
}: GetPaginationProps<T[]>) => {
|
||||||
|
const totalPagesArray = getPageNumbers(posts.length);
|
||||||
|
const totalPages = totalPagesArray.length;
|
||||||
|
|
||||||
|
const currentPage = isIndex
|
||||||
|
? 1
|
||||||
|
: page && !isNaN(Number(page)) && totalPagesArray.includes(Number(page))
|
||||||
|
? Number(page)
|
||||||
|
: 0;
|
||||||
|
|
||||||
|
const lastPost = isIndex ? SITE.postPerPage : currentPage * SITE.postPerPage;
|
||||||
|
const startPost = isIndex ? 0 : lastPost - SITE.postPerPage;
|
||||||
|
const paginatedPosts = posts.slice(startPost, lastPost);
|
||||||
|
|
||||||
|
return {
|
||||||
|
totalPages,
|
||||||
|
currentPage,
|
||||||
|
paginatedPosts,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default getPagination;
|
10
src/utils/getPostsByTag.ts
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import type { CollectionEntry } from "astro:content";
|
||||||
|
import getSortedPosts from "./getSortedPosts";
|
||||||
|
import { slugifyAll } from "./slugify";
|
||||||
|
|
||||||
|
const getPostsByTag = (posts: CollectionEntry<"blog">[], tag: string) =>
|
||||||
|
getSortedPosts(
|
||||||
|
posts.filter(post => slugifyAll(post.data.tags).includes(tag))
|
||||||
|
);
|
||||||
|
|
||||||
|
export default getPostsByTag;
|
18
src/utils/getSortedPosts.ts
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
import type { CollectionEntry } from "astro:content";
|
||||||
|
import postFilter from "./postFilter";
|
||||||
|
|
||||||
|
const getSortedPosts = (posts: CollectionEntry<"blog">[]) => {
|
||||||
|
return posts
|
||||||
|
.filter(postFilter)
|
||||||
|
.sort(
|
||||||
|
(a, b) =>
|
||||||
|
Math.floor(
|
||||||
|
new Date(b.data.modDatetime ?? b.data.pubDatetime).getTime() / 1000
|
||||||
|
) -
|
||||||
|
Math.floor(
|
||||||
|
new Date(a.data.modDatetime ?? a.data.pubDatetime).getTime() / 1000
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default getSortedPosts;
|
23
src/utils/getUniqueTags.ts
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
import { slugifyStr } from "./slugify";
|
||||||
|
import type { CollectionEntry } from "astro:content";
|
||||||
|
import postFilter from "./postFilter";
|
||||||
|
|
||||||
|
interface Tag {
|
||||||
|
tag: string;
|
||||||
|
tagName: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const getUniqueTags = (posts: CollectionEntry<"blog">[]) => {
|
||||||
|
const tags: Tag[] = posts
|
||||||
|
.filter(postFilter)
|
||||||
|
.flatMap(post => post.data.tags)
|
||||||
|
.map(tag => ({ tag: slugifyStr(tag), tagName: tag }))
|
||||||
|
.filter(
|
||||||
|
(value, index, self) =>
|
||||||
|
self.findIndex(tag => tag.tag === value.tag) === index
|
||||||
|
)
|
||||||
|
.sort((tagA, tagB) => tagA.tag.localeCompare(tagB.tag));
|
||||||
|
return tags;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default getUniqueTags;
|
199
src/utils/joplin.js
Normal file
|
@ -0,0 +1,199 @@
|
||||||
|
const http = require('node:http');
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
async function fetch(url, method = "GET") {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
http.get(url, {method: method},(res) => {
|
||||||
|
let data = '';
|
||||||
|
res.on('data', (chunk) => data += chunk);
|
||||||
|
res.on('end', () => resolve(data));
|
||||||
|
}).on('error', () => resolve(""));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function saveImage(url, outputPath) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const request = http.get(url, (response) => {
|
||||||
|
if (response.statusCode !== 200) {
|
||||||
|
reject(new Error(`Failed to download image. Status code: ${response.statusCode}`));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const writer = fs.createWriteStream(outputPath);
|
||||||
|
response.pipe(writer);
|
||||||
|
|
||||||
|
writer.on('finish', () => resolve(outputPath));
|
||||||
|
writer.on('error', (err) => {
|
||||||
|
fs.unlink(outputPath, () => reject(err));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
request.on('error', (err) => reject(err));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function findPort() {
|
||||||
|
for (let portToTest = 41184; portToTest <= 41194; portToTest++) {
|
||||||
|
const result = await fetch("http://localhost:" + portToTest + "/ping");
|
||||||
|
if (result === 'JoplinClipperServer') {
|
||||||
|
return portToTest
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new Error("Joplin clipper server not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function authenticate(host) {
|
||||||
|
// Step 1: Call POST /auth to get the auth_token
|
||||||
|
const authResponse = await fetch(host + "/auth", "POST");
|
||||||
|
const { auth_token } = JSON.parse(authResponse);
|
||||||
|
|
||||||
|
// Step 2: Poll GET /auth/check at regular intervals
|
||||||
|
const checkAuthStatus = async () => {
|
||||||
|
const checkResponse = await fetch(`${host}/auth/check?auth_token=${auth_token}`);
|
||||||
|
const { status, token } = JSON.parse(checkResponse);
|
||||||
|
|
||||||
|
if (status === "accepted") {
|
||||||
|
console.log("Authentication successful.");
|
||||||
|
return token;
|
||||||
|
} else if (status === "rejected") {
|
||||||
|
throw new Error("Authentication rejected by the user.");
|
||||||
|
} else {
|
||||||
|
console.log("Pending approval. Status:", status)
|
||||||
|
return new Promise(resolve => setTimeout(() => resolve(checkAuthStatus()), 1000));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return checkAuthStatus();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getNotebookNotes(apiToken, host) {
|
||||||
|
|
||||||
|
const foldersResponse = await fetch(`${host}/folders?token=${apiToken}`);
|
||||||
|
const folders = JSON.parse(foldersResponse);
|
||||||
|
let id = null;
|
||||||
|
for(let folder of folders.items) {
|
||||||
|
if(folder.title === "Blog") {
|
||||||
|
id = folder.id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(id == null) {
|
||||||
|
throw new Error("Blog notebook not found.");
|
||||||
|
}
|
||||||
|
|
||||||
|
const notesResponse = await fetch(`${host}/folders/${id}/notes?token=${apiToken}`);
|
||||||
|
const notes = JSON.parse(notesResponse);
|
||||||
|
|
||||||
|
let noteIds = [];
|
||||||
|
for(let note of notes.items) {
|
||||||
|
noteIds.push(note.id);
|
||||||
|
}
|
||||||
|
return noteIds
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getNoteBody(apiToken, host, noteId) {
|
||||||
|
const noteResponse = await fetch(`${host}/notes/${noteId}?token=${apiToken}&fields=body`);
|
||||||
|
return JSON.parse(noteResponse).body;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getNoteResources(apiToken, host, noteId) {
|
||||||
|
const resourcesResponse = await fetch(`${host}/notes/${noteId}/resources?token=${apiToken}&fields=id,mime`);
|
||||||
|
let resources = [];
|
||||||
|
for(let resource of JSON.parse(resourcesResponse).items) {
|
||||||
|
resources.push([resource.id, resource.mime.replace(/^image\//, "")]);
|
||||||
|
}
|
||||||
|
return resources;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function fixResourceLinks(resources, body) {
|
||||||
|
for(let resource of resources) {
|
||||||
|
// Replace markdown image links with ./ instead of :/
|
||||||
|
body = body.replaceAll(":/" + resource[0], "./" + resource[0])
|
||||||
|
// Add resource extension
|
||||||
|
body = body.replaceAll(resource[0], resource[0] + "." + resource[1])
|
||||||
|
}
|
||||||
|
return body;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function otherReplaces(body) {
|
||||||
|
// Remove ogImage lines
|
||||||
|
const ogImageRegex = /^\s*!\[ogImage\].*$/gm;
|
||||||
|
body = body.replace(ogImageRegex, '');
|
||||||
|
|
||||||
|
// Remove spoiler blocks
|
||||||
|
const spoilerRegex = /^:\[\n(.*?)\n\n([\s\S]*?)\n\n\]:$/gm;
|
||||||
|
return body.replace(spoilerRegex, '');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async function getNoteSlug(body) {
|
||||||
|
let frontmatterSplt = body.split("---\n");
|
||||||
|
if(frontmatterSplt.length < 3) {
|
||||||
|
throw new Error("No frontmatter found in note.");
|
||||||
|
}
|
||||||
|
let frontmatter = frontmatterSplt[1];
|
||||||
|
for(let line of frontmatter.split("\n")) {
|
||||||
|
if(line.startsWith("slug: ")) {
|
||||||
|
return line.split("slug: ")[1].trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new Error("No slug found in frontmatter.");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function saveNote(slug, noteBody) {
|
||||||
|
const dirPath = path.join(__dirname, '../content/blog', slug);
|
||||||
|
if (!fs.existsSync(dirPath)){
|
||||||
|
fs.mkdirSync(dirPath, { recursive: true });
|
||||||
|
}
|
||||||
|
const filePath = path.join(dirPath, 'index.md');
|
||||||
|
fs.writeFileSync(filePath, noteBody);
|
||||||
|
console.log(`Note saved to ${filePath}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function saveResources(resources, apiToken, host, slug) {
|
||||||
|
for(let resource of resources) {
|
||||||
|
const resID = resource[0];
|
||||||
|
const extension = resource[1];
|
||||||
|
const filePath = path.join(__dirname, '../content/blog', slug, resID + "." + extension);
|
||||||
|
await saveImage(`${host}/resources/${resID}/file?token=${apiToken}&fields=data`, filePath)
|
||||||
|
console.log(`Resource saved to ${filePath}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function clearBlogFolder() {
|
||||||
|
const blogFolderPath = path.join(__dirname, '../content/blog');
|
||||||
|
if (fs.existsSync(blogFolderPath)) {
|
||||||
|
fs.rmSync(blogFolderPath, { recursive: true, force: true });
|
||||||
|
console.log(`Cleared blog folder at ${blogFolderPath}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
|
||||||
|
console.log("Finding JoplinClipperServer port...");
|
||||||
|
let host = "http://localhost:" + await findPort();
|
||||||
|
let apiToken = await authenticate(host);
|
||||||
|
//let apiToken = "";
|
||||||
|
let notes = await getNotebookNotes(apiToken, host);
|
||||||
|
await clearBlogFolder();
|
||||||
|
|
||||||
|
for(let noteId of notes) {
|
||||||
|
|
||||||
|
let noteBody = await getNoteBody(apiToken, host, noteId);
|
||||||
|
let slug = await getNoteSlug(noteBody);
|
||||||
|
|
||||||
|
let resources = await getNoteResources(apiToken, host, noteId);
|
||||||
|
|
||||||
|
noteBody = await fixResourceLinks(resources, noteBody);
|
||||||
|
noteBody = await otherReplaces(noteBody);
|
||||||
|
|
||||||
|
console.log("Saving note with slug:", slug, resources);
|
||||||
|
await saveNote(slug, noteBody);
|
||||||
|
await saveResources(resources, apiToken, host, slug)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
main().then();
|
96
src/utils/og-templates/post.tsx
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
import { SITE } from "@config";
|
||||||
|
import type { CollectionEntry } from "astro:content";
|
||||||
|
|
||||||
|
export default (post: CollectionEntry<"blog">) => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
background: "#fefbfb",
|
||||||
|
width: "100%",
|
||||||
|
height: "100%",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
top: "-1px",
|
||||||
|
right: "-1px",
|
||||||
|
border: "4px solid #000",
|
||||||
|
background: "#ecebeb",
|
||||||
|
opacity: "0.9",
|
||||||
|
borderRadius: "4px",
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
margin: "2.5rem",
|
||||||
|
width: "88%",
|
||||||
|
height: "80%",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
border: "4px solid #000",
|
||||||
|
background: "#fefbfb",
|
||||||
|
borderRadius: "4px",
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
margin: "2rem",
|
||||||
|
width: "88%",
|
||||||
|
height: "80%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
margin: "20px",
|
||||||
|
width: "90%",
|
||||||
|
height: "90%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<p
|
||||||
|
style={{
|
||||||
|
fontSize: 72,
|
||||||
|
fontWeight: "bold",
|
||||||
|
maxHeight: "84%",
|
||||||
|
overflow: "hidden",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{post.data.title}
|
||||||
|
</p>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
width: "100%",
|
||||||
|
marginBottom: "8px",
|
||||||
|
fontSize: 28,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
by{" "}
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
color: "transparent",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
"
|
||||||
|
</span>
|
||||||
|
<span style={{ overflow: "hidden", fontWeight: "bold" }}>
|
||||||
|
{post.data.author}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span style={{ overflow: "hidden", fontWeight: "bold" }}>
|
||||||
|
{SITE.title}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
87
src/utils/og-templates/site.tsx
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
import { SITE } from "@config";
|
||||||
|
|
||||||
|
export default () => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
background: "#fefbfb",
|
||||||
|
width: "100%",
|
||||||
|
height: "100%",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
top: "-1px",
|
||||||
|
right: "-1px",
|
||||||
|
border: "4px solid #000",
|
||||||
|
background: "#ecebeb",
|
||||||
|
opacity: "0.9",
|
||||||
|
borderRadius: "4px",
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
margin: "2.5rem",
|
||||||
|
width: "88%",
|
||||||
|
height: "80%",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
border: "4px solid #000",
|
||||||
|
background: "#fefbfb",
|
||||||
|
borderRadius: "4px",
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "center",
|
||||||
|
margin: "2rem",
|
||||||
|
width: "88%",
|
||||||
|
height: "80%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
margin: "20px",
|
||||||
|
width: "90%",
|
||||||
|
height: "90%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
justifyContent: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
height: "90%",
|
||||||
|
maxHeight: "90%",
|
||||||
|
overflow: "hidden",
|
||||||
|
textAlign: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<p style={{ fontSize: 72, fontWeight: "bold" }}>{SITE.title}</p>
|
||||||
|
<p style={{ fontSize: 28 }}>{SITE.desc}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "flex-end",
|
||||||
|
width: "100%",
|
||||||
|
marginBottom: "8px",
|
||||||
|
fontSize: 28,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<span style={{ overflow: "hidden", fontWeight: "bold" }}>
|
||||||
|
{new URL(SITE.website).hostname}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
11
src/utils/postFilter.ts
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
import { SITE } from "@config";
|
||||||
|
import type { CollectionEntry } from "astro:content";
|
||||||
|
|
||||||
|
const postFilter = ({ data }: CollectionEntry<"blog">) => {
|
||||||
|
const isPublishTimePassed =
|
||||||
|
Date.now() >
|
||||||
|
new Date(data.pubDatetime).getTime() - SITE.scheduledPostMargin;
|
||||||
|
return !data.draft && (import.meta.env.DEV || isPublishTimePassed);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default postFilter;
|
5
src/utils/slugify.ts
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import { slug as slugger } from "github-slugger";
|
||||||
|
|
||||||
|
export const slugifyStr = (str: string) => slugger(str);
|
||||||
|
|
||||||
|
export const slugifyAll = (arr: string[]) => arr.map(str => slugifyStr(str));
|
75
tailwind.config.js
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
function withOpacity(variableName) {
|
||||||
|
return ({ opacityValue }) => {
|
||||||
|
if (opacityValue !== undefined) {
|
||||||
|
return `rgba(var(${variableName}), ${opacityValue})`;
|
||||||
|
}
|
||||||
|
return `rgb(var(${variableName}))`;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
module.exports = {
|
||||||
|
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
|
||||||
|
theme: {
|
||||||
|
// Remove the following screen breakpoint or add other breakpoints
|
||||||
|
// if one breakpoint is not enough for you
|
||||||
|
screens: {
|
||||||
|
sm: "640px",
|
||||||
|
},
|
||||||
|
|
||||||
|
extend: {
|
||||||
|
textColor: {
|
||||||
|
skin: {
|
||||||
|
base: withOpacity("--color-text-base"),
|
||||||
|
accent: withOpacity("--color-accent"),
|
||||||
|
inverted: withOpacity("--color-fill"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
backgroundColor: {
|
||||||
|
skin: {
|
||||||
|
fill: withOpacity("--color-fill"),
|
||||||
|
accent: withOpacity("--color-accent"),
|
||||||
|
inverted: withOpacity("--color-text-base"),
|
||||||
|
card: withOpacity("--color-card"),
|
||||||
|
"card-muted": withOpacity("--color-card-muted"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
outlineColor: {
|
||||||
|
skin: {
|
||||||
|
fill: withOpacity("--color-accent"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
borderColor: {
|
||||||
|
skin: {
|
||||||
|
line: withOpacity("--color-border"),
|
||||||
|
fill: withOpacity("--color-text-base"),
|
||||||
|
accent: withOpacity("--color-accent"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
skin: {
|
||||||
|
base: withOpacity("--color-text-base"),
|
||||||
|
accent: withOpacity("--color-accent"),
|
||||||
|
},
|
||||||
|
transparent: "transparent",
|
||||||
|
},
|
||||||
|
fontFamily: {
|
||||||
|
mono: ["IBM Plex Mono", "monospace"],
|
||||||
|
},
|
||||||
|
|
||||||
|
typography: {
|
||||||
|
DEFAULT: {
|
||||||
|
css: {
|
||||||
|
pre: {
|
||||||
|
color: false,
|
||||||
|
},
|
||||||
|
code: {
|
||||||
|
color: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins: [require("@tailwindcss/typography")],
|
||||||
|
};
|
17
tsconfig.json
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"extends": "astro/tsconfigs/strict",
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "src",
|
||||||
|
"jsx": "react-jsx",
|
||||||
|
"paths": {
|
||||||
|
"@assets/*": ["assets/*"],
|
||||||
|
"@config": ["config.ts"],
|
||||||
|
"@components/*": ["components/*"],
|
||||||
|
"@content/*": ["content/*"],
|
||||||
|
"@layouts/*": ["layouts/*"],
|
||||||
|
"@pages/*": ["pages/*"],
|
||||||
|
"@styles/*": ["styles/*"],
|
||||||
|
"@utils/*": ["utils/*"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|