mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-02-02 05:50:51 +03:00
Create screenshots page
This commit is contained in:
parent
1714cd1a21
commit
48a2aebb95
4 changed files with 52 additions and 0 deletions
17
screenshots.html
Normal file
17
screenshots.html
Normal 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
12
src/pages/screenshots.ts
Normal 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;
|
1
src/sass/screenshots.sass
Normal file
1
src/sass/screenshots.sass
Normal file
|
@ -0,0 +1 @@
|
|||
@import "basic"
|
22
src/screenshots.svelte
Normal file
22
src/screenshots.svelte
Normal 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>
|
Loading…
Add table
Reference in a new issue