Testing typescript
This commit is contained in:
parent
1dea005dfb
commit
2300e514c0
16 changed files with 573 additions and 82 deletions
29
src/components/Banner.svelte
Normal file
29
src/components/Banner.svelte
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<script>
|
||||
export let title = "Quartznet";
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.overlay {
|
||||
display: flex;
|
||||
background-image: url("/img/bluenebula.webp");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
min-height: 200px;
|
||||
text-align: center;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
display: inline-block;
|
||||
font-size: 3rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="overlay">
|
||||
<div class="description col-md-5">
|
||||
<h1 class="title">{title}</h1>
|
||||
<p>Software, Games, Science, Space!</p>
|
||||
</div>
|
||||
</div>
|
||||
4
src/components/Footer.svelte
Normal file
4
src/components/Footer.svelte
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<footer class="container py-3">
|
||||
<p>© 2020-2022 Quartznet | <a href="./policy">Policy</a></p>
|
||||
<p><a href="#">Back to top</a></p>
|
||||
</footer>
|
||||
21
src/components/Thumbnail.svelte
Normal file
21
src/components/Thumbnail.svelte
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<script>
|
||||
export let name;
|
||||
export let link;
|
||||
export let img = "https://placehold.it/600x300";
|
||||
export let imgClass = "img-fluid mb-3 mb-md-0";
|
||||
export let size = { width: 600, height: 300 };
|
||||
export let description;
|
||||
</script>
|
||||
|
||||
<div class="row">
|
||||
<div class="thumb col-md-7">
|
||||
<a href="{link}">
|
||||
<img class={imgClass} src={img} alt={name} width={size.width} height={size.height}>
|
||||
</a>
|
||||
</div>
|
||||
<div class="blurb col-md-5">
|
||||
<h2>{name}</h2>
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
17
src/components/UserManager.svelte
Normal file
17
src/components/UserManager.svelte
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<script>
|
||||
export const name = "%USER%";
|
||||
export let icon;
|
||||
export let onClick;
|
||||
</script>
|
||||
|
||||
<style>
|
||||
img {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- <a on:click={onClick} href="404"><img src="/user.svg" alt="Admin"></a> -->
|
||||
<a on:click={onClick} href="/404">Admin</a>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import {onMount} from 'svelte'
|
||||
import Banner from '../components/banner.svelte'
|
||||
import Banner from '../components/Banner.svelte'
|
||||
|
||||
const dev = process.env.NODE_ENV === 'development';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import {onMount} from 'svelte'
|
||||
import Banner from '../components/banner.svelte'
|
||||
import Banner from '../components/Banner.svelte'
|
||||
|
||||
export let status;
|
||||
export let error;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<script>
|
||||
import Nav from '../components/Nav.svelte';
|
||||
import userManager from '../components/userManager.svelte'
|
||||
import userManager from '../components/UserManager.svelte'
|
||||
import Modal from '../components/Modal.svelte'
|
||||
import Footer from '../components/footer.svelte'
|
||||
import Footer from '../components/Footer.svelte'
|
||||
|
||||
export let segment;
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import Banner from '../components/banner.svelte'
|
||||
import Banner from '../components/Banner.svelte'
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import Banner from '../../components/banner.svelte'
|
||||
import Banner from '../../components/Banner.svelte'
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import Banner from '../../components/banner.svelte'
|
||||
import Banner from '../../components/Banner.svelte'
|
||||
|
||||
let username = "";
|
||||
let password = "";
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
</script>
|
||||
|
||||
<script>
|
||||
import Banner from '../../components/banner.svelte'
|
||||
import Banner from '../../components/Banner.svelte'
|
||||
export let post;
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script context="module">
|
||||
import Banner from '../../components/banner.svelte'
|
||||
import Banner from '../../components/Banner.svelte'
|
||||
|
||||
export function preload({params, query}) {
|
||||
return this.fetch(`blog.json`).then(r => r.json()).then(posts => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import {onMount} from 'svelte';
|
||||
import Thumb from '../components/thumbnail.svelte'
|
||||
import Banner from '../components/banner.svelte'
|
||||
import Thumb from '../components/Thumbnail.svelte'
|
||||
import Banner from '../components/Banner.svelte'
|
||||
|
||||
let games = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import Banner from '../components/banner.svelte'
|
||||
import Banner from '../components/Banner.svelte'
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import Banner from '../../components/banner.svelte'
|
||||
import Banner from '../../components/Banner.svelte'
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
|||
|
|
@ -1,54 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<meta name="theme-color" content="#333333">
|
||||
<meta name="description" content="Quartznet is a small team developing games, tools and more!">
|
||||
|
||||
%sapper.base%
|
||||
|
||||
<!-- Using bootstrap for nav/grid -->
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
<link rel="stylesheet" href="/css/native.css">
|
||||
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@700&display=swap" rel="stylesheet">
|
||||
|
||||
<link rel="icon" type="image/png" href="/img/favicon.ico">
|
||||
<link rel="preload" as="image" href="/img/bluenebula.webp">
|
||||
|
||||
<!-- Sapper creates a <script> tag containing `src/client.js`
|
||||
and anything else it needs to hydrate the app and
|
||||
initialise the router -->
|
||||
%sapper.scripts%
|
||||
|
||||
<!-- Sapper generates a <style> tag containing critical CSS
|
||||
for the current page. CSS for the rest of the app is
|
||||
lazily loaded when it precaches secondary pages -->
|
||||
%sapper.styles%
|
||||
|
||||
<!-- This contains the contents of the <svelte:head> component, if
|
||||
the current page has one -->
|
||||
%sapper.head%
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-120787474-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-120787474-1', {
|
||||
'anonymize_ip': true,
|
||||
cookie_domain: '{{ site.title }}',
|
||||
cookie_flags: 'SameSite=None;Secure'
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- The application will be rendered inside this element,
|
||||
because `src/client.js` references it -->
|
||||
<div id="sapper">%sapper.html%</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in a new issue