Merge branch 'layout'
1
.gitignore
vendored
@ -17,3 +17,4 @@ dist/yarn-error.log
|
|||||||
.histoire/dist
|
.histoire/dist
|
||||||
dist
|
dist
|
||||||
src/lib/components/__image_snapshots__/__diff_output__/
|
src/lib/components/__image_snapshots__/__diff_output__/
|
||||||
|
.histoire/dist
|
||||||
|
16
.histoire/dist/__sandbox.html
vendored
@ -1,16 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Histoire</title>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
||||||
<meta name="description" content="">
|
|
||||||
<link rel="stylesheet" href="/assets/style-7abbff26.css">
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="app"></div>
|
|
||||||
<script type="module" src="/assets/bundle-sandbox-5de41e5f.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
16
.histoire/dist/index.html
vendored
@ -1,16 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Histoire</title>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
||||||
<meta name="description" content="">
|
|
||||||
<link rel="stylesheet" href="/assets/style-7abbff26.css">
|
|
||||||
|
|
||||||
<link rel="preload" href="/assets/vendor-5d606883.js" as="script" crossOrigin="anonymous">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="app"></div>
|
|
||||||
<script type="module" src="/assets/bundle-main-2dc03f26.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
28
src/lib/components/MainLayout.svelte
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<header>
|
||||||
|
<nav>
|
||||||
|
<h1>
|
||||||
|
<a>The Docks</a>
|
||||||
|
</h1>
|
||||||
|
<h3 class="max">a Full Thrust ship builder</h3>
|
||||||
|
<a>About</a>
|
||||||
|
<span> </span>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<main class="responsive">
|
||||||
|
<slot />
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import "$lib/style/index.js";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
header nav {
|
||||||
|
align-items: baseline;
|
||||||
|
font-family: "Faktos";
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
font-size: var(--font-scale-12);
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
</style>
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
12
src/routes/+layout.svelte
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<Layout>
|
||||||
|
<slot />
|
||||||
|
</Layout>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { setContext } from "svelte";
|
||||||
|
|
||||||
|
import { createApi } from "$lib/store/api.ts";
|
||||||
|
import Layout from "$lib/components/MainLayout.svelte";
|
||||||
|
|
||||||
|
setContext("api", createApi());
|
||||||
|
</script>
|
@ -1,12 +1 @@
|
|||||||
<App />
|
TODO
|
||||||
|
|
||||||
<script>
|
|
||||||
import { setContext } from "svelte";
|
|
||||||
|
|
||||||
import "$lib/style/index.js";
|
|
||||||
import shipStore from "$lib/store/ship.js";
|
|
||||||
|
|
||||||
import App from "$lib/components/App.svelte";
|
|
||||||
|
|
||||||
setContext("ship", shipStore());
|
|
||||||
</script>
|
|
||||||
|
23
src/routes/about/+layout.svelte
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<nav class="m l left">
|
||||||
|
<a>
|
||||||
|
<i>Question_Mark</i>
|
||||||
|
<span>About</span>
|
||||||
|
</a>
|
||||||
|
<!-- TODO
|
||||||
|
<a>
|
||||||
|
<i>Quiz</i>
|
||||||
|
<span>See also</span>
|
||||||
|
</a>
|
||||||
|
<a>
|
||||||
|
<i>Format_List_Bulleted</i>
|
||||||
|
<span>Changelog</span>
|
||||||
|
</a>
|
||||||
|
-->
|
||||||
|
</nav>
|
||||||
|
<slot />
|
||||||
|
|
||||||
|
<style>
|
||||||
|
nav {
|
||||||
|
margin-top: 70px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,82 +1,39 @@
|
|||||||
<header>
|
<h2>Welcome to the docks!</h2>
|
||||||
<nav>
|
|
||||||
<h1>
|
|
||||||
<a>The Docks</a>
|
|
||||||
</h1>
|
|
||||||
<h3 class="max">a Full Thrust ship builder</h3>
|
|
||||||
<a>About</a>
|
|
||||||
<span> </span>
|
|
||||||
</nav>
|
|
||||||
</header>
|
|
||||||
<main class="responsive">
|
|
||||||
<nav class="m l left">
|
|
||||||
<a>
|
|
||||||
<i>Question_Mark</i>
|
|
||||||
<span>About</span>
|
|
||||||
</a>
|
|
||||||
<!-- TODO
|
|
||||||
<a>
|
|
||||||
<i>Quiz</i>
|
|
||||||
<span>See also</span>
|
|
||||||
</a>
|
|
||||||
<a>
|
|
||||||
<i>Format_List_Bulleted</i>
|
|
||||||
<span>Changelog</span>
|
|
||||||
</a>
|
|
||||||
-->
|
|
||||||
</nav>
|
|
||||||
<h2>Welcome to the docks!</h2>
|
|
||||||
|
|
||||||
<!-- TODO
|
<!-- TODO
|
||||||
<p class="version">
|
<p class="version">
|
||||||
<span>version {import.meta.env.PACKAGE_VERSION}</span>
|
<span>version {import.meta.env.PACKAGE_VERSION}</span>
|
||||||
<a>changelog</a>
|
<a>changelog</a>
|
||||||
</p>
|
</p>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The Docks is a ship builder for the game
|
The Docks is a ship builder for the game
|
||||||
<a href="https://shop.groundzerogames.co.uk/rules.html" class="helper"
|
<a href="https://shop.groundzerogames.co.uk/rules.html" class="helper"
|
||||||
>Full Thrust</a
|
>Full Thrust</a
|
||||||
>, with construction rules following the
|
>, with construction rules following the
|
||||||
<a href="http://members.ozemail.com.au/~laranzu/fullthrust/rules/">
|
<a href="http://members.ozemail.com.au/~laranzu/fullthrust/rules/">
|
||||||
Cross Dimensions rules
|
Cross Dimensions rules
|
||||||
</a>
|
</a>
|
||||||
as closely as possible.
|
as closely as possible.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The app is mostly developed for Firefox. I also check as much as I can that
|
The app is mostly developed for Firefox. I also check as much as I can that I
|
||||||
I don't mess things too badly on Chrome. For the other browsers... caveat
|
don't mess things too badly on Chrome. For the other browsers... caveat
|
||||||
emptor.
|
emptor.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Written by
|
Written by
|
||||||
<!-- TODO change link -->
|
<!-- TODO change link -->
|
||||||
<a href="https://techblog.babyl.ca">Yanick Champoux</a>
|
<a href="https://techblog.babyl.ca">Yanick Champoux</a>
|
||||||
. Code available on
|
. Code available on
|
||||||
<!-- TODO read the url from package.json -->
|
<!-- TODO read the url from package.json -->
|
||||||
<a href="https://github.com/aotds/aotds-shipyard">Github</a>.
|
<a href="https://github.com/aotds/aotds-shipyard">Github</a>.
|
||||||
</p>
|
</p>
|
||||||
</main>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import "$lib/style/index.js";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
header nav {
|
|
||||||
align-items: baseline;
|
|
||||||
font-family: "Faktos";
|
|
||||||
}
|
|
||||||
main nav {
|
|
||||||
margin-top: 70px;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
font-size: var(--font-scale-12);
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
h2 {
|
h2 {
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
}
|
}
|
||||||
|
9
src/routes/about/about.test.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { render, fireEvent, screen, getByText } from "@testing-library/svelte";
|
||||||
|
import "@testing-library/jest-dom";
|
||||||
|
|
||||||
|
import About from "./+page.svelte";
|
||||||
|
|
||||||
|
test("we have an about page", () => {
|
||||||
|
const { getByText } = render(About);
|
||||||
|
expect(getByText("Welcome to the docks!")).toBeInTheDocument();
|
||||||
|
});
|