Skip to content
Snippets Groups Projects
Unverified Commit de955241 authored by Conrad Zelck's avatar Conrad Zelck
Browse files

fix: use shared header styles


Signed-off-by: default avatarConrad Zelck <git@simpel.cc>
parent ec418a6e
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
<head>
<?php include dirname($_SERVER['DOCUMENT_ROOT']) . "/simpel.cc/php/head.php"; ?>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="style.min.css">
</head>
<body onKeyDown="keys(event,'d')" onKeyUp="keys(event,'u')">
......@@ -35,6 +35,6 @@
<textarea id="textarea" autofocus placeholder="fill in lines to sort here …" spellcheck="false" autocomplete="off"></textarea>
</main>
</body>
<script src="script.js"></script>
<script src="script.min.js"></script>
</html>
var button_pastesortunique,button_sortunique,textarea;function natural_compare(e,t){var n=[],o=[];for(e.replace(/(\d+)|(\D+)/g,(function(e,t,o){n.push([t||1/0,o||""])})),t.replace(/(\d+)|(\D+)/g,(function(e,t,n){o.push([t||1/0,n||""])}));n.length>0&&o.length>0;){var a,r,u;if(a=n.shift(),r=o.shift(),0!==(u=a[0]-r[0]||a[1].localeCompare(r[1])))return u}return n.length-o.length}function sort_and_copy(e){var t,n=textarea.value.replace(/[\r\n]+/gm,"\n").split("\n"),o={};let a=document.querySelector("#unique");if(a.checked){for(t=0;t<n.length;t++)o[n[t]]="";n=Object.keys(o)}n=n.sort(natural_compare),a.checked&&""==n[0]&&(n=n.slice(1)),textarea.value=n.join("\n"),window.getSelection().removeAllRanges();try{textarea.select(),document.execCommand("copy")}catch(e){}window.getSelection().removeAllRanges(),textarea.selectionStart=0,textarea.selectionEnd=0,textarea.focus()}function paste(){navigator.clipboard.readText().then((e=>{textarea.value=e,sort_and_copy()}))}function keys(e,t){"1"==e.key&&"d"==t&&paste(),"2"==e.key&&"d"==t&&sort_and_copy()}button_pastesortunique=document.querySelector("body > main > div > button.button.pastesortunique"),button_sortunique=document.querySelector("body > main > div > button.button.sortunique"),textarea=document.querySelector("body > main > textarea");
\ No newline at end of file
body {
min-height: 50vh;
font-family: helvetica, Arial, sans-serif;
font-size: 2vmin;
background-color: #555;
color: white;
margin: 3vmin 4vmin 2vmin 4vmin;
}
/* iPad portait */
@media (max-width: 768px) {
body {
font-size: 3vmin;
}
}
/* iPhone landscape only */
@media (max-width: 568px) {
body {
font-size: 4vmin;
}
}
/* iPhone portait only */
@media (max-width: 320px) {
body {
font-size: 4vmin;
}
}
*:focus {
outline: 2px solid white;
outline-offset: 2px;
}
a {
color: #ffffff;
text-decoration: none;
font-size: 2em;
}
header {
margin-bottom: 1.5em;
}
nav {
display: flex;
align-items: center;
column-gap: 0.7em;
}
h1 {
font-size: 1.5em;
margin: 0;
}
#github {
margin-left: auto;
}
#github-cat {
height: 1.5em;
main {
font-size: 0.75em;
}
.flex {
display: flex;
flex-wrap: wrap;
column-gap: 1.5rem;
row-gap: 0.5rem;
padding-top: 1.5rem;
padding-bottom: 1.5rem;
column-gap: 1.5em;
row-gap: 0.5em;
padding-top: 1.5em;
padding-bottom: 1.5em;
}
.button {
......@@ -79,7 +28,7 @@ h1 {
}
button {
font-size: 1em;
font-size: inherit;
padding: 5px 10px;
color: white;
border: 2px solid white;
......@@ -91,18 +40,20 @@ button {
}
input[type="checkbox"] {
margin-left: 1vmin;
margin-left: 0;
}
.flexlabel {
display: flex;
column-gap: 0.25em
}
textarea {
font-size: larger;
font-size: 0.92em;
width: 100%;
padding-left: 0;
padding-right: 0;
height: 50vh;
margin-top: 2vmin;
padding: 0.5em;
height: calc(100vh - 6vmin - 13em);
margin-top: 0.5em;
box-sizing: border-box;
resize: none;
}
body{font-size:2em;}header{margin-bottom:1.5em;}main{font-size:.75em;}.flex{display:flex;flex-wrap:wrap;column-gap:1.5em;row-gap:.5em;padding-top:1.5em;padding-bottom:1.5em;}.button{align-self:flex-end;}.between_buttons,input[type="checkbox"],label{align-self:center;}button{font-size:inherit;padding:5px 10px;color:white;border:2px solid white;cursor:pointer;-webkit-border-radius:5px;border-radius:5px;border-color:white;background-color:#333;}input[type="checkbox"]{margin-left:0;}.flexlabel{display:flex;column-gap:.25em}textarea{font-size:.92em;width:100%;padding:.5em;height:calc(100vh - 6vmin - 13em);margin-top:.5em;box-sizing:border-box;resize:none;}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment