Initial commit
This commit is contained in:
36
src/term/wterminal-autoextend.js
Normal file
36
src/term/wterminal-autoextend.js
Normal file
@@ -0,0 +1,36 @@
|
||||
/* Author: Ward Truyen
|
||||
* Version: 1.0.0
|
||||
* About: This auromaticly adds the other terminal extention scripts.
|
||||
* THIS SCRIPT DOES NOT WORK FOR A BROWSER-ADDON/EXTENTION!
|
||||
*/
|
||||
|
||||
{// this code block hides the variables below from other scripts.
|
||||
const addScripts = function() {
|
||||
// location of script files
|
||||
const extentionScripts = [
|
||||
"termext/ext-variables.js",
|
||||
"termext/ext-cookies.js",
|
||||
"termext/ext-eval.js",
|
||||
"termext/ext-timerdebug.js",
|
||||
"termext/ext-stresstest.js",
|
||||
"termext/ext-popvar.js",
|
||||
"termext/ext-passw.js",
|
||||
// "../termext/ext-featuretest.js",
|
||||
// "../termext/ext-forcelocals.js",
|
||||
// "../termext/ext-transfer.js", // only for browser-extention
|
||||
];
|
||||
|
||||
for (let ext of extentionScripts) {
|
||||
const element = document.createElement("script");
|
||||
// element.addAttribute("src", ext);
|
||||
element.src = ext;
|
||||
document.head.append(element);
|
||||
}
|
||||
}//--> addScripts = function() {
|
||||
|
||||
if (document.body) {
|
||||
addScripts();
|
||||
} else {
|
||||
window.addEventListener("load", addScripts);
|
||||
}
|
||||
}
|
150
src/term/wterminal.css
Normal file
150
src/term/wterminal.css
Normal file
@@ -0,0 +1,150 @@
|
||||
/* Author: Ward Truyen
|
||||
* Version: 1.1.0
|
||||
*/
|
||||
|
||||
.wterminal-background {
|
||||
z-index: 9995;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
color: black;
|
||||
line-height: normal;
|
||||
visibility: hidden;
|
||||
background: unset;
|
||||
transition: all 0.2s ease-out 0s;
|
||||
}
|
||||
|
||||
.wterminal-background .wterminal-container{
|
||||
position: relative;
|
||||
margin: 0px auto;
|
||||
width: 70%;
|
||||
border: 1px solid #888;
|
||||
border-top: 0px solid grey;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
padding: 4px;
|
||||
background: linear-gradient(24deg, rgba(209,211,196,1) 20%, rgba(221,221,221,1) 50%, rgba(221,221,221,1) 70%, rgba(190,199,207,1) 90%);
|
||||
box-shadow: 3px 3px 3px black;
|
||||
text-align: left;
|
||||
margin-top: -50%;
|
||||
}
|
||||
|
||||
.wterminal-container pre {
|
||||
color: unset;
|
||||
border: 2px solid #c0c0c0;
|
||||
min-height: 18em;
|
||||
max-height: 18em;
|
||||
margin: 0px 0px 2px;
|
||||
padding: 2px 4px 6px 4px;
|
||||
background-color: #F0F0F0;
|
||||
overflow-y: scroll;
|
||||
font-family: Monospace, Incosolata, Courier;
|
||||
font-size: 12px;
|
||||
line-height: 1.05;
|
||||
width: unset;
|
||||
}
|
||||
|
||||
.wterminal-output u{
|
||||
/* adds a nice fat blue underline to titles */
|
||||
text-decoration-color: #8cb4ff;
|
||||
text-decoration-thickness: .15rem;
|
||||
text-underline-offset: .1em;
|
||||
}
|
||||
|
||||
.wterminal-input {
|
||||
padding: 1px 2px;
|
||||
margin: 0px;
|
||||
background-color: #F0F0F0;
|
||||
color: black;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.wterminal-input:hover{
|
||||
background-color: #DDD;
|
||||
}
|
||||
|
||||
.wterminal-container input[type="submit"]:hover, button:hover{
|
||||
background-color: #DDD;
|
||||
cursor: pointer;
|
||||
}
|
||||
.wterminal-container input, .wterminal-container label{
|
||||
line-height: unset;
|
||||
display: unset;
|
||||
/* width: unset; */
|
||||
height: unset;
|
||||
margin: 0;
|
||||
margin-left: 2px;
|
||||
}
|
||||
.wterminal-container input[type="submit"], button{
|
||||
width: unset;
|
||||
height: unset;
|
||||
margin: 0;
|
||||
margin-left: 2px;
|
||||
padding: 1px 4px;
|
||||
color: black;
|
||||
background-color: #eee;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 3px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.wterminal-background.wterminal-visible{
|
||||
background-color: #0000008F;
|
||||
backdrop-filter: blur(4px);
|
||||
visibility: visible;
|
||||
transition: background-color .1s ease-out 0s, backdrop-filter .1s ease-out 0s;
|
||||
}
|
||||
|
||||
.wterminal-visible .wterminal-container{
|
||||
margin-top: 0px;
|
||||
transition: margin-top .2s ease-out 0s;
|
||||
}
|
||||
|
||||
.wterminal-container form{
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
/* Width */
|
||||
@media screen and (max-width: 480px) {
|
||||
.wterminal-input{
|
||||
width: 40%;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 480px) and (max-width: 720px) {
|
||||
.wterminal-input{
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 720px) and (max-width: 1080px) {
|
||||
.wterminal-input{
|
||||
width: 60%;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 1080px) {
|
||||
.wterminal-input{
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Height */
|
||||
@media screen and (min-height: 512px) and (max-height: 1024px) {
|
||||
.wterminal-background .wterminal-container .wterminal-output{
|
||||
min-height: 24em;
|
||||
max-height: 24em;
|
||||
}
|
||||
}
|
||||
@media screen and (min-height: 1024px) and (max-height: 1536px) {
|
||||
.wterminal-background .wterminal-container .wterminal-output{
|
||||
min-height: 32em;
|
||||
max-height: 32em;
|
||||
}
|
||||
}
|
||||
@media screen and (min-height: 1536px) {
|
||||
.wterminal-background .wterminal-container .wterminal-output{
|
||||
min-height: 48em;
|
||||
max-height: 48em;
|
||||
}
|
||||
}
|
1313
src/term/wterminal.js
Normal file
1313
src/term/wterminal.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user