initial project structure

This commit is contained in:
Jonas_Jones 2025-01-19 20:28:45 +01:00
parent 11e4d6b487
commit 2a29c90535
11 changed files with 1536 additions and 0 deletions

23
.gitignore vendored Normal file
View file

@ -0,0 +1,23 @@
node_modules
# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build
# OS
.DS_Store
Thumbs.db
# Env
.env
.env.*
!.env.example
!.env.test
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

1
.npmrc Normal file
View file

@ -0,0 +1 @@
engine-strict=true

13
jsconfig.json Normal file
View file

@ -0,0 +1,13 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": false,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/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
}

1353
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

18
package.json Normal file
View file

@ -0,0 +1,18 @@
{
"name": "hub.jonasjones.dev",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^4.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"svelte": "^5.0.0",
"vite": "^5.4.11"
}
}

24
src/app.html Normal file
View file

@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<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>
<style>
html {
background: linear-gradient(135deg, #333333, #1a1a1a, black);
display: flex;
flex-wrap: wrap;
justify-content: center;
position: relative;
align-items: center;
height: 100vh;
}
</style>

1
src/lib/index.js Normal file
View file

@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.

84
src/routes/+page.svelte Normal file
View file

@ -0,0 +1,84 @@
<script>
import { onMount } from "svelte";
// Array of site data
let sites = [];
onMount(async () => {
const res = await fetch(
"https://cdn.jonasjones.dev/api/hub/blobs.json"
);
sites = await res.json();
});
</script>
<style>
.container {
display: flex;
flex-wrap: wrap;
justify-content: center;
padding: 20px;
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.site-card {
background-color: darkgray;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
margin: 15px;
width: 300px;
overflow: hidden;
text-align: center;
}
.site-card img {
width: 100%;
height: 150px;
object-fit: cover;
}
.site-card .content {
padding: 20px;
}
.site-card h3 {
margin: 10px 0;
font-size: 1.2rem;
color: #333;
}
.site-card p {
font-size: 0.9rem;
color: #666;
}
.site-card a {
display: inline-block;
margin-top: 10px;
padding: 8px 15px;
background-color: #0073e6;
color: white;
text-decoration: none;
border-radius: 4px;
transition: background-color 0.3s;
}
.site-card a:hover {
background-color: #005bb5;
}
</style>
<div class="container">
{#each sites as { name, description, image, link }}
<div class="site-card">
<img src={image} alt={name} />
<div class="content">
<h3>{name}</h3>
<p>{description}</p>
<a href={link} target="_blank" rel="noopener noreferrer">Visit Site</a>
</div>
</div>
{/each}
</div>

BIN
static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

13
svelte.config.js Normal file
View file

@ -0,0 +1,13 @@
import adapter from '@sveltejs/adapter-auto';
/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter()
}
};
export default config;

6
vite.config.js Normal file
View file

@ -0,0 +1,6 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()]
});