diff --git a/index.html b/index.html
index 9b8415e..535101e 100644
--- a/index.html
+++ b/index.html
@@ -1,17 +1,17 @@
-
+
-
-
-
-
-

-
{t('header.title')}
-
-
-
+
);
-}
\ No newline at end of file
+}
diff --git a/src/components/HeaderButton.tsx b/src/components/HeaderButton.tsx
index 72c0d83..2578891 100644
--- a/src/components/HeaderButton.tsx
+++ b/src/components/HeaderButton.tsx
@@ -2,23 +2,23 @@ import { useTranslation } from "react-i18next";
import { Link } from "preact-router";
interface HeaderButtonProps {
- href: string;
- Icon: any;
- translationKey: string;
+ href: string;
+ Icon: any;
+ translationKey: string;
}
export function HeaderButton(props: HeaderButtonProps) {
- const { href, Icon, translationKey } = props;
- const { t } = useTranslation();
+ const { href, Icon, translationKey } = props;
+ const { t } = useTranslation();
- return (
-
-
-
-
- {t(translationKey)}
-
-
-
- );
+ return (
+
+
+
+
+ {t(translationKey)}
+
+
+
+ );
}
diff --git a/src/i18n.ts b/src/i18n.ts
index 0084cd7..c5e5090 100644
--- a/src/i18n.ts
+++ b/src/i18n.ts
@@ -1,17 +1,17 @@
-import i18n from 'i18next';
-import { initReactI18next } from 'react-i18next';
-import LanguageDetector from 'i18next-browser-languagedetector';
+import i18n from "i18next";
+import { initReactI18next } from "react-i18next";
+import LanguageDetector from "i18next-browser-languagedetector";
-import translationEN from './locales/en.json';
-import translationJA from './locales/ja.json';
+import translationEN from "./locales/en.json";
+import translationJA from "./locales/ja.json";
const resources = {
en: {
- translation: translationEN,
+ translation: translationEN
},
ja: {
- translation: translationJA,
- },
+ translation: translationJA
+ }
};
i18n
@@ -19,10 +19,10 @@ i18n
.use(LanguageDetector)
.init({
resources,
- fallbackLng: 'en',
+ fallbackLng: "en",
interpolation: {
- escapeValue: false,
- },
+ escapeValue: false
+ }
});
-export default i18n;
\ No newline at end of file
+export default i18n;
diff --git a/src/index.tsx b/src/index.tsx
index 907300c..dc53c45 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,31 +1,31 @@
-import { render } from 'preact';
-import { LocationProvider, Router, Route } from 'preact-iso';
+import { render } from "preact";
+import { LocationProvider, Router, Route } from "preact-iso";
-import { Header } from './components/Header.jsx';
-import { Home } from './pages/Home';
-import { NotFound } from './pages/_404.jsx';
-import './style.css';
-import './themes/main.css';
-import './i18n';
-import { discordPag } from './pages/discord.js';
+import { Header } from "./components/Header.jsx";
+import { Home } from "./pages/Home";
+import { NotFound } from "./pages/_404.jsx";
+import "./style.css";
+import "./themes/main.css";
+import "./i18n";
+import { discordPag } from "./pages/discord.js";
export function App() {
- return (
-
-
-
- );
+ return (
+
+
+
+ );
}
-render(
, document.getElementById('app'));
+render(
, document.getElementById("app"));
diff --git a/src/locales/en.json b/src/locales/en.json
index a56b9ee..ff1ab71 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -1,21 +1,21 @@
{
- "header": {
- "title": "nebula.",
- "games": "Games",
- "settings": "Settings",
- "discord": "Want more links?"
- },
- "404": {
- "text": "This Nebula Service has been disabled.",
- "return": "Back to home"
- },
- "home": {
- "placeholder": "Search the web freely"
- },
- "discord": {
- "title": "Nebula's Discord Server",
- "sub": "Would you like to open this via proxy?",
- "button1": "Open Normally",
- "button2": "Use Proxy"
- }
-}
\ No newline at end of file
+ "header": {
+ "title": "nebula.",
+ "games": "Games",
+ "settings": "Settings",
+ "discord": "Want more links?"
+ },
+ "404": {
+ "text": "This Nebula Service has been disabled.",
+ "return": "Back to home"
+ },
+ "home": {
+ "placeholder": "Search the web freely"
+ },
+ "discord": {
+ "title": "Nebula's Discord Server",
+ "sub": "Would you like to open this via proxy?",
+ "button1": "Open Normally",
+ "button2": "Use Proxy"
+ }
+}
diff --git a/src/locales/ja.json b/src/locales/ja.json
index 07177c0..44c336e 100644
--- a/src/locales/ja.json
+++ b/src/locales/ja.json
@@ -1,21 +1,21 @@
{
- "header": {
- "title": "ネブラ。",
- "games": "ゲーム",
- "settings": "セッティング",
- "discord": "もっとリンクが欲しいですか?"
- },
- "404": {
- "text": "このネビュラサービスは無効になっています",
- "return": "帰宅"
- },
- "home": {
- "placeholder": "由にウェブを検索"
- },
- "discord": {
- "title": "ネブラDiscordサーバー",
- "sub": "プロキシ経由で開きますか?",
- "button1": "通常通り開く",
- "button2": "プロキシを使用する"
- }
-}
\ No newline at end of file
+ "header": {
+ "title": "ネブラ。",
+ "games": "ゲーム",
+ "settings": "セッティング",
+ "discord": "もっとリンクが欲しいですか?"
+ },
+ "404": {
+ "text": "このネビュラサービスは無効になっています",
+ "return": "帰宅"
+ },
+ "home": {
+ "placeholder": "由にウェブを検索"
+ },
+ "discord": {
+ "title": "ネブラDiscordサーバー",
+ "sub": "プロキシ経由で開きますか?",
+ "button1": "通常通り開く",
+ "button2": "プロキシを使用する"
+ }
+}
diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx
index 89f9aef..ed9d835 100644
--- a/src/pages/Home.tsx
+++ b/src/pages/Home.tsx
@@ -1,24 +1,23 @@
import { useState } from "preact/hooks";
-import { useTranslation } from 'react-i18next';
+import { useTranslation } from "react-i18next";
export function Home() {
- const [isFocused, setIsFocused] = useState(false);
- const { t } = useTranslation()
+ const [isFocused, setIsFocused] = useState(false);
+ const { t } = useTranslation();
- return (
-
- {
- setIsFocused(true);
- }}
- onBlur={(e) => {
- setIsFocused(false);
- }}
- type="text"
- class="p-2 border border-input-border-color rounded-2xl h-14 w-80 text-center bg-input text-xl placeholder:text-input-text focus:outline-none font-roboto"
- placeholder={isFocused ? '' : t('home.placeholder')}
- >
-
-
- );
-}
\ No newline at end of file
+ return (
+
+ {
+ setIsFocused(true);
+ }}
+ onBlur={(e) => {
+ setIsFocused(false);
+ }}
+ type="text"
+ class="font-roboto h-14 w-80 rounded-2xl border border-input-border-color bg-input p-2 text-center text-xl placeholder:text-input-text focus:outline-none"
+ placeholder={isFocused ? "" : t("home.placeholder")}
+ >
+
+ );
+}
diff --git a/src/pages/_404.tsx b/src/pages/_404.tsx
index 2186d8f..c294a22 100644
--- a/src/pages/_404.tsx
+++ b/src/pages/_404.tsx
@@ -1,20 +1,22 @@
-import { useTranslation } from 'react-i18next';
-import { Link } from 'preact-router';
+import { useTranslation } from "react-i18next";
+import { Link } from "preact-router";
export function NotFound() {
- const { t } = useTranslation()
- return (
-
-
-

-
-
{t('404.text')}
-
404
-
-
-
-
-
-
- );
+ const { t } = useTranslation();
+ return (
+
+
+

+
+
{t("404.text")}
+
404
+
+
+
+
+
+
+ );
}
diff --git a/src/pages/discord.tsx b/src/pages/discord.tsx
index 5f89e8d..56a3d1a 100644
--- a/src/pages/discord.tsx
+++ b/src/pages/discord.tsx
@@ -1,21 +1,25 @@
-import { useTranslation } from 'react-i18next';
+import { useTranslation } from "react-i18next";
export function discordPag() {
- const { t } = useTranslation()
- return (
-
- );
-}
\ No newline at end of file
+ const { t } = useTranslation();
+ return (
+
+ );
+}
diff --git a/src/style.css b/src/style.css
index 1157c11..739b03e 100644
--- a/src/style.css
+++ b/src/style.css
@@ -1,5 +1,5 @@
-@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;700;900&display=swap');
+@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;700;900&display=swap");
@tailwind base;
@tailwind components;
-@tailwind utilities;
\ No newline at end of file
+@tailwind utilities;
diff --git a/src/themes/main.css b/src/themes/main.css
index 4dc377f..983f7a9 100644
--- a/src/themes/main.css
+++ b/src/themes/main.css
@@ -1,26 +1,26 @@
@import url("https://fonts.googleapis.com/css2?family=Dongle&family=Roboto:wght@100&display=swap");
:root {
- --background-primary: #191724;
- --navbar-color: #26233a;
- --navbar-height: 60px;
- --navbar-text-color: #7967dd;
- --navbar-link-color: #e0def4;
- --navbar-link-hover-color: gray;
- --navbar-font: "Roboto";
- --input-text-color: #e0def4;
- --input-placeholder-color: white;
- --input-background-color: #1f1d2e;
- --input-border-color: #eb6f92;
- --input-border-size: 1.3px;
- --navbar-logo-filter: none;
- }
+ --background-primary: #191724;
+ --navbar-color: #26233a;
+ --navbar-height: 60px;
+ --navbar-text-color: #7967dd;
+ --navbar-link-color: #e0def4;
+ --navbar-link-hover-color: gray;
+ --navbar-font: "Roboto";
+ --input-text-color: #e0def4;
+ --input-placeholder-color: white;
+ --input-background-color: #1f1d2e;
+ --input-border-color: #eb6f92;
+ --input-border-size: 1.3px;
+ --navbar-logo-filter: none;
+}
.font-inter {
- font-family: 'Inter', sans-serif;
- font-weight: 300;
+ font-family: "Inter", sans-serif;
+ font-weight: 300;
}
-
+
.font-roboto {
- font-family: 'Roboto';
+ font-family: "Roboto";
}
diff --git a/tailwind.config.js b/tailwind.config.js
index be2c59a..bf39f6b 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,22 +1,18 @@
/** @type {import('tailwindcss').Config} */
export default {
- content: [
- "./index.html",
- "./src/**/*.{js,ts,jsx,tsx}",
- ],
+ content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"],
theme: {
colors: {
- "primary": "var(--background-primary)",
+ primary: "var(--background-primary)",
"navbar-text-color": "var(--navbar-text-color)",
"navbar-color": "var(--navbar-color)",
"text-color": "var(--navbar-link-color)",
"text-hover-color": "var(--navbar-link-hover-color)",
- "input": "var(--input-background-color)",
+ input: "var(--input-background-color)",
"input-text": "var(--input-text-color)",
"input-border-color": "var(--input-border-color)"
},
- extend: {},
+ extend: {}
},
- plugins: [],
-}
-
+ plugins: []
+};
diff --git a/tsconfig.json b/tsconfig.json
index 12bb30b..77e0f9c 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,20 +1,20 @@
{
- "compilerOptions": {
- "target": "ES2020",
- "module": "ESNext",
- "moduleResolution": "bundler",
- "noEmit": true,
- "allowJs": true,
- "checkJs": true,
+ "compilerOptions": {
+ "target": "ES2020",
+ "module": "ESNext",
+ "moduleResolution": "bundler",
+ "noEmit": true,
+ "allowJs": true,
+ "checkJs": true,
- /* Preact Config */
- "jsx": "react-jsx",
- "jsxImportSource": "preact",
- "skipLibCheck": true,
- "paths": {
- "react": ["./node_modules/preact/compat/"],
- "react-dom": ["./node_modules/preact/compat/"]
- }
- },
- "include": ["node_modules/vite/client.d.ts", "**/*"]
+ /* Preact Config */
+ "jsx": "react-jsx",
+ "jsxImportSource": "preact",
+ "skipLibCheck": true,
+ "paths": {
+ "react": ["./node_modules/preact/compat/"],
+ "react-dom": ["./node_modules/preact/compat/"]
+ }
+ },
+ "include": ["node_modules/vite/client.d.ts", "**/*"]
}
diff --git a/vite.config.ts b/vite.config.ts
index 026e669..1233e8d 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,8 +1,8 @@
-import million from 'million/compiler';
-import { defineConfig } from 'vite';
-import preact from '@preact/preset-vite';
+import million from "million/compiler";
+import { defineConfig } from "vite";
+import preact from "@preact/preset-vite";
// https://vitejs.dev/config/
export default defineConfig({
- plugins: [million.vite({ auto: true }), preact()],
+ plugins: [million.vite({ auto: true }), preact()]
});