-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 85d7952
Showing
23 changed files
with
351 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
node_modules | ||
|
||
# Output | ||
.output | ||
.vercel | ||
/.svelte-kit | ||
/build | ||
|
||
# OS | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Env | ||
.env | ||
.env.* | ||
!.env.example | ||
!.env.test | ||
|
||
# Vite | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
engine-strict=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Package Managers | ||
package-lock.json | ||
pnpm-lock.yaml | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"useTabs": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"printWidth": 100, | ||
"plugins": ["prettier-plugin-svelte"], | ||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Sliver Complex - Landing Site | ||
|
||
The landing site of Sliver Complex, powered by SvelteKit. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import js from '@eslint/js'; | ||
import ts from 'typescript-eslint'; | ||
import svelte from 'eslint-plugin-svelte'; | ||
import prettier from 'eslint-config-prettier'; | ||
import globals from 'globals'; | ||
|
||
/** @type {import('eslint').Linter.FlatConfig[]} */ | ||
export default [ | ||
js.configs.recommended, | ||
...ts.configs.recommended, | ||
...svelte.configs['flat/recommended'], | ||
prettier, | ||
...svelte.configs['flat/prettier'], | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node | ||
} | ||
} | ||
}, | ||
{ | ||
files: ['**/*.svelte'], | ||
languageOptions: { | ||
parserOptions: { | ||
parser: ts.parser | ||
} | ||
} | ||
}, | ||
{ | ||
ignores: ['build/', '.svelte-kit/', 'dist/'] | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "s-complex", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite dev", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"lint": "prettier --check . && eslint .", | ||
"format": "prettier --write ." | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^3.0.0", | ||
"@sveltejs/adapter-static": "^3.0.2", | ||
"@sveltejs/kit": "^2.0.0", | ||
"@sveltejs/vite-plugin-svelte": "^3.0.0", | ||
"@types/eslint": "^8.56.7", | ||
"@unocss/extractor-svelte": "^0.61.3", | ||
"@unocss/transformer-compile-class": "^0.61.3", | ||
"eslint": "^9.0.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-svelte": "^2.36.0", | ||
"globals": "^15.0.0", | ||
"prettier": "^3.1.1", | ||
"prettier-plugin-svelte": "^3.1.2", | ||
"svelte": "^4.2.7", | ||
"svelte-check": "^3.6.0", | ||
"tslib": "^2.4.1", | ||
"typescript": "^5.0.0", | ||
"typescript-eslint": "^8.0.0-alpha.20", | ||
"unocss": "^0.61.3", | ||
"vite": "^5.0.3" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"@unocss/reset": "^0.61.3", | ||
"svelte-theme-select": "^0.0.7" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// See https://kit.svelte.dev/docs/types#app | ||
// for information about these interfaces | ||
declare global { | ||
namespace App { | ||
// interface Error {} | ||
// interface Locals {} | ||
// interface PageData {} | ||
// interface PageState {} | ||
// interface Platform {} | ||
} | ||
} | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
%sveltekit.head% | ||
</head> | ||
<body data-sveltekit-preload-data="hover"> | ||
<div style="display: contents">%sveltekit.body%</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script lang="ts"> | ||
</script> | ||
|
||
<footer class=":uno: p-4 text-center"> | ||
<p>© 2022 - {@html new Date().getFullYear()} <a href="/">Sliver Complex</a>. Powered by SvelteKit.</p> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<header class=":uno: shadow-md bg-white dark:bg-neutral-700 px-2"> | ||
<nav class=":uno: flex justify-center gap-1"> | ||
<a class=":uno: nav-item" href="/"> | ||
<img width="32" height="32" src="https://library.gxres.net/images/icons/favicon.webp" alt="Site favicon" /> | ||
</a> | ||
<a class=":uno: nav-item" href="/">Index</a> | ||
<a class=":uno: nav-item" href="/project">Project</a> | ||
<a class=":uno: nav-item" href="/about">About</a> | ||
</nav> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// place files you want to import through the `$lib` alias in this folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script lang="ts"> | ||
import 'uno.css'; | ||
import Header from '../components/Header.svelte'; | ||
import Footer from '../components/Footer.svelte'; | ||
import { createThemeSwitcher, Theme } from 'svelte-theme-select'; | ||
createThemeSwitcher(); | ||
</script> | ||
|
||
<svelte:head> | ||
<title>Sliver Complex</title> | ||
<meta name="description" content="The landing site of Sliver Complex."> | ||
<link rel="icon" href="https://library.gxres.net/images/icons/favicon.webp"> | ||
</svelte:head> | ||
|
||
<div> | ||
<Header /> | ||
<main class=":uno: max-w-4xl mx-auto p-4"> | ||
<slot /> | ||
</main> | ||
<Footer /> | ||
</div> | ||
|
||
<Theme /> | ||
|
||
<style> | ||
:global(body) { | ||
--apply: m-0 bg-white dark:bg-neutral-800; | ||
font-family: 'Noto Sans'; | ||
} | ||
:global(h1, h2, h3, h4, h5, h6, p) { | ||
--apply: text-black dark:text-white; | ||
} | ||
:global(a) { | ||
--apply: text-sky-600 no-underline; | ||
} | ||
:global(code) { | ||
--apply: text-red font-family: 'Jetbrains Mono'; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const prerender = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<section class=":uno: flex justify-center text-center space-y-4"> | ||
<div> | ||
<span class=":uno: flex justify-center"> | ||
<img | ||
class=":uno: rounded-full" | ||
width="128" | ||
height="128" | ||
src="https://library.gxres.net/images/icons/big-favicon.webp" | ||
alt="Sliver Complex logo" | ||
/> | ||
</span> | ||
<hgroup> | ||
<h1>Sliver Complex</h1> | ||
<p> | ||
Personal lab of <a target="_blank" href="https://github.com/gxres042">@gxres042</a> and | ||
<a target="_blank" href="https://github.com/slivermoe">slivermoe</a> | ||
</p> | ||
</hgroup> | ||
<br> | ||
<p class=":uno: text-sm">* We use domain <code>slirv.vip</code> to serve some services, such as the comment system and the self-hosted analysis service.</p> | ||
<p></p> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<h1>About</h1> | ||
<p>Sliver Complex is a personal lab belongs to Restent Ou and SliverRiver.</p> | ||
<h2>Direction</h2> | ||
<p> | ||
We focus on the production of every front-end project, which will finally be used on our website | ||
or others. | ||
</p> | ||
<p> | ||
We usually use Vue as the main front-end framework. At the same time, we sometimes use React and | ||
Svelte in other projects. | ||
</p> | ||
<h2>Services</h2> | ||
<p> | ||
Now, the GitHub organization of Sliver Complex hosts our website project, and its associated | ||
domain, <code>slirv.vip</code>, also provides some of the services that complement our website. | ||
</p> | ||
<p> | ||
However, we are glad to help others building their websites, such as personal homepage and blog, | ||
although our current capacity is still limited. <a | ||
href="https://library.gxres.net/social/for-contact">Contact us</a | ||
> if you are interested. | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<script lang="ts"> | ||
import { onMount } from 'svelte'; | ||
interface Repo { | ||
name: string; | ||
html_url: string; | ||
description: string; | ||
} | ||
let repos: Repo[] = []; | ||
let isLoading = true; | ||
onMount(async () => { | ||
const response = await fetch('https://api.slirv.vip/org-projects'); | ||
const data: Repo[] = await response.json(); | ||
repos = data.map((repo) => ({ | ||
name: repo.name, | ||
html_url: repo.html_url, | ||
description: repo.description | ||
})); | ||
isLoading = false; | ||
}); | ||
</script> | ||
|
||
<hgroup> | ||
<h1>Project</h1> | ||
<p>List of projects that are visible to everyone in this lab.</p> | ||
</hgroup> | ||
|
||
{#if isLoading} | ||
<p>Loading...</p> | ||
{:else} | ||
<div class=":uno: grid grid-cols-1 sm:grid-cols-2 gap-4"> | ||
{#each repos as repo (repo.name)} | ||
<a href={repo.html_url}> | ||
<div class=":uno: px-4 py-2 shadow-md hover:shadow-lg rounded"> | ||
<p class=":uno: text-2xl font-semibold">{repo.name}</p> | ||
<p>{repo.description}</p> | ||
</div> | ||
</a> | ||
{/each} | ||
</div> | ||
{/if} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import adapter from '@sveltejs/adapter-static' | ||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; | ||
|
||
/** @type {import('@sveltejs/kit').Config} */ | ||
const config = { | ||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors | ||
// for more information about preprocessors | ||
preprocess: vitePreprocess(), | ||
|
||
kit: { | ||
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. | ||
// If your environment is not supported, or you settled on a specific environment, switch out the adapter. | ||
// See https://kit.svelte.dev/docs/adapters for more information about adapters. | ||
adapter: adapter() | ||
}, | ||
|
||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"extends": "./.svelte-kit/tsconfig.json", | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"checkJs": true, | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"sourceMap": true, | ||
"strict": true, | ||
"moduleResolution": "bundler" | ||
} | ||
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias | ||
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files | ||
// | ||
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes | ||
// from the referenced tsconfig.json - TypeScript does not merge them in | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { defineConfig, presetUno, presetWebFonts, transformerDirectives } from 'unocss'; | ||
import transformerCompileClass from '@unocss/transformer-compile-class'; | ||
|
||
export default defineConfig({ | ||
presets: [ | ||
presetUno(), | ||
presetWebFonts({ | ||
provider: 'bunny', | ||
fonts: { | ||
sans: 'Noto Sans', | ||
mono: 'Jetbrains Mono' | ||
} | ||
}) | ||
], | ||
shortcuts: { | ||
'nav-item': | ||
'px-2 py-3 hover:bg-neutral-100 dark:hover:bg-neutral-600 flex items-center text-black dark:text-white no-underline' | ||
}, | ||
transformers: [ | ||
transformerCompileClass(), | ||
transformerDirectives({ | ||
applyVariable: ['--apply'] | ||
}) | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { sveltekit } from '@sveltejs/kit/vite'; | ||
import { defineConfig } from 'vite'; | ||
import UnoCSS from 'unocss/vite'; | ||
|
||
export default defineConfig({ | ||
plugins: [UnoCSS(), sveltekit()] | ||
}); |