diff --git a/CSS/startpage.css b/CSS/startpage.css new file mode 100644 index 0000000..25c76d1 --- /dev/null +++ b/CSS/startpage.css @@ -0,0 +1,188 @@ +@charset "utf-8"; +/* CSS Document */ + +@font-face { + font-family: 'WorkSans-SemiBold'; + src: url("../fonts/WorkSans-SemiBold.ttf"); +} + +@font-face { + font-family: 'SpaceMono-Bold'; + src: url("../fonts/SpaceMono-Bold.ttf"); +} + +@font-face { + font-family: 'SpaceMono-Regular'; + src: url("../fonts/SpaceMono-Regular.ttf"); +} + +header { + color: #757575; + font-family: 'SpaceMono-Bold'; + font-size: 50px; + -webkit-text-fill-color: #757575; + z-index:1; +} + +p1 { + font-family: 'SpaceMono-Regular'; + -webkit-text-fill-color: #757575; + font-size: 17px; + z-index:1; +} + +p2 { + font-family: 'SpaceMono-Regular'; + -webkit-text-fill-color: #757575; + font-size: 12px; + z-index:1; +} + +form { + background-color: #363636; + width: 25%; + height: 35px; + border-radius: 5px; + display: flex; + flex-direction: row; + align-items: center; + margin: 0 auto; +} + +input { + background-color: unset; + font: 16px 'SpaceMono-regular'; + color: #fff; + height: 100%; + width: 100%; + padding: 6px 10px; + border-top-style: hidden; + border-right-style: hidden; + border-left-style: hidden; + border-bottom-style: hidden; +} + +::placeholder { + color: #757575; + opacity: 0.7; +} + +svg { + color: #fff; + fill: currentColor; + width: 24px; + height: 24px; + padding: 10px; +} + +button { + all: unset; + cursor: pointer; + width: auto; + height: 10px; +} + +input { + color: #B5B5B5; +} + +.buttontext { + color: #757575; + font-family: 'SpaceMono-regular'; +} + +.button { + border: none; + background: none; + color: #757575; + padding: 10px; + font-size: 12px; + align-content: center; + text-align: center; + font-family: 'SpaceMono-regular'; +} + +.button:hover { + border: none; + background: none; + color: #B5B5B5; + padding: 10px; + font-size: 12px; + align-content: center; + text-align: center; + font-family: 'SpaceMono-regular'; +} + +.button[id = "twitch"]:hover{ + border: none; + background: none; + color: #b48ead; + padding: 10px; + font-size: 12px; + align-content: center; + text-align: center; + font-family: 'SpaceMono-regular'; +} + +.button[id = "youtube"]:hover{ + border: none; + background: none; + color: #bf616a; + padding: 10px; + font-size: 12px; + align-content: center; + text-align: center; + font-family: 'SpaceMono-regular'; +} + +.button[id = "twitter"]:hover{ + border: none; + background: none; + color: #81a1c1; + padding: 10px; + font-size: 12px; + align-content: center; + text-align: center; + font-family: 'SpaceMono-regular'; +} + +a {color: inherit; } + +.outer { + display: table; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; +} + +.middle { + display: table-cell; + vertical-align: middle; +} + +.inner { + margin-left: auto; + margin-right: auto; + width: auto; + justify-content: center; + text-align: center; + /*whatever width you want*/ +} + +#clock { + width: 100%; + font-size: 60px; + text-align: center; + font-family: 'WorkSans-SemiBold'; + color: #757575; + padding: 20px; +} + +#footer { + position: fixed ; + left: 0 ; + bottom: 0 ; + z-index:0; +} diff --git a/JS/script.js b/JS/script.js new file mode 100644 index 0000000..5dc8172 --- /dev/null +++ b/JS/script.js @@ -0,0 +1,27 @@ +// JavaScript Document + +// Real Time Clock (not yet working) +function realTimeClock() { + + var clock = new Date(); + + var hours = clock.getHours(); + var minutes = clock.getMinutes(); + var seconds = clock.getSeconds(); + + // am or pm? + var tod = ( hours < 12 ) ? "am" : "pm"; + + // convert to 12 hour format + hours = ( hours > 12 ) ? hours - 12: hours; + + // padding to make it look a bit nicer + hours = ("0" + hours).slice(-2); + minutes = ("0" + minutes).slice(-2); + seconds = ("0" + seconds).slice(-2); + + // actually show the clock + document.getElementById('clock').innerHTML = hours + " : " + minutes; + document.getElementById('ampm').innerHTML = tod; + var t = setTimeout( realTimeClock, 500 ); +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..e1de808 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Minimal Startpage + So here's my startpage! It's pretty simple but I like it that way! + I was aiming for a more functional and non-flashy site, and I think it turned out just fine! + + ![image](https://user-images.githubusercontent.com/17168770/117563325-f55ca700-b059-11eb-887f-d9cbb1aef117.png) + + + As far as hosting it goes, you can run it locally from the html file, or get it hosted by something like GitHub Pages or a Raspberry Pi! + + I'll probably update it every once in a while if I feel like adding more features or fixing bugs, but for now I think it'll be just fine. If you have any issues with it feel free to let me know and I'll see how I can help! + + Anyways, thanks for taking a look- I hope it helps you get a bit more organized! + -Simon diff --git a/bookmark.png b/bookmark.png deleted file mode 100644 index fd3ec04..0000000 Binary files a/bookmark.png and /dev/null differ diff --git a/css/sidebar.css b/css/sidebar.css deleted file mode 100644 index 1501f7c..0000000 --- a/css/sidebar.css +++ /dev/null @@ -1,171 +0,0 @@ -.sidebar-wrapper { - position: fixed; - display: flex; - flex-direction: column; - align-items: center; - height: 100%; - right: -300px; - transition: box-shadow 1s, right .6s ease-in-out; - z-index: 2; -} - -.sidebar { - width: 300px; - height: 100%; - padding: 20px; - background: var(--background); - overflow: auto; -} - -.show-sidebar { - right: 0; - box-shadow: 0px 0px 20px 2px rgba(0, 0, 0, 0.4); -} - -.sidebar__settings { - display: flex; - flex-direction: column; - color: var(--foreground); - width: 100%; - padding-bottom: 25px; -} - -.sidebar h4 {font-size: 13px;} - -.sidebar h3 { - font-size: 15px; - padding-bottom: 10px; - margin-bottom: 10px; - border-bottom: 2px solid var(--accent); -} - -.sidebar__input { - width: 100%; - border-color: transparent; - margin: 5px 0 20px 0; -} - -.sidebar__input:hover {border: 2px solid var(--accent);} - -.sidebar__input:focus { - color: var(--accent); - border: 2px solid var(--accent); -} - -.sidebar__input:focus::placeholder { - color: var(--accent); - transition: .3s; -} - -.sidebar__button-container { - display: flex; - flex-direction: row; - justify-content: space-between; -} - -.sidebar__button { - outline: none; - border: none; - background-color: var(--accent); - color: white; - cursor: pointer; - width: 60px; - padding: 7px 5px; - border-radius: 3px; - transition: .3s; -} - -.sidebar__button:hover { - filter: brightness(.75); - box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, .4); - transform: translateY(-2px); -} - -.sidebar__button:active {transform: translateY(0px);} - -.sidebar__radio { - display: flex; - flex-direction: row; -} - -.control { - display: flex; - align-items: center; - justify-content: center; - position: relative; - font-weight: bold; - padding-left: 25px; - margin: 0 20px 20px 0; - cursor: pointer; -} - -.control input { - position: absolute; - z-index: -1; - opacity: 0; -} - -.control__indicator { - position: absolute; - left: 0; - height: 20px; - width: 20px; - background: var(--input); - transition: .3s; -} - -.control:hover input ~ .control__indicator, -.control input:checked ~ .control__indicator, -.control input:focus ~ .control__indicator {background: var(--accent);} - -.control__indicator::after { - box-sizing: unset; - content: ''; - position: absolute; - display: none; -} - -.control input:checked ~ .control__indicator::after {display: block;} - -.control-radio .control__indicator { - border-radius: 50%; -} - -.control-radio .control__indicator::after { - left: 7px; - top: 7px; - height: 6px; - width: 6px; - border-radius: 50%; - background: #ffffff; -} - -input[type="color"] { - background: var(--input); - border: 2px solid transparent; - outline: none; - width: 100%; - height: 40px; - transition: .3s; - margin: 5px 0 20px 0; - border-radius: 3px; - cursor: pointer; -} - -input[type="color"]:hover, -input[type="color"]:focus {border: 2px solid var(--accent);} - -input[type="color"]::-webkit-color-swatch-wrapper { - padding: 5px 5px; -} - -input[type="color"]::-webkit-color-swatch { - border: none; - border-radius: 3px; - box-shadow: 0px 1px 5px rgba(0, 0, 0, .5); -} - -input[type=color]::-moz-color-swatch { - border: none; - border-radius: 3px; -} \ No newline at end of file diff --git a/css/style.css b/css/style.css deleted file mode 100644 index 510e5fe..0000000 --- a/css/style.css +++ /dev/null @@ -1,286 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Roboto&family=Ubuntu&family=IBM+Plex+Mono&display=swap'); -@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css'); -@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css'); - -@import url('../css/sidebar.css'); - -:root { - --ubuntu: 'Ubuntu', sans-serif; - --roboto: 'Roboto', sans-serif; - --ibm-mono: 'IBM Plex Mono', monospace; - - --inactive-icon: #BDBDBD; - --theme-icon: #ffd37b; - --header-icon: #7ebebd; - --menu-icon: #dd7c85; -} - -[theme="light"] { - --background: #1d2021; - --foreground: #91949c; - --accent: #81A1C1; - --input: #212125; -} - -[theme="dark"] { - --background: #1d2021; - --foreground: #91949c; - --accent: #81A1C1; - --input: #212125; -} - -* { - font-family: var(--ubuntu); - box-sizing: border-box; - margin: 0px; -} - -body { - background: var(--background); - display: flex; - align-items: center; - justify-content: center; - margin: 0 60px; - height: 100vh; - overflow: hidden; - font-size: 16px; - transition: all .5s, background-color .8s; -} - -.container { - display: grid; - grid-template-rows: 1fr auto 1fr; -} - -.main { - display: flex; - align-items: center; - justify-content: center; - flex-direction: row; - flex-wrap: wrap; - z-index: 1; -} - -a { - color: var(--foreground); - display: flex; - align-items: center; - justify-content: center; - width: 50px; - height: 50px; - margin: 25px; - font-size: 50px; - text-decoration: none; - transition: .5s; -} - -.big-icons { - margin: 40px; - font-size: 65px; -} - -.small-icons { - margin: 20px; - font-size: 35px; -} - -.main a:hover { - color: var(--accent); - transform: scale(1.2); - transition: .3s; -} - -.header { - position: relative; - align-self: end; - text-align: center; - color: var(--foreground); - font-size: 18px; - font-weight: bold; - letter-spacing: 1px; - transition: all .2s, margin .5s ease; -} - -.header::after { - content: ''; - position: absolute; - width: 444px; - height: 2px; - bottom: 0; - left: 50%; - background: var(--accent); - margin: 0px 0px 0px -222px; - opacity: .5; - border-radius: 10px; - z-index: -1; -} - -.header__weather, -.header__greeting { - margin-bottom: 25px; - transition: opacity .5s ease; -} - -.hide-header-elements { - opacity: 0; - transition: opacity 0s; -} - -.header__greeting-name, -.header__weather-temp {color: var(--accent);} - -.search-form { - position: absolute; - bottom: -33px; - left: 50%; - opacity: 0; - display: flex; - flex-direction: row; - justify-content: center; - width: 450px; - margin: 0px 0px 0px -225px; - transition: opacity .2s ease-out; -} - -.show-search { - opacity: 1; - transition: opacity .5s ease-in; -} - -.search-form__input { - border: 2px solid transparent; - width: 100%; -} - -.search-form__input:hover, -.search-form__input:focus { - border: 2px solid var(--accent); -} - -.search-form__button { - position: absolute; - top: 0; - right: 0; - background: transparent; - color: var(--foreground); - width: 35px; - height: 35px; - outline: none; - border: 2px solid transparent; - border-radius: 0px 3px 3px 0px; - cursor: pointer; - transition: .3s; -} - -.search-form__button:hover { - background: var(--accent); - color: var(--background); -} - -@media screen and (max-width: 600px) { - .header h1{ - font-size: 30px; - } - - a { - width: 40px; - height: 40px; - margin: 20px; - font-size: 40px; - } - - .big { - margin: 30px; - font-size: 55px; - } - - .header::after { - width: 344px; - margin: 0px 0px 0px -172px; - } - - .search-form { - width: 350px; - margin: 0px 0px 0px -175px; - } -} - -.buttons { - position: absolute; - display: flex; - flex-direction: column; - top: 15px; - left: -45px; - -} - -.btn_theme, -.btn_header, -.btn_menu {padding: 5px 0;} - -.btn_theme {transform: rotate(-25deg);} - -#chb_theme, -#chb_header, -#chb_menu {display: none;} - -#chb_theme + label::before, -#chb_theme + label:hover::before, -#chb_theme:checked + label::before, -#chb_theme:checked + label:hover::before, -#chb_header + label::before, -#chb_header + label:hover::before, -#chb_header:checked + label::before, -#chb_header:checked + label:hover::before, -#chb_menu + label::before, -#chb_menu + label:hover::before, -#chb_menu:checked + label::before, -#chb_menu:checked + label:hover::before { - font-family: 'Font Awesome 5 Free'; - font-weight: 900; - font-size: 22px; - cursor: pointer; - transition: .2s; -} - -#chb_theme + label::before, -#chb_theme + label:hover::before, -#chb_theme:checked + label::before, -#chb_theme:checked + label:hover::before {font-size: 20px;} - -#chb_theme + label::before {content: "\f186";} - -#chb_header + label::before {content: "\f05a";} - -#chb_menu + label::before {content: "\f013";} - -#chb_theme + label::before, -#chb_header + label::before, -#chb_menu + label::before {color: var(--inactive-icon);} - -#chb_theme:checked + label::before, -#chb_theme:checked + label:hover::before {color: var(--theme-icon);} - -#chb_header:checked + label::before, -#chb_header:checked + label:hover::before {color: var(--header-icon);} - -#chb_menu:checked + label::before, -#chb_menu:checked + label:hover::before {color: var(--menu-icon);} - -#chb_theme + label:hover::before, -#chb_header + label:hover::before, -#chb_menu + label:hover::before, -#chb_theme:checked + label:hover::before, -#chb_header:checked + label:hover::before, -#chb_menu:checked + label:hover::before {filter: brightness(.8);} - -input[type=text] { - height: 35px; - outline: none; - text-align: center; - font-weight: bold; - background: var(--input); - color: var(--foreground); - border-radius: 3px; - transition: .3s; -} diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..0a1d4a0 Binary files /dev/null and b/favicon.ico differ diff --git a/fonts/SpaceMono-Bold.ttf b/fonts/SpaceMono-Bold.ttf new file mode 100644 index 0000000..4acd36a Binary files /dev/null and b/fonts/SpaceMono-Bold.ttf differ diff --git a/fonts/SpaceMono-Regular.ttf b/fonts/SpaceMono-Regular.ttf new file mode 100644 index 0000000..28d7ff7 Binary files /dev/null and b/fonts/SpaceMono-Regular.ttf differ diff --git a/fonts/WorkSans-Regular.ttf b/fonts/WorkSans-Regular.ttf new file mode 100644 index 0000000..ba11a2d Binary files /dev/null and b/fonts/WorkSans-Regular.ttf differ diff --git a/fonts/WorkSans-SemiBold.ttf b/fonts/WorkSans-SemiBold.ttf new file mode 100644 index 0000000..5cefd7c Binary files /dev/null and b/fonts/WorkSans-SemiBold.ttf differ diff --git a/index.html b/index.html index d4d620d..34a0bc8 100644 --- a/index.html +++ b/index.html @@ -1,134 +1,59 @@ - - - - - Welcome Javier! - - - - - - - - -
-
-

Howdy, Javier Pacheco.

-
-

-

-
-
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - + + + + + [ startpage - javier@venom ] + + + + + + + +
+
+
+
+ + +

+ +
+
+

+ [jpacheco] + [disroot] + [github] + [gitlab] + [mail] +

+

+ [autoliv] + [partview] + [ed] +

+

+ [Telegram] + [youtube] +

+
+
+
+
+
+ + diff --git a/js/greeting.js b/js/greeting.js deleted file mode 100644 index 1c38014..0000000 --- a/js/greeting.js +++ /dev/null @@ -1,50 +0,0 @@ -let greeting = document.querySelector('.header__greeting'); -let buttonApplyName = document.getElementById('name_apply'); -let nameInput = document.getElementById('greeting_name'); - -// Greetings -const night = 'Good night'; -const morning = 'Good morning'; -const afternoon = 'Good afternoon'; -const evening = 'Good evening'; - -// Name -if (localStorage.getItem('name') !== null) { - let name = localStorage.getItem('name'); - let greetingName = `${name}.`; - setGreeting(greetingName); - nameInput.placeholder = name; -} else { - let name = 'Javier Pacheco'; - let greetingName = `${name}.` - setGreeting(greetingName); - nameInput.placeholder = name; -} - -buttonApplyName.onclick = () => { - if (nameInput.value !== '') { - let greetingName = `${nameInput.value}.`; - setGreeting(greetingName); - - localStorage.setItem('name', nameInput.value); - - nameInput.placeholder = nameInput.value; - nameInput.value = ''; - nameInput.blur(); - } -}; - -// Hours of the greetings -function setGreeting(greetingName) { - let hour = new Date().getHours(); - - if (hour >= 23 || hour < 6) { - greeting.innerHTML = `${night}, ${greetingName}`; - } else if (hour >= 6 && hour < 12) { - greeting.innerHTML = `${morning}, ${greetingName}`; - } else if (hour >= 12 && hour < 17) { - greeting.innerHTML = `${afternoon}, ${greetingName}`; - } else { - greeting.innerHTML = `${evening}, ${greetingName}`; - } -} diff --git a/js/header.js b/js/header.js deleted file mode 100644 index 4f39e00..0000000 --- a/js/header.js +++ /dev/null @@ -1,78 +0,0 @@ -let buttonHeader = document.getElementById('chb_header'); -let header = document.querySelector('.header'); -let headerWeather = document.querySelector('.header__weather'); -let headerGreeting = document.querySelector('.header__greeting'); -let icons = document.querySelectorAll('.main a'); - -localStorage.getItem('header') === 'shown' || localStorage.getItem('header') === null ? showHeader() : hideHeader(); - -buttonHeader.onclick = () => buttonHeader.checked ? showHeader() : hideHeader(); - -function showHeader() { - buttonHeader.checked = true; - localStorage.setItem('header', 'shown'); - - for (let e of icons) { - e.classList.remove('big-icons'); - } - - header.style.opacity = '.75'; - header.style.zIndex = '1'; - headerWeather.classList.remove('hide-header-elements'); - headerGreeting.classList.remove('hide-header-elements'); -} - -function hideHeader() { - buttonHeader.checked = false; - localStorage.setItem('header', 'hidden'); - - for (let e of icons) { - e.classList.add('big-icons'); - } - - header.style.opacity = '0'; - header.style.zIndex = '-1'; -} - -document.addEventListener('keyup', (event) => { - let header = document.querySelector('.header'); - let sidebar = document.querySelector('.sidebar-wrapper'); - let searchForm = document.querySelector('.search-form'); - let searchInput = document.querySelector('.search-form__input'); - - if (searchInput !== document.activeElement && - event.keyCode >= 65 && - event.keyCode <= 90 && - !sidebar.classList.contains('show-sidebar')) { - if (buttonHeader.checked === false) { - header.style.opacity = '.75'; - header.style.zIndex = '1'; - headerWeather.classList.add('hide-header-elements'); - headerGreeting.classList.add('hide-header-elements'); - - for (let e of icons) { - e.classList.remove('big-icons'); - } - } - - header.style.marginBottom = '35px'; - searchForm.classList.add('show-search'); - searchInput.focus(); - searchInput.value = event.key; - } - - if (event.code === 'Escape') { - if (buttonHeader.checked === false) { - header.style.opacity = '0'; - - for (let e of icons) { - e.classList.add('big-icons'); - } - } - - header.style.marginBottom = ''; - searchForm.classList.remove('show-search'); - searchInput.value = ''; - searchInput.blur(); - } -}); \ No newline at end of file diff --git a/js/menu.js b/js/menu.js deleted file mode 100644 index 0bd6821..0000000 --- a/js/menu.js +++ /dev/null @@ -1,5 +0,0 @@ -let buttonSidebar = document.querySelector('.btn_menu'); -buttonSidebar.onclick = () => { - let sidebar = document.querySelector('.sidebar-wrapper'); - sidebar.classList.toggle('show-sidebar'); -}; \ No newline at end of file diff --git a/js/script.js b/js/script.js deleted file mode 100644 index 5d360c7..0000000 --- a/js/script.js +++ /dev/null @@ -1,299 +0,0 @@ -/* based on chromium plugin code, adapted by Nibble<.gs@gmail.com> */ -var hint_num_str = ''; -var hint_elems = []; -var hint_open_in_new_tab = false; -var hint_enabled = false; -function hintMode(newtab){ - hint_enabled = true; - if (newtab) { - hint_open_in_new_tab = true; - } else { - hint_open_in_new_tab = false; - } - setHints(); - document.removeEventListener('keydown', initKeyBind, false); - document.addEventListener('keydown', hintHandler, false); - hint_num_str = ''; -} -function hintHandler(e){ - e.preventDefault(); //Stop Default Event - var pressedKey = get_key(e); - if (pressedKey == 'Enter') { - if (hint_num_str == '') - hint_num_str = '1'; - judgeHintNum(Number(hint_num_str)); - } else if (/[0-9]/.test(pressedKey) == false) { - removeHints(); - } else { - hint_num_str += pressedKey; - var hint_num = Number(hint_num_str); - if (hint_num * 10 > hint_elems.length + 1) { - judgeHintNum(hint_num); - } else { - var hint_elem = hint_elems[hint_num - 1]; - if (hint_elem != undefined && hint_elem.tagName.toLowerCase() == 'a') { - setHighlight(hint_elem, true); - } - } - } -} -function setHighlight(elem, is_active) { - if (is_active) { - var active_elem = document.body.querySelector('a[highlight=hint_active]'); - if (active_elem != undefined) - active_elem.setAttribute('highlight', 'hint_elem'); - elem.setAttribute('highlight', 'hint_active'); - } else { - elem.setAttribute('highlight', 'hint_elem'); - } -} -function setHintRules() { - if (document.styleSheets.length < 1) { - var style = document.createElement("style"); - style.appendChild(document.createTextNode("")); - document.head.appendChild(style); - } - var ss = document.styleSheets[0]; - ss.insertRule('a[highlight=hint_elem] {background-color: NULL}', 0); - ss.insertRule('a[highlight=hint_active] {background-color: NULL}', 0); -} -function deleteHintRules() { - var ss = document.styleSheets[0]; - ss.deleteRule(0); - ss.deleteRule(0); -} -function judgeHintNum(hint_num) { - var hint_elem = hint_elems[hint_num - 1]; - if (hint_elem != undefined) { - execSelect(hint_elem); - } else { - removeHints(); - } -} -function execSelect(elem) { - var tag_name = elem.tagName.toLowerCase(); - var type = elem.type ? elem.type.toLowerCase() : ""; - if (tag_name == 'a' && elem.href != '') { - setHighlight(elem, true); - // TODO: ajax,