2021-04-11: This project has been deprecated. GKK record handling is now part of https://github.com/krisell/gkk-anmalan
Live at https://gkk-styrkelyft.se/klubbrekord/
This is my first attempt at using Svelte. Any notes about best practices I've missed or other ideas are welcome.
- Clone repository
- Install depencecies,
npm install
- Build, preferably using
npm run dev
which also sets up a dev-server atlocalhost:5000
The file public/test.html
uses the package in the intended environment, which adds a few additional styles.
- Add the files to the server.
- Create a new page.
- Set the HTML-content of the new page to the following (assuming the Svelte built files are placed in
/rekord
):
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/rekord/bundle.css">
<style>
.entry-header {display: none;}
.site-content {display: none;}
h3 {margin-top: 12px;}
</style>
<script defer="" src="/rekord/bundle.js"></script>
The Svelte script is set to mount to an element with id "main", which exists by default in wordpress. The custom styles are used to remove unwanted Wordpress boilerplate.