commit d14afc488a9d09fda481ffbb7a3d93ee3a7aa9bd
parent 302fa0cf8b668db8a6ab168f2f1edc10e5ecb7fe
Author: breadcat <breadcat@users.noreply.github.com>
Date: Tue, 19 Apr 2022 23:29:52 +0100
Tidy unused selector, start using variables
Diffstat:
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/index.html b/index.html
@@ -4,22 +4,21 @@
<meta charset="utf-8">
<title>New Tab</title>
<style>
- :root{--main-bg-color:#2e3440;--prompt-bg-color:#151515;--text-color:#6c99bb}
+ :root{--main-bg-color:#2e3440;--prompt-bg-color:#151515;--input-color:#6c99bb;--text-color:#d6dce8}
*{margin:0;padding:0;border:0;outline:0;font-family:monospace;font-size:1rem}
body{width:100vw;height:100vh;align-items:center;justify-content:center;overflow:hidden;background-color:var(--main-bg-color)}
#screen{width:56vw;box-shadow:1px 1px 10px;border-radius:4px;padding:1.5em 0;background-color:var(--prompt-bg-color);margin:auto;margin-top:2rem;margin-bottom:2rem}
- .log{padding-left:10px;padding-right:10px;color:var(--text-color)}
- input{background-color:var(--prompt-bg-color);color:var(--text-color);width:90%}
- #input{padding-left:20px;padding-right:10px;color:var(--text-color)}
+ input{background-color:var(--prompt-bg-color);color:var(--input-color);width:90%}
+ #input{padding-left:20px;padding-right:10px;color:var(--input-color)}
#input p{display:inline-block}
- div.container{width:calc(100% - 6rem);max-width:1000px;margin:0 auto;color:#d6dce8;background-color:#373e4d;border-radius:0;box-shadow:#2c4948 12px 12px 0,#2a4549 24px 24px 0,#29414a 36px 36px 0,#273d4b 48px 48px 0,#25394c 60px 60px 0;border:.125rem solid #579190;overflow:hidden}
+ div.container{width:calc(100% - 6rem);max-width:1000px;margin:0 auto;color:var(--text-color);background-color:#373e4d;border-radius:0;box-shadow:#2c4948 12px 12px 0,#2a4549 24px 24px 0,#29414a 36px 36px 0,#273d4b 48px 48px 0,#25394c 60px 60px 0;border:.125rem solid #579190;overflow:hidden}
#bookmarks{list-style-type:none;padding:0;margin:0}
#bookmarks li{margin:5px 15px 5px 0;float:left}
- #bookmarks li a{color:#d6dce8;padding:6px;text-decoration:none}
+ #bookmarks li a{color:var(--text-color);padding:6px;text-decoration:none}
#bookmarks li a:hover:not(.header):hover{text-decoration:underline}
div#bookmark-filter{width:56vw;margin:auto;position:relative;max-height:16rem;overflow:hidden;position:relative}
- div#bookmark-filter:before{content:'';width:100%;height:100%;position:absolute;background:linear-gradient(to bottom,transparent,var(--main-bg-color));pointer-events:none}
- div#introduction p{width:56vw;margin:auto;color:#d6dce8;margin-top:10%}
+ div#bookmark-filter:before{content:'';width:100%;height:16rem;position:absolute;background:linear-gradient(to bottom,transparent,var(--main-bg-color));pointer-events:none;}
+ div#introduction p{width:56vw;margin:auto;color:var(--text-color);margin-top:10%}
</style>
</head>
<body>
@@ -126,7 +125,7 @@
function filter_bookmarks(){var e,t,n,a;for(e=document.getElementById("input_source").value.toUpperCase(),t=document.getElementById("bookmarks").getElementsByTagName("li"),a=0;a<t.length;a++)((n=t[a].getElementsByTagName("a")[0]).textContent||n.innerText).toUpperCase().indexOf(e)>-1?t[a].style.display="":t[a].style.display="none"}
// functions
var current_block;function new_block()
- {(current_block=document.createElement("div")).classList.add("log")}
+ {(current_block=document.createElement("div"))}
function block_log(e,n=!1){new_block()}
function handleKeyUp(){13===event.keyCode&&submit_command(),38===event.keyCode&&last_command()}
function submit_command(){var e=document.getElementById("input_source").value