diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 22a1505..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "recommendations": ["astro-build.astro-vscode"], - "unwantedRecommendations": [] -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index d642209..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "command": "./node_modules/.bin/astro dev", - "name": "Development server", - "request": "launch", - "type": "node-terminal" - } - ] -} diff --git a/public/fonts/LICENSE b/public/fonts/LICENSE deleted file mode 100644 index 06eb073..0000000 --- a/public/fonts/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Ryan L McIntyre - -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. diff --git a/public/fonts/README.md b/public/fonts/README.md deleted file mode 100644 index 375b577..0000000 --- a/public/fonts/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Nerd Fonts - -This is an archived font from the Nerd Fonts release v3.3.0. - -For more information see: -* https://github.com/ryanoasis/nerd-fonts/ -* https://github.com/ryanoasis/nerd-fonts/releases/latest/ - -# Symbols Only - -This font contains (in the patched-fonts folder) all symbols and is intended to be used -as fallback or together with fontconfig - so that you do not need to individually -patch all the fonts. YMMV. - -## Which font? - -### TL;DR - -* Pick your font family: - * If you are limited to monospaced fonts (because of your terminal, etc) then pick a font with `Nerd Font Mono` (or `NFM`). - * If you want to have bigger icons (usually around 1.5 normal letters wide) pick a font without `Mono` i.e. `Nerd Font` (or `NF`). Most terminals support this, but ymmv. - * If you work in a proportional context (GUI elements or edit a presentation etc) pick a font with `Nerd Font Propo` (or `NFP`). - -### Ligatures - -Ligatures are generally preserved in the patched fonts. -Nerd Fonts `v2.0.0` had no ligatures in the `Nerd Font Mono` fonts, this has been dropped with `v2.1.0`. -If you have a ligature-aware terminal and don't want ligatures you can (usually) disable them in the terminal settings. - -### Explanation - -Once you narrow down your font choice of family (`Droid Sans`, `Inconsolata`, etc) and style (`bold`, `italic`, etc) you have 2 main choices: - -#### `Option 1: Download already patched font` - - * For a stable version download a font package from the [release page](https://github.com/ryanoasis/nerd-fonts/releases) - * Or download the development version from the folders here - -#### `Option 2: Patch your own font` - - * Patch your own variations with the various options provided by the font patcher (i.e. not include all symbols for smaller font size) - -For more information see: [The FAQ](https://github.com/ryanoasis/nerd-fonts/wiki/FAQ-and-Troubleshooting#which-font) - -[SIL-RFN]:http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web_fonts_and_RFNs#14cbfd4a - diff --git a/public/fonts/symbols-nerdfont-mono-regular.ttf b/public/fonts/symbols-nerdfont-mono-regular.ttf deleted file mode 100644 index fbd5e15..0000000 Binary files a/public/fonts/symbols-nerdfont-mono-regular.ttf and /dev/null differ diff --git a/public/icons/x.svg b/public/icons/x.svg deleted file mode 100644 index 35e914d..0000000 --- a/public/icons/x.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/nijika_404.png b/public/images/nijika_404.png new file mode 100644 index 0000000..dafc902 Binary files /dev/null and b/public/images/nijika_404.png differ diff --git a/src/components/Button.astro b/src/components/Button.astro deleted file mode 100644 index 1bb37b0..0000000 --- a/src/components/Button.astro +++ /dev/null @@ -1,13 +0,0 @@ ---- - -interface Props { - href: string; - color: string; -} - ---- - -
- -
- diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 4121f75..baacb55 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -12,9 +12,10 @@ const tr = useTranslations(lang); diff --git a/src/components/LinkButton.astro b/src/components/LinkButton.astro index 608580b..f6355c2 100644 --- a/src/components/LinkButton.astro +++ b/src/components/LinkButton.astro @@ -1,18 +1,20 @@ --- interface Props { href: string; + external?: boolean; } -const { href } = Astro.props; +const { href, external } = Astro.props; --- - + diff --git a/src/components/Navigation.astro b/src/components/Navigation.astro index 7a8b3c2..9690188 100644 --- a/src/components/Navigation.astro +++ b/src/components/Navigation.astro @@ -12,7 +12,9 @@ const tr = useTranslations(lang as never); diff --git a/src/components/SocialLinks.astro b/src/components/SocialLinks.astro index 06ca1b6..09890a7 100644 --- a/src/components/SocialLinks.astro +++ b/src/components/SocialLinks.astro @@ -8,78 +8,73 @@ import LinkButton from "./LinkButton.astro"; width={340} height={120} sandbox="allow-scripts" - frameborder={0} - src="https://widgets.vendicated.dev/user?id=568589231954591749&theme=dark&banner=true&full-banner=false&rounded-corners=false&discord-icon=true&badges=false&guess-nitro=false&" + style="display: none" /> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
GitHubretrozinndev
GitLabretrozinndev
CodeBergretrozinndev
X / Twitter@retrozinndev
Matrix@retrozinndev:matrix.org
RedditMuch_Clue7037
Mailjoaovodias@gmail.com
diff --git a/src/i18n/en.ts b/src/i18n/lang/en.ts similarity index 53% rename from src/i18n/en.ts rename to src/i18n/lang/en.ts index 3ce85ed..c7a0fd3 100644 --- a/src/i18n/en.ts +++ b/src/i18n/lang/en.ts @@ -1,25 +1,31 @@ -export const en = { +import type { i18nStruct } from "../struct"; + +export default { language: "English (United States)", nav: { home: "Home", + home_tooltip: "Go back to the home page", about: "About", + about_tooltip: "More information about me", stack: "Stack", + stack_tooltip: "My technology stack", projects: "Projects", + projects_tooltip: "Some of my most important projects", language: "Language" }, about: { - title: "Heyy, I'm", + title: "My name is", description: `I'm a tech enthusiast who loves GNU/Linux and has passion on learning software development stuff! You can also call me retrozinn if you want to.`, socials_title: "Some of my socials", projects: "Get in touch with my projects" }, - 404: { - title: "404 - Not found!", + "404": { + artist: "Artist", description: { l1: "Looks like I haven't developed this yet!", l2: "Feel free to suggest me anything, talk to me on any of" @@ -30,28 +36,6 @@ export const en = { projects: { title: "Projects", description: "Here are some of my projects! You can also see them on", - - retrozinndev_website: { - description: "My personal website on GitHub!" - }, - parceiroti_website: { - description: "The new Parceiro T.I. website, redesigned" - }, - updatentime: { - description: "Tool that synchronizes your computer's date and time with the internet!" - }, - noteui: { - description: "An UI library for Note Studios games and apps!" - }, - jsonutils: { - description: "A JSON library for java that is focused at being easy to use" - }, - thetraveler: { - description: "2D Shooter game that is free and open-source!" - }, - spaceshooter: { - description: "A free game about shooting meteors in space!" - } }, footer: { @@ -64,4 +48,4 @@ export const en = { nf_load_error: "Couldn't load NerdFont" } -} as const; +} as const as i18nStruct; diff --git a/src/i18n/lang/pt.ts b/src/i18n/lang/pt.ts new file mode 100644 index 0000000..57bf0ce --- /dev/null +++ b/src/i18n/lang/pt.ts @@ -0,0 +1,46 @@ +import type { i18nStruct } from "../struct"; + +export default { + + language: "Português (Brasil)", + + nav: { + home: "Início", + home_tooltip: "Retornar à pagina inicial", + about: "Sobre", + about_tooltip: "Mais informaçes sobre mim", + stack: "Stack", + stack_tooltip: "Linguagens e tecnologias que uso", + projects: "Projetos", + projects_tooltip: "Alguns dos meus principais projetos", + language: "Idioma" + }, + + about: { + title: "Meu nome é", + description: `Eu curto tecnologia, GNU/Linux e também gosto de aprender como desenvolver + coisas! Você também pode me chamar de Retrozinn, se quiser.`, + socials_title: "Minhas redes", + projects: "Veja alguns dos meus projetos" + }, + + "404": { + artist: "Artista", + description: { + l1: "Parece que eu ainda não desenvolvi essa página!", + l2: "Se quiser sugerir alguma ideia, me chame em qualquer uma das" + }, + socials: "minhas redes sociais!" + }, + + projects: { + title: "Projetos", + description: "Aqui estão alguns dos meus projetos! Você pode vê-los no", + }, + + footer: { + txt1: "Feito com", + txt2: "por João Dias", + txt3: "Melhore esta página" + } +} as const as i18nStruct; diff --git a/src/i18n/pt.ts b/src/i18n/pt.ts deleted file mode 100644 index d0bb6f6..0000000 --- a/src/i18n/pt.ts +++ /dev/null @@ -1,62 +0,0 @@ -export const pt = { - - language: "Português (Brasil)", - - nav: { - home: "Início", - about: "Sobre mim", - stack: "Conhecimento", - projects: "Projetos", - language: "Idioma" - }, - - about: { - title: "Olá, sou o", - description: `Eu curto tecnologia, GNU/Linux e também gosto de aprender como desenvolver - coisas! Você também pode me chamar de Retrozinn, se quiser.`, - socials_title: "Minhas redes", - projects: "Veja alguns dos meus projetos" - }, - - 404: { - title: "404 - Não encontrado!", - description: { - l1: "Parece que eu ainda não desenvolvi essa página!", - l2: "Se quiser sugerir alguma ideia, me chame em qualquer uma das" - }, - socials: "minhas redes sociais!" - }, - - projects: { - title: "Projetos", - description: "Aqui estão alguns dos meus projetos! Você pode vê-los no", - - retrozinndev_website: { - description: "Meu website pessoal no GitHub!" - }, - parceiroti_website: { - description: "O novo website da Parceiro T.I." - }, - updatentime: { - description: "Ferramenta que sincroniza sua data e hora com o da internet!" - }, - noteui: { - description: "Uma biblioteca de objetos de interface para jogos e aplicativos da Note Studios" - }, - jsonutils: { - description: "Uma biblioteca de JSON para Java, focada em ser fácil de usar" - }, - thetraveler: { - description: "Um jogo de tiro 2D gratuito e de código aberto!" - }, - spaceshooter: { - description: "Jogo de código aberto sobre atirar em meteoros no espaço!" - } - }, - - footer: { - txt1: "Feito com", - txt2: "por João Dias", - txt3: "Melhore esta página" - } -} as const; diff --git a/src/i18n/struct.ts b/src/i18n/struct.ts new file mode 100644 index 0000000..3f7dfe7 --- /dev/null +++ b/src/i18n/struct.ts @@ -0,0 +1,46 @@ +export type i18nStruct = { + language: string, + + nav: { + home: string, + home_tooltip: string, + about: string, + about_tooltip: string, + stack: string, + stack_tooltip: string, + projects: string, + projects_tooltip: string, + language: string + }, + + about: { + title: string, + description: string, + socials_title: string, + projects: string + }, + + 404: { + artist: string, + description: { + l1: string, + l2: string + }, + socials: string + }, + + projects: { + title: string, + description: string, + }, + + footer: { + txt1: string, + txt2: string, + txt3: string + }, + + errors: { + nf_load_error: string + } +}; diff --git a/src/i18n/ui.ts b/src/i18n/ui.ts index 9ca6dad..fdb6365 100644 --- a/src/i18n/ui.ts +++ b/src/i18n/ui.ts @@ -1,15 +1,8 @@ -import { en } from"./en.ts"; -import { pt } from "./pt.ts"; - -export let i18n: object = { - en: { - ...en - }, - pt: { - ...pt - } +export const i18n = { + en: (await import("./lang/en")).default, + pt: (await import("./lang/pt")).default }; export const languages: Array = Object.keys(i18n); -export const defaultLang = "en" as keyof typeof i18n; +export const defaultLang = languages[0]; diff --git a/src/i18n/utils.ts b/src/i18n/utils.ts index fead143..1c0a801 100644 --- a/src/i18n/utils.ts +++ b/src/i18n/utils.ts @@ -1,27 +1,37 @@ +import type { i18nStruct } from "./struct.ts"; import { languages, i18n, defaultLang } from "./ui.ts"; -export function getLanguageFromURL(url: URL): (string|keyof typeof i18n) { - var splittedURL: string[] = url.pathname.split("/"); - var currentIntl: string = splittedURL[1]; // Gets the second URL part +export function getLanguageFromURL(url: (URL|string)): (string) { + const splittedURL: string[] = (typeof url === "string") ? + url.split('/') + : url.pathname.split("/"); - if(currentIntl in i18n) - return currentIntl as keyof typeof i18n; - - return currentIntl as string; + return splittedURL[1].length !== 2 ? + defaultLang + : splittedURL[1]; } -export function useTranslations(lang: keyof typeof i18n): Function { +export function useTranslations(lang: string): Function { return function tr(key: string): string { const keys = key.split("."); - let translation = i18n[lang], defaultTranslation = i18n[defaultLang]; + let translation: (object|string) = i18n[lang as keyof typeof i18n] as i18nStruct, + defaultTranslation: (object|string) = i18n[defaultLang as keyof typeof i18n] as i18nStruct; keys.forEach(key => { - translation = translation[key]; - defaultTranslation = defaultTranslation[key]; + translation = translation[key as keyof typeof translation]; + defaultTranslation = defaultTranslation[key as never]; }); - return translation || defaultTranslation || "Couldn't find key to translate."; + if(typeof translation !== "string") + return (typeof defaultTranslation === "string") ? + defaultTranslation + : (() => { + console.error(`i18n: no string found for \`${key}\`, or key is not of type \`string\``); + return "no_tr_key_error"; + })(); + + return translation; } } diff --git a/src/layouts/PageLayout.astro b/src/layouts/PageLayout.astro index 540ef04..e0d1c12 100644 --- a/src/layouts/PageLayout.astro +++ b/src/layouts/PageLayout.astro @@ -5,7 +5,7 @@ import "../styles/global.scss"; interface Props { title: string; - icon: string; + icon?: string; } const { title, icon } = Astro.props; --- @@ -15,10 +15,16 @@ const { title, icon } = Astro.props; { title } - + - + +
diff --git a/src/pages/404.astro b/src/pages/404.astro index b419eb6..e411685 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -1,49 +1,80 @@ --- +import { Image } from "astro:assets"; import { getLanguages, getLanguageFromURL, useTranslations } from "../i18n/utils"; -import Navigation from "../components/Navigation.astro"; +import PageLayout from "../layouts/PageLayout.astro"; Astro.params.lang = "en"; -const langs: string[] = getLanguages(); -langs.forEach(intl => { - if(getLanguageFromURL(Astro.url) == intl) { - Astro.params.lang = intl; - } +getLanguages().forEach(intl => { + if(getLanguageFromURL(Astro.url) !== intl) + return; + + Astro.params.lang = intl; }); -const tr = useTranslations(Astro.params.lang as never); +const tr = useTranslations(Astro.params.lang); --- - - - - - - retrozinndev - Not Found! - - - - -
-
-

{ tr("404.title") }

-

- { tr("404.description.l1") }
- { tr("404.description.l2") } { tr("404.socials") } -

+ +
+
+
+ Nijika 404 +

{ tr("404.artist").toLowerCase() }: schu_1112

+
+

404!

+

+ { tr("404.description.l1") }
+ { tr("404.description.l2") } { tr("404.socials") } +

- - - - - - + + +
diff --git a/src/pages/[lang]/index.astro b/src/pages/[lang]/index.astro index bbe555d..45d14fc 100644 --- a/src/pages/[lang]/index.astro +++ b/src/pages/[lang]/index.astro @@ -10,7 +10,7 @@ export { getStaticPaths }; const tr = useTranslations(Astro.params.lang as never); --- - +
diff --git a/src/pages/[lang]/projects.astro b/src/pages/[lang]/projects.astro index 3aa7664..c14723b 100644 --- a/src/pages/[lang]/projects.astro +++ b/src/pages/[lang]/projects.astro @@ -9,7 +9,7 @@ export { getStaticPaths }; const tr = useTranslations(Astro.params.lang as never); --- - +

{ tr("projects.title") }

diff --git a/src/pages/[lang]/stack.astro b/src/pages/[lang]/stack.astro index 1bf9857..e0a2682 100644 --- a/src/pages/[lang]/stack.astro +++ b/src/pages/[lang]/stack.astro @@ -6,7 +6,7 @@ import LinkButton from "../../components/LinkButton.astro"; export { getStaticPaths }; --- - +

Tech Stack

This is my knowlege stack! It contains the technologies that I've learned until today. Not much yet, I know.

diff --git a/src/styles/_colors.scss b/src/styles/_colors.scss index 9333e90..93ae46a 100644 --- a/src/styles/_colors.scss +++ b/src/styles/_colors.scss @@ -10,6 +10,6 @@ $link-color: #2f82c2; $emphasis-color: #2c73a5; // General -$accent-color: #e0c82b; -$accent-color-dark: #ad9c2a; +$accent-color: #e3cf62; +$accent-color-dark: #a89b54; diff --git a/src/styles/_fonts.scss b/src/styles/_fonts.scss index 67167d0..49fd042 100644 --- a/src/styles/_fonts.scss +++ b/src/styles/_fonts.scss @@ -3,5 +3,5 @@ @font-face { font-family: "Nerd Font Symbols"; - src: url("/fonts/symbols-nerdfont-mono-regular.ttf"); + src: url("https://cdn.jsdelivr.net/gh/ryanoasis/nerd-fonts@latest/patched-fonts/NerdFontsSymbolsOnly/SymbolsNerdFontMono-Regular.ttf"); } diff --git a/src/styles/global.scss b/src/styles/global.scss index a64feca..b16bff5 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -1,4 +1,3 @@ - @use "./colors"; @use "./fonts"; @@ -9,21 +8,37 @@ html { } body { - overflow-y: scroll; - overflow-inline: clip; - color: white; -} + overflow-y: scroll; + overflow-inline: clip; + color: white; + + & a { + all: unset; + transition: 120ms ease-in; + cursor: pointer; + text-decoration: underline; + font-weight: 600; + } -body.dark { + &.dark { color-scheme: dark; background-color: colors.$bg-color-dark; color: white; -} -body.light { + a:hover { + color: colors.$accent-color; + } + } + + &.light { color-scheme: light; background-color: colors.$bg-color-light; color: black; + + a:hover { + color: colors.$accent-color-dark + } + } } h1 {