Skip to content

Commit b765a52

Browse files
committed
buttons and offsets
1 parent 7d07fa7 commit b765a52

12 files changed

+543
-0
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env
7+
.env.*
8+
!.env.example
9+
vite.config.js.timestamp-*
10+
vite.config.ts.timestamp-*

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "svelte-github-pages",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite dev",
7+
"build": "vite build",
8+
"preview": "vite preview"
9+
},
10+
"devDependencies": {
11+
"@sveltejs/adapter-static": "^2.0.1",
12+
"@sveltejs/kit": "^1.0.0",
13+
"svelte": "^3.54.0",
14+
"vite": "^4.0.0"
15+
},
16+
"type": "module",
17+
"dependencies": {}
18+
}

src/app.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
6+
<meta name="viewport" content="width=device-width" />
7+
%sveltekit.head%
8+
</head>
9+
<body data-sveltekit-preload-data="hover">
10+
<div style="display: contents">%sveltekit.body%</div>
11+
</body>
12+
</html>

src/routes/+layout.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// https://dev.to/robertobutti/how-to-start-building-your-static-website-with-svelte-and-tailwindcss-hbk
2+
// if you want to generate a static html file
3+
// for your page.
4+
// Documentation: https://kit.svelte.dev/docs/page-options#prerender
5+
export const prerender = true;
6+
7+
// if you want to Generate a SPA
8+
// you have to set ssr to false.
9+
// This is not the case (so set as true or comment the line)
10+
// Documentation: https://kit.svelte.dev/docs/page-options#ssr
11+
export const ssr = true;
12+
13+
// How to manage the trailing slashes in the URLs
14+
// the URL for about page witll be /about with 'ignore' (default)
15+
// the URL for about page witll be /about/ with 'always'
16+
// https://kit.svelte.dev/docs/page-options#trailingslash
17+
export const trailingSlash = 'ignore';

src/routes/+page.svelte

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<svelte:head>
2+
<title>svelte-winapi-structs</title>
3+
<link rel="preconnect" href="https://fonts.googleapis.com">
4+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
5+
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@500&display=swap" rel="stylesheet">
6+
</svelte:head>
7+
8+
<script>
9+
10+
import flattened from './flattened1.json'
11+
let currentArr = []
12+
13+
function handleClick(arr_of_type_name_offset) {
14+
currentArr = arr_of_type_name_offset
15+
document.body.scrollTop = document.documentElement.scrollTop = 0;
16+
}
17+
18+
</script>
19+
20+
{#each currentArr as element}
21+
<p>{element[0]} {element[1]} {element[2]}</p>
22+
{/each}
23+
24+
{#each flattened as weirdArr}
25+
<button on:click={()=>handleClick(weirdArr[1])}>{weirdArr[0]}</button>
26+
{/each}
27+
28+
<style>
29+
* {
30+
font-family: 'Fira Code', monospace;
31+
}
32+
</style>

src/routes/flattened1.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

static/.nojekyll

Whitespace-only changes.

static/favicon.png

1.53 KB
Loading

svelte.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import adapter from '@sveltejs/adapter-static';
2+
3+
const dev = process.argv.includes('dev');
4+
5+
export default {
6+
kit: {
7+
adapter: adapter({
8+
// default options are shown. On some platforms
9+
// these options are set automatically — see below
10+
pages: 'docs',
11+
assets: 'docs',
12+
fallback: null,
13+
precompress: false,
14+
strict: true
15+
}),
16+
paths: {
17+
base: dev ? '' : '/svelte-winapi-structs',
18+
}
19+
}
20+
};

vite.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { sveltekit } from '@sveltejs/kit/vite'
2+
3+
/** @type {import('vite').UserConfig} */
4+
const config = {
5+
plugins: [
6+
sveltekit(),
7+
],
8+
}
9+
10+
export default config

0 commit comments

Comments
 (0)