Files
start/index.html
2020-07-30 22:11:22 -04:00

155 lines
4.5 KiB
HTML
Executable File

<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Start</title>
<style>
:root {
--background: #ffffff;
--foreground: #000000;
--width: 70ch;
}
* {
font-family: "Work Sans";
font-size: 20px;
}
::selection {
color: var(--background);
background: var(--foreground);
}
html {
background-color: var(--background);
color: var(--foreground);
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
}
.items {
display: grid;
grid-template-columns: 10ch auto;
grid-template-rows: auto auto auto auto;
max-width: var(--width);
width: 100%;
}
.items > div {
margin-bottom: 1ch;
}
.search {
max-width: var(--width);
width: 100%;
margin-bottom: 1ch;
}
.search > input{
width: 100%;
background: var(--background);
color: var(--foreground);
border: solid 2px var(--foreground);
padding: 1ch;
}
.title {
font-weight: 700;
width: 8ch;
}
.link {
margin-right: 1ch;
}
.link a {
text-decoration: none;
color: var(--foreground);
}
.link a:hover {
text-decoration: underline
}
link a:visited {
color: var(--foreground);
}
</style>
</head>
<body>
<div class='container'>
<div class='search'>
<input type='search' name='q' autocomplete='off' autofocus>
</div>
<div class='items'>
<span class='title'>General</span>
<div>
<span class='link'>[<a href="https://tweetdeck.twitter.com">twitter</a>]</span>
<span class='link'>[<a href="https://www.youtube.com">youtube</a>]</span>
<span class='link'>[<a href="https://news.ycombinator.com">hacker_news</a>]</span>
<span class='link'>[<a href="https://lobste.rs">lobsters</a>]</span>
<span class='link'>[<a href="https://web.whatsapp.com">whatsapp</a>]</span>
</div>
<span class='title'>Inacap</span>
<div>
<span class='link'>[<a href="https://www.inacap.cl">home</a>]</span>
<span class='link'>[<a href="https://adfs.inacap.cl/adfs/ls/?wtrealm=https://siga.inacap.cl/sts/&wa=wsignin1.0&wreply=https://siga.inacap.cl/sts/&wctx=https%3a%2f%2fadfs.inacap.cl%2fadfs%2fls%2f%3fwreply%3dhttps%3a%2f%2fwww.inacap.cl%2ftportalvp%2fintranet-alumno%26wtrealm%3dhttps%3a%2f%2fwww.inacap.cl%2f">intranet</a>]</span>
<span class='link'>[<a href="https://www.inacap.cl/tportalvp/procesar_link.php?url=https://lms.inacap.cl/auth/saml2/login.php?wants=https://lms.inacap.cl/my/">aprendizaje</a>]</span>
<span class='link'>[<a href="https://docs.google.com">docs</a>]</span>
</div>
<span class='title'>Reddit</span>
<div>
<span class='link'>[<a href="https://www.reddit.com">frontpage</a>]</span>
<span class='link'>[<a href="https://www.reddit.com/r/unixporn">/r/unixporn</a>]</span>
<span class='link'>[<a href="https://www.reddit.com/r/piracy">/r/piracy</a>]</span>
<span class='link'>[<a href="https://www.reddit.com/r/roms">/r/roms</a>]</span>
<span class='link'>[<a href="https://www.reddit.com/r/chile">/r/chile</a>]</span>
</div>
<span class='title'>4chan</span>
<div>
<span class='link'>[<a href="https://4chan.org/g/catalog">/g/</a>]</span>
<span class='link'>[<a href="https://4chan.org/wg/catalog">/wg/</a>]</span>
<span class='link'>[<a href="https://4chan.org/v/catalog">/v/</a>]</span>
<span class='link'>[<a href="https://4chan.org/x/catalog">/x/</a>]</span>
</div>
</div>
</div>
<script>
document.onkeydown = function(e) {
q = document.getElementsByName('q')[0].value;
if(q.length === 0){
return;
}
if(e.key === 'Enter'){
if(e.ctrlKey) {
window.location.href = 'https://' + q;
} else if(q[0] === '!'){
switch(q.slice(1)) {
case 't': window.location.href = 'https://www.twitter.com'; break;
case 'w': window.location.href = 'https://www.wikipedia.com'; break;
case 'y': window.location.href = 'https://www.youtube.com'; break;
case 'r': window.location.href = 'https://www.reddit.com'; break;
default : window.location.href = 'https://www.duckduckgo.com/?q=' + encodeURIComponent(q); break;
}
} else {
window.location.href = 'https://www.duckduckgo.com/?q=' + encodeURIComponent(q);
}
}
}
</script>
</body>
</html>