diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2020-04-23 13:14:45 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2020-04-23 13:14:45 +0200 |
| commit | f0ab244a726e2a5be413a343829ae891a42203f4 (patch) | |
| tree | e3d72b974b1e14ed74efa0a544ce112ff66fcebc | |
| parent | f3db5473b38d010a774c5e1af0f63ceab70371db (diff) | |
Add home-term theme.
| -rw-r--r-- | bcst/themes/home-term/css/style.css | 124 | ||||
| -rw-r--r-- | bcst/themes/home-term/fonts/roboto-mono-medium.ttf | bin | 0 -> 109292 bytes | |||
| -rw-r--r-- | bcst/themes/home-term/index.html | 52 | ||||
| -rw-r--r-- | bcst/themes/home-term/resources.json | 22 | ||||
| -rw-r--r-- | bcst/themes/home-term/script/script.js | 35 | ||||
| -rw-r--r-- | gallery/README.md | 7 | ||||
| -rw-r--r-- | gallery/home-term.jpg | bin | 0 -> 32174 bytes |
7 files changed, 240 insertions, 0 deletions
diff --git a/bcst/themes/home-term/css/style.css b/bcst/themes/home-term/css/style.css new file mode 100644 index 0000000..b6a9790 --- /dev/null +++ b/bcst/themes/home-term/css/style.css @@ -0,0 +1,124 @@ +@font-face { + font-family: "Roboto Mono"; + src: url("../fonts/roboto-mono-medium.ttf"); +} + +:root { + --font: "Roboto Mono"; + --background: #0f0e17; + --foreground: #fffffe; + --pink: #e53170; + --red: #f25f4c; + --orange: #ff8906; + --branch: 1px solid #a7a9be; +} + +html { + font-size: 18px; + overflow: hidden; +} + +body { + background: var(--background); + width: 100vw; + height: 100vh; + margin: 0; + display: flex; + justify-content: center; + align-items: center; +} + +.prompt { + font-family: var(--font); + color: var(--foreground); +} + +.prompt~.prompt { + padding: 1.5rem 0 0.3125rem; +} + +span { + color: var(--pink); +} + +h1 { + display: inline; + font-family: var(--font); + font-size: 1rem; + font-weight: normal; + color: var(--red); + cursor: pointer; +} + +.tree > ul { + margin: 0; + padding-left: 1rem; +} + +ul { + list-style: none; + padding-left: 2.5rem; +} + +li { + position: relative; +} + +li.hideChildren > ul { + display: none; +} + +li::before, li::after { + content: ""; + position: absolute; + left: -0.75rem; +} + +li::before { + border-top: var(--branch); + top: 0.75rem; + width: 0.5rem; +} + +li::after { + border-left: var(--branch); + height: 100%; + top: 0.25rem; +} + +li:last-child::after { + height: 0.5rem; +} + +a { + font-family: var(--font); + font-size: 1rem; + color: var(--foreground); + text-decoration: none; + outline: none; +} + +a:hover, +a:focus { + color: var(--background); + background: var(--orange); +} + +form h1 { + padding-left: 0.125rem; +} + +/* you can fill the texarea above/below? the Viewport */ +#search { + font-family: var(--font); + font-size: 1rem; + color: var(--foreground); + background-color: var(--background); + border: none; + outline: none; + position: absolute; + width: 50vw; + height: 50vh; + word-break: break-all; + resize:none; +} diff --git a/bcst/themes/home-term/fonts/roboto-mono-medium.ttf b/bcst/themes/home-term/fonts/roboto-mono-medium.ttf Binary files differnew file mode 100644 index 0000000..c496725 --- /dev/null +++ b/bcst/themes/home-term/fonts/roboto-mono-medium.ttf diff --git a/bcst/themes/home-term/index.html b/bcst/themes/home-term/index.html new file mode 100644 index 0000000..7624368 --- /dev/null +++ b/bcst/themes/home-term/index.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="UTF-8"> + <link rel="stylesheet" type="text/css" href="css/style.css"> + <title>{{title}}</title> + </head> + <body> + <main> + <div class="prompt">[<span data-Name>user</span>@<span>home</span> ~]$ tree</div> + <div class="tree"> + <h1>.</h1> + <ul id="list"> + <li><h1>[error]</h1></li> + </ul> + </div> + <div class="prompt">[<span data-Name>user</span>@<span>home</span> ~]$ ddg</div> + + <form action="https://duckduckgo.com/" method="GET" autocomplete="off"> + <h1>{{ search_msg }}</h1> + <textarea type="text" name="q" id="search" wrap="hard" autofocus></textarea> + </form> + </main> + </body> +</html> + +<script type="text/javascript"> +const Config = { + name: "{{name}}", + scale: 1, + Links: [ + {% for key, value in bookmarks.items() %} + [ + "{{key}}", + [ + {% for link_name, url in value.items() %} + ["{{link_name}}", "{{url}}"] + {% if not loop.last %} + , + {% endif %} + {% endfor %} + ] + ] + {% if not loop.last %} + , + {% endif %} + {% endfor %} + ] +} +</script> + +<script src="script/script.js"></script> diff --git a/bcst/themes/home-term/resources.json b/bcst/themes/home-term/resources.json new file mode 100644 index 0000000..64f71d3 --- /dev/null +++ b/bcst/themes/home-term/resources.json @@ -0,0 +1,22 @@ +{ + "title": "Home", + "name": "user", + "bookmarks": { + "engines": { + "Qwant": "https://www.qwant.com/", + "DDG": "https://duckduckgo.com/", + "Google": "http://google.fr" + }, + "Reddit": { + "Home": "https://www.reddit.com/", + "Unixporn": "https://www.reddit.com/r/Unixporn", + "Linux": "https://www.reddit.com/me/m/linux" + }, + "Social": { + "Discord": "https://discordapp.com/channels/@me", + "Twitter": "https://twitter.com/", + "LinuxRocks": "https://linuxrocks.online/web/getting-started" + } + }, + "search_msg":"search: " +} diff --git a/bcst/themes/home-term/script/script.js b/bcst/themes/home-term/script/script.js new file mode 100644 index 0000000..b3e8bc8 --- /dev/null +++ b/bcst/themes/home-term/script/script.js @@ -0,0 +1,35 @@ + +const Main = (() => { + const list = document.getElementById("list"); + const names = document.querySelectorAll("[data-Name]"); + const search = document.getElementById("search"); + const form = document.forms[0]; + + const init = () => { + list.innerHTML = Config.Links.map(([gName, Links]) => ` + <li> + <h1 onclick="this.parentNode.classList.toggle('hideChildren')">${gName}</h1> + <ul> + ${Links.map(([lName, url]) => ` + <li> + <a href="${url}">${lName}</a> + </li>` + ).join("")} + </ul> + </li>` + ).join("") + + names.forEach(el => { + el.innerText = Config.name; + }); + + document.addEventListener("keydown", e => e.key.length === 1 && search.focus()); + search.addEventListener("keydown", () => (window.event ? event.keyCode : e.which) == 13 && form.submit()); + }; + + return { + init, + }; +})(); + +Main.init() diff --git a/gallery/README.md b/gallery/README.md index 0dc6778..215911b 100644 --- a/gallery/README.md +++ b/gallery/README.md @@ -12,6 +12,13 @@ - Author: hungry-hobo - Url: https://github.com/Hungry-Hobo/Homepage +### home-term + +*Description*: +- Author: Nytly, Teiem +- Url Nytly: https://notabug.org/nytly/home +- Url Teiem: https://github.com/Teiem/homeFork/tree/gh-pages + ### qhungg  *Description*: diff --git a/gallery/home-term.jpg b/gallery/home-term.jpg Binary files differnew file mode 100644 index 0000000..26a063d --- /dev/null +++ b/gallery/home-term.jpg |
