improved workflow

This commit is contained in:
iaphetes 2024-12-20 12:17:18 +01:00
parent 340833ea7b
commit a1de20f0ec
5 changed files with 126 additions and 48 deletions

View file

@ -0,0 +1,2 @@
<?xml version="1.0" ?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><defs><style>.a,.b{fill:none;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;}.b{fill-rule:evenodd;}</style></defs><circle class="a" cx="7" cy="16" r="2"/><circle class="a" cx="16" cy="6" r="3"/><circle class="a" cx="18" cy="18" r="4"/><circle class="a" cx="4" cy="4" r="2"/><line class="a" x1="14" x2="8.75774" y1="18" y2="16.95155"/><line class="a" x1="16.95928" x2="18.2766" y1="8.83997" y2="14.01668"/><line class="a" x1="6" x2="13.16407" y1="4" y2="5.02344"/><path class="b" d="M6.7441,14.01668C7,14,4.35961,5.96728,4.35961,5.96728"/></svg>

After

Width:  |  Height:  |  Size: 766 B

View file

@ -1,19 +1,30 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri App</title>
<script type="module" src="/main.js" defer></script>
</head>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri App</title>
<script type="module" src="./main.js" defer></script>
<script src="./main.js"></script>
</head>
<body>
<main class="container">
<div class="main_editor">
<div class='markdown_input' id="markdown_input" contenteditable></div>
<div class="rendered_markdown" id="rendered_markdown"></div>
<body>
<div class="main">
<div class="top-bar">
<button class="topbar_button" id="hide-sidebar"><img class="topbar_icon" src="images/graph_icon.svg" /></button>
</div>
<div class="container">
<div id="sidebar">
<button class="sidebar_button"><img class="sidebar_icon" src="images/graph_icon.svg" /></button>
<button class="sidebar_button"><img class="sidebar_icon" src="images/graph_icon.svg" /></button>
<button class="sidebar_button"><img class="sidebar_icon" src="images/graph_icon.svg" /></button>
</div>
<div class="row" id="main_editor">
<div class="col" id="markdown_input" contenteditable></div>
<div class="col" id="rendered_markdown"></div>
</div>
</div>
</div>
</main>
</body>
</body>
</html>

View file

@ -30,3 +30,16 @@ textarea.addEventListener('input', ()=> {
// });
});
document.getElementById("hide-sidebar").onclick = function() {toggle_visibility("sidebar");};
function toggle_visibility(id) {
if (document.getElementById(id).style.visibility == "hidden"){
document.getElementById(id).style.visibility = "visible";
var style = window.getComputedStyle(document.body);
document.getElementById(id).style.width = style.getPropertyValue("--sidebar-width");
}else{
document.getElementById(id).style.visibility = "hidden";
document.getElementById(id).style.width = 0;
}
}

View file

@ -1,23 +1,33 @@
.logo.vanilla:hover {
filter: drop-shadow(0 0 2em #ffe21c);
}
:root {
font-family: Avenir, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
--main-bg-color: #4f4f4f;
--sidebar-width: 3em;
font-family: Avenir, Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 24px;
color: #f6f6f6;
background-color: #2f2f2f;
color: #f6f6f6;
background-color: var(--main-bg-color);
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-size-adjust: 100%;
}
*{
box-sizing: border-box;
padding: 0;
margin: 0;
}
.container {
height: 90vh;
height: 100%;
margin: 0;
padding-top: 1vh;
display: flex;
@ -26,40 +36,44 @@
text-align: left;
}
.row {
display: flex;
justify-content: left;
.col {
width: 50%;
padding: 0.5em;
margin: .1em;
border: solid;
border-radius: .5em;
}
.markdown_input
#markdown_input
{
border-style: solid;
width: 49%;
height: 100%;
text-align: left;
float:left;
color: #f6f6f6;
background: #2f2f2f;
grid-column: 1;
grid-row: 1;
text-align: left;
/*float:left;*/
color: #f6f6f6;
background: var(--main-bg-color);
}
.rendered_markdown {
border-style: solid;
width: 49%;
height: 100%;
float:right;
text-align: left;
color: #f6f6f6;
background-color: #2f2f2f;
#rendered_markdown {
grid-column: 2;
grid-row: 1;
/*float:right;*/
text-align: left;
color: #f6f6f6;
background-color: var(--main-bg-color);
}
.main_editor{
width: 100%;
text-align: center;
font-size: 16px;
line-height: 18px;
display: flex;
flex-direction: column;
justify-content: center;
color: #f6f6f6;
background-color: #2f2f2f;
background-color: var(--main-bg-color);
}
h1 {
text-align: left;
@ -69,11 +83,44 @@ h1 {
}
.sidebar_button {
width: 100%;
background-color: var(--main-bg-color);
border: none;
}
.sidebar_icon {
width: 100%;
}
.topbar_button {
height: 2em;
background-color: var(--main-bg-color);
/*border: none;*/
}
.topbar_icon {
height: 100%;
}
@media (prefers-color-scheme: dark) {
:root {
color: #f6f6f6;
background-color: #2f2f2f;
background-color: var(--main-bg-color);
}
}
#main_editor {
display: flex;
width: 100%;
height: 100%;
}
.main {
display: flex;
height:100vh;
flex-direction: column;
}
#sidebar {
visibility: visible;
width: var(--sidebar-width);
}