Update CI #4
36
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: 🔧 Setup bun
|
||||||
|
uses: https://github.com/oven-sh/setup-bun@v1
|
||||||
|
|
||||||
|
- name: 🧱 Install packages
|
||||||
|
run: bun i
|
||||||
|
|
||||||
|
- name: ✅ Check project
|
||||||
|
run: bun run check
|
||||||
|
|
||||||
|
- name: 🔨 Build project
|
||||||
|
run: bun run build
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
run: |
|
||||||
|
tar -czf build.tar.gz build
|
||||||
|
curl --user minijack:${{ secrets.PACKAGE_TOKEN }} \
|
||||||
|
--upload-file build.tar.gz \
|
||||||
|
https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz
|
||||||
|
echo https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz
|
30
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
runs-on: selfhost
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
needs: build
|
||||||
|
runs-on: selfhost
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: get artifact
|
||||||
|
run: |
|
||||||
|
curl --user minijack:${{ secrets.PACKAGE_TOKEN }} \
|
||||||
|
https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz > build.tar.gz
|
||||||
|
echo https://git.quartznet.info/api/packages/quartznet/generic/artifacts/ref-${{ gitea.sha }}/build-${{ gitea.sha }}.tar.gz
|
||||||
|
- name: extract artifact
|
||||||
|
run: |
|
||||||
|
tar -xvzf build.tar.gz
|
||||||
|
- run: ls -la build
|
||||||
|
- run: ls -la /www/
|
||||||
|
- run: ls -la /www/svelte/
|
||||||
|
- name: 🧹 Clean Deploy Area
|
||||||
|
run: rm -rf /www/svelte/build
|
||||||
|
- name: 📦 Deploy
|
||||||
|
run: mv build /www/svelte/
|
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
__sapper__
|
||||||
|
node_modules
|
||||||
|
.svelte-kit
|
||||||
|
build
|
153
LICENSE
@ -1,23 +1,21 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
Version 3, 29 June 2007
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The GNU General Public License is a free, copyleft license for
|
The GNU Affero General Public License is a free, copyleft license for
|
||||||
software and other kinds of works.
|
software and other kinds of works, specifically designed to ensure
|
||||||
|
cooperation with the community in the case of network server software.
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
The licenses for most software and other practical works are designed
|
||||||
to take away your freedom to share and change the works. By contrast,
|
to take away your freedom to share and change the works. By contrast,
|
||||||
the GNU General Public License is intended to guarantee your freedom to
|
our General Public Licenses are intended to guarantee your freedom to
|
||||||
share and change all versions of a program--to make sure it remains free
|
share and change all versions of a program--to make sure it remains free
|
||||||
software for all its users. We, the Free Software Foundation, use the
|
software for all its users.
|
||||||
GNU General Public License for most of our software; it applies also to
|
|
||||||
any other work released this way by its authors. You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
When we speak of free software, we are referring to freedom, not
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
|
|||||||
want it, that you can change the software or use pieces of it in new
|
want it, that you can change the software or use pieces of it in new
|
||||||
free programs, and that you know you can do these things.
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
To protect your rights, we need to prevent others from denying you
|
Developers that use our General Public Licenses protect your rights
|
||||||
these rights or asking you to surrender the rights. Therefore, you have
|
with two steps: (1) assert copyright on the software, and (2) offer
|
||||||
certain responsibilities if you distribute copies of the software, or if
|
you this License which gives you legal permission to copy, distribute
|
||||||
you modify it: responsibilities to respect the freedom of others.
|
and/or modify the software.
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
A secondary benefit of defending all users' freedom is that
|
||||||
gratis or for a fee, you must pass on to the recipients the same
|
improvements made in alternate versions of the program, if they
|
||||||
freedoms that you received. You must make sure that they, too, receive
|
receive widespread use, become available for other developers to
|
||||||
or can get the source code. And you must show them these terms so they
|
incorporate. Many developers of free software are heartened and
|
||||||
know their rights.
|
encouraged by the resulting cooperation. However, in the case of
|
||||||
|
software used on network servers, this result may fail to come about.
|
||||||
|
The GNU General Public License permits making a modified version and
|
||||||
|
letting the public access it on a server without ever releasing its
|
||||||
|
source code to the public.
|
||||||
|
|
||||||
Developers that use the GNU GPL protect your rights with two steps:
|
The GNU Affero General Public License is designed specifically to
|
||||||
(1) assert copyright on the software, and (2) offer you this License
|
ensure that, in such cases, the modified source code becomes available
|
||||||
giving you legal permission to copy, distribute and/or modify it.
|
to the community. It requires the operator of a network server to
|
||||||
|
provide the source code of the modified version running there to the
|
||||||
|
users of that server. Therefore, public use of a modified version, on
|
||||||
|
a publicly accessible server, gives the public access to the source
|
||||||
|
code of the modified version.
|
||||||
|
|
||||||
For the developers' and authors' protection, the GPL clearly explains
|
An older license, called the Affero General Public License and
|
||||||
that there is no warranty for this free software. For both users' and
|
published by Affero, was designed to accomplish similar goals. This is
|
||||||
authors' sake, the GPL requires that modified versions be marked as
|
a different license, not a version of the Affero GPL, but Affero has
|
||||||
changed, so that their problems will not be attributed erroneously to
|
released a new version of the Affero GPL which permits relicensing under
|
||||||
authors of previous versions.
|
this license.
|
||||||
|
|
||||||
Some devices are designed to deny users access to install or run
|
|
||||||
modified versions of the software inside them, although the manufacturer
|
|
||||||
can do so. This is fundamentally incompatible with the aim of
|
|
||||||
protecting users' freedom to change the software. The systematic
|
|
||||||
pattern of such abuse occurs in the area of products for individuals to
|
|
||||||
use, which is precisely where it is most unacceptable. Therefore, we
|
|
||||||
have designed this version of the GPL to prohibit the practice for those
|
|
||||||
products. If such problems arise substantially in other domains, we
|
|
||||||
stand ready to extend this provision to those domains in future versions
|
|
||||||
of the GPL, as needed to protect the freedom of users.
|
|
||||||
|
|
||||||
Finally, every program is threatened constantly by software patents.
|
|
||||||
States should not allow patents to restrict development and use of
|
|
||||||
software on general-purpose computers, but in those that do, we wish to
|
|
||||||
avoid the special danger that patents applied to a free program could
|
|
||||||
make it effectively proprietary. To prevent this, the GPL assures that
|
|
||||||
patents cannot be used to render the program non-free.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
@ -72,7 +60,7 @@ modification follow.
|
|||||||
|
|
||||||
0. Definitions.
|
0. Definitions.
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU General Public License.
|
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
works, such as semiconductor masks.
|
works, such as semiconductor masks.
|
||||||
@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
|
|||||||
the Program, the only way you could satisfy both those terms and this
|
the Program, the only way you could satisfy both those terms and this
|
||||||
License would be to refrain entirely from conveying the Program.
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
13. Use with the GNU Affero General Public License.
|
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, if you modify the
|
||||||
|
Program, your modified version must prominently offer all users
|
||||||
|
interacting with it remotely through a computer network (if your version
|
||||||
|
supports such interaction) an opportunity to receive the Corresponding
|
||||||
|
Source of your version by providing access to the Corresponding Source
|
||||||
|
from a network server at no charge, through some standard or customary
|
||||||
|
means of facilitating copying of software. This Corresponding Source
|
||||||
|
shall include the Corresponding Source for any work covered by version 3
|
||||||
|
of the GNU General Public License that is incorporated pursuant to the
|
||||||
|
following paragraph.
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
Notwithstanding any other provision of this License, you have
|
||||||
permission to link or combine any covered work with a work licensed
|
permission to link or combine any covered work with a work licensed
|
||||||
under version 3 of the GNU Affero General Public License into a single
|
under version 3 of the GNU General Public License into a single
|
||||||
combined work, and to convey the resulting work. The terms of this
|
combined work, and to convey the resulting work. The terms of this
|
||||||
License will continue to apply to the part which is the covered work,
|
License will continue to apply to the part which is the covered work,
|
||||||
but the special requirements of the GNU Affero General Public License,
|
but the work with which it is combined will remain governed by version
|
||||||
section 13, concerning interaction through a network will apply to the
|
3 of the GNU General Public License.
|
||||||
combination as such.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
the GNU General Public License from time to time. Such new versions will
|
the GNU Affero General Public License from time to time. Such new versions
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
will be similar in spirit to the present version, but may differ in detail to
|
||||||
address new problems or concerns.
|
address new problems or concerns.
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
Each version is given a distinguishing version number. If the
|
||||||
Program specifies that a certain numbered version of the GNU General
|
Program specifies that a certain numbered version of the GNU Affero General
|
||||||
Public License "or any later version" applies to it, you have the
|
Public License "or any later version" applies to it, you have the
|
||||||
option of following the terms and conditions either of that numbered
|
option of following the terms and conditions either of that numbered
|
||||||
version or of any later version published by the Free Software
|
version or of any later version published by the Free Software
|
||||||
Foundation. If the Program does not specify a version number of the
|
Foundation. If the Program does not specify a version number of the
|
||||||
GNU General Public License, you may choose any version ever published
|
GNU Affero General Public License, you may choose any version ever published
|
||||||
by the Free Software Foundation.
|
by the Free Software Foundation.
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
If the Program specifies that a proxy can decide which future
|
||||||
versions of the GNU General Public License can be used, that proxy's
|
versions of the GNU Affero General Public License can be used, that proxy's
|
||||||
public statement of acceptance of a version permanently authorizes you
|
public statement of acceptance of a version permanently authorizes you
|
||||||
to choose that version for the Program.
|
to choose that version for the Program.
|
||||||
|
|
||||||
@ -631,44 +629,33 @@ to attach them to the start of each source file to most effectively
|
|||||||
state the exclusion of warranty; and each file should have at least
|
state the exclusion of warranty; and each file should have at least
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
{one line to give the program's name and a brief idea of what it does.}
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
Copyright (C) 2018 {name of author}
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU Affero General Public License as published
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
by the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU Affero General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU Affero General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short
|
If your software can interact with users remotely through a computer
|
||||||
notice like this when it starts in an interactive mode:
|
network, you should also make sure that it provides a way for users to
|
||||||
|
get its source. For example, if your program is a web application, its
|
||||||
Quartz Copyright (C) 2018 ChrisDill
|
interface could display a "Source" link that leads users to an archive
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
of the code. There are many ways you could offer source, and different
|
||||||
This is free software, and you are welcome to redistribute it
|
solutions will be better for different programs; see section 13 for the
|
||||||
under certain conditions; type `show c' for details.
|
specific requirements.
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, your program's commands
|
|
||||||
might be different; for a GUI interface, you would use an "about box".
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
For more information on this, and how to apply and follow the GNU GPL, see
|
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||||
<http://www.gnu.org/licenses/>.
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
The GNU General Public License does not permit incorporating your program
|
|
||||||
into proprietary programs. If your program is a subroutine library, you
|
|
||||||
may consider it more useful to permit linking proprietary applications with
|
|
||||||
the library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License. But first, please read
|
|
||||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
||||||
|
17
README.md
@ -2,12 +2,21 @@
|
|||||||
|
|
||||||
We are a small team developing software and games.
|
We are a small team developing software and games.
|
||||||
|
|
||||||
This is our company website with information on us, our products etc.
|
This is our main website where you can find information about us and what we do.
|
||||||
|
This website is a work in progress and subject to change.
|
||||||
|
|
||||||
It currently is using php for a couple of features. We try to simplify things where possible so that may likely change.
|
Powered by svelte.
|
||||||
|
|
||||||
The website is in a work in progress and subject to change.
|
## Building
|
||||||
|
|
||||||
|
1. `npm install`
|
||||||
|
|
||||||
|
2. `npm run build`
|
||||||
|
|
||||||
|
## Serving
|
||||||
|
|
||||||
|
1. `npm run dev`
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Check [LICENSE](LICENSE.md) for further details.
|
See [LICENSE](LICENSE) for more details.
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"baseUrl": "http://localhost:3000",
|
|
||||||
"video": false
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Using fixtures to represent data",
|
|
||||||
"email": "hello@cypress.io",
|
|
||||||
"body": "Fixtures are a great way to mock data for responses to routes"
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
describe('Sapper template app', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.visit('/')
|
|
||||||
});
|
|
||||||
|
|
||||||
it('has the correct <h1>', () => {
|
|
||||||
cy.contains('h1', 'Great success!')
|
|
||||||
});
|
|
||||||
|
|
||||||
it('navigates to /about', () => {
|
|
||||||
cy.get('nav a').contains('about').click();
|
|
||||||
cy.url().should('include', '/about');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('navigates to /blog', () => {
|
|
||||||
cy.get('nav a').contains('blog').click();
|
|
||||||
cy.url().should('include', '/blog');
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,17 +0,0 @@
|
|||||||
// ***********************************************************
|
|
||||||
// This example plugins/index.js can be used to load plugins
|
|
||||||
//
|
|
||||||
// You can change the location of this file or turn off loading
|
|
||||||
// the plugins file with the 'pluginsFile' configuration option.
|
|
||||||
//
|
|
||||||
// You can read more here:
|
|
||||||
// https://on.cypress.io/plugins-guide
|
|
||||||
// ***********************************************************
|
|
||||||
|
|
||||||
// This function is called when a project is opened or re-opened (e.g. due to
|
|
||||||
// the project's config changing)
|
|
||||||
|
|
||||||
module.exports = (on, config) => {
|
|
||||||
// `on` is used to hook into various events Cypress emits
|
|
||||||
// `config` is the resolved Cypress config
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
// ***********************************************
|
|
||||||
// This example commands.js shows you how to
|
|
||||||
// create various custom commands and overwrite
|
|
||||||
// existing commands.
|
|
||||||
//
|
|
||||||
// For more comprehensive examples of custom
|
|
||||||
// commands please read more here:
|
|
||||||
// https://on.cypress.io/custom-commands
|
|
||||||
// ***********************************************
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// -- This is a parent command --
|
|
||||||
// Cypress.Commands.add("login", (email, password) => { ... })
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// -- This is a child command --
|
|
||||||
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// -- This is a dual command --
|
|
||||||
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// -- This is will overwrite an existing command --
|
|
||||||
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
|
@ -1,20 +0,0 @@
|
|||||||
// ***********************************************************
|
|
||||||
// This example support/index.js is processed and
|
|
||||||
// loaded automatically before your test files.
|
|
||||||
//
|
|
||||||
// This is a great place to put global configuration and
|
|
||||||
// behavior that modifies Cypress.
|
|
||||||
//
|
|
||||||
// You can change the location of this file or turn off
|
|
||||||
// automatically serving support files with the
|
|
||||||
// 'supportFile' configuration option.
|
|
||||||
//
|
|
||||||
// You can read more here:
|
|
||||||
// https://on.cypress.io/configuration
|
|
||||||
// ***********************************************************
|
|
||||||
|
|
||||||
// Import commands.js using ES2015 syntax:
|
|
||||||
import './commands'
|
|
||||||
|
|
||||||
// Alternatively you can use CommonJS syntax:
|
|
||||||
// require('./commands')
|
|
@ -1,89 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Quartznet | About</title>
|
|
||||||
|
|
||||||
<!-- General meta tags -->
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
|
|
||||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
<meta name="description" content="A software and game studio.">
|
|
||||||
<meta name="keywords" content="quartznet, software, games, tools"/>
|
|
||||||
<meta name="author" content="quartznet"/>
|
|
||||||
|
|
||||||
<!-- Open Graph tags -->
|
|
||||||
<meta property="og:title" content="quartznet" />
|
|
||||||
<meta property="og:description" content="We are software and game developers." />
|
|
||||||
|
|
||||||
<!-- Load CSS -->
|
|
||||||
<link rel="stylesheet" href="/quartznet/assets/css/bootstrap.min.css" defer>
|
|
||||||
<link href="/quartznet/assets/css/stylesheet.css" rel="stylesheet">
|
|
||||||
<link href="/quartznet/assets/css/themes.css" rel="stylesheet">
|
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
|
|
||||||
<link rel="icon" href="/quartznet/assets/favicon.ico">
|
|
||||||
|
|
||||||
<!-- Load javascript -->
|
|
||||||
<script src="/quartznet/assets/js/jquery-3.5.1.min.js" defer></script>
|
|
||||||
|
|
||||||
<!-- 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');
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
<div class="container">
|
|
||||||
<nav class="navbar navbar-expand-md">
|
|
||||||
<div class="navbar-collapse order-1 order-md-0 dual-collapse2">
|
|
||||||
<ul class="navbar-nav mr-auto">
|
|
||||||
<li><a href="/quartznet/">Quartznet</a></li>
|
|
||||||
<li><a href="/quartznet/about">About</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="navbar-collapse collapse w-100 order-3 dual-collapse2">
|
|
||||||
<ul class="navbar-nav ml-auto">
|
|
||||||
<li><a href="/quartznet/admin">Admin</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="overlay">
|
|
||||||
<div class="description">
|
|
||||||
<h1 class="title">Quartznet</h1>
|
|
||||||
<p>Software, Games, Science, Space!</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<main>
|
|
||||||
<section class="container">
|
|
||||||
<h2>Frequently Asked Questions</h2>
|
|
||||||
<h3>Who we are</h3>
|
|
||||||
<p>A small team developing games and software.</p>
|
|
||||||
|
|
||||||
<h3>Why the name Quartznet</h3>
|
|
||||||
<p>Naming things is hard. We ended up with the name quartz and added net to it to make quartznet. Also it includes the letters q and z so it is cleary a great name!
|
|
||||||
|
|
||||||
<h2>Contact</h2>
|
|
||||||
<p>We can be reached at contact@quartznet.com. If you are requesting a key for reviewing, steaming, or youtube, as well as all other legitimate purposes, please be sure to include a link to your channel or website.</p>
|
|
||||||
|
|
||||||
<p>Feel free to contact us via email if you want to get in touch.</p>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<div class="container">
|
|
||||||
<hr>
|
|
||||||
<p>© Quartznet 2020 | <a href="/quartznet/policy">Policy</a></p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,103 +0,0 @@
|
|||||||
<!-- <li class="nav-item dropdown">
|
|
||||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
||||||
Admin
|
|
||||||
</a>
|
|
||||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
|
||||||
<a class="dropdown-item" href="https://quartznet.info/sound">Sound</a>
|
|
||||||
<a class="dropdown-item" href="https://quartznet.info/status">Status</a>
|
|
||||||
<a class="dropdown-item" href="https://quartznet.info/git">Git</a>
|
|
||||||
<a class="dropdown-item" href="https://quartznet.info/sql">SQL</a>
|
|
||||||
<a class="dropdown-item" href="/quartznet/admin/logout.php">Logout</a>
|
|
||||||
</div>
|
|
||||||
</li> -->
|
|
||||||
|
|
||||||
<?php
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
// Check if user has admin access
|
|
||||||
function auth() {
|
|
||||||
if($_SESSION["login"] != "admin") {
|
|
||||||
header("location:../admin/login.php");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function connect() {
|
|
||||||
// Connect to database
|
|
||||||
$db_server = "localhost";
|
|
||||||
$db_username = "postgres";
|
|
||||||
$db_password = "cryo";
|
|
||||||
$db_database = "test";
|
|
||||||
|
|
||||||
$connection = pg_connect("host=$db_server dbname=$db_database user=$db_username password=$db_password port=5432");
|
|
||||||
if (!$connection) {
|
|
||||||
$error = "pg_connect error: " . pg_last_error($connection);
|
|
||||||
error_log($error, 0);
|
|
||||||
die($error);
|
|
||||||
}
|
|
||||||
return $connection;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Logs in to index.php and checks username and password for a match in users
|
|
||||||
function login_post() {
|
|
||||||
$connection = connect();
|
|
||||||
|
|
||||||
// Attempt login
|
|
||||||
if(isset($_POST["username"]) and isset($_POST["password"])) {
|
|
||||||
$username = $_POST["username"];
|
|
||||||
$password = $_POST["password"];
|
|
||||||
login($username, $password);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function login($username, $password) {
|
|
||||||
// Salt the password to make it harder to compare md5 hashes
|
|
||||||
// Run md5 encryption on salted string
|
|
||||||
$salt = "salt";
|
|
||||||
$newPassword = md5($salt.$editedPassword.$salt);
|
|
||||||
|
|
||||||
// Search for matching username and password
|
|
||||||
$sql = "SELECT * FROM users WHERE name = '$username' AND password = '$newPassword'";
|
|
||||||
|
|
||||||
$result = pg_query($connection, $sql);
|
|
||||||
if (!result) {
|
|
||||||
die("pg_query error: " . pg_last_error($db));
|
|
||||||
}
|
|
||||||
$rowCount = pg_num_rows($result);
|
|
||||||
|
|
||||||
// Success if a matching user is found
|
|
||||||
if ($rowCount == 1) {
|
|
||||||
session_start();
|
|
||||||
$_SESSION["login"] = "admin";
|
|
||||||
header("location:/quartznet/admin");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
echo "Invalid username or password. Failed to login.";
|
|
||||||
}
|
|
||||||
|
|
||||||
// I'm trying to fix the database calm down...
|
|
||||||
if ($username == "chris" && $password="space") {
|
|
||||||
session_start();
|
|
||||||
$_SESSION["login"] = "admin";
|
|
||||||
header("location:/quartznet/admin");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function add_user($username, $password) {
|
|
||||||
// include_once("../includes/connect.php");
|
|
||||||
$connection = connect();
|
|
||||||
|
|
||||||
// Encrypt password and add new user
|
|
||||||
$salt = "salt";
|
|
||||||
$password = md5($salt.$password.$salt);
|
|
||||||
$query= "INSERT INTO t_users(UID, username, PWORD) VALUES(NULL, '$username', '$password')";
|
|
||||||
$run = pg_query($connect, $query) or pg_last_error($connection);
|
|
||||||
|
|
||||||
// return to users page
|
|
||||||
}
|
|
||||||
|
|
||||||
function add_user_post() {
|
|
||||||
if (isset($_POST["username"]) and isset($_POST["password"])) {
|
|
||||||
add_user($_POST["username"], $_POST["password"]);
|
|
||||||
header("Location:users.php");
|
|
||||||
}
|
|
||||||
}?>
|
|
@ -1,112 +0,0 @@
|
|||||||
<?php require_once("./auth.php"); auth(); ?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Quartznet | Admin</title>
|
|
||||||
|
|
||||||
<!-- General meta tags -->
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
|
|
||||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
<meta name="description" content="A software and game studio.">
|
|
||||||
<meta name="keywords" content="quartznet, software, games, tools"/>
|
|
||||||
<meta name="author" content="quartznet"/>
|
|
||||||
|
|
||||||
<!-- Open Graph tags -->
|
|
||||||
<meta property="og:title" content="quartznet" />
|
|
||||||
<meta property="og:description" content="We are software and game developers." />
|
|
||||||
|
|
||||||
<!-- Load CSS -->
|
|
||||||
<link rel="stylesheet" href="/quartznet/assets/css/bootstrap.min.css" defer>
|
|
||||||
<link href="/quartznet/assets/css/stylesheet.css" rel="stylesheet">
|
|
||||||
<link href="/quartznet/assets/css/themes.css" rel="stylesheet">
|
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
|
|
||||||
<link rel="icon" href="/quartznet/assets/favicon.ico">
|
|
||||||
|
|
||||||
<!-- Load javascript -->
|
|
||||||
<script src="/quartznet/assets/js/jquery-3.5.1.min.js" defer></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
<div class="container">
|
|
||||||
<nav class="navbar navbar-expand-md">
|
|
||||||
<div class="navbar-collapse order-1 order-md-0 dual-collapse2">
|
|
||||||
<ul class="navbar-nav mr-auto">
|
|
||||||
<li><a href="/quartznet/">Quartznet</a></li>
|
|
||||||
<li><a href="/quartznet/about">About</a></li>
|
|
||||||
<li><a href="https://quartznet.info/sound">Sound</a></li>
|
|
||||||
<li><a href="https://quartznet.info/status">Status</a></li>
|
|
||||||
<li><a href="https://quartznet.info/git">Git</a></li>
|
|
||||||
<li><a href="https://quartznet.info/sql">SQL</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="navbar-collapse collapse w-100 order-3 dual-collapse2">
|
|
||||||
<ul class="navbar-nav ml-auto">
|
|
||||||
<li><a href="/quartznet/admin/logout.php">Logout</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="overlay">
|
|
||||||
<div class="description">
|
|
||||||
<h1 class="title">Quartznet</h1>
|
|
||||||
<p>Software, Games, Science, Space!</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<section class="container">
|
|
||||||
<h2>Admin</h2>
|
|
||||||
<p>Welcome to the super special admin page where you can manage the different parts of quartznet.</p>
|
|
||||||
<p><b>UNLIMITED POWER</b></p>
|
|
||||||
<h2>Also cats!</h2>
|
|
||||||
<img src="../assets/images/friendscats1.png" alt="cats">
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="container">
|
|
||||||
<h1>Users</h1>
|
|
||||||
<!-- Should this still use tables -->
|
|
||||||
<table width="100%">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Password</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
<!-- User info --->
|
|
||||||
<?php while($row=pg_fetch_assoc($result)) { ?>
|
|
||||||
<tr>
|
|
||||||
<td><?php echo $row["id"]?></td>
|
|
||||||
<td><?php echo $row["name"]?></td>
|
|
||||||
<td><?php echo $row["password"]?></td>
|
|
||||||
<?php } ?>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<!--Insert new user-->
|
|
||||||
<form method="post" action="users.php" name="login">
|
|
||||||
<div class="form-group">
|
|
||||||
<input name="username" type="text" required placeholder="username" maxlength="30">
|
|
||||||
<input name="password" type="password" required placeholder="password" maxlength="30">
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<div class="container">
|
|
||||||
<hr>
|
|
||||||
<p>© Quartznet 2020 | <a href="/quartznet/policy">Policy</a></p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,89 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once("./auth.php");
|
|
||||||
login_post();
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Quartznet | Login</title>
|
|
||||||
|
|
||||||
<!-- General meta tags -->
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
|
|
||||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
<meta name="description" content="A software and game studio.">
|
|
||||||
<meta name="keywords" content="quartznet, software, games, tools"/>
|
|
||||||
<meta name="author" content="quartznet"/>
|
|
||||||
|
|
||||||
<!-- Open Graph tags -->
|
|
||||||
<meta property="og:title" content="quartznet" />
|
|
||||||
<meta property="og:description" content="We are software and game developers." />
|
|
||||||
|
|
||||||
<!-- Load CSS -->
|
|
||||||
<link rel="stylesheet" href="/quartznet/assets/css/bootstrap.min.css" defer>
|
|
||||||
<link href="/quartznet/assets/css/stylesheet.css" rel="stylesheet">
|
|
||||||
<link href="/quartznet/assets/css/themes.css" rel="stylesheet">
|
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
|
|
||||||
<link rel="icon" href="/quartznet/assets/favicon.ico">
|
|
||||||
|
|
||||||
<!-- Load javascript -->
|
|
||||||
<script src="/quartznet/assets/js/jquery-3.5.1.min.js" defer></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
<div class="container">
|
|
||||||
<nav class="navbar navbar-expand-md">
|
|
||||||
<div class="navbar-collapse order-1 order-md-0 dual-collapse2">
|
|
||||||
<ul class="navbar-nav mr-auto">
|
|
||||||
<li><a href="/quartznet/">Quartznet</a></li>
|
|
||||||
<li><a href="/quartznet/about">About</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="navbar-collapse collapse w-100 order-3 dual-collapse2">
|
|
||||||
<ul class="navbar-nav ml-auto">
|
|
||||||
<li><a href="/quartznet/admin">Admin</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="overlay">
|
|
||||||
<div class="description">
|
|
||||||
<h1 class="title">Quartznet</h1>
|
|
||||||
<p>Software, Games, Science, Space!</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main class="container">
|
|
||||||
<form class="form-signin" action="login.php" method="post">
|
|
||||||
<div class="form-label-group">
|
|
||||||
<label for="username">Username</label>
|
|
||||||
<input type="text" id="username" class="form-control" name="username" placeholder="Username" required autofocus>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-label-group">
|
|
||||||
<label for="inputPassword">Password</label>
|
|
||||||
<input type="password" id="password" class="form-control" name="password" placeholder="Password" required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="custom-control custom-checkbox mb-3">
|
|
||||||
<input type="checkbox" class="custom-control-input" id="customCheck1">
|
|
||||||
<label class="custom-control-label" for="customCheck1">Remember password</label>
|
|
||||||
</div>
|
|
||||||
<button class="btn btn-lg btn-primary btn-block text-uppercase" type="submit">Sign in</button>
|
|
||||||
</form>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<div class="container">
|
|
||||||
<hr>
|
|
||||||
<p>© Quartznet 2020 | <a href="/quartznet/policy">Policy</a></p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
session_unset();
|
|
||||||
session_destroy();
|
|
||||||
header("location:../index.php");
|
|
||||||
?>
|
|
@ -1,46 +0,0 @@
|
|||||||
<style>
|
|
||||||
h1, figure, p {
|
|
||||||
text-align: center;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 2.8em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
font-weight: 700;
|
|
||||||
margin: 0 0 0.5em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
figure {
|
|
||||||
margin: 0 0 1em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 400px;
|
|
||||||
margin: 0 0 1em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 1em auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 480px) {
|
|
||||||
h1 {
|
|
||||||
font-size: 4em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>Sapper project template</title>
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<h1>Great success!</h1>
|
|
||||||
|
|
||||||
<figure>
|
|
||||||
<img alt='Success Kid' src='successkid.jpg'>
|
|
||||||
<figcaption>Have fun with Sapper!</figcaption>
|
|
||||||
</figure>
|
|
||||||
|
|
||||||
<p><strong>Try editing this file (src/routes/index.svelte) to test live reloading.</strong></p>
|
|
@ -1,112 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<title>Quartznet | Policy</title>
|
|
||||||
|
|
||||||
<!-- General meta tags -->
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
|
|
||||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
<meta name="description" content="A software and game studio.">
|
|
||||||
<meta name="keywords" content="quartznet, software, games, tools"/>
|
|
||||||
<meta name="author" content="quartznet"/>
|
|
||||||
|
|
||||||
<!-- Open Graph tags -->
|
|
||||||
<meta property="og:title" content="quartznet" />
|
|
||||||
<meta property="og:description" content="We are software and game developers." />
|
|
||||||
|
|
||||||
<!-- Load CSS -->
|
|
||||||
<link rel="stylesheet" href="/quartznet/assets/css/bootstrap.min.css" defer>
|
|
||||||
<link href="/quartznet/assets/css/stylesheet.css" rel="stylesheet">
|
|
||||||
<link href="/quartznet/assets/css/themes.css" rel="stylesheet">
|
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
|
|
||||||
<link rel="icon" href="/quartznet/assets/favicon.ico">
|
|
||||||
|
|
||||||
<!-- Load javascript -->
|
|
||||||
<script src="/quartznet/assets/js/jquery-3.5.1.min.js" defer></script>
|
|
||||||
|
|
||||||
<!-- 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');
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
<div class="container">
|
|
||||||
<nav class="navbar navbar-expand-md">
|
|
||||||
<div class="navbar-collapse order-1 order-md-0 dual-collapse2">
|
|
||||||
<ul class="navbar-nav mr-auto">
|
|
||||||
<li><a href="/quartznet/">Quartznet</a></li>
|
|
||||||
<li><a href="/quartznet/about">About</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="navbar-collapse collapse w-100 order-3 dual-collapse2">
|
|
||||||
<ul class="navbar-nav ml-auto">
|
|
||||||
<li><a href="/quartznet/admin">Admin</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="overlay">
|
|
||||||
<div class="description">
|
|
||||||
<h1 class="title">Quartznet</h1>
|
|
||||||
<p>Software, Games, Science, Space!</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<section class="container">
|
|
||||||
<h2>Privacy Policy</h2>
|
|
||||||
<span>Last updated: 20/12/2019</span>
|
|
||||||
|
|
||||||
<p>Quartznet ("I", "My", or "Me") operates *GameCompanySite* (the "Site"). This page informs you of my policies regarding the collection, use and disclosure of Personal Information I receive from users of the Site.</p>
|
|
||||||
|
|
||||||
<p>I use your Personal Information only for providing and improving the Site. By using the Site, you agree to the collection and use of information in accordance with this policy.</p>
|
|
||||||
|
|
||||||
<h2>Log Data</h2>
|
|
||||||
|
|
||||||
<p>Like many site operators, I collect information that your browser sends whenever you visit my Site ("Log Data").
|
|
||||||
This Log Data may include information such as your computer's Internet Protocol ("IP") address, browser type, browser version, the pages of my Site that you visit, the time and date of your visit, the time spent on those pages and other statistics.</p>
|
|
||||||
|
|
||||||
<p>In addition, I may use third party services such as Google Analytics that collect, monitor and analyze this.</p>
|
|
||||||
<hr>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="container">
|
|
||||||
<h2>Cookies Policy</h2>
|
|
||||||
<span>Last updated: 20/12/2019</span>
|
|
||||||
|
|
||||||
<p>Quartznet ("I", "My") uses cookies on Quartznet (the "Service"). By using the Service, you consent to the use of cookies.</p>
|
|
||||||
|
|
||||||
<h2>What are cookies</h2>
|
|
||||||
<p>Cookies are small pieces of text sent by your web browser by a website you visit. A cookie file is stored in your web browser and allows the Service or a third-party to recognize you and make your next visit easier and the Service more useful to you.</p>
|
|
||||||
|
|
||||||
<h2>How Quartznet uses cookies</h2>
|
|
||||||
<p>When you use and access the Service, I may place a number of cookies files in your web browser.</p>
|
|
||||||
|
|
||||||
<p>I use cookies for the following purposes: to enable certain functions of the Service, to provide analytics, and to store your preferences.</p>
|
|
||||||
|
|
||||||
<h2>What are your choices regarding cookies</h2>
|
|
||||||
<p>If you'd like to delete cookies or instruct your web browser to delete or refuse cookies, please visit the help pages of your web browser.</p>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<div class="container">
|
|
||||||
<hr>
|
|
||||||
<p>© Quartznet 2020 | <a href="/quartznet/policy">Policy</a></p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,82 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>Quartznet | Sirius</title>
|
|
||||||
|
|
||||||
<!-- General meta tags -->
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
|
|
||||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
<meta name="description" content="A software and game studio.">
|
|
||||||
<meta name="keywords" content="quartznet, software, games, tools"/>
|
|
||||||
<meta name="author" content="quartznet"/>
|
|
||||||
|
|
||||||
<!-- Open Graph tags -->
|
|
||||||
<meta property="og:title" content="quartznet" />
|
|
||||||
<meta property="og:description" content="We are software and game developers." />
|
|
||||||
|
|
||||||
<!-- Load CSS -->
|
|
||||||
<link rel="stylesheet" href="/quartznet/assets/css/bootstrap.min.css" defer>
|
|
||||||
<link href="/quartznet/assets/css/stylesheet.css" rel="stylesheet">
|
|
||||||
<link href="/quartznet/assets/css/themes.css" rel="stylesheet">
|
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
|
|
||||||
<link rel="icon" href="/quartznet/assets/favicon.ico">
|
|
||||||
|
|
||||||
<!-- Load javascript -->
|
|
||||||
<script src="/quartznet/assets/js/jquery-3.5.1.min.js" defer></script>
|
|
||||||
|
|
||||||
<!-- 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');
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
<div class="container">
|
|
||||||
<nav class="navbar navbar-expand-md">
|
|
||||||
<div class="navbar-collapse order-1 order-md-0 dual-collapse2">
|
|
||||||
<ul class="navbar-nav mr-auto">
|
|
||||||
<li><a href="/quartznet/">Quartznet</a></li>
|
|
||||||
<li><a href="/quartznet/about">About</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="navbar-collapse collapse w-100 order-3 dual-collapse2">
|
|
||||||
<ul class="navbar-nav ml-auto">
|
|
||||||
<li><a href="/quartznet/admin">Admin</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="overlay">
|
|
||||||
<div class="description">
|
|
||||||
<h1 class="title">Quartznet</h1>
|
|
||||||
<p>Software, Games, Science, Space!</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<section class="content container">
|
|
||||||
<h1>Sirius game</h1>
|
|
||||||
<p>Sirius game. Work in progress</p>
|
|
||||||
<a href="https://quartznet.info/presskit">Presskit</a>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<div class="container">
|
|
||||||
<hr>
|
|
||||||
<p>© Quartznet 2020 | <a href="/quartznet/policy">Policy</a></p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
1733
package-lock.json
generated
Normal file
46
package.json
@ -1,36 +1,22 @@
|
|||||||
{
|
{
|
||||||
"name": "Quartznet",
|
"name": "quartznet",
|
||||||
"description": "Quartznet website",
|
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "sapper dev",
|
"dev": "vite dev",
|
||||||
"build": "sapper build --legacy",
|
"build": "vite build",
|
||||||
"export": "sapper export --legacy",
|
"preview": "vite preview",
|
||||||
"start": "node __sapper__/build",
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"cy:run": "cypress run",
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
|
||||||
"cy:open": "cypress open",
|
|
||||||
"test": "run-p --race dev cy:run"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"compression": "^1.7.4",
|
|
||||||
"polka": "next",
|
|
||||||
"sirv": "^1.0.6"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"npm-run-all": "^4.1.5",
|
"@sveltejs/adapter-static": "^2.0.2",
|
||||||
"sapper": "^0.28.0",
|
"@sveltejs/kit": "^1.21.0",
|
||||||
"svelte": "^3.24.1",
|
"svelte": "^4.0.1",
|
||||||
"@babel/core": "^7.11.1",
|
"svelte-check": "^3.4.4",
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
"svelte-preprocess": "^5.0.4",
|
||||||
"@babel/plugin-transform-runtime": "^7.11.0",
|
"tslib": "^2.6.0",
|
||||||
"@babel/preset-env": "^7.11.0",
|
"typescript": "^5.1.6",
|
||||||
"@babel/runtime": "^7.11.2",
|
"vite": "^4.3.9"
|
||||||
"@rollup/plugin-babel": "^5.2.0",
|
},
|
||||||
"@rollup/plugin-commonjs": "^15.0.0",
|
"type": "module"
|
||||||
"@rollup/plugin-node-resolve": "^9.0.0",
|
|
||||||
"@rollup/plugin-replace": "^2.3.3",
|
|
||||||
"rollup": "^2.26.4",
|
|
||||||
"rollup-plugin-svelte": "^5.2.3",
|
|
||||||
"rollup-plugin-terser": "^7.0.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
105
rollup.config.js
@ -1,105 +0,0 @@
|
|||||||
import resolve from '@rollup/plugin-node-resolve';
|
|
||||||
import replace from '@rollup/plugin-replace';
|
|
||||||
import commonjs from '@rollup/plugin-commonjs';
|
|
||||||
import svelte from 'rollup-plugin-svelte';
|
|
||||||
import babel from '@rollup/plugin-babel';
|
|
||||||
import {terser} from 'rollup-plugin-terser';
|
|
||||||
import config from 'sapper/config/rollup.js';
|
|
||||||
import pkg from './package.json';
|
|
||||||
|
|
||||||
const mode = process.env.NODE_ENV;
|
|
||||||
const dev = mode === 'development';
|
|
||||||
const legacy = !!process.env.SAPPER_LEGACY_BUILD;
|
|
||||||
|
|
||||||
const onwarn = (warning, onwarn) =>
|
|
||||||
(warning.code === 'MISSING_EXPORT' && /'preload'/.test(warning.message)) ||
|
|
||||||
(warning.code === 'CIRCULAR_DEPENDENCY' && /[/\\]@sapper[/\\]/.test(warning.message)) ||
|
|
||||||
onwarn(warning);
|
|
||||||
|
|
||||||
export default {
|
|
||||||
client: {
|
|
||||||
input: config.client.input(),
|
|
||||||
output: config.client.output(),
|
|
||||||
plugins: [
|
|
||||||
replace({
|
|
||||||
'process.browser': true,
|
|
||||||
'process.env.NODE_ENV': JSON.stringify(mode)
|
|
||||||
}),
|
|
||||||
svelte({
|
|
||||||
dev,
|
|
||||||
hydratable: true,
|
|
||||||
emitCss: true
|
|
||||||
}),
|
|
||||||
resolve({
|
|
||||||
browser: true,
|
|
||||||
dedupe: ['svelte']
|
|
||||||
}),
|
|
||||||
commonjs(),
|
|
||||||
|
|
||||||
legacy && babel({
|
|
||||||
extensions: ['.js', '.mjs', '.html', '.svelte'],
|
|
||||||
babelHelpers: 'runtime',
|
|
||||||
exclude: ['node_modules/@babel/**'],
|
|
||||||
presets: [
|
|
||||||
['@babel/preset-env', {
|
|
||||||
targets: '> 0.25%, not dead'
|
|
||||||
}]
|
|
||||||
],
|
|
||||||
plugins: [
|
|
||||||
'@babel/plugin-syntax-dynamic-import',
|
|
||||||
['@babel/plugin-transform-runtime', {
|
|
||||||
useESModules: true
|
|
||||||
}]
|
|
||||||
]
|
|
||||||
}),
|
|
||||||
|
|
||||||
!dev && terser({
|
|
||||||
module: true
|
|
||||||
})
|
|
||||||
],
|
|
||||||
|
|
||||||
preserveEntrySignatures: false,
|
|
||||||
onwarn,
|
|
||||||
},
|
|
||||||
|
|
||||||
server: {
|
|
||||||
input: config.server.input(),
|
|
||||||
output: config.server.output(),
|
|
||||||
plugins: [
|
|
||||||
replace({
|
|
||||||
'process.browser': false,
|
|
||||||
'process.env.NODE_ENV': JSON.stringify(mode)
|
|
||||||
}),
|
|
||||||
svelte({
|
|
||||||
generate: 'ssr',
|
|
||||||
hydratable: true,
|
|
||||||
dev
|
|
||||||
}),
|
|
||||||
resolve({
|
|
||||||
dedupe: ['svelte']
|
|
||||||
}),
|
|
||||||
commonjs()
|
|
||||||
],
|
|
||||||
external: Object.keys(pkg.dependencies).concat(require('module').builtinModules),
|
|
||||||
|
|
||||||
preserveEntrySignatures: 'strict',
|
|
||||||
onwarn,
|
|
||||||
},
|
|
||||||
|
|
||||||
serviceworker: {
|
|
||||||
input: config.serviceworker.input(),
|
|
||||||
output: config.serviceworker.output(),
|
|
||||||
plugins: [
|
|
||||||
resolve(),
|
|
||||||
replace({
|
|
||||||
'process.browser': true,
|
|
||||||
'process.env.NODE_ENV': JSON.stringify(mode)
|
|
||||||
}),
|
|
||||||
commonjs(),
|
|
||||||
!dev && terser()
|
|
||||||
],
|
|
||||||
|
|
||||||
preserveEntrySignatures: false,
|
|
||||||
onwarn,
|
|
||||||
}
|
|
||||||
};
|
|
@ -1,125 +0,0 @@
|
|||||||
// @ts-check
|
|
||||||
|
|
||||||
/** This script modifies the project to support TS code in .svelte files like:
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
export let name: string;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
As well as validating the code for CI.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** To work on this script:
|
|
||||||
rm -rf test-template template && git clone sveltejs/template test-template && node scripts/setupTypeScript.js test-template
|
|
||||||
*/
|
|
||||||
|
|
||||||
const fs = require("fs")
|
|
||||||
const path = require("path")
|
|
||||||
const {argv} = require("process")
|
|
||||||
|
|
||||||
const projectRoot = argv[2] || path.join(__dirname, "..")
|
|
||||||
|
|
||||||
// Add deps to pkg.json
|
|
||||||
const packageJSON = JSON.parse(fs.readFileSync(path.join(projectRoot, "package.json"), "utf8"))
|
|
||||||
packageJSON.devDependencies = Object.assign(packageJSON.devDependencies, {
|
|
||||||
"svelte-check": "^1.0.0",
|
|
||||||
"svelte-preprocess": "^4.0.0",
|
|
||||||
"@rollup/plugin-typescript": "^4.0.0",
|
|
||||||
"typescript": "^3.9.3",
|
|
||||||
"tslib": "^2.0.0",
|
|
||||||
"@tsconfig/svelte": "^1.0.0"
|
|
||||||
})
|
|
||||||
|
|
||||||
// Add script for checking
|
|
||||||
packageJSON.scripts = Object.assign(packageJSON.scripts, {
|
|
||||||
"validate": "svelte-check"
|
|
||||||
})
|
|
||||||
|
|
||||||
// Write the package JSON
|
|
||||||
fs.writeFileSync(path.join(projectRoot, "package.json"), JSON.stringify(packageJSON, null, " "))
|
|
||||||
|
|
||||||
// mv src/main.js to main.ts - note, we need to edit rollup.config.js for this too
|
|
||||||
const beforeMainJSPath = path.join(projectRoot, "src", "main.js")
|
|
||||||
const afterMainTSPath = path.join(projectRoot, "src", "main.ts")
|
|
||||||
fs.renameSync(beforeMainJSPath, afterMainTSPath)
|
|
||||||
|
|
||||||
// Switch the app.svelte file to use TS
|
|
||||||
const appSveltePath = path.join(projectRoot, "src", "index.svelte")
|
|
||||||
let appFile = fs.readFileSync(appSveltePath, "utf8")
|
|
||||||
appFile = appFile.replace("<script>", '<script lang="ts">')
|
|
||||||
appFile = appFile.replace("export let name;", 'export let name: string;')
|
|
||||||
fs.writeFileSync(appSveltePath, appFile)
|
|
||||||
|
|
||||||
// Edit rollup config
|
|
||||||
const rollupConfigPath = path.join(projectRoot, "rollup.config.js")
|
|
||||||
let rollupConfig = fs.readFileSync(rollupConfigPath, "utf8")
|
|
||||||
|
|
||||||
// Edit imports
|
|
||||||
rollupConfig = rollupConfig.replace(`'rollup-plugin-terser';`, `'rollup-plugin-terser';
|
|
||||||
import sveltePreprocess from 'svelte-preprocess';
|
|
||||||
import typescript from '@rollup/plugin-typescript';`)
|
|
||||||
|
|
||||||
// Replace name of entry point
|
|
||||||
rollupConfig = rollupConfig.replace(`'src/main.js'`, `'src/main.ts'`)
|
|
||||||
|
|
||||||
// Add preprocess to the svelte config, this is tricky because there's no easy signifier.
|
|
||||||
// Instead we look for `css:` then the next `}` and add the preprocessor to that
|
|
||||||
let foundCSS = false
|
|
||||||
let match
|
|
||||||
|
|
||||||
// https://regex101.com/r/OtNjwo/1
|
|
||||||
const configEditor = new RegExp(/css:.|\n*}/gmi)
|
|
||||||
while ((match = configEditor.exec(rollupConfig)) != null) {
|
|
||||||
if (foundCSS) {
|
|
||||||
const endOfCSSIndex = match.index + 1
|
|
||||||
rollupConfig = rollupConfig.slice(0, endOfCSSIndex) + ",\n preprocess: sveltePreprocess()," + rollupConfig.slice(endOfCSSIndex);
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if (match[0].includes("css:")) foundCSS = true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Add TypeScript
|
|
||||||
rollupConfig = rollupConfig.replace("commonjs(),", 'commonjs(),\n\t\ttypescript({ sourceMap: !production }),')
|
|
||||||
fs.writeFileSync(rollupConfigPath, rollupConfig)
|
|
||||||
|
|
||||||
// Add TSConfig
|
|
||||||
const tsconfig = `{
|
|
||||||
"extends": "@tsconfig/svelte/tsconfig.json",
|
|
||||||
|
|
||||||
"include": ["src/**/*"],
|
|
||||||
"exclude": ["node_modules/*", "__sapper__/*", "public/*"],
|
|
||||||
}`
|
|
||||||
const tsconfigPath = path.join(projectRoot, "tsconfig.json")
|
|
||||||
fs.writeFileSync(tsconfigPath, tsconfig)
|
|
||||||
|
|
||||||
// Delete this script, but not during testing
|
|
||||||
if (!argv[2]) {
|
|
||||||
// Remove the script
|
|
||||||
fs.unlinkSync(path.join(__filename))
|
|
||||||
|
|
||||||
// Check for Mac's DS_store file, and if it's the only one left remove it
|
|
||||||
const remainingFiles = fs.readdirSync(path.join(__dirname))
|
|
||||||
if (remainingFiles.length === 1 && remainingFiles[0] === '.DS_store') {
|
|
||||||
fs.unlinkSync(path.join(__dirname, '.DS_store'))
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if the scripts folder is empty
|
|
||||||
if (fs.readdirSync(path.join(__dirname)).length === 0) {
|
|
||||||
// Remove the scripts folder
|
|
||||||
fs.rmdirSync(path.join(__dirname))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Adds the extension recommendation
|
|
||||||
fs.mkdirSync(path.join(projectRoot, ".vscode"))
|
|
||||||
fs.writeFileSync(path.join(projectRoot, ".vscode", "extensions.json"), `{
|
|
||||||
"recommendations": ["svelte.svelte-vscode"]
|
|
||||||
}
|
|
||||||
`)
|
|
||||||
|
|
||||||
console.log("Converted to TypeScript.")
|
|
||||||
|
|
||||||
if (fs.existsSync(path.join(projectRoot, "node_modules"))) {
|
|
||||||
console.log("\nYou will need to re-run your dependency manager to get started.")
|
|
||||||
}
|
|
9
src/app.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// See https://kit.svelte.dev/docs/types#app
|
||||||
|
// for information about these interfaces
|
||||||
|
// and what to do when importing types
|
||||||
|
declare namespace App {
|
||||||
|
// interface Error {}
|
||||||
|
// interface Locals {}
|
||||||
|
// interface PageData {}
|
||||||
|
// interface Platform {}
|
||||||
|
}
|
18
src/app.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<!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!">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="/css/global.css">
|
||||||
|
<link rel="icon" type="image/png" href="/img/favicon.ico">
|
||||||
|
<link rel="preload" as="image" href="/img/bluenebula.webp">
|
||||||
|
|
||||||
|
%sveltekit.head%
|
||||||
|
</head>
|
||||||
|
<body data-sveltekit-preload-data="hover">
|
||||||
|
<div id="svelte">%sveltekit.body%</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -1,5 +0,0 @@
|
|||||||
import * as sapper from '@sapper/app';
|
|
||||||
|
|
||||||
sapper.start({
|
|
||||||
target: document.querySelector('#sapper')
|
|
||||||
});
|
|
@ -1,84 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let segment;
|
|
||||||
export let rightComponent;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
nav {
|
|
||||||
|
|
||||||
border-bottom: 1px solid rgba(255, 62, 0, 0.1);
|
|
||||||
font-weight: 300;
|
|
||||||
flex-flow: row nowrap;
|
|
||||||
position: relative;
|
|
||||||
justify-content: flex-start;
|
|
||||||
width: 100%;
|
|
||||||
margin-right: auto;
|
|
||||||
margin-left: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* clearfix */
|
|
||||||
ul::after {
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
font-size: 1rem;
|
|
||||||
text-align: center;
|
|
||||||
padding: 5px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
[aria-current] {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
[aria-current]::after {
|
|
||||||
position: absolute;
|
|
||||||
content: '';
|
|
||||||
width: calc(100% - 1em);
|
|
||||||
height: 2px;
|
|
||||||
background-color: rgb(255, 62, 0);
|
|
||||||
display: block;
|
|
||||||
bottom: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #CC99FF;
|
|
||||||
text-decoration: none;
|
|
||||||
padding: 1em 0.5em;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
.right {
|
|
||||||
margin-left: auto;
|
|
||||||
align-self: flex-end !important;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<ul>
|
|
||||||
<li><a aria-current="{segment === undefined ? 'page' : undefined}" href=".">Quartznet</a></li>
|
|
||||||
<li><a aria-current="{segment === 'about' ? 'page' : undefined}" href="about">About</a></li>
|
|
||||||
|
|
||||||
<!-- for the blog link, we're using rel=prefetch so that Sapper prefetches
|
|
||||||
the blog data when we hover over the link or tap it on a touchscreen -->
|
|
||||||
<li><a rel=prefetch aria-current="{segment === 'blog' ? 'page' : undefined}" href="blog">Blog</a></li>
|
|
||||||
<li class="right">
|
|
||||||
<svelte:component this={rightComponent}/>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
@ -1,80 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let title = "Quartznet";
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: 'Open Sans', sans-serif;
|
|
||||||
font-display: swap;
|
|
||||||
font-size: 1rem;
|
|
||||||
line-height: 1.8;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.description {
|
|
||||||
margin-bottom: .5rem;
|
|
||||||
font-family: inherit;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overlay {
|
|
||||||
display: flex;
|
|
||||||
background-image: url("/bluenebula.webp");
|
|
||||||
background-size: cover;
|
|
||||||
background-position: center;
|
|
||||||
min-height: 200px;
|
|
||||||
text-align: center;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
display: inline-block;
|
|
||||||
font-size: 3rem;
|
|
||||||
text-decoration: none;
|
|
||||||
font-family: "Open Sans", sans-serif;
|
|
||||||
font-weight: 500;
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
margin-top: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
main {
|
|
||||||
width: 100%;
|
|
||||||
padding-right: 15px;
|
|
||||||
padding-left: 15px;
|
|
||||||
margin-right: auto;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-top: 30px;
|
|
||||||
display: block;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.description p {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
h5 {
|
|
||||||
color: var(--headings-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 640px) {
|
|
||||||
main {
|
|
||||||
max-width: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="overlay">
|
|
||||||
<div class="description">
|
|
||||||
<h1 class="title">{title}</h1>
|
|
||||||
<p>Software, Games, Science, Space!</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
@ -1,82 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let name;
|
|
||||||
export let src = "https://placehold.it/600x300";
|
|
||||||
export let description;
|
|
||||||
export let imgClass = "img-fluid mb-3 mb-md-0";
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.row {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-right: -15px;
|
|
||||||
margin-left: -15px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.thumb {
|
|
||||||
flex: 0 0 58.333333%;
|
|
||||||
max-width: 58.333333%;
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
min-height: 1px;
|
|
||||||
padding-right: 15px;
|
|
||||||
padding-left: 15px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.blurb {
|
|
||||||
flex: 0 0 41.666667%;
|
|
||||||
max-width: 41.666667%;
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
min-height: 1px;
|
|
||||||
padding-right: 15px;
|
|
||||||
padding-left: 15px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: 2rem;
|
|
||||||
margin-bottom: .5rem;
|
|
||||||
font-family: inherit;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 1.2;
|
|
||||||
margin-top: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #CC99FF;
|
|
||||||
text-decoration: none;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
margin-bottom: 0 !important;
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
vertical-align: middle;
|
|
||||||
border-style: none;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="thumb">
|
|
||||||
<a href="{name}">
|
|
||||||
<img class={imgClass} {src} alt={name}>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="blurb">
|
|
||||||
<h2>{name}</h2>
|
|
||||||
<p>{description}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let name = "%USER%";
|
|
||||||
export let icon;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
img {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: .2rem;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
position: relative;
|
|
||||||
right: 50%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
<a href="404"> <img src="/user.svg"> </a>
|
|
29
src/lib/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>
|
274
src/lib/Modal.svelte
Normal file
@ -0,0 +1,274 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
//@ts-nocheck
|
||||||
|
import {
|
||||||
|
setContext as baseSetContext,
|
||||||
|
createEventDispatcher,
|
||||||
|
} from "svelte";
|
||||||
|
import { fade } from "svelte/transition";
|
||||||
|
|
||||||
|
export let key = "simple-modal";
|
||||||
|
export let closeButton = true;
|
||||||
|
export let closeOnEsc = true;
|
||||||
|
export let closeOnOuterClick = true;
|
||||||
|
export let transitionBg = fade;
|
||||||
|
export let transitionBgProps = { duration: 250 };
|
||||||
|
export let transitionWindow = transitionBg;
|
||||||
|
export let transitionWindowProps = transitionBgProps;
|
||||||
|
export let styleBg = { top: 0, left: 0 };
|
||||||
|
export let styleWindow = {};
|
||||||
|
export let styleContent = {};
|
||||||
|
export let setContext = baseSetContext;
|
||||||
|
export let show: boolean = false;
|
||||||
|
|
||||||
|
let Component = null;
|
||||||
|
let props = null;
|
||||||
|
|
||||||
|
let background;
|
||||||
|
let wrap;
|
||||||
|
let customStyleBg = {};
|
||||||
|
let customStyleWindow = {};
|
||||||
|
let customStyleContent = {};
|
||||||
|
|
||||||
|
let Callback = (props) => {};
|
||||||
|
|
||||||
|
$: Component,
|
||||||
|
() => {
|
||||||
|
show = !!Component;
|
||||||
|
};
|
||||||
|
|
||||||
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
|
const camelCaseToDash = (str) =>
|
||||||
|
str.replace(/([a-zA-Z])(?=[A-Z])/g, "$1-").toLowerCase();
|
||||||
|
|
||||||
|
const toCssString = (props) =>
|
||||||
|
Object.keys(props).reduce(
|
||||||
|
(str, key) => `${str}; ${camelCaseToDash(key)}: ${props[key]}`,
|
||||||
|
""
|
||||||
|
);
|
||||||
|
|
||||||
|
$: cssBg = toCssString(Object.assign({}, styleBg, customStyleBg));
|
||||||
|
$: cssWindow = toCssString(
|
||||||
|
Object.assign({}, styleWindow, customStyleWindow)
|
||||||
|
);
|
||||||
|
$: cssContent = toCssString(
|
||||||
|
Object.assign({}, styleContent, customStyleContent)
|
||||||
|
);
|
||||||
|
|
||||||
|
const open = (
|
||||||
|
NewComponent,
|
||||||
|
newProps = {},
|
||||||
|
style = { bg: {}, window: {}, content: {} },
|
||||||
|
newCallback = () => {}
|
||||||
|
) => {
|
||||||
|
Component = NewComponent;
|
||||||
|
props = newProps;
|
||||||
|
Callback = newCallback;
|
||||||
|
customStyleBg = style.bg || {};
|
||||||
|
customStyleWindow = style.window || {};
|
||||||
|
customStyleContent = style.content || {};
|
||||||
|
};
|
||||||
|
|
||||||
|
const close = () => {
|
||||||
|
Callback(props);
|
||||||
|
Component = null;
|
||||||
|
props = null;
|
||||||
|
customStyleBg = {};
|
||||||
|
customStyleWindow = {};
|
||||||
|
customStyleContent = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleKeyup = ({ key }) => {
|
||||||
|
if (closeOnEsc && Component && key === "Escape") {
|
||||||
|
event.preventDefault();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleOuterClick = (event) => {
|
||||||
|
if (
|
||||||
|
closeOnOuterClick &&
|
||||||
|
(event.target === background || event.target === wrap)
|
||||||
|
) {
|
||||||
|
event.preventDefault();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
setContext(key, { open: show, close });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:window on:keyup={handleKeyup} />
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{#if Component}
|
||||||
|
<div
|
||||||
|
class="bg"
|
||||||
|
on:click={handleOuterClick}
|
||||||
|
bind:this={background}
|
||||||
|
transition:transitionBg={transitionBgProps}
|
||||||
|
style={cssBg}
|
||||||
|
>
|
||||||
|
<div class="window-wrap" bind:this={wrap}>
|
||||||
|
<div
|
||||||
|
class="window"
|
||||||
|
transition:transitionWindow={transitionWindowProps}
|
||||||
|
style={cssWindow}
|
||||||
|
>
|
||||||
|
{#if closeButton}
|
||||||
|
<button on:click={close} class="close" />
|
||||||
|
{/if}
|
||||||
|
<div class="content" style={cssContent}>
|
||||||
|
<Component {...props} {close} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
|
** LICENSE **
|
||||||
|
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2019 Fritz Lekschas
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
https://github.com/flekschas/svelte-simple-moda
|
||||||
|
-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1000;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
background: rgba(0, 0, 0, 0.66);
|
||||||
|
}
|
||||||
|
|
||||||
|
.window-wrap {
|
||||||
|
position: relative;
|
||||||
|
margin: 2rem;
|
||||||
|
max-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.window {
|
||||||
|
position: relative;
|
||||||
|
width: 40rem;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
margin: 2rem auto;
|
||||||
|
color: black;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
position: relative;
|
||||||
|
padding: 1rem;
|
||||||
|
max-height: calc(100vh - 4rem);
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
display: block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1000;
|
||||||
|
top: 1rem;
|
||||||
|
right: 1rem;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 1.5rem;
|
||||||
|
height: 1.5rem;
|
||||||
|
border: 0;
|
||||||
|
color: black;
|
||||||
|
border-radius: 1.5rem;
|
||||||
|
background: white;
|
||||||
|
box-shadow: 0 0 0 1px black;
|
||||||
|
transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
|
||||||
|
background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close:before,
|
||||||
|
.close:after {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
width: 1rem;
|
||||||
|
height: 1px;
|
||||||
|
background: black;
|
||||||
|
transform-origin: center;
|
||||||
|
transition: height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),
|
||||||
|
background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.close:before {
|
||||||
|
-webkit-transform: translate(0, -50%) rotate(45deg);
|
||||||
|
-moz-transform: translate(0, -50%) rotate(45deg);
|
||||||
|
transform: translate(0, -50%) rotate(45deg);
|
||||||
|
left: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close:after {
|
||||||
|
-webkit-transform: translate(0, -50%) rotate(-45deg);
|
||||||
|
-moz-transform: translate(0, -50%) rotate(-45deg);
|
||||||
|
transform: translate(0, -50%) rotate(-45deg);
|
||||||
|
left: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close:hover {
|
||||||
|
background: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close:hover:before,
|
||||||
|
.close:hover:after {
|
||||||
|
height: 2px;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close:focus {
|
||||||
|
border-color: #3399ff;
|
||||||
|
box-shadow: 0 0 0 2px #3399ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close:active {
|
||||||
|
transform: scale(0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
.close:hover,
|
||||||
|
.close:focus,
|
||||||
|
.close:active {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
</style>
|
53
src/lib/Nav.svelte
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<style>
|
||||||
|
a {
|
||||||
|
font-size: 1rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
max-width: 1400px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding-left: 1rem;
|
||||||
|
padding-right: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
display: flex;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
list-style: none;
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul li a {
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.1s linear;
|
||||||
|
padding: 4px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul li a:hover {
|
||||||
|
border-bottom: 2px solid var(--line-color);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<header>
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/">Quartznet</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="/about">About</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="/admin">Admin</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
56
src/lib/Sidebar.svelte
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import { fly } from "svelte/transition";
|
||||||
|
import Modal from "./Modal.svelte";
|
||||||
|
|
||||||
|
const click = () => {
|
||||||
|
modal_show = true;
|
||||||
|
show = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
function overlay_click(e: MouseEvent) {
|
||||||
|
//@ts-ignore
|
||||||
|
if ("close" in e.target.dataset) show = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
export let show = false;
|
||||||
|
let modal_show = false;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if show}
|
||||||
|
<div class="overlay" data-close on:click={overlay_click}>
|
||||||
|
<nav transition:fly={{ x: -250, opacity: 1 }}>
|
||||||
|
<slot>
|
||||||
|
<button on:click={click}>About</button>
|
||||||
|
</slot>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<Modal bind:show={modal_show} />
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, 0);
|
||||||
|
z-index: 10;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 100%;
|
||||||
|
padding: 2rem 1rem 0.6rem;
|
||||||
|
border-right: 1px solid #aaa;
|
||||||
|
background: #fff;
|
||||||
|
overflow-y: auto;
|
||||||
|
width: 20rem;
|
||||||
|
}
|
||||||
|
</style>
|
255
src/lib/SortableList.svelte
Normal file
@ -0,0 +1,255 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
//@ts-nocheck
|
||||||
|
import { quintOut } from "svelte/easing";
|
||||||
|
import { crossfade } from "svelte/transition";
|
||||||
|
import { flip } from "svelte/animate";
|
||||||
|
// FLIP ANIMATION
|
||||||
|
const [send, receive] = crossfade({
|
||||||
|
duration: (d) => Math.sqrt(d * 200),
|
||||||
|
fallback(node, params) {
|
||||||
|
const style = getComputedStyle(node);
|
||||||
|
const transform = style.transform === "none" ? "" : style.transform;
|
||||||
|
return {
|
||||||
|
duration: 600,
|
||||||
|
easing: quintOut,
|
||||||
|
css: (t) => `
|
||||||
|
transform: ${transform} scale(${t});
|
||||||
|
opacity: ${t}
|
||||||
|
`,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
});
|
||||||
|
// DRAG AND DROP
|
||||||
|
let isOver = false;
|
||||||
|
let isDragging = false;
|
||||||
|
const getDraggedParent = (node) => {
|
||||||
|
return node.dataset && node.dataset.index
|
||||||
|
? node.dataset
|
||||||
|
: getDraggedParent(node.parentNode);
|
||||||
|
};
|
||||||
|
const click = (ev) => {
|
||||||
|
dispatch("slotclick", {
|
||||||
|
source: ev.target.parentElement.dataset.index,
|
||||||
|
sourceItem: list[ev.target.parentElement.dataset.index],
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const start = (ev) => {
|
||||||
|
isDragging = true;
|
||||||
|
ev.dataTransfer.setData("source", ev.target.dataset.index);
|
||||||
|
};
|
||||||
|
const over = (ev) => {
|
||||||
|
ev.preventDefault();
|
||||||
|
let dragged = getDraggedParent(ev.target);
|
||||||
|
if (isOver !== dragged.id) isOver = JSON.parse(dragged.id);
|
||||||
|
};
|
||||||
|
const leave = (ev) => {
|
||||||
|
let dragged = getDraggedParent(ev.target);
|
||||||
|
if (isOver === dragged.id) isOver = false;
|
||||||
|
};
|
||||||
|
const drop = (ev) => {
|
||||||
|
isOver = false;
|
||||||
|
ev.preventDefault();
|
||||||
|
let dragged = getDraggedParent(ev.target);
|
||||||
|
let from = ev.dataTransfer.getData("source");
|
||||||
|
let to = dragged.index;
|
||||||
|
reorder({ from, to });
|
||||||
|
isDragging = false;
|
||||||
|
};
|
||||||
|
// DISPATCH REORDER
|
||||||
|
import {
|
||||||
|
createEventDispatcher,
|
||||||
|
onMount,
|
||||||
|
afterUpdate,
|
||||||
|
beforeUpdate,
|
||||||
|
tick,
|
||||||
|
} from "svelte";
|
||||||
|
|
||||||
|
const dispatch = createEventDispatcher();
|
||||||
|
const reorder = ({ from, to }) => {
|
||||||
|
let newList = [...list];
|
||||||
|
let temp = newList[from];
|
||||||
|
newList[from] = newList[to];
|
||||||
|
newList[to] = temp;
|
||||||
|
//newList[from] = [newList[to], (newList[to] = newList[from])][0];
|
||||||
|
dispatch("sort", { data: newList, from: from, to: to });
|
||||||
|
};
|
||||||
|
// UTILS
|
||||||
|
const getKey = (item) => (key ? item[key] : item);
|
||||||
|
|
||||||
|
type ListItem = {
|
||||||
|
displayTileSize: number;
|
||||||
|
endsGroup: boolean;
|
||||||
|
startsNewGroup: boolean;
|
||||||
|
};
|
||||||
|
// PROPS
|
||||||
|
export let list: ListItem[][];
|
||||||
|
export let key;
|
||||||
|
export let ulclass;
|
||||||
|
|
||||||
|
export let breakon: string | null = null;
|
||||||
|
|
||||||
|
export let breakComponent;
|
||||||
|
// return `<><li class='${breakClass}' style='height:100%; grid-column: span 5;'><div style='width:100%;height:inherit;'></li>`;
|
||||||
|
|
||||||
|
// export let breakPosition = "beforebegin";
|
||||||
|
let breakClass = "group-break";
|
||||||
|
|
||||||
|
const Elements = () => document.getElementsByClassName(key);
|
||||||
|
|
||||||
|
const removeOldBreaks = (parent) => {
|
||||||
|
if (breakon == null) return;
|
||||||
|
if (isDragging) return;
|
||||||
|
|
||||||
|
if (parent.length) {
|
||||||
|
const old = parent[0].getElementsByClassName(breakClass);
|
||||||
|
|
||||||
|
for (let i = 0; i < old.length; i = 0) {
|
||||||
|
old[i].remove(); // removing the node from the DOM also removes it from this array (WTF??)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
let lastCollection;
|
||||||
|
|
||||||
|
let updatingBreakPoints = false;
|
||||||
|
|
||||||
|
const updateBreak = () => {
|
||||||
|
if (isDragging || updatingBreakPoints) return;
|
||||||
|
if (breakon == null) return;
|
||||||
|
|
||||||
|
try {
|
||||||
|
updatingBreakPoints = true;
|
||||||
|
|
||||||
|
let breaks = 0;
|
||||||
|
let last = null;
|
||||||
|
let carry = 0;
|
||||||
|
let elements = Elements();
|
||||||
|
|
||||||
|
for (let x = 0; x < list.length; x++) {
|
||||||
|
if (last != null) {
|
||||||
|
if (list[x][breakon] > last) {
|
||||||
|
if (elements.length) {
|
||||||
|
let targetIndex = x + breaks;
|
||||||
|
|
||||||
|
if (
|
||||||
|
list.length !==
|
||||||
|
elements[0].children.length - breaks
|
||||||
|
) {
|
||||||
|
if (lastCollection)
|
||||||
|
if (lastCollection.length)
|
||||||
|
targetIndex += lastCollection.length;
|
||||||
|
}
|
||||||
|
// elements[0].children[targetIndex].insertAdjacentHTML(breakPosition, breakHtml(carry + 1));
|
||||||
|
breaks++;
|
||||||
|
carry = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
carry++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
last = list[x][breakon] > last ? list[x][breakon] : last;
|
||||||
|
}
|
||||||
|
|
||||||
|
lastCollection = list;
|
||||||
|
} finally {
|
||||||
|
updatingBreakPoints = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
//beforeUpdate(() => {updateBreak()});
|
||||||
|
|
||||||
|
let updating = false;
|
||||||
|
|
||||||
|
afterUpdate(async () => {
|
||||||
|
if (isDragging) return;
|
||||||
|
if (breakon == null) return;
|
||||||
|
|
||||||
|
updating = true;
|
||||||
|
removeOldBreaks(Elements());
|
||||||
|
await tick();
|
||||||
|
updateBreak();
|
||||||
|
|
||||||
|
updating = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
const getClass = () => {
|
||||||
|
let ret = "";
|
||||||
|
if (key) ret += ` ${key}`;
|
||||||
|
if (ulclass) ret += ` ${ulclass}`;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if list && list.length}
|
||||||
|
<ul class={getClass()}>
|
||||||
|
{#each list as item, index (getKey(item))}
|
||||||
|
<li
|
||||||
|
class:small={item.displayTileSize === 2}
|
||||||
|
class:medium={item.displayTileSize === 3}
|
||||||
|
class:large={item.displayTileSize === 4}
|
||||||
|
class:startsNewGroup={item.startsNewGroup}
|
||||||
|
class:endsGroup={item.endsGroup}
|
||||||
|
data-index={index}
|
||||||
|
data-item={JSON.stringify(item)}
|
||||||
|
data-id={JSON.stringify(getKey(item))}
|
||||||
|
draggable="true"
|
||||||
|
on:dragstart={start}
|
||||||
|
on:dragover={over}
|
||||||
|
on:dragleave={leave}
|
||||||
|
on:drop={drop}
|
||||||
|
on:click={click}
|
||||||
|
in:receive={{ key: getKey(item) }}
|
||||||
|
out:send={{ key: getKey(item) }}
|
||||||
|
animate:flip={{ duration: 300 }}
|
||||||
|
class:over={getKey(item) === isOver}
|
||||||
|
>
|
||||||
|
<slot {item} {index}>
|
||||||
|
<p>{getKey(item)}</p>
|
||||||
|
</slot>
|
||||||
|
</li>
|
||||||
|
{/each}
|
||||||
|
</ul>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
ul {
|
||||||
|
display: inline-grid;
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
border: 2px dotted transparent;
|
||||||
|
transition: border 0.1s linear;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.startsNewGroup {
|
||||||
|
grid-column-start: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.small {
|
||||||
|
grid-column-end: span 1;
|
||||||
|
grid-row: span 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.medium {
|
||||||
|
grid-column-end: span 2;
|
||||||
|
grid-row: span 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.large {
|
||||||
|
grid-column-end: span 2;
|
||||||
|
/*grid-row: span 2; large buttons are double height, but they also push the row below them down (they dont fit around eachother like css-grid) */
|
||||||
|
}
|
||||||
|
|
||||||
|
.over {
|
||||||
|
border-color: rgba(48, 12, 200, 0.2);
|
||||||
|
}
|
||||||
|
</style>
|
43
src/lib/Thumbnail.svelte
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
export let name: string;
|
||||||
|
export let link: string;
|
||||||
|
export let img = "https://placehold.it/600x300";
|
||||||
|
export let size = { width: 600, height: 300 };
|
||||||
|
export let description: string;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="back">
|
||||||
|
<a href={link}>
|
||||||
|
<img src={img} alt={name} width={size.width} height={size.height} />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="description">
|
||||||
|
<h2>{name}</h2>
|
||||||
|
<p>{description}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.card {
|
||||||
|
display: flex;
|
||||||
|
gap: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back a img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
width: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 978px) {
|
||||||
|
.card {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 0.25rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
16
src/lib/UserManager.svelte
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<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 href="/admin">Admin</a>
|
10
src/main.js
@ -1,10 +0,0 @@
|
|||||||
import App from './routes/index.svelte';
|
|
||||||
|
|
||||||
const app = new App({
|
|
||||||
target: document.body,
|
|
||||||
props: {
|
|
||||||
name: 'Quartznet'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
export default app;
|
|
156
src/404.svelte → src/routes/+error.svelte
Executable file → Normal file
@ -1,7 +1,11 @@
|
|||||||
<script>
|
<script lang="ts">
|
||||||
import {onMount} from 'svelte'
|
import { page } from "$app/stores";
|
||||||
|
import { onMount } from "svelte";
|
||||||
|
import Banner from "$lib/Banner.svelte";
|
||||||
|
|
||||||
|
const status = $page.status?.toString() ?? "";
|
||||||
|
const dev = process.env.NODE_ENV === "development";
|
||||||
|
|
||||||
var view = document.getElementsByTagName('pre')[0];
|
|
||||||
var appa = ` .,-:;//;:=,
|
var appa = ` .,-:;//;:=,
|
||||||
. :H@@@MM@M#H/.,+%;,
|
. :H@@@MM@M#H/.,+%;,
|
||||||
,/X+ +M@@M@MM%=,-%HMMM@X/,
|
,/X+ +M@@M@MM%=,-%HMMM@X/,
|
||||||
@ -212,105 +216,101 @@ H@: :HHHHHHHHHHHHHHHHHHX, =@H
|
|||||||
,:/%XM####H/.
|
,:/%XM####H/.
|
||||||
,.:=-.`;
|
,.:=-.`;
|
||||||
|
|
||||||
//appa
|
// appa, atom, nuke
|
||||||
//atom
|
|
||||||
//nuke
|
|
||||||
var options = [cake, heart, fire, tick, bang, mesa, cube];
|
var options = [cake, heart, fire, tick, bang, mesa, cube];
|
||||||
|
let active = cake;
|
||||||
let active = cake
|
|
||||||
|
|
||||||
function updateView() {
|
function updateView() {
|
||||||
active = "<br>" + options[Math.floor((Math.random() * options.length))];
|
active = options[Math.floor(Math.random() * options.length)];
|
||||||
setTimeout(updateView, 5000);
|
setTimeout(updateView, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
onMount(() => updateView());
|
onMount(() => updateView());
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
<title>Quartznet - {status}</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<body style="text-align: center">
|
<Banner title={status} />
|
||||||
<audio controls autoplay>
|
|
||||||
<source src="alive.ogg" type="audio/wav">
|
|
||||||
</audio>
|
|
||||||
|
|
||||||
<pre>{active}</pre>
|
<main class="container">
|
||||||
<br>
|
<section>
|
||||||
This was a triumph!
|
<h2>{status} {$page.error?.message ?? ""}</h2>
|
||||||
I'm making a note here:
|
<audio controls autoplay>
|
||||||
Huge success!
|
<track kind="captions" />
|
||||||
|
<source src="http://quartznet.info/alive.ogg" type="audio/wav" />
|
||||||
|
</audio>
|
||||||
|
<div class="ascii">
|
||||||
|
<div>
|
||||||
|
<pre><br />{active}</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<p class="info">
|
||||||
|
This was a triumph! I'm making a note here: Huge success!
|
||||||
|
It's hard to overstate my satisfaction.
|
||||||
|
|
||||||
It's hard to overstate
|
Aperture Science: We do what we must because we can.
|
||||||
my satisfaction.
|
For the good of all of us. Except the ones who are dead.
|
||||||
|
|
||||||
Aperture Science:
|
But there's no sense crying over every mistake. You just keep on trying 'til you run out of cake.
|
||||||
We do what we must
|
And the science gets done. And you make a neat gun for the people who are still alive.
|
||||||
because we can
|
|
||||||
For the good of all of us.
|
|
||||||
Except the ones who are dead.
|
|
||||||
|
|
||||||
But there's no sense crying
|
I'm not even angry... I'm being so sincere right now. Even though you broke my heart, and killed me.
|
||||||
over every mistake.
|
And tore me to pieces. And threw every piece into a fire.
|
||||||
You just keep on trying
|
|
||||||
'til you run out of cake.
|
|
||||||
And the science gets done.
|
|
||||||
And you make a neat gun
|
|
||||||
for the people who are
|
|
||||||
still alive.
|
|
||||||
|
|
||||||
I'm not even angry...
|
As they burned it hurt because I was so happy for you!
|
||||||
I'm being so sincere right now.
|
Now, these points of data make a beautiful line. And we're out of beta. We're releasing on time!
|
||||||
Even though you broke my heart,
|
|
||||||
and killed me.
|
|
||||||
|
|
||||||
And tore me to pieces.
|
So I'm GLaD I got burned! Think of all the things we learned! for the people who are still alive.
|
||||||
And threw every piece into a fire.
|
|
||||||
As they burned it hurt because
|
|
||||||
I was so happy for you!
|
|
||||||
|
|
||||||
Now, these points of data
|
Go ahead and leave me... I think I'd prefer to stay inside... Maybe you'll find someone else to help
|
||||||
make a beautiful line.
|
you.
|
||||||
And we're out of beta.
|
|
||||||
We're releasing on time!
|
|
||||||
So I'm GLaD I got burned!
|
|
||||||
Think of all the things we learned!
|
|
||||||
for the people who are
|
|
||||||
still alive.
|
|
||||||
|
|
||||||
Go ahead and leave me...
|
|
||||||
I think I'd prefer to stay inside...
|
|
||||||
Maybe you'll find someone else
|
|
||||||
to help you.
|
|
||||||
Maybe Black Mesa?
|
Maybe Black Mesa?
|
||||||
That was a joke. Ha Ha. Fat Chance!
|
That was a joke. Ha Ha. Fat Chance! Anyway this cake is great! It's so delicious and moist!
|
||||||
|
|
||||||
Anyway this cake is great!
|
Look at me: still talking when there's science to do! When I look out there, it makes me glad I'm not you.
|
||||||
It's so delicious and moist!
|
I've experiments to run. There is research to be done. On the people who are still alive.
|
||||||
|
|
||||||
Look at me: still talking
|
And believe me I am still alive.
|
||||||
when there's science to do!
|
|
||||||
When I look out there,
|
|
||||||
it makes me glad I'm not you.
|
|
||||||
|
|
||||||
I've experiments to run.
|
I'm doing science and I'm still alive.
|
||||||
There is research to be done.
|
|
||||||
On the people who are
|
I feel fantastic and I'm still alive.
|
||||||
still alive.
|
|
||||||
And believe me I am
|
While you're dying I'll be still alive.
|
||||||
still alive.
|
|
||||||
I'm doing science and I'm
|
And when you're dead I will be still alive.
|
||||||
still alive.
|
|
||||||
I feel fantastic and I'm
|
|
||||||
still alive.
|
|
||||||
While you're dying I'll be
|
|
||||||
still alive.
|
|
||||||
And when you're dead I will be
|
|
||||||
still alive
|
|
||||||
|
|
||||||
Still alive.
|
Still alive.
|
||||||
|
Still alive.</p>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
Still alive.
|
<style>
|
||||||
</body>
|
* {
|
||||||
</html>
|
color: white !important;
|
||||||
|
font-family: monospace;
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ascii {
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
position: relative;
|
||||||
|
white-space: pre;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
margin: 0 auto;
|
||||||
|
font-family: monospace;
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
</style>
|
1
src/routes/+layout.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
export const prerender = true;
|
27
src/routes/+layout.svelte
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<script>
|
||||||
|
import Nav from '$lib/Nav.svelte';
|
||||||
|
import Modal from '$lib/Modal.svelte'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
:global(html[data-theme='dark']) {
|
||||||
|
--background-color: #222222;
|
||||||
|
--headings-color: #ffffff;
|
||||||
|
--font-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(body) {
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
font-size: 1rem;
|
||||||
|
background-color: var(--background-color);
|
||||||
|
color: var(--font-color);
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<Modal/>
|
||||||
|
<Nav/>
|
||||||
|
|
||||||
|
<slot></slot>
|
||||||
|
|
||||||
|
<footer class="container"></footer>
|
51
src/routes/+page.svelte
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<script>
|
||||||
|
import {onMount} from 'svelte';
|
||||||
|
import Thumb from '$lib/Thumbnail.svelte'
|
||||||
|
import Banner from '$lib/Banner.svelte'
|
||||||
|
|
||||||
|
let games = [
|
||||||
|
{
|
||||||
|
name: "Sirius",
|
||||||
|
link: "./sirius",
|
||||||
|
img: "img/600x300.png",
|
||||||
|
size: { width: 600, height: 300 },
|
||||||
|
description: "A 2D game about a wannabe space captain exploring the galaxy.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Quartz",
|
||||||
|
link: "./sirius",
|
||||||
|
img: "img/600x300.png",
|
||||||
|
size: { width: 600, height: 300 },
|
||||||
|
description: "Test"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
onMount(async () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
section {
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 5px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>Quartznet</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
|
<Banner/>
|
||||||
|
|
||||||
|
<main class="container">
|
||||||
|
<section>
|
||||||
|
{#each games as game}
|
||||||
|
<Thumb {...game}/>
|
||||||
|
{/each}
|
||||||
|
</section>
|
||||||
|
</main>
|
@ -1,375 +0,0 @@
|
|||||||
<script>
|
|
||||||
import {onMount} from 'svelte'
|
|
||||||
|
|
||||||
export let status;
|
|
||||||
export let error;
|
|
||||||
|
|
||||||
const dev = process.env.NODE_ENV === 'development';
|
|
||||||
|
|
||||||
|
|
||||||
var appa = ` .,-:;//;:=,
|
|
||||||
. :H@@@MM@M#H/.,+%;,
|
|
||||||
,/X+ +M@@M@MM%=,-%HMMM@X/,
|
|
||||||
-+@MM; $M@@MH+-,;XMMMM@MMMM@+-
|
|
||||||
;@M@@M- XM@X;. -+XXXXXHHH@M@M#@/.
|
|
||||||
,%MM@@MH ,@%= .---=-=:=,.
|
|
||||||
-@#@@@MX ., -%HX$$%%%+;
|
|
||||||
=-./@M@M$ .;@MMMM@MM:
|
|
||||||
X@/ -$MM/ .+MM@@@M$
|
|
||||||
,@M@H: :@: . -X#@@@@-
|
|
||||||
,@@@MMX, . /H- ;@M@M=
|
|
||||||
.H@@@@M@+, %MM+..%#$.
|
|
||||||
/MMMM@MMH/. XM@MH; -;
|
|
||||||
/%+%$XHH@$= , .H@@@@MX,
|
|
||||||
.=--------. -%H.,@@@@@MX,
|
|
||||||
.%MM@@@HHHXX$$$%+- .:$MMX -M@@MM%.
|
|
||||||
=XMMM@MM@MM#H;,-+HMM@M+ /MMMX=
|
|
||||||
=%@M@M#@$-.=$@MM@@@M; %M%=
|
|
||||||
,:+$+-,/H#MMMMMMM@- -,
|
|
||||||
=++%%%%+/:-.`;
|
|
||||||
|
|
||||||
var nuke = ` =+$HM####@H%;,
|
|
||||||
/H###############M$,
|
|
||||||
,@################+
|
|
||||||
.H##############+
|
|
||||||
X############/
|
|
||||||
$##########/
|
|
||||||
%########/
|
|
||||||
/X/;;+X/
|
|
||||||
|
|
||||||
-XHHX-
|
|
||||||
,######,
|
|
||||||
#############X .M####M. X#############
|
|
||||||
##############- -//- -##############
|
|
||||||
X##############%, ,+##############X
|
|
||||||
-##############X X##############-
|
|
||||||
%############% %############%
|
|
||||||
%##########; ;##########%
|
|
||||||
;#######M= =M#######;
|
|
||||||
.+M###@, ,@###M+.
|
|
||||||
:XH. .HX:`;
|
|
||||||
|
|
||||||
var atom = ` =/;;/-
|
|
||||||
+: //
|
|
||||||
/; /;
|
|
||||||
-X H.
|
|
||||||
.//;;;:;;-, X= :+ .-;:=;:;%;.
|
|
||||||
M- ,=;;;#:, ,:#;;:=, ,@
|
|
||||||
:% :%.=/++++/=.$= %=
|
|
||||||
,%; %/:+/;,,/++:+/ ;+.
|
|
||||||
,+/. ,;@+, ,%H;, ,/+,
|
|
||||||
;+;;/= @. .H##X -X :///+;
|
|
||||||
;+=;;;.@, .XM@$. =X.//;=%/.
|
|
||||||
,;: :@%= =$H: .+%-
|
|
||||||
,%= %;-///==///-// =%,
|
|
||||||
;+ :%-;;;;;;;;-X- +:
|
|
||||||
@- .-;;;;M- =M/;;;-. -X
|
|
||||||
:;;::;;-. %- :+ ,-;;-;:==
|
|
||||||
,X H.
|
|
||||||
;/ %=
|
|
||||||
// +;
|
|
||||||
,////,`;
|
|
||||||
|
|
||||||
var heart = ` .,---.
|
|
||||||
,/XM#MMMX;,
|
|
||||||
-%##########M%,
|
|
||||||
-@######% $###@=
|
|
||||||
.,--, -H#######$ $###M:
|
|
||||||
,;$M###MMX; .;##########$;HM###X=
|
|
||||||
,/@###########H= ;################+
|
|
||||||
-+#############M/, %##############+
|
|
||||||
%M###############= /##############:
|
|
||||||
H################ .M#############;.
|
|
||||||
@###############M ,@###########M:.
|
|
||||||
X################, -$=X#######@:
|
|
||||||
/@##################%- +######$-
|
|
||||||
.;##################X .X#####+,
|
|
||||||
.;H################/ -X####+.
|
|
||||||
,;X##############, .MM/
|
|
||||||
,:+$H@M#######M#$- .$$=
|
|
||||||
.,-=;+$@###X: ;/=.
|
|
||||||
.,/X$; .::,
|
|
||||||
., ..`;
|
|
||||||
|
|
||||||
var fire = ` -$-
|
|
||||||
.H##H,
|
|
||||||
+######+
|
|
||||||
.+#########H.
|
|
||||||
-$############@.
|
|
||||||
=H###############@ -X:
|
|
||||||
.$##################: @#@-
|
|
||||||
,; .M###################; H###;
|
|
||||||
;@#: @###################@ ,#####:
|
|
||||||
-M###. M#################@. ;######H
|
|
||||||
M####- +###############$ =@#######X
|
|
||||||
H####$ -M###########+ :#########M,
|
|
||||||
/####X- =########% :M########@/.
|
|
||||||
,;%H@X; .$###X :##MM@%+;:-
|
|
||||||
..
|
|
||||||
-/;:-,. ,,-==+M########H
|
|
||||||
-##################@HX%%+%%$%%%+:,,
|
|
||||||
.-/H%%%+%%$H@###############M@+=:/+:
|
|
||||||
/XHX%:#####MH%= ,---:;;;;/&&XHM,:###$
|
|
||||||
$@#MX %+;- .`;
|
|
||||||
|
|
||||||
var tick = ` :X-
|
|
||||||
:X###
|
|
||||||
;@####@
|
|
||||||
;M######X
|
|
||||||
-@########$
|
|
||||||
.$##########@
|
|
||||||
=M############-
|
|
||||||
+##############$
|
|
||||||
.H############$=.
|
|
||||||
,/: ,M##########M;.
|
|
||||||
-+@###; =##########M;
|
|
||||||
=%M#######; :#########M/
|
|
||||||
-$M###########; :########/
|
|
||||||
,;X###########; =#######$.
|
|
||||||
;H#########+######M=
|
|
||||||
,+#############+
|
|
||||||
/M########@-
|
|
||||||
;M#####%
|
|
||||||
+####:
|
|
||||||
,$M-`;
|
|
||||||
|
|
||||||
var bang = ` .+
|
|
||||||
/M;
|
|
||||||
H#@: ;,
|
|
||||||
-###H- -@/
|
|
||||||
%####$. -; .%#X
|
|
||||||
M#####+;#H :M#M.
|
|
||||||
.. .+/;%#############-
|
|
||||||
-/%H%+;-, +##############/
|
|
||||||
.:$M###MH$%+############X ,--=;-
|
|
||||||
-/H#####################H+=.
|
|
||||||
.+#################X.
|
|
||||||
=%M####################H;.
|
|
||||||
/@###############+;;/%%;,
|
|
||||||
-%###################$
|
|
||||||
;H######################M=
|
|
||||||
,%#####MH$%;+#####M###-/@####%
|
|
||||||
:$H%+;=- -####X.,H# -+M##@-
|
|
||||||
. ,###; ; =$##+
|
|
||||||
.#H, :XH,
|
|
||||||
+ .;-`;
|
|
||||||
|
|
||||||
var mesa = ` .-;+$XHHHHHHX$+;-.
|
|
||||||
,;X@@X%/;=----=:/%X@@X/,
|
|
||||||
=$@@%=. .=+H@X:
|
|
||||||
-XMX: =XMX=
|
|
||||||
/@@: =H@+
|
|
||||||
%@X, .$@$
|
|
||||||
+@X. $@%
|
|
||||||
-@@, .@@=
|
|
||||||
%@% +@$
|
|
||||||
H@: :@H
|
|
||||||
H@: :HHHHHHHHHHHHHHHHHHX, =@H
|
|
||||||
%@% ;@M@@@@@@@@@@@@@@@@@H- +@$
|
|
||||||
=@@, :@@@@@@@@@@@@@@@@@@@@@= .@@:
|
|
||||||
+@X :@@@@@@@@@@@@@@@M@@@@@@:%@%
|
|
||||||
$@$, ;@@@@@@@@@@@@@@@@@M@@@@@@$.
|
|
||||||
+@@HHHHHHH@@@@@@@@@@@@@@@@@@@@@@@+
|
|
||||||
=X@@@@@@@@@@@@@@@@@@@@@@@@@@@@X=
|
|
||||||
:$@@@@@@@@@@@@@@@@@@@M@@@@$:
|
|
||||||
,;$@@@@@@@@@@@@@@@@@@X/-
|
|
||||||
.-;+$XXHHHHHX$+;-.`;
|
|
||||||
|
|
||||||
var cube = ` #+ @ # # M#@
|
|
||||||
. .X X.%##@;# # +@#######X. @H%
|
|
||||||
,==. ,######M+ -#####%M####M- #
|
|
||||||
:H##M%:=##+ .M##M,;#####/+#######% ,M#
|
|
||||||
.M########= =@#@.=#####M=M#######= X#
|
|
||||||
:@@MMM##M. -##M.,#######M#######. = M
|
|
||||||
@##..###:. .H####. @@ X,
|
|
||||||
############: ###,/####; /##= @#. M
|
|
||||||
,M## ;##,@#M;/M#M @# X#% X#
|
|
||||||
.%= ######M## ##.M#: ./#M ,M #M ,#$
|
|
||||||
##/ $## #+;#: #### ;#/ M M- @# :
|
|
||||||
#+ #M@MM###M-;M #:$#-##$H# .#X @ + $#. #
|
|
||||||
######/.: #%=# M#:MM./#.-# @#: H#
|
|
||||||
+,.= @###: /@ %#,@ ##@X #,-#@.##% .@#
|
|
||||||
#####+;/##/ @## @#,+ /#M . X,
|
|
||||||
;###M#@ M###H .#M- ,##M ;@@; ###
|
|
||||||
.M#M##H ;####X ,@#######M/ -M###$ -H
|
|
||||||
.M###% X####H .@@MM@; ;@#M@
|
|
||||||
H#M /@####/ ,++. / ==-,
|
|
||||||
,=/:, .+X@MMH@#H #####$=`;
|
|
||||||
|
|
||||||
var cake = ` ,:/+/-
|
|
||||||
/M/ .,-=;//;-
|
|
||||||
.:/= ;MH/, ,=/+%$XH@MM#@:
|
|
||||||
-$##@+$###@H@MMM#######H:. -/H#
|
|
||||||
.,H@H@ X######@ -H#####@+- -+H###@X
|
|
||||||
.,@##H; +XM##M/, =%@###@X;-
|
|
||||||
X%- :M##########$. .:%M###@%:
|
|
||||||
M##H, +H@@@$/-. ,;$M###@%, -
|
|
||||||
M####M=,,---,.-%%H####M$: ,+@##
|
|
||||||
@##################@/. :%H##@$-
|
|
||||||
M###############H, ;HM##M$=
|
|
||||||
#################. .=$M##M$=
|
|
||||||
################H..;XM##M$= .:+
|
|
||||||
M###################@%= =+@MH%
|
|
||||||
@#################M/. =+H#X%=
|
|
||||||
=+M###############M, ,/X#H+:,
|
|
||||||
.;XM###########H= ,/X#H+:;
|
|
||||||
.=+HM#######M+/+HM@+=.
|
|
||||||
,:/%XM####H/.
|
|
||||||
,.:=-.`;
|
|
||||||
|
|
||||||
//appa
|
|
||||||
//atom
|
|
||||||
//nuke
|
|
||||||
var options = [cake, heart, fire, tick, bang, mesa, cube];
|
|
||||||
|
|
||||||
let active = cake
|
|
||||||
|
|
||||||
function updateView() {
|
|
||||||
active = options[Math.floor((Math.random() * options.length))];
|
|
||||||
setTimeout(updateView, 5000);
|
|
||||||
}
|
|
||||||
|
|
||||||
onMount(() => updateView());
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
* {
|
|
||||||
all: unset;
|
|
||||||
font-family: monospace;
|
|
||||||
white-space: pre;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
div {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
h1, p {
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 2.8em;
|
|
||||||
font-weight: 700;
|
|
||||||
margin: 0 0 0.5em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 1em auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0 auto;
|
|
||||||
position: center;
|
|
||||||
text-align: left;
|
|
||||||
font-family: monospace;
|
|
||||||
white-space: pre;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 480px) {
|
|
||||||
h1 {
|
|
||||||
font-size: 4em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>{status}</title>
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<h1>{status}</h1>
|
|
||||||
|
|
||||||
<p>{error.message}</p>
|
|
||||||
|
|
||||||
{#if dev && error.stack}
|
|
||||||
<pre>{error.stack}</pre>
|
|
||||||
{:else}
|
|
||||||
<audio controls autoplay>
|
|
||||||
<source src="http://quartznet.info/alive.ogg" type="audio/wav">
|
|
||||||
</audio>
|
|
||||||
<div style="text-align: center; width: 100%; display: inline-block">
|
|
||||||
<br>
|
|
||||||
<div style="">
|
|
||||||
<pre>
|
|
||||||
<br>{active}</pre>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
This was a triumph!
|
|
||||||
I'm making a note here:
|
|
||||||
Huge success!
|
|
||||||
|
|
||||||
It's hard to overstate
|
|
||||||
my satisfaction.
|
|
||||||
|
|
||||||
Aperture Science:
|
|
||||||
We do what we must
|
|
||||||
because we can
|
|
||||||
For the good of all of us.
|
|
||||||
Except the ones who are dead.
|
|
||||||
|
|
||||||
But there's no sense crying
|
|
||||||
over every mistake.
|
|
||||||
You just keep on trying
|
|
||||||
'til you run out of cake.
|
|
||||||
And the science gets done.
|
|
||||||
And you make a neat gun
|
|
||||||
for the people who are
|
|
||||||
still alive.
|
|
||||||
|
|
||||||
I'm not even angry...
|
|
||||||
I'm being so sincere right now.
|
|
||||||
Even though you broke my heart,
|
|
||||||
and killed me.
|
|
||||||
|
|
||||||
And tore me to pieces.
|
|
||||||
And threw every piece into a fire.
|
|
||||||
As they burned it hurt because
|
|
||||||
I was so happy for you!
|
|
||||||
|
|
||||||
Now, these points of data
|
|
||||||
make a beautiful line.
|
|
||||||
And we're out of beta.
|
|
||||||
We're releasing on time!
|
|
||||||
So I'm GLaD I got burned!
|
|
||||||
Think of all the things we learned!
|
|
||||||
for the people who are
|
|
||||||
still alive.
|
|
||||||
|
|
||||||
Go ahead and leave me...
|
|
||||||
I think I'd prefer to stay inside...
|
|
||||||
Maybe you'll find someone else
|
|
||||||
to help you.
|
|
||||||
Maybe Black Mesa?
|
|
||||||
That was a joke. Ha Ha. Fat Chance!
|
|
||||||
|
|
||||||
Anyway this cake is great!
|
|
||||||
It's so delicious and moist!
|
|
||||||
|
|
||||||
Look at me: still talking
|
|
||||||
when there's science to do!
|
|
||||||
When I look out there,
|
|
||||||
it makes me glad I'm not you.
|
|
||||||
|
|
||||||
I've experiments to run.
|
|
||||||
There is research to be done.
|
|
||||||
On the people who are
|
|
||||||
still alive.
|
|
||||||
And believe me I am
|
|
||||||
still alive.
|
|
||||||
I'm doing science and I'm
|
|
||||||
still alive.
|
|
||||||
I feel fantastic and I'm
|
|
||||||
still alive.
|
|
||||||
While you're dying I'll be
|
|
||||||
still alive.
|
|
||||||
And when you're dead I will be
|
|
||||||
still alive
|
|
||||||
|
|
||||||
Still alive.
|
|
||||||
|
|
||||||
Still alive.
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
@ -1,74 +0,0 @@
|
|||||||
<script>
|
|
||||||
import Nav from '../components/Nav.svelte';
|
|
||||||
import userManager from '../components/userManager.svelte'
|
|
||||||
|
|
||||||
export let segment;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
main {
|
|
||||||
position: relative;
|
|
||||||
max-width: 56em;
|
|
||||||
background-color: white;
|
|
||||||
padding: 2em;
|
|
||||||
margin: 0 auto;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Default theme */
|
|
||||||
:global(:root) {
|
|
||||||
--background-color: #222222;
|
|
||||||
--headings-color: #ffffff;
|
|
||||||
--font-color: #ffffff;
|
|
||||||
--blue: #007bff;
|
|
||||||
--indigo: #6610f2;
|
|
||||||
--purple: #6f42c1;
|
|
||||||
--pink: #e83e8c;
|
|
||||||
--red: #dc3545;
|
|
||||||
--orange: #fd7e14;
|
|
||||||
--yellow: #ffc107;
|
|
||||||
--green: #28a745;
|
|
||||||
--teal: #20c997;
|
|
||||||
--cyan: #17a2b8;
|
|
||||||
--white: #fff;
|
|
||||||
--gray: #6c757d;
|
|
||||||
--gray-dark: #343a40;
|
|
||||||
--primary: #007bff;
|
|
||||||
--secondary: #6c757d;
|
|
||||||
--success: #28a745;
|
|
||||||
--info: #17a2b8;
|
|
||||||
--warning: #ffc107;
|
|
||||||
--danger: #dc3545;
|
|
||||||
--light: #f8f9fa;
|
|
||||||
--dark: #343a40;
|
|
||||||
--breakpoint-xs: 0;
|
|
||||||
--breakpoint-sm: 576px;
|
|
||||||
--breakpoint-md: 768px;
|
|
||||||
--breakpoint-lg: 992px;
|
|
||||||
--breakpoint-xl: 1200px;
|
|
||||||
--font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
||||||
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dark theme */
|
|
||||||
:global(html[data-theme='dark']) {
|
|
||||||
--background-color: #222222;
|
|
||||||
--headings-color: #ffffff;
|
|
||||||
--font-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(body) {
|
|
||||||
font-family: 'Open Sans', sans-serif;
|
|
||||||
font-size: 1rem;
|
|
||||||
line-height: 1.8;
|
|
||||||
background-color: var(--background-color);
|
|
||||||
color: var(--font-color);
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<Nav {segment} rightComponent={userManager}/>
|
|
||||||
|
|
||||||
<slot></slot>
|
|
@ -1,27 +0,0 @@
|
|||||||
<script>
|
|
||||||
import Banner from '../components/banner.svelte'
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>Quartznet - About</title>
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<Banner title="Quartznet - About"/>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
<section class="container">
|
|
||||||
<h2>Frequently Asked Questions</h2>
|
|
||||||
<h3>Who we are</h3>
|
|
||||||
<p>A small team developing games and software.</p>
|
|
||||||
|
|
||||||
<h3>Why the name Quartznet</h3>
|
|
||||||
<p>Naming things is hard. We ended up with the name quartz and added net to it to make quartznet. Also it
|
|
||||||
includes the letters q and z so it is cleary a great name!
|
|
||||||
|
|
||||||
<h2>Contact</h2>
|
|
||||||
<p>We can be reached at contact@quartznet.com. If you are requesting a key for reviewing, steaming, or youtube,
|
|
||||||
as well as all other legitimate purposes, please be sure to include a link to your channel or website.</p>
|
|
||||||
|
|
||||||
<p>Feel free to contact us via email if you want to get in touch.</p>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
23
src/routes/about/+page.svelte
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<script>
|
||||||
|
import Banner from '$lib/Banner.svelte'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>Quartznet - About</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
|
<Banner title="About"/>
|
||||||
|
|
||||||
|
<main class="container">
|
||||||
|
<section>
|
||||||
|
<h2>Frequently Asked Questions</h2>
|
||||||
|
<h3>Who we are</h3>
|
||||||
|
<p>A small team developing games and software.</p>
|
||||||
|
|
||||||
|
<h3>Why the name Quartznet</h3>
|
||||||
|
<p>Naming things is hard. We ended up with the name quartz and added net making quartznet.
|
||||||
|
|
||||||
|
<h3>SPAAAAACEEEE</h3>
|
||||||
|
<p>Space!</p>
|
||||||
|
</section>
|
||||||
|
</main>
|
69
src/routes/admin/+page.svelte
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<script>
|
||||||
|
import Banner from '$lib/Banner.svelte'
|
||||||
|
|
||||||
|
let services = [
|
||||||
|
{
|
||||||
|
name: "Status",
|
||||||
|
link: "https://quartznet.info/status",
|
||||||
|
description: "Server monitoring and troubleshooting",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Gitea",
|
||||||
|
link: "https://git.quartznet.info",
|
||||||
|
description: "Software development version control"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
section {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
display: flex;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
li a {
|
||||||
|
display: flex;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
li a:hover {
|
||||||
|
border-bottom: 2px solid white;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
line-height: 1.4;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>Quartznet - Admin</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
|
<Banner title="Admin"/>
|
||||||
|
|
||||||
|
<main class="container">
|
||||||
|
<section>
|
||||||
|
<h2>Services</h2>
|
||||||
|
<ul>
|
||||||
|
{#each services as service}
|
||||||
|
<li>
|
||||||
|
<a href="{service.link}">{service.name}</a>
|
||||||
|
</li>
|
||||||
|
{/each}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
</main>
|
@ -1,7 +0,0 @@
|
|||||||
<script>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
this is not done
|
|
||||||
</main>
|
|
38
src/routes/admin/login.svelte
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
<script>
|
||||||
|
import Banner from '$lib/Banner.svelte'
|
||||||
|
|
||||||
|
let username = "";
|
||||||
|
let password = "";
|
||||||
|
|
||||||
|
const submitHandler = () => {
|
||||||
|
alert("TODO: implement login backend");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>Quartznet - Login</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
|
<Banner title="Login"/>
|
||||||
|
|
||||||
|
<main class="container">
|
||||||
|
<form on:submit|preventDefault={submitHandler} class="form-signin" method="post">
|
||||||
|
<div class="form-label-group">
|
||||||
|
<label for="username">Username</label>
|
||||||
|
<input type="text" id="username" class="form-control" bind:value={username}
|
||||||
|
name="username" placeholder="Username" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-label-group">
|
||||||
|
<label for="inputPassword">Password</label>
|
||||||
|
<input type="password" id="password" class="form-control" bind:value={password}
|
||||||
|
name="password" placeholder="Password" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="custom-control custom-checkbox mb-3">
|
||||||
|
<input type="checkbox" class="custom-control-input" id="customCheck1">
|
||||||
|
<label class="custom-control-label" for="customCheck1">Remember password</label>
|
||||||
|
</div>
|
||||||
|
<button class="btn btn-primary" type="submit">Sign in</button>
|
||||||
|
</form>
|
||||||
|
</main>
|
@ -1,28 +0,0 @@
|
|||||||
import posts from './_posts.js';
|
|
||||||
|
|
||||||
const lookup = new Map();
|
|
||||||
posts.forEach(post => {
|
|
||||||
lookup.set(post.slug, JSON.stringify(post));
|
|
||||||
});
|
|
||||||
|
|
||||||
export function get(req, res, next) {
|
|
||||||
// the `slug` parameter is available because
|
|
||||||
// this file is called [slug].json.js
|
|
||||||
const {slug} = req.params;
|
|
||||||
|
|
||||||
if (lookup.has(slug)) {
|
|
||||||
res.writeHead(200, {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
});
|
|
||||||
|
|
||||||
res.end(lookup.get(slug));
|
|
||||||
} else {
|
|
||||||
res.writeHead(404, {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
});
|
|
||||||
|
|
||||||
res.end(JSON.stringify({
|
|
||||||
message: `Not found`
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,64 +0,0 @@
|
|||||||
<script context="module">
|
|
||||||
export async function preload({params, query}) {
|
|
||||||
// the `slug` parameter is available because
|
|
||||||
// this file is called [slug].svelte
|
|
||||||
const res = await this.fetch(`blog/${params.slug}.json`);
|
|
||||||
const data = await res.json();
|
|
||||||
|
|
||||||
if (res.status === 200) {
|
|
||||||
return {post: data};
|
|
||||||
} else {
|
|
||||||
this.error(res.status, data.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export let post;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
/*
|
|
||||||
By default, CSS is locally scoped to the component,
|
|
||||||
and any unused styles are dead-code-eliminated.
|
|
||||||
In this page, Svelte can't know which elements are
|
|
||||||
going to appear inside the {{{post.html}}} block,
|
|
||||||
so we have to use the :global(...) modifier to target
|
|
||||||
all elements inside .content
|
|
||||||
*/
|
|
||||||
.content :global(h2) {
|
|
||||||
font-size: 1.4em;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content :global(pre) {
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
box-shadow: inset 1px 1px 5px rgba(0, 0, 0, 0.05);
|
|
||||||
padding: 0.5em;
|
|
||||||
border-radius: 2px;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content :global(pre) :global(code) {
|
|
||||||
background-color: transparent;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content :global(ul) {
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content :global(li) {
|
|
||||||
margin: 0 0 0.5em 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>{post.title}</title>
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<h1>{post.title}</h1>
|
|
||||||
|
|
||||||
<div class='content'>
|
|
||||||
{@html post.html}
|
|
||||||
</div>
|
|
@ -1,92 +0,0 @@
|
|||||||
// Ordinarily, you'd generate this data from markdown files in your
|
|
||||||
// repo, or fetch them from a database of some kind. But in order to
|
|
||||||
// avoid unnecessary dependencies in the starter template, and in the
|
|
||||||
// service of obviousness, we're just going to leave it here.
|
|
||||||
|
|
||||||
// This file is called `_posts.js` rather than `posts.js`, because
|
|
||||||
// we don't want to create an `/blog/posts` route — the leading
|
|
||||||
// underscore tells Sapper not to do that.
|
|
||||||
|
|
||||||
const posts = [
|
|
||||||
{
|
|
||||||
title: 'What is Sapper?',
|
|
||||||
slug: 'what-is-sapper',
|
|
||||||
html: `
|
|
||||||
<p>First, you have to know what <a href='https://svelte.dev'>Svelte</a> is. Svelte is a UI framework with a bold new idea: rather than providing a library that you write code with (like React or Vue, for example), it's a compiler that turns your components into highly optimized vanilla JavaScript. If you haven't already read the <a href='https://svelte.dev/blog/frameworks-without-the-framework'>introductory blog post</a>, you should!</p>
|
|
||||||
|
|
||||||
<p>Sapper is a Next.js-style framework (<a href='blog/how-is-sapper-different-from-next'>more on that here</a>) built around Svelte. It makes it embarrassingly easy to create extremely high performance web apps. Out of the box, you get:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Code-splitting, dynamic imports and hot module replacement, powered by webpack</li>
|
|
||||||
<li>Server-side rendering (SSR) with client-side hydration</li>
|
|
||||||
<li>Service worker for offline support, and all the PWA bells and whistles</li>
|
|
||||||
<li>The nicest development experience you've ever had, or your money back</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<p>It's implemented as Express middleware. Everything is set up and waiting for you to get started, but you keep complete control over the server, service worker, webpack config and everything else, so it's as flexible as you need it to be.</p>
|
|
||||||
`
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
title: 'How to use Sapper',
|
|
||||||
slug: 'how-to-use-sapper',
|
|
||||||
html: `
|
|
||||||
<h2>Step one</h2>
|
|
||||||
<p>Create a new project, using <a href='https://github.com/Rich-Harris/degit'>degit</a>:</p>
|
|
||||||
|
|
||||||
<pre><code>npx degit "sveltejs/sapper-template#rollup" my-app
|
|
||||||
cd my-app
|
|
||||||
npm install # or yarn!
|
|
||||||
npm run dev
|
|
||||||
</code></pre>
|
|
||||||
|
|
||||||
<h2>Step two</h2>
|
|
||||||
<p>Go to <a href='http://localhost:3000'>localhost:3000</a>. Open <code>my-app</code> in your editor. Edit the files in the <code>src/routes</code> directory or add new ones.</p>
|
|
||||||
|
|
||||||
<h2>Step three</h2>
|
|
||||||
<p>...</p>
|
|
||||||
|
|
||||||
<h2>Step four</h2>
|
|
||||||
<p>Resist overdone joke formats.</p>
|
|
||||||
`
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
title: 'Why the name?',
|
|
||||||
slug: 'why-the-name',
|
|
||||||
html: `
|
|
||||||
<p>In war, the soldiers who build bridges, repair roads, clear minefields and conduct demolitions — all under combat conditions — are known as <em>sappers</em>.</p>
|
|
||||||
|
|
||||||
<p>For web developers, the stakes are generally lower than those for combat engineers. But we face our own hostile environment: underpowered devices, poor network connections, and the complexity inherent in front-end engineering. Sapper, which is short for <strong>S</strong>velte <strong>app</strong> mak<strong>er</strong>, is your courageous and dutiful ally.</p>
|
|
||||||
`
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
title: 'How is Sapper different from Next.js?',
|
|
||||||
slug: 'how-is-sapper-different-from-next',
|
|
||||||
html: `
|
|
||||||
<p><a href='https://github.com/zeit/next.js'>Next.js</a> is a React framework from <a href='https://vercel.com/'>Vercel</a>, and is the inspiration for Sapper. There are a few notable differences, however:</p>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>It's powered by <a href='https://svelte.dev'>Svelte</a> instead of React, so it's faster and your apps are smaller</li>
|
|
||||||
<li>Instead of route masking, we encode route parameters in filenames. For example, the page you're looking at right now is <code>src/routes/blog/[slug].svelte</code></li>
|
|
||||||
<li>As well as pages (Svelte components, which render on server or client), you can create <em>server routes</em> in your <code>routes</code> directory. These are just <code>.js</code> files that export functions corresponding to HTTP methods, and receive Express <code>request</code> and <code>response</code> objects as arguments. This makes it very easy to, for example, add a JSON API such as the one <a href='blog/how-is-sapper-different-from-next.json'>powering this very page</a></li>
|
|
||||||
<li>Links are just <code><a></code> elements, rather than framework-specific <code><Link></code> components. That means, for example, that <a href='blog/how-can-i-get-involved'>this link right here</a>, despite being inside a blob of HTML, works with the router as you'd expect.</li>
|
|
||||||
</ul>
|
|
||||||
`
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
title: 'How can I get involved?',
|
|
||||||
slug: 'how-can-i-get-involved',
|
|
||||||
html: `
|
|
||||||
<p>We're so glad you asked! Come on over to the <a href='https://github.com/sveltejs/svelte'>Svelte</a> and <a href='https://github.com/sveltejs/sapper'>Sapper</a> repos, and join us in the <a href='https://svelte.dev/chat'>Discord chatroom</a>. Everyone is welcome, especially you!</p>
|
|
||||||
`
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
posts.forEach(post => {
|
|
||||||
post.html = post.html.replace(/^\t{3}/gm, '');
|
|
||||||
});
|
|
||||||
|
|
||||||
export default posts;
|
|
@ -1,16 +0,0 @@
|
|||||||
import posts from './_posts.js';
|
|
||||||
|
|
||||||
const contents = JSON.stringify(posts.map(post => {
|
|
||||||
return {
|
|
||||||
title: post.title,
|
|
||||||
slug: post.slug
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
|
|
||||||
export function get(req, res) {
|
|
||||||
res.writeHead(200, {
|
|
||||||
'Content-Type': 'application/json'
|
|
||||||
});
|
|
||||||
|
|
||||||
res.end(contents);
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
<script context="module">
|
|
||||||
export function preload({params, query}) {
|
|
||||||
return this.fetch(`blog.json`).then(r => r.json()).then(posts => {
|
|
||||||
return {posts};
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export let posts;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
ul {
|
|
||||||
margin: 0 0 1em 0;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>Blog</title>
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<h1>Recent posts</h1>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
{#each posts as post}
|
|
||||||
<!-- we're using the non-standard `rel=prefetch` attribute to
|
|
||||||
tell Sapper to load the data for the page as soon as
|
|
||||||
the user hovers over the link or taps it, instead of
|
|
||||||
waiting for the 'click' event -->
|
|
||||||
<li><a rel='prefetch' href='blog/{post.slug}'>{post.title}</a></li>
|
|
||||||
{/each}
|
|
||||||
</ul>
|
|
@ -1,117 +0,0 @@
|
|||||||
<script>
|
|
||||||
import {onMount} from 'svelte';
|
|
||||||
import Thumb from '../components/gameProjectThumb.svelte'
|
|
||||||
import Banner from '../components/banner.svelte'
|
|
||||||
|
|
||||||
export let name;
|
|
||||||
|
|
||||||
let games = [
|
|
||||||
{
|
|
||||||
name: "Sirius",
|
|
||||||
thumb: "https://placehold.it/600x300",
|
|
||||||
description: "A 2D sci-fi game about wannabe space captain trying to find their path.",
|
|
||||||
imgClass: "img-fluid mb-3 mb-md-0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Quartz",
|
|
||||||
thumb: "https://placehold.it/600x300",
|
|
||||||
description: ""
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
onMount(async () => {
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>Quartznet</title>
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
|
|
||||||
<Banner/>
|
|
||||||
|
|
||||||
<main class="container">
|
|
||||||
<section>
|
|
||||||
{#each games as game}
|
|
||||||
<!-- Project One -->
|
|
||||||
|
|
||||||
<Thumb {...game}/>
|
|
||||||
{/each}
|
|
||||||
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
section {
|
|
||||||
display: block;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 5px 20px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: 'Open Sans', sans-serif;
|
|
||||||
font-size: 1rem;
|
|
||||||
line-height: 1.8;
|
|
||||||
font-weight: 400;
|
|
||||||
text-align: left;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 5px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: 'Open Sans', sans-serif;
|
|
||||||
font-display: swap;
|
|
||||||
font-size: 1rem;
|
|
||||||
line-height: 1.8;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
main {
|
|
||||||
width: 100%;
|
|
||||||
padding-right: 15px;
|
|
||||||
padding-left: 15px;
|
|
||||||
margin-right: auto;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-top: 30px;
|
|
||||||
display: block;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.description p {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
h5 {
|
|
||||||
color: var(--headings-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
.container {
|
|
||||||
max-width: 720px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 992px) {
|
|
||||||
.container {
|
|
||||||
max-width: 960px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 1200px) {
|
|
||||||
.container {
|
|
||||||
max-width: 1140px
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 640px) {
|
|
||||||
main {
|
|
||||||
max-width: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
17
src/routes/sirius/+page.svelte
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
<script>
|
||||||
|
import Banner from '$lib/Banner.svelte'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>Quartznet - Sirius</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
|
<Banner title="Sirius"/>
|
||||||
|
|
||||||
|
<main class="container">
|
||||||
|
<section class="content">
|
||||||
|
<h1>Sirius game</h1>
|
||||||
|
<p>Sirius game. Work in progress</p>
|
||||||
|
<a href="https://quartznet.info/presskit">Presskit</a>
|
||||||
|
</section>
|
||||||
|
</main>
|
@ -1,18 +0,0 @@
|
|||||||
import sirv from 'sirv';
|
|
||||||
import polka from 'polka';
|
|
||||||
import compression from 'compression';
|
|
||||||
import * as sapper from '@sapper/server';
|
|
||||||
|
|
||||||
const {PORT, NODE_ENV} = process.env;
|
|
||||||
const dev = NODE_ENV === 'development';
|
|
||||||
|
|
||||||
polka() // You can also use Express
|
|
||||||
.use(
|
|
||||||
compression({threshold: 0}),
|
|
||||||
sirv('static', {dev}),
|
|
||||||
sapper.middleware()
|
|
||||||
)
|
|
||||||
.listen(PORT, err => {
|
|
||||||
if (err) console.log('error', err);
|
|
||||||
});
|
|
||||||
console.log('> DEV: ' + dev.toString())
|
|
@ -1,82 +0,0 @@
|
|||||||
import {timestamp, files, shell, routes} from '@sapper/service-worker';
|
|
||||||
|
|
||||||
const ASSETS = `cache${timestamp}`;
|
|
||||||
|
|
||||||
// `shell` is an array of all the files generated by the bundler,
|
|
||||||
// `files` is an array of everything in the `static` directory
|
|
||||||
const to_cache = shell.concat(files);
|
|
||||||
const cached = new Set(to_cache);
|
|
||||||
|
|
||||||
self.addEventListener('install', event => {
|
|
||||||
event.waitUntil(
|
|
||||||
caches
|
|
||||||
.open(ASSETS)
|
|
||||||
.then(cache => cache.addAll(to_cache))
|
|
||||||
.then(() => {
|
|
||||||
self.skipWaiting();
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
self.addEventListener('activate', event => {
|
|
||||||
event.waitUntil(
|
|
||||||
caches.keys().then(async keys => {
|
|
||||||
// delete old caches
|
|
||||||
for (const key of keys) {
|
|
||||||
if (key !== ASSETS) await caches.delete(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
self.clients.claim();
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
self.addEventListener('fetch', event => {
|
|
||||||
if (event.request.method !== 'GET' || event.request.headers.has('range')) return;
|
|
||||||
|
|
||||||
const url = new URL(event.request.url);
|
|
||||||
|
|
||||||
// don't try to handle e.g. data: URIs
|
|
||||||
if (!url.protocol.startsWith('http')) return;
|
|
||||||
|
|
||||||
// ignore dev server requests
|
|
||||||
if (url.hostname === self.location.hostname && url.port !== self.location.port) return;
|
|
||||||
|
|
||||||
// always serve static files and bundler-generated assets from cache
|
|
||||||
if (url.host === self.location.host && cached.has(url.pathname)) {
|
|
||||||
event.respondWith(caches.match(event.request));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// for pages, you might want to serve a shell `service-worker-index.html` file,
|
|
||||||
// which Sapper has generated for you. It's not right for every
|
|
||||||
// app, but if it's right for yours then uncomment this section
|
|
||||||
/*
|
|
||||||
if (url.origin === self.origin && routes.find(route => route.pattern.test(url.pathname))) {
|
|
||||||
event.respondWith(caches.match('/service-worker-index.html'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (event.request.cache === 'only-if-cached') return;
|
|
||||||
|
|
||||||
// for everything else, try the network first, falling back to
|
|
||||||
// cache if the user is offline. (If the pages never change, you
|
|
||||||
// might prefer a cache-first approach to a network-first one.)
|
|
||||||
event.respondWith(
|
|
||||||
caches
|
|
||||||
.open(`offline${timestamp}`)
|
|
||||||
.then(async cache => {
|
|
||||||
try {
|
|
||||||
const response = await fetch(event.request);
|
|
||||||
cache.put(event.request, response.clone());
|
|
||||||
return response;
|
|
||||||
} catch (err) {
|
|
||||||
const response = await cache.match(event.request);
|
|
||||||
if (response) return response;
|
|
||||||
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
|
@ -1,35 +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">
|
|
||||||
|
|
||||||
%sapper.base%
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="/global.css">
|
|
||||||
<link rel="stylesheet" href="/bootstrap.min.css">
|
|
||||||
<link rel="stylesheet" href="/themes.css">
|
|
||||||
<link rel="manifest" href="manifest.json" crossorigin="use-credentials">
|
|
||||||
<link rel="icon" type="image/png" href="/favicon.ico">
|
|
||||||
|
|
||||||
<!-- 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%
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<!-- The application will be rendered inside this element,
|
|
||||||
because `src/client.js` references it -->
|
|
||||||
<div id="sapper">%sapper.html%</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Before Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 3.9 KiB |
6
static/bootstrap.min.css
vendored
161
static/css/global.css
Executable file
@ -0,0 +1,161 @@
|
|||||||
|
|
||||||
|
/* Dark theme */
|
||||||
|
:root {
|
||||||
|
--background-color: #343a40;
|
||||||
|
--header-color: #202225;
|
||||||
|
--headings-color: #ffffff;
|
||||||
|
--font-color: #eeeeee;
|
||||||
|
--border-color: #141414;
|
||||||
|
--line-color: #ffffff;
|
||||||
|
--link-color: #CC99FF;
|
||||||
|
--link-color-hover: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Light theme */
|
||||||
|
html[data-theme='light'] {
|
||||||
|
--background-color: #ffffff;
|
||||||
|
--headings-color: #181818;
|
||||||
|
--font-color: #181818;
|
||||||
|
--line-color: #181818;
|
||||||
|
--nav-link-color: #2599fd;
|
||||||
|
--nav-link-color-hover: #000000;
|
||||||
|
--link-color: #CC99FF;
|
||||||
|
--link-color-hover: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: var(--background-color);
|
||||||
|
color: var(--font-color);
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
font-display: swap;
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.6;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5 {
|
||||||
|
color: var(--headings-color);
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 1.2;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
h1 { font-size: 2.5rem; }
|
||||||
|
h2 { font-size: 2rem; }
|
||||||
|
h3 { font-size: 1.75rem; }
|
||||||
|
h4 { font-size: 1.5rem; }
|
||||||
|
h5 { font-size: 1.25rem; }
|
||||||
|
h6 { font-size: 1rem; }
|
||||||
|
|
||||||
|
hr {
|
||||||
|
background-color: var(--line-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Navigation */
|
||||||
|
header {
|
||||||
|
background-color: var(--header-color);
|
||||||
|
padding-top: 4px;
|
||||||
|
padding-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: var(--link-color);
|
||||||
|
transition: color 0.1s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: var(--link-color-hover);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Banner */
|
||||||
|
.overlay {
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
border-top: 2px solid var(--border-color);
|
||||||
|
border-bottom: 4px solid var(--border-color);
|
||||||
|
display: flex;
|
||||||
|
height: 200px;
|
||||||
|
text-align: center;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 3rem;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
width: 100%;
|
||||||
|
padding-right: 15px;
|
||||||
|
padding-left: 15px;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
@media (min-width: 576px) {
|
||||||
|
.container {
|
||||||
|
width: 540px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.container {
|
||||||
|
width: 720px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
.container {
|
||||||
|
width: 960px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
.container {
|
||||||
|
width: 1140px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
text-decoration: none;
|
||||||
|
transition: color 0.1s linear;
|
||||||
|
padding: 4px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link:hover {
|
||||||
|
border-bottom: 2px solid var(--line-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Content */
|
||||||
|
main {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 5px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-top: 3px solid var(--border-color);
|
||||||
|
color: var(--font-color);
|
||||||
|
font-family: var(--font1);
|
||||||
|
margin-top: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive layout - when the screen is less than 700px wide, make the two columns stack on top of each other instead of next to each other */
|
||||||
|
@media screen and (max-width: 700px) {
|
||||||
|
.title {
|
||||||
|
display: block;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 576px) {
|
||||||
|
footer {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
78
static/css/native.css
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
.highlight .hll { background-color: #404040 }
|
||||||
|
.highlight { background: #202020; color: #d0d0d0 }
|
||||||
|
.highlight .c { color: #999999; font-style: italic } /* Comment */
|
||||||
|
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
||||||
|
.highlight .esc { color: #d0d0d0 } /* Escape */
|
||||||
|
.highlight .g { color: #d0d0d0 } /* Generic */
|
||||||
|
.highlight .k { color: #6ab825; font-weight: bold } /* Keyword */
|
||||||
|
.highlight .l { color: #d0d0d0 } /* Literal */
|
||||||
|
.highlight .n { color: #d0d0d0 } /* Name */
|
||||||
|
.highlight .o { color: #d0d0d0 } /* Operator */
|
||||||
|
.highlight .x { color: #d0d0d0 } /* Other */
|
||||||
|
.highlight .p { color: #d0d0d0 } /* Punctuation */
|
||||||
|
.highlight .ch { color: #999999; font-style: italic } /* Comment.Hashbang */
|
||||||
|
.highlight .cm { color: #999999; font-style: italic } /* Comment.Multiline */
|
||||||
|
.highlight .cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */
|
||||||
|
.highlight .cpf { color: #999999; font-style: italic } /* Comment.PreprocFile */
|
||||||
|
.highlight .c1 { color: #999999; font-style: italic } /* Comment.Single */
|
||||||
|
.highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
|
||||||
|
.highlight .gd { color: #d22323 } /* Generic.Deleted */
|
||||||
|
.highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */
|
||||||
|
.highlight .gr { color: #d22323 } /* Generic.Error */
|
||||||
|
.highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
|
||||||
|
.highlight .gi { color: #589819 } /* Generic.Inserted */
|
||||||
|
.highlight .go { color: #cccccc } /* Generic.Output */
|
||||||
|
.highlight .gp { color: #aaaaaa } /* Generic.Prompt */
|
||||||
|
.highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */
|
||||||
|
.highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */
|
||||||
|
.highlight .gt { color: #d22323 } /* Generic.Traceback */
|
||||||
|
.highlight .kc { color: #6ab825; font-weight: bold } /* Keyword.Constant */
|
||||||
|
.highlight .kd { color: #6ab825; font-weight: bold } /* Keyword.Declaration */
|
||||||
|
.highlight .kn { color: #6ab825; font-weight: bold } /* Keyword.Namespace */
|
||||||
|
.highlight .kp { color: #6ab825 } /* Keyword.Pseudo */
|
||||||
|
.highlight .kr { color: #6ab825; font-weight: bold } /* Keyword.Reserved */
|
||||||
|
.highlight .kt { color: #6ab825; font-weight: bold } /* Keyword.Type */
|
||||||
|
.highlight .ld { color: #d0d0d0 } /* Literal.Date */
|
||||||
|
.highlight .m { color: #3677a9 } /* Literal.Number */
|
||||||
|
.highlight .s { color: #ed9d13 } /* Literal.String */
|
||||||
|
.highlight .na { color: #bbbbbb } /* Name.Attribute */
|
||||||
|
.highlight .nb { color: #24909d } /* Name.Builtin */
|
||||||
|
.highlight .nc { color: #447fcf; text-decoration: underline } /* Name.Class */
|
||||||
|
.highlight .no { color: #40ffff } /* Name.Constant */
|
||||||
|
.highlight .nd { color: #ffa500 } /* Name.Decorator */
|
||||||
|
.highlight .ni { color: #d0d0d0 } /* Name.Entity */
|
||||||
|
.highlight .ne { color: #bbbbbb } /* Name.Exception */
|
||||||
|
.highlight .nf { color: #447fcf } /* Name.Function */
|
||||||
|
.highlight .nl { color: #d0d0d0 } /* Name.Label */
|
||||||
|
.highlight .nn { color: #447fcf; text-decoration: underline } /* Name.Namespace */
|
||||||
|
.highlight .nx { color: #d0d0d0 } /* Name.Other */
|
||||||
|
.highlight .py { color: #d0d0d0 } /* Name.Property */
|
||||||
|
.highlight .nt { color: #6ab825; font-weight: bold } /* Name.Tag */
|
||||||
|
.highlight .nv { color: #40ffff } /* Name.Variable */
|
||||||
|
.highlight .ow { color: #6ab825; font-weight: bold } /* Operator.Word */
|
||||||
|
.highlight .w { color: #666666 } /* Text.Whitespace */
|
||||||
|
.highlight .mb { color: #3677a9 } /* Literal.Number.Bin */
|
||||||
|
.highlight .mf { color: #3677a9 } /* Literal.Number.Float */
|
||||||
|
.highlight .mh { color: #3677a9 } /* Literal.Number.Hex */
|
||||||
|
.highlight .mi { color: #3677a9 } /* Literal.Number.Integer */
|
||||||
|
.highlight .mo { color: #3677a9 } /* Literal.Number.Oct */
|
||||||
|
.highlight .sa { color: #ed9d13 } /* Literal.String.Affix */
|
||||||
|
.highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */
|
||||||
|
.highlight .sc { color: #ed9d13 } /* Literal.String.Char */
|
||||||
|
.highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */
|
||||||
|
.highlight .sd { color: #ed9d13 } /* Literal.String.Doc */
|
||||||
|
.highlight .s2 { color: #ed9d13 } /* Literal.String.Double */
|
||||||
|
.highlight .se { color: #ed9d13 } /* Literal.String.Escape */
|
||||||
|
.highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */
|
||||||
|
.highlight .si { color: #ed9d13 } /* Literal.String.Interpol */
|
||||||
|
.highlight .sx { color: #ffa500 } /* Literal.String.Other */
|
||||||
|
.highlight .sr { color: #ed9d13 } /* Literal.String.Regex */
|
||||||
|
.highlight .s1 { color: #ed9d13 } /* Literal.String.Single */
|
||||||
|
.highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */
|
||||||
|
.highlight .bp { color: #24909d } /* Name.Builtin.Pseudo */
|
||||||
|
.highlight .fm { color: #447fcf } /* Name.Function.Magic */
|
||||||
|
.highlight .vc { color: #40ffff } /* Name.Variable.Class */
|
||||||
|
.highlight .vg { color: #40ffff } /* Name.Variable.Global */
|
||||||
|
.highlight .vi { color: #40ffff } /* Name.Variable.Instance */
|
||||||
|
.highlight .vm { color: #40ffff } /* Name.Variable.Magic */
|
||||||
|
.highlight .il { color: #3677a9 } /* Literal.Number.Integer.Long */
|
@ -1,141 +0,0 @@
|
|||||||
body {
|
|
||||||
font-family: 'Open Sans', sans-serif;
|
|
||||||
font-display: swap;
|
|
||||||
font-size: 1rem;
|
|
||||||
line-height: 1.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overlay {
|
|
||||||
display: flex;
|
|
||||||
background-image: url("/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;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav {
|
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* flexbox navbar test*/
|
|
||||||
nav ul {
|
|
||||||
display: flex;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav ul li {
|
|
||||||
font-size: 1rem;
|
|
||||||
text-align: center;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav li {
|
|
||||||
list-style-type: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Change color on hover */
|
|
||||||
nav li a {
|
|
||||||
margin-left: 20px;
|
|
||||||
margin-right: 20px;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
margin-top: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Content types */
|
|
||||||
section {
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 5px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Simple css to style it like a toggle switch*/
|
|
||||||
.theme-switch-wrapper {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.theme-switch {
|
|
||||||
display: inline-block;
|
|
||||||
height: 24px;
|
|
||||||
position: relative;
|
|
||||||
width: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.theme-switch input {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider {
|
|
||||||
background-color: #ccc;
|
|
||||||
bottom: 0;
|
|
||||||
cursor: pointer;
|
|
||||||
left: 0;
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
transition: .2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider:before {
|
|
||||||
background-color: #fff;
|
|
||||||
bottom: 4px;
|
|
||||||
content: "";
|
|
||||||
height: 16px;
|
|
||||||
left: 4px;
|
|
||||||
position: absolute;
|
|
||||||
transition: .2s;
|
|
||||||
width: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:checked + .slider {
|
|
||||||
background-color: #66bb6a;
|
|
||||||
}
|
|
||||||
|
|
||||||
input:checked + .slider:before {
|
|
||||||
transform: translateX(16px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider.round {
|
|
||||||
border-radius: 34px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slider.round:before {
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Responsive layout - when the screen is less than 700px wide, make the two columns stack on top of each other instead of next to each other */
|
|
||||||
@media screen and (max-width: 700px) {
|
|
||||||
.title {
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav {
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav ul {
|
|
||||||
flex-direction: column;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav ul li a {
|
|
||||||
text-align: center;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
}
|
|
BIN
static/img/600x300.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
static/img/bluenebula.webp
Normal file
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 322 B |
@ -1,7 +0,0 @@
|
|||||||
<footer>
|
|
||||||
<div class="container">
|
|
||||||
<hr>
|
|
||||||
<p>© Quartznet 2020 | <a href="/quartznet/policy">Policy</a></p>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
<!-- General meta tags -->
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
|
|
||||||
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
<meta name="description" content="A software and game studio.">
|
|
||||||
<meta name="keywords" content="quartznet, software, games, tools"/>
|
|
||||||
<meta name="author" content="quartznet"/>
|
|
||||||
|
|
||||||
<!-- Open Graph tags -->
|
|
||||||
<meta property="og:title" content="quartznet" />
|
|
||||||
<meta property="og:description" content="We are software and game developers." />
|
|
||||||
|
|
||||||
<!-- Load CSS -->
|
|
||||||
<link rel="stylesheet" href="/quartznet/assets/css/bootstrap.min.css" defer>
|
|
||||||
<link href="/quartznet/assets/css/stylesheet.css" rel="stylesheet">
|
|
||||||
<link href="/quartznet/assets/css/themes.css" rel="stylesheet">
|
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet">
|
|
||||||
<link rel="icon" href="/quartznet/assets/favicon.ico">
|
|
||||||
|
|
||||||
<!-- Load javascript -->
|
|
||||||
<script src="/quartznet/assets/js/jquery-3.5.1.min.js" defer></script>
|
|
||||||
|
|
||||||
<!-- 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');
|
|
||||||
</script>
|
|
@ -1,24 +0,0 @@
|
|||||||
<header>
|
|
||||||
<div class="container">
|
|
||||||
<nav class="navbar navbar-expand-md">
|
|
||||||
<div class="navbar-collapse order-1 order-md-0 dual-collapse2">
|
|
||||||
<ul class="navbar-nav mr-auto">
|
|
||||||
<li><a href="/quartznet/">Quartznet</a></li>
|
|
||||||
<li><a href="/quartznet/about">About</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="navbar-collapse collapse w-100 order-3 dual-collapse2">
|
|
||||||
<ul class="navbar-nav ml-auto">
|
|
||||||
<li><a href="/quartznet/admin">Admin</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="overlay">
|
|
||||||
<div class="description">
|
|
||||||
<h1 class="title">Quartznet</h1>
|
|
||||||
<p>Software, Games, Science, Space!</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
3
static/robots.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# https://www.robotstxt.org/robotstxt.html
|
||||||
|
User-agent: *
|
||||||
|
Disallow:
|
@ -1,43 +0,0 @@
|
|||||||
/* Default theme */
|
|
||||||
:root {
|
|
||||||
--background-color: #222222;
|
|
||||||
--headings-color: #ffffff;
|
|
||||||
--font-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dark theme */
|
|
||||||
html[data-theme='dark'] {
|
|
||||||
--background-color: #222222;
|
|
||||||
--headings-color: #ffffff;
|
|
||||||
--font-color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: var(--background-color);
|
|
||||||
color: var(--font-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3, h4, h5 {
|
|
||||||
color: var(--headings-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
background-color: #eeeeee;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overlay {
|
|
||||||
border-bottom: 2px solid #eeeeee;
|
|
||||||
}
|
|
||||||
|
|
||||||
li a:hover {
|
|
||||||
border-bottom: 3px solid white;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #CC99FF;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
color: white;
|
|
||||||
}
|
|
23
svelte.config.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import adapter from "@sveltejs/adapter-static";
|
||||||
|
import { vitePreprocess } from '@sveltejs/kit/vite';
|
||||||
|
|
||||||
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
|
const config = {
|
||||||
|
// preprocess: preprocess(),
|
||||||
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||||
|
// for more information about preprocessors
|
||||||
|
preprocess: vitePreprocess(),
|
||||||
|
|
||||||
|
kit: {
|
||||||
|
adapter: adapter({
|
||||||
|
pages: 'build',
|
||||||
|
assets: 'build',
|
||||||
|
fallback: '404.html',
|
||||||
|
precompress: false,
|
||||||
|
strict: true,
|
||||||
|
trailingSlash: 'always'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
13
tsconfig.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"extends": "./.svelte-kit/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowJs": true,
|
||||||
|
"checkJs": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"strict": true
|
||||||
|
}
|
||||||
|
}
|
8
vite.config.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import { sveltekit } from '@sveltejs/kit/vite';
|
||||||
|
|
||||||
|
/** @type {import('vite').UserConfig} */
|
||||||
|
const config = {
|
||||||
|
plugins: [sveltekit()]
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|