Create screenshots page

This commit is contained in:
Marie 2022-04-03 10:53:44 +00:00
parent 1714cd1a21
commit 48a2aebb95
4 changed files with 52 additions and 0 deletions

17
screenshots.html Normal file
View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" lang="sass" href="/src/sass/screenshots.sass" />
<link rel="stylesheet" href="/src/css/hint.min.css" />
</head>
<body data-theme="light">
<div id="app"></div>
<script src="neutralino.js"></script>
<script type="module" src="/src/pages/screenshots.ts" lang="ts"></script>
</body>
</html>

12
src/pages/screenshots.ts Normal file
View file

@ -0,0 +1,12 @@
import '../i18n';
import App from '../screenshots.svelte';
declare const Neutralino;
Neutralino.init();
const app = new App({
target: document.getElementById('app')!
});
export default app;

View file

@ -0,0 +1 @@
@import "basic"

22
src/screenshots.svelte Normal file
View file

@ -0,0 +1,22 @@
<script context="module" lang="ts">
declare const Neutralino;
</script>
<script lang="ts">
import { onMount } from 'svelte';
import { Configs, Windows } from './empathize';
onMount(async () => {
await Windows.current.show();
await Windows.current.center(900, 600);
// Auto theme switcher
Configs.get('theme').then((theme) => {
if (theme === 'system')
theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
document.body.setAttribute('data-theme', theme as string);
});
});
</script>