Skip to content
Snippets Groups Projects
Commit e883bc6d authored by Lorenz Glißmann's avatar Lorenz Glißmann
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
.DS_Store
node_modules
dist
dist-ssr
*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
yarn-lock.json
package-lock.json
*.log
# Editor directories and files
.idea
.vscode
!.vscode/extensions.json
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.DS_Store
LICENSE 0 → 100644
MIT License
Copyright (c) 2020 NW.js Utilities
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.
{
"main": "http://localhost:3000/",
"name": "markdoffice",
"node-remote": "http://localhost:3000/",
"window": {
"frame": false,
"position": "center",
"transparent": true
}
}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>MarkOffice 2023</title>
<link rel="stylesheet" href="https://unpkg.com/98.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Atkinson+Hyperlegible">
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Svelte</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
{
"compilerOptions": {
"moduleResolution": "Node",
"target": "ESNext",
"module": "ESNext",
/**
* svelte-preprocess cannot figure out whether you have
* a value or a type, so tell TypeScript to enforce using
* `import type` instead of `import` for Types.
*/
"importsNotUsedAsValues": "error",
"isolatedModules": true,
"resolveJsonModule": true,
/**
* To have warnings / errors of the Svelte compiler at the
* correct position, enable source maps by default.
*/
"sourceMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
/**
* Typecheck JS in `.svelte` and `.js` files by default.
* Disable this if you'd like to use dynamic types.
*/
"checkJs": true
},
/**
* Use global.d.ts instead of compilerOptions.types
* to avoid limiting type declarations.
*/
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
}
{
"name": "markoffice",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"start": "vite build && nw dist/",
"dev": "concurrently --kill-others \"vite --port 3000 --strictPort\" \"nw dev/\""
},
"window": {
"frame": false,
"position": "center",
"transparent": true
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.0.4",
"concurrently": "^8.0.1",
"nw": "^0.75.0",
"svelte": "^3.55.1",
"vite": "^4.2.0"
},
"dependencies": {
"@milkdown/core": "^7.2.0",
"@milkdown/ctx": "^7.2.0",
"@milkdown/preset-commonmark": "^7.2.0",
"@milkdown/prose": "^7.2.0",
"@milkdown/theme-nord": "^7.2.0",
"@milkdown/transformer": "^7.2.0",
"@toast-ui/editor": "^3.2.2",
"98.css": "^0.1.20"
}
}
{
"main": "index.html",
"name": "markoffice",
"window": {
"frame": true,
"position": "center",
"transparent": true
}
}
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
\ No newline at end of file
<Window title={title} statusbar={["hi", "mom"]}>
<Editor></Editor>
</Window>
<style>
</style>
<script>
import Editor from "./lib/Editor.svelte";
const title = "MarkOffice 2023";
import Window from "./lib/Window.svelte";
</script>
\ No newline at end of file
html {
zoom: 120%;
}
main, html, body, #app {
height: 100%;
margin: 0;
background-color: rebeccapurple;
overflow: hidden;
}
.window-body {
overflow: auto;
}
.window {
display: flex;
flex-direction: column;
padding: 0;
height: 100%;
width: 100%;
}
.window-body {
flex-grow: 1;
margin-left: 3px;
margin-right: 3px;
padding: 5px;
}
.title-bar {
margin-top: 3px;
margin-left: 3px;
margin-right: 3px;
-webkit-app-region: drag;
}
.title-bar > .title-bar-controls {
-webkit-app-region: no-drag;
}
.status-bar {
margin-left: 3px;
margin-right: 3px;
margin-bottom: 3px;
}
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="26.6" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 308"><path fill="#FF3E00" d="M239.682 40.707C211.113-.182 154.69-12.301 113.895 13.69L42.247 59.356a82.198 82.198 0 0 0-37.135 55.056a86.566 86.566 0 0 0 8.536 55.576a82.425 82.425 0 0 0-12.296 30.719a87.596 87.596 0 0 0 14.964 66.244c28.574 40.893 84.997 53.007 125.787 27.016l71.648-45.664a82.182 82.182 0 0 0 37.135-55.057a86.601 86.601 0 0 0-8.53-55.577a82.409 82.409 0 0 0 12.29-30.718a87.573 87.573 0 0 0-14.963-66.244"></path><path fill="#FFF" d="M106.889 270.841c-23.102 6.007-47.497-3.036-61.103-22.648a52.685 52.685 0 0 1-9.003-39.85a49.978 49.978 0 0 1 1.713-6.693l1.35-4.115l3.671 2.697a92.447 92.447 0 0 0 28.036 14.007l2.663.808l-.245 2.659a16.067 16.067 0 0 0 2.89 10.656a17.143 17.143 0 0 0 18.397 6.828a15.786 15.786 0 0 0 4.403-1.935l71.67-45.672a14.922 14.922 0 0 0 6.734-9.977a15.923 15.923 0 0 0-2.713-12.011a17.156 17.156 0 0 0-18.404-6.832a15.78 15.78 0 0 0-4.396 1.933l-27.35 17.434a52.298 52.298 0 0 1-14.553 6.391c-23.101 6.007-47.497-3.036-61.101-22.649a52.681 52.681 0 0 1-9.004-39.849a49.428 49.428 0 0 1 22.34-33.114l71.664-45.677a52.218 52.218 0 0 1 14.563-6.398c23.101-6.007 47.497 3.036 61.101 22.648a52.685 52.685 0 0 1 9.004 39.85a50.559 50.559 0 0 1-1.713 6.692l-1.35 4.116l-3.67-2.693a92.373 92.373 0 0 0-28.037-14.013l-2.664-.809l.246-2.658a16.099 16.099 0 0 0-2.89-10.656a17.143 17.143 0 0 0-18.398-6.828a15.786 15.786 0 0 0-4.402 1.935l-71.67 45.674a14.898 14.898 0 0 0-6.73 9.975a15.9 15.9 0 0 0 2.709 12.012a17.156 17.156 0 0 0 18.404 6.832a15.841 15.841 0 0 0 4.402-1.935l27.345-17.427a52.147 52.147 0 0 1 14.552-6.397c23.101-6.006 47.497 3.037 61.102 22.65a52.681 52.681 0 0 1 9.003 39.848a49.453 49.453 0 0 1-22.34 33.12l-71.664 45.673a52.218 52.218 0 0 1-14.563 6.398"></path></svg>
\ No newline at end of file
<div id="editor" />
<script>
import { onMount } from 'svelte';
import Editor from '@toast-ui/editor';
let editor;
onMount(async () => {
editor = new Editor({
el: document.querySelector('#editor'),
initialEditType: 'wysiwyg',
height: '100%',
initialValue: content
});
});
const content = `# Hello World\n## Einleitung\n- Einleitung\n- Zusammenfassung\n## Zusammenfassung`;
import '@toast-ui/editor/dist/toastui-editor.css'; // Editor's Style
</script>
<style scoped>
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
font-family: 'Atkinson Hyperlegible', sans-serif;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
#editor {
background-color: white;
}
</style>
\ No newline at end of file
<main class="window">
<nav class="title-bar">
<div class="title-bar-text">{title}</div>
<div class="title-bar-controls">
<button aria-label="Minimize" on:click={windowaction('minimize')}></button>
<button aria-label="Maximize" on:click={windowaction('maximize')}></button>
<button aria-label="Close" on:click={windowaction('close')}></button>
</div>
</nav>
<div class="window-body">
<slot></slot>
</div>
{#if statusbar}
<div class="status-bar">
{#each statusbar as status}
<p class="status-bar-field">{status}</p>
{/each}
</div>
{/if}
</main>
<script>
export let title = "A window";
export let statusbar = ["Press F1 for help"];
function windowaction(action) {
return () => nw.Window.get()[action]();
}
</script>
\ No newline at end of file
import './app.css'
import App from './App.svelte'
const app = new App({
target: document.getElementById('app'),
})
export default app
/// <reference types="svelte" />
/// <reference types="vite/client" />
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
export default {
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
// for more information about preprocessors
preprocess: vitePreprocess(),
}
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
})
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment