mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 13:04:30 -08:00
deploy: leporello-js/app@a6e3f1b36f
This commit is contained in:
523
index.html
523
index.html
@@ -5,6 +5,8 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Leporello.js</title>
|
||||
|
||||
<script type='module' src='./src/ts_libs.js' async></script>
|
||||
|
||||
<script src='ace/ace.js'></script>
|
||||
<script src='ace/keybinding-vim.js'></script>
|
||||
<script src='ace/ext-language_tools.js'></script>
|
||||
@@ -20,526 +22,7 @@
|
||||
|
||||
<script type='module' src="./src/launch.js"></script>
|
||||
|
||||
<style>
|
||||
|
||||
:root {
|
||||
--shadow_color: rgb(171 200 214);
|
||||
--active_color: rgb(173, 228, 253);
|
||||
--error-color: #ff000024;
|
||||
--warn-color: #fff6d5;
|
||||
}
|
||||
|
||||
html, body, .app {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
display: inline-block;
|
||||
height: 0.8em;
|
||||
width: 0.8em;
|
||||
min-width: 0.8em;
|
||||
border-radius: 50%;
|
||||
border-top: none !important;
|
||||
border: 2px solid;
|
||||
animation: rotate 0.6s linear infinite;
|
||||
}
|
||||
@keyframes rotate {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.app {
|
||||
/* same as ace editor */
|
||||
font-family: Monaco, Menlo, "Ubuntu Mono", Consolas, source-code-pro, monospace;
|
||||
}
|
||||
|
||||
.app::backdrop {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.root {
|
||||
height: 100%;
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
"code code"
|
||||
"bottom files"
|
||||
"statusbar statusbar";
|
||||
grid-template-columns: 70% 30%;
|
||||
grid-template-rows: auto 1fr 2.5em;
|
||||
}
|
||||
|
||||
.editor_container, .bottom, .files_container, .statusbar {
|
||||
box-shadow: 1px 1px 3px 0px var(--shadow_color);
|
||||
}
|
||||
|
||||
.editor_container, .bottom, .statusbar, .files_container {
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.editor_container:focus-within,
|
||||
.bottom:focus-within,
|
||||
.files_container:focus-within,
|
||||
dialog {
|
||||
outline: none;
|
||||
box-shadow: 1px 1px 6px 3px var(--shadow_color);
|
||||
}
|
||||
|
||||
.tab_content:focus-within, .problems_container:focus-within {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.editor_container {
|
||||
height: 55vh;
|
||||
resize: vertical;
|
||||
position: relative;
|
||||
grid-area: code;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/* ace markers */
|
||||
|
||||
.selection {
|
||||
position: absolute;
|
||||
background-color: #ff00ff;
|
||||
z-index: 1; /* make it on top of evaluated_ok and evaluated_error */
|
||||
}
|
||||
|
||||
.evaluated_ok {
|
||||
position: absolute;
|
||||
background-color: rgb(225, 244, 253);
|
||||
}
|
||||
.evaluated_error {
|
||||
position: absolute;
|
||||
background-color: var(--error-color);
|
||||
}
|
||||
.error-code {
|
||||
/*
|
||||
TODO: make underline like in all editors
|
||||
*/
|
||||
position: absolute;
|
||||
border-bottom: 4px solid red;
|
||||
}
|
||||
|
||||
/* end of ace markers */
|
||||
|
||||
.eval_error {
|
||||
padding: 0em 1em;
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* Tabs */
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.tabs > .tab {
|
||||
margin-right: 1em;
|
||||
padding: 0.3em 1em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tabs > .tab.active {
|
||||
background-color: rgb(225, 244, 253);
|
||||
}
|
||||
|
||||
/* debugger */
|
||||
|
||||
.bottom {
|
||||
grid-area: bottom;
|
||||
overflow: auto;
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.debugger {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.debugger_wrapper {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.debugger, .problems_container {
|
||||
padding: 5px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.logs, .io_trace {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.logs .log {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.logs .log.active {
|
||||
background-color: var(--active_color) !important;
|
||||
}
|
||||
|
||||
.logs .log.error {
|
||||
background-color: var(--error-color);
|
||||
color: black !important; /* override red color that is set for calltree */
|
||||
&.native {
|
||||
color: grey !important;
|
||||
}
|
||||
}
|
||||
|
||||
.logs .log.warn {
|
||||
background-color: var(--warn-color);
|
||||
}
|
||||
|
||||
.tab_content {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.callnode {
|
||||
/* This makes every callnode be the size of the the longest one, so
|
||||
* every callnode is clickable anywhere in the calltree view, and
|
||||
* background for active callnodes is as wide as the entire container.
|
||||
* Useful when scrolling very wide call trees */
|
||||
min-width: fit-content;
|
||||
margin-left: 1em;
|
||||
}
|
||||
.callnode .active {
|
||||
background-color: var(--active_color);
|
||||
}
|
||||
.call_el {
|
||||
/*
|
||||
Make active callnode background start from the left of the calltree
|
||||
view
|
||||
*/
|
||||
margin-left: -1000vw;
|
||||
padding-left: 1000vw;
|
||||
width: 100%;
|
||||
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
.call_el .expand_icon, .call_el .expand_icon_placeholder {
|
||||
padding-left: 5px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.call_header {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.call_header.error {
|
||||
color: red;
|
||||
}
|
||||
.call_header.error.native {
|
||||
color: red;
|
||||
}
|
||||
.call_header.native {
|
||||
font-style: italic;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.call_header .loop_step {
|
||||
color: grey;
|
||||
border-radius: 5px;
|
||||
padding: 1px 5px;
|
||||
font-size: 0.9em;
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
/* problems view */
|
||||
.problem a {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* files */
|
||||
|
||||
.files_container {
|
||||
overflow: auto;
|
||||
grid-area: files;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.allow_file_access {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.allow_file_access .subtitle {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.files {
|
||||
overflow: auto;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.files .file {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.files > .file {
|
||||
margin-left: 0em !important;
|
||||
}
|
||||
|
||||
.files .file_title {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.files .file_title.active {
|
||||
background-color: var(--active_color);
|
||||
}
|
||||
|
||||
.files .file_title .select_entrypoint {
|
||||
margin-left: auto;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.files .file_title .icon {
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
width: 1em;
|
||||
}
|
||||
|
||||
.file_actions {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 5px;
|
||||
background-color: rgb(225 244 253 / 80%);
|
||||
}
|
||||
|
||||
.file_actions .file_action {
|
||||
margin-right: 2em;
|
||||
}
|
||||
|
||||
.file_actions .select_entrypoint_title {
|
||||
width: 40px;
|
||||
position: absolute;
|
||||
right: 7px;
|
||||
font-size: 0.8em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* value_explorer */
|
||||
|
||||
.embed_value_explorer_container.is_not_dom_el {
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
.embed_value_explorer_container.is_dom_el {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.embed_value_explorer_wrapper {
|
||||
/* preserve wrapper from getting clicks for code line left to it */
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.embed_value_explorer_container.is_not_dom_el .embed_value_explorer_wrapper {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.embed_value_explorer_content {
|
||||
pointer-events: initial;
|
||||
white-space: pre;
|
||||
max-width: fit-content;
|
||||
background-color: white;
|
||||
box-shadow: 1px 2px 9px -1px var(--shadow_color);
|
||||
}
|
||||
|
||||
.embed_value_explorer_content:focus {
|
||||
outline: none;
|
||||
box-shadow: 1px 2px 11px 1px var(--shadow_color);
|
||||
}
|
||||
|
||||
.embed_value_explorer_content > .value_explorer_node {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.embed_value_explorer_control {
|
||||
display: block;
|
||||
margin-bottom: 1em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.value_explorer_node {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.value_explorer_header {
|
||||
display: inline-block;
|
||||
padding-right: 1em;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.value_explorer_header .expand_icon {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.value_explorer_header.active {
|
||||
background-color: rgb(148, 227, 191);
|
||||
}
|
||||
|
||||
.value_explorer_key {
|
||||
color: rgb(150, 0, 128);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* status */
|
||||
|
||||
.statusbar {
|
||||
margin-bottom: 0px;
|
||||
grid-area: statusbar;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.statusbar .spinner {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.status, .current_file {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.status {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.statusbar_action {
|
||||
margin-right: 2em;
|
||||
}
|
||||
|
||||
.statusbar_action.first {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.open_app_window_button {
|
||||
position: relative;
|
||||
}
|
||||
.open_app_window_tooltip {
|
||||
padding: 1em;
|
||||
position: absolute;
|
||||
margin-bottom: 20px;
|
||||
bottom: 100%;
|
||||
border: none;
|
||||
font-size: 1.7em;
|
||||
background-color: rgb(120 206 247);
|
||||
border-radius: 21px;
|
||||
transform: scale(0);
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
.open_app_window_tooltip.on {
|
||||
transform: scale(1);
|
||||
}
|
||||
.open_app_window_tooltip:after {
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 20px solid transparent;
|
||||
border-right: 20px solid transparent;
|
||||
border-top: 20px solid rgb(120 206 247);
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
left: 50%;
|
||||
transform: translate(-50%);
|
||||
}
|
||||
|
||||
.options {
|
||||
padding: 5px;
|
||||
}
|
||||
.options > * {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.show_help, .github {
|
||||
margin: 0em 0.5em;
|
||||
}
|
||||
|
||||
.share_button, .upload_button {
|
||||
border: none;
|
||||
color: white;
|
||||
background: rgb(23 166 236);
|
||||
}
|
||||
|
||||
.share_button {
|
||||
font-size: 1.2em;
|
||||
margin-left: 1em;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.share_button[disabled] {
|
||||
background: grey;
|
||||
}
|
||||
|
||||
|
||||
.share_dialog input, .share_dialog button {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.share_dialog button {
|
||||
padding: 5px;
|
||||
height: 2em;
|
||||
}
|
||||
|
||||
dialog {
|
||||
border: none;
|
||||
}
|
||||
|
||||
dialog::backdrop {
|
||||
background-color: rgb(225 244 253 / 80%);
|
||||
}
|
||||
|
||||
.help_dialog[open] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
min-width: 70%;
|
||||
min-height: 70%;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.help {
|
||||
padding: 2em;
|
||||
border-spacing: 5px;
|
||||
}
|
||||
|
||||
.help th {
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.help th.key {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.help td.key {
|
||||
background-color: rgb(225, 244, 253, 0.5);
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.help_dialog form {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
</style>
|
||||
<link rel=stylesheet href='./styles.css'></link>
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user