Commit d77cac05 authored by thiemol's avatar thiemol

Merge branch 'master' into webpack

parents d83b4b0e b623f61d
node_modules
dist/main.js
dist/struktog.min.css
\ No newline at end of file
build
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="struktog.min.css">
<script src="main.js"></script>
<title>Struktog.</title>
</head>
<body>
<!-- Header -->
<header class="container">
<section class="nav-col">
<div class="nav-logo-container">
<div class="logo-container logo"></div>
<a href="index.html">
<strong>Struktog.</strong>
</a>
</div>
</section>
<section class="nav-col">
<div id="optionButtons" class="options-container">
<div class="column container">
<button class="column" onclick="document.getElementById('IEModal').style.display = 'block';">
Import / Export
</button>
</div>
</div>
</section>
</header>
<main>
<div id="editorDisplay" class="container">
</div>
<!-- Popup modal for import and export -->
<div id="IEModal" class="modal">
<div class="modal-content">
<span class="close"
onclick="document.getElementById('IEModal').style.display = 'none';">
&times;
</span>
<p>
JSON-Import:
</p>
<input id="ImportForm" type="file" class="form-input" \>
<p>
Export:
</p>
<div id="Export" class="text-center pt-1"></div>
</div>
</div>
</main>
<footer class="container">
<div class="column">
<span>
&#169; 2019 Klaus Ramm
</span>
<span>
(
</span>
<a href="license.html">MIT License</a>
<span>
)
</span>
</div>
</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Licence Struktog.</title>
<style>
body {
width: 50%;
}
@media (max-width: 840px) {
body {width: 95%}
}
</style>
</head>
<body>
<p>The MIT License (MIT)</p>
<p>Copyright © 2019 Klaus Ramm</p>
<p>
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:
</p>
<p>
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
</p>
<p>
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.
</p>
</body>
</html>
This diff is collapsed.
$code-highlight: rgb(128,212,255);
.highlight {
background-color: rgba(145, 138, 229, 0.4);
}
.form-select {
outline: 0;
box-shadow: none;
background: white;
position: relative;
width: 90%;
overflow: hidden;
border-radius: .2em;
border: 0.1em solid rgb(38, 64, 64);
padding: 0 .5em;
color: rgb(38, 64, 64);
cursor: pointer;
option {
color: rgb(38, 64, 64);
cursor: pointer;
}
}
.text-code {
color: $code-highlight;
/* Remove IE arrow */
select::-ms-expand {
display: none;
}
.bg-primary {
background-color: $main-background-color;
.code {
color: rgb(38, 64, 64);
position: relative;
padding-left: 0.3em;
display: flex;
&::before {
color: rgb(38, 64, 64);
content: attr(data-lang);
font-size: 100%;
position: absolute;
right: 0.5em;
top: 0.5em;
}
code {
//background: rgb(238, 238, 238);
border-radius: 0.2em;
border: 0.1em solid rgb(38, 64, 64);
color: inherit;
line-height: 1.5;
overflow-x: auto;
flex: 1;
padding: 1rem;
.keyword {
color: rgb(127, 0, 85);
}
span {
font-weight: bold;
}
}
}
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 2; /* Sit on top */
align-items: center;
bottom: 0;
display: none;
justify-content: center;
left: 0;
opacity: 0;
overflow: hidden;
padding: 0.5em;
position: fixed;
right: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
/* Modal Content/Box */
.modal-content {
background-color: #fefefe;
margin: 15% auto; /* 15% from the top and centered */
padding: 20px;
border: 1px solid #888;
width: 80%; /* Could be more or less, depending on screen size */
}
&:target,
&.active {
display: flex;
opacity: 1;
z-index: 2;
.modal-overlay {
background: rgba(0,0,0,0.4);
bottom: 0;
cursor: default;
display: block;
left: 0;
position: absolute;
right: 0;
top: 0;
}
/* The Close Button */
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
.modal-container {
animation: slide-down .2s ease 1;
z-index: 1;
}
}
&.modal-sm {
.modal-container {
max-width: 10em;
padding: 0 1em;
}
}
}
.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
.modal-container {
background: rgb(250, 250, 250);
border-radius: 0.1em;
display: flex;
flex-direction: column;
max-height: 75vh;
max-width: 25em;
padding: 0 1em;
width: 100%;
&.modal-fullheight {
max-height: 100vh;
}
.modal-header {
padding: 0 1em;
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
}
}
.modal-body {
overflow-y: auto;
padding: 0 1em;
position: relative;
}
.modal-footer {
padding: 1em;
text-align: right;
.modal-buttons {
flex: auto;
min-height: 1.5em;
margin: 0 1em;
border: 0.15em solid rgb(38, 64, 64);
border-radius: 0.2em;
}
}
}
......@@ -12,7 +12,13 @@ $main-background-color: rgba(128,212,255, 0.5);
}
.fixedHalfHeight {
flex: 0 0 1em;
flex-grow: 0;
flex-shrink: 0;
flex-basis: 0.7em;
transition: flex-basis 0.2s ease-in-out;
&:hover {
flex-basis: 1.3em;
}
}
.fixedHeight {
......@@ -41,38 +47,54 @@ $main-background-color: rgba(128,212,255, 0.5);
}
.symbol {
margin-top: 6.5px;
margin: 6.5px 0;
.input-group {
margin-top: -6px;
}
}
.margin-small {
margin-left: 0.2em;
}
.symbolHeight {
height: 1em;
flex: auto;
}
.justify-center {
justify-content: center;
}
.columnInput {
flex: 48%;
}
@media screen and (min-width: 486px) {
.columnInput {
flex-grow: 0;
flex-basis: 48%;
}
}
@media screen and (min-width: 800px) {
.columnInput {
flex: 32%;
flex-grow: 0;
flex-basis: 32%;
}
}
.insertButton {
border: 0.15em solid black;
border: 0.15em solid rgb(38, 64, 64);
text-align: center;
margin: 0.2em;
border-radius: 0.2em;
display: flex;
justify-content: center;
.buttonLogo {
float: left;
height: 1em;
height: 1.3em;
min-width: 2em;
margin: auto;
flex: 1;
......@@ -105,14 +127,12 @@ $main-background-color: rgba(128,212,255, 0.5);
}
}
.columnText {
flex: auto;
}
.optionContainer {
position: absolute;
z-index: 1;
top: 0;
right: 1em;
height: 100%;
......@@ -136,55 +156,6 @@ $main-background-color: rgba(128,212,255, 0.5);
}
}
.tooltip {
position: relative;
&:after {
background: rgba(50, 50, 50, 0.95);
border-radius: 0;
bottom: 100%;
color: white;
content: attr(data-tooltip);
display: block;
left: -100%;
max-width: 15em;
opacity: 0;
overflow: hidden;
padding: 0.3em;
pointer-events: none;
position: absolute;
text-overflow: ellipsis;
transform: translate(-50%, 0.3em);
transition: opacity .2s, transform .2s;
white-space: pre;
z-index: 2;
}
&:focus,
&:hover {
&::after {
opacity: 1;
transform: translate(-50%, -0.3em);
}
}
&[disabled],
&.disabled {
pointer-events: auto;
}
&.tooltip-bottom {
&::after {
bottom: auto;
top: 75%;
transform: translate(-50%, -0.3em);
}
&:focus,
&:hover {
&::after {
transform: translate(-50%, 0.3em);
}
}
}
}
.columnFull {
flex-basis: 100%;
......@@ -194,14 +165,18 @@ $main-background-color: rgba(128,212,255, 0.5);
flex: 1;
}
.bottomHeader {
align-self: flex-end;
.columnAuto-2 {
flex: 2;
}
.moveText {
flex: auto;
margin: auto;
padding-bottom: 0.15em;
}
// display borders around elements
.simpleBorder {
margin: 0 1px;
background-color: $main-background-color;
.bottomHeader {
align-self: flex-end;
}
.loopShift {
......
......@@ -6,6 +6,10 @@
$font-stack: "Verdana", Geneva, sans-serif;
header {
margin-top: 0.5em;
}
body {
font: 100% $font-stack;
max-width: 1500px;
......@@ -14,12 +18,17 @@ body {
display: flex;
flex-direction: column;
justify-content: center;
background-color: rgb(250, 250, 250);
main {
flex: 1;
}
}
strong {
color: rgb(38, 64, 64);
}
.container {
display: flex;
flex-direction: row;
......@@ -59,6 +68,17 @@ body {
flex-wrap: wrap;
align-items: center;
justify-content: center;
a {
text-decoration: none;
margin-left: calc(0.5em + 2px);
}
strong {
padding-left: 1em;
color: rgb(38, 64, 64);
font-size: 1.5em;
}
}
.nav-col {
......@@ -66,19 +86,42 @@ body {
margin: auto;
}
.nav-col-opt {
flex-basis: 100%;
margin-top: 0.5em;
}
@media screen and (min-width: 731px) {
.nav-col-opt {
flex: auto;
margin: auto;
}
}
.options-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: baseline;
justify-content: flex-end;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
}
.options-element {
height: 3em;
flex-basis: 5em;
}
.hand {
cursor: pointer;
}
.center {
flex: auto;
margin: auto;
}
.columnEditorFull {
margin-top: 0.5em;
flex-basis: 100%;
}
......@@ -88,7 +131,16 @@ body {
}
.columnEditorCode {
flex-basis: 50%;
margin: 0.2em;
padding-top: 1em;
flex-grow: 0;
width: 100%;
}
@media screen and (min-width: 480px) {
.columnEditorCode {
width: 50%;
}
}
@media screen and (min-width: 1200px) {
......@@ -97,7 +149,9 @@ body {
}
.columnEditorCode {
flex-basis: 24%;
padding-top: 0;
margin: 0 1em;
width: calc(25% - 4.5em);
}
}
......@@ -120,3 +174,88 @@ body {
.ov-hidden {
overflow: hidden;
}
.fixFullWidth {
flex-basis: 100%;
flex-grow: 0;
flex-shrink: 0;
}
.tooltip {
position: relative;
&:after {
background: rgba(50, 50, 50, 0.95);
border-radius: 0;
bottom: 100%;
color: white;
content: attr(data-tooltip);
display: block;
left: 50%;
max-width: 15em;
opacity: 0;
overflow: hidden;
padding: 0.3em;
pointer-events: none;
position: absolute;
text-overflow: ellipsis;
transform: translate(-50%, 0.3em);
transition: opacity .2s, transform .2s;
white-space: pre;
z-index: 1;
}
&:focus,
&:hover {
&::after {
opacity: 1;
transform: translate(-50%, -0.3em);
}
}
&[disabled],
&.disabled {
pointer-events: auto;
}
&.tooltip-bottom {
&::after {
bottom: auto;
top: 100%;
transform: translate(-50%, -0.3em);
}
&:focus,
&:hover {
&::after {
transform: translate(-50%, 0.3em);
}
}
}
&.tooltip-bottoml {
&::after {
bottom: auto;
top: 75%;
left: -100%;
transform: translate(-50%, -0.3em);
}
&:focus,
&:hover {
&::after {
transform: translate(-50%, 0.3em);
}
}
}
}
.divider {
display: block;
position: relative;
border-top: 0.1em solid rgb(38, 64, 64);
height: 0.1em;
margin: 0.2em 0;
}
.borderWidth {
flex: 0 0 3px;
}
.borderHeight {
height: 2px;
}
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 128 64">
<rect x="10" y="10" width="108" height="44" stroke="black" stroke-width="4" fill-opacity="0" />