Skip to content

Commit

Permalink
begin port
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Apr 29, 2024
1 parent f42d425 commit ef0445f
Show file tree
Hide file tree
Showing 92 changed files with 5,066 additions and 163 deletions.
File renamed without changes.
24 changes: 24 additions & 0 deletions kitsune-fe-old/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
1 change: 1 addition & 0 deletions kitsune-fe-old/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
13 changes: 13 additions & 0 deletions kitsune-fe-old/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"endOfLine": "lf",
"importOrder": ["^\\w", "^[./|~/]"],
"importOrderSeparation": true,
"importOrderParserPlugins": ["typescript"],
"plugins": [
"@trivago/prettier-plugin-sort-imports",
"prettier-plugin-css-order"
],
"semi": true,
"singleQuote": true,
"vueIndentScriptAndStyle": true
}
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions kitsune-fe-old/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Kitsune FE

Frontend for Kitsune using its GraphQL API

## Build

```
yarn build
```

## Development server

```
yarn dev
```

Set the backend the frontend uses inside `.env.development`

## Autogenerate GraphQL typings in the background

```
yarn graphql-codegen --watch
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
73 changes: 73 additions & 0 deletions kitsune-fe-old/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"name": "kitsune-fe",
"private": true,
"version": "0.0.0",
"type": "module",
"license": "AGPL-3.0-or-later",
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"preview": "vite preview",
"lint": "eslint src",
"format": "prettier . --write"
},
"dependencies": {
"@fluent/bundle": "^0.18.0",
"@formkit/core": "^1.6.2",
"@formkit/validation": "^1.6.2",
"@formkit/vue": "^1.6.2",
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/vue-fontawesome": "^3.0.6",
"@hcaptcha/vue3-hcaptcha": "^1.3.0",
"@mcaptcha/vanilla-glue": "^0.1.0-alpha-3",
"@tiptap/pm": "^2.3.0",
"@tiptap/starter-kit": "^2.3.0",
"@tiptap/vue-3": "^2.3.0",
"@urql/exchange-graphcache": "^7.0.1",
"@urql/vue": "^1.1.3",
"@vueuse/core": "^10.9.0",
"@zxcvbn-ts/core": "^3.0.4",
"@zxcvbn-ts/language-common": "^3.0.4",
"@zxcvbn-ts/language-en": "^3.0.2",
"floating-vue": "^5.2.2",
"fluent-vue": "^3.5.2",
"graphql": "^16.8.1",
"lodash": "^4.17.21",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
"rollup": "npm:@rollup/wasm-node",
"tiptap-markdown": "^0.8.10",
"unhead": "^1.9.7",
"vue": "^3.4.23",
"vue-powerglitch": "^1.0.0",
"vue-router": "^4.3.2",
"vue-virtual-scroller": "^2.0.0-beta.8"
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/client-preset": "^4.2.5",
"@parcel/watcher": "^2.4.1",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/lodash": "^4.17.0",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
"eslint": "^9.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vue": "^9.25.0",
"prettier": "^3.2.5",
"prettier-plugin-css-order": "^2.1.2",
"sass": "^1.75.0",
"typescript": "^5.4.5",
"unplugin-fluent-vue": "^1.3.0",
"vite": "^5.2.10",
"vue-tsc": "^2.0.13"
},
"resolutions": {
"rollup": "npm:@rollup/wasm-node"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions kitsune-fe-old/src/styles/_breakpoints.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Source: Tailwind <https://tailwindcss.com/docs/screens>

$breakpoints: (
sm: 640px,
md: 768px,
lg: 1024px,
xl: 1280px,
xxl: 1536px,
);
7 changes: 7 additions & 0 deletions kitsune-fe-old/src/styles/_colours.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
$dark1: #0f1026;
$dark2: #051c30;
$dark3: #042f40;
$shade1dark: #53a0c4;
$shade1light: #afd7fa;
$shade2dark: #935d7e;
$shade2light: #d68fbc;
6 changes: 6 additions & 0 deletions kitsune-fe-old/src/styles/_fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// COPYRIGHT INFO

@font-face {
src: url('/BlockZone.ttf') format('truetype');
font-family: 'BlockZone';
}
8 changes: 8 additions & 0 deletions kitsune-fe-old/src/styles/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@use './breakpoints' as *;
@use 'sass:map';

@mixin only-on-mobile {
@media only screen and (max-width: map.get($breakpoints, md)) {
@content;
}
}
49 changes: 49 additions & 0 deletions kitsune-fe-old/src/styles/root.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@use 'colours' as *;
@use 'fonts' as *;

* {
// font-family: BlockZone;
box-sizing: inherit;
font-family: 'Courier New', Courier, monospace;
}

:root {
background-color: $dark1;
color: white;

color-scheme: light dark;
font-weight: 400;
font-size: 16px;
line-height: 24px;

font-synthesis: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;

box-sizing: border-box;
}

a {
color: $shade2light;
font-weight: 500;
text-decoration: inherit;
}

body {
margin: 0;
margin-top: 85px;
}

::-webkit-scrollbar {
width: 0.666em;
height: 0.666em;
}

::-webkit-scrollbar-track {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
background-color: $shade2light;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions kitsune-fe-old/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"noEmit": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
}
File renamed without changes.
32 changes: 32 additions & 0 deletions kitsune-fe-old/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import vue from '@vitejs/plugin-vue';

import path from 'node:path';
import { ExternalFluentPlugin } from 'unplugin-fluent-vue/vite';
import { defineConfig } from 'vite';

// https://vitejs.dev/config/
export default defineConfig({
build: {
rollupOptions: {
output: {
manualChunks: {
zxcvbnCommon: ['@zxcvbn-ts/language-common'],
},
},
},
},
plugins: [
vue(),
ExternalFluentPlugin({
locales: ['en', 'en-cyberpunk'],
checkSyntax: true,

baseDir: path.resolve('src'),
ftlDir: path.resolve('src/locales'),

getFtlPath(locale) {
return path.join('src/locales', `${locale}.ftl`);
},
}),
],
});
File renamed without changes.
13 changes: 13 additions & 0 deletions kitsune-fe/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
31 changes: 31 additions & 0 deletions kitsune-fe/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/** @type { import("eslint").Linter.Config } */
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
},
env: {
browser: true,
es2017: true,
node: true
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
]
};
32 changes: 9 additions & 23 deletions kitsune-fe/.gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
1 change: 1 addition & 0 deletions kitsune-fe/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
5 changes: 4 additions & 1 deletion kitsune-fe/.prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
dist/
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
17 changes: 6 additions & 11 deletions kitsune-fe/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"endOfLine": "lf",
"importOrder": ["^\\w", "^[./|~/]"],
"importOrderSeparation": true,
"importOrderParserPlugins": ["typescript"],
"plugins": [
"@trivago/prettier-plugin-sort-imports",
"prettier-plugin-css-order"
],
"semi": true,
"singleQuote": true,
"vueIndentScriptAndStyle": true
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
Loading

0 comments on commit ef0445f

Please sign in to comment.