1
Fork 0
mirror of https://github.com/glassflame/glassflame.github.io.git synced 2024-11-25 09:34:27 +00:00
glassflame/index.html

211 lines
No EOL
5 KiB
HTML

<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8" />
<title>WIP: Obsiview</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Interaction scripts -->
<script type="module" src="src/index.mjs"></script>
<!-- Global style -->
<style>
@import "style/light.css";
@import "style/dark.css";
:root {
--color-background: #ffffff;
--color-foreground: #000000;
--color-accent: initial;
--color-gray: #7E7E7E;
--color-red: #FB464C;
--color-orange: #E9973F;
--color-yellow: #E0DE71;
--color-green: #44CF6E;
--color-blue: #53DFDD;
--color-purple: #A882FF;
--edge-width: 2px;
--node-group-border-width: 2px;
--node-file-border-width: 2px;
}
body {
padding: 128px;
width: max-content;
height: max-content;
background-color: var(--color-background);
color: var(--color-foreground);
}
</style>
<!-- Templates -->
<template id="template-vault">
<style>
</style>
<div class="vault">
<slot name="vault-child"></slot>
</div>
</template>
<template id="template-canvas">
<style>
.canvas {
position: relative;
display: flex;
width: max-content;
height: max-content;
}
.canvas * {
left: 0;
top: 0;
}
.canvas *:first-child {
position: relative;
}
.canvas *:not(:first-child) {
position: absolute;
}
</style>
<div class="canvas">
<slot name="canvas-edges">{Canvas edges}</slot>
<slot name="canvas-nodes">{Canvas nodes}</slot>
</div>
</template>
<template id="template-display">
<slot name="display-container">{Displayed content}</slot>
</template>
<template id="template-node-group">
<style>
.node {
outline: var(--node-group-border-width) solid var(--color-node);
background-color: color-mix(in srgb, var(--color-node) 20%, var(--color-background));
border-radius: 0 8px 8px 8px;
padding: 12px;
}
.node-group-label {
position: relative;
bottom: 14px;
left: -12px;
transform: translateY(-100%);
display: inline-block;
outline: var(--node-group-border-width) solid var(--color-node);
background-color: color-mix(in srgb, var(--color-node) 20%, var(--color-background));
border-radius: 8px 8px 0 0;
padding: 12px;
}
.node-group-label-title {
margin: 0;
}
</style>
<div class="canvas-item node node-group">
<aside class="node-group-label">
<h1 class="node-group-label-title"><slot name="node-group-label">{Group label}</slot></h1>
</aside>
</div>
</template>
<template id="template-node-file">
<style>
.node {
outline: var(--node-file-border-width) solid var(--color-node);
background-color: color-mix(in srgb, var(--color-node) 10%, var(--color-background));
border-radius: 8px;
padding: 12px;
}
.node-file {
overflow-x: clip;
overflow-y: scroll;
}
.node-file-label {
font-size: 2em;
margin-block-start: .67em;
margin-block-end: .67em;
}
</style>
<article class="canvas-item node node-file">
<h1 class="node-file-label">
<slot name="node-file-label">{Node title}</slot>
</h1>
<slot name="node-file-contents">{Node contents}</slot>
</article>
</template>
<template id="template-node-text">
<style>
.node {
outline: var(--node-file-border-width) solid var(--color-node);
background-color: color-mix(in srgb, var(--color-node) 10%, var(--color-background));
border-radius: 8px;
padding: 12px;
}
.node-text {
overflow-x: clip;
overflow-y: scroll;
}
</style>
<article class="canvas-item node node-text">
<slot name="node-text-contents">{Node contents}</slot>
</article>
</template>
<template id="template-edge">
<style>
.edge svg line {
stroke: var(--color-node);
stroke-width: var(--edge-width);
}
</style>
<div class="edge">
<slot name="edge-svg">{Edge SVG}</slot>
</div>
</template>
<template id="template-markdown">
<style>
.markdown
</style>
<div class="markdown">
<slot name="markdown-document">{Markdown text}</slot>
</div>
</template>
<template id="template-frontmatter">
<style>
.frontmatter {
opacity: 50%;
}
</style>
<div class="frontmatter">
<slot name="frontmatter-contents">{Markdown text}</slot>
</div>
</template>
<template id="template-hashtag">
<style>
.hashtag {
background-color: color-mix(in srgb, var(--color-accent) 20%, transparent);
color: var(--color-accent);
}
</style>
<span class="hashtag"><slot name="hashtag-tag">{#Hashtag}</slot></span>
</template>
<template id="template-wikilink">
<style>
.wikilink {
color: var(--color-accent);
text-decoration: underline 1px solid currentColor;
cursor: pointer;
}
</style>
<a class="wikilink"><slot name="wikilink-anchor">{Wikilink text}</slot></a>
</template>
</head>
<body>
</body>
</html>