├── .github ├── startpage.gif └── startpage.mp4 ├── .gitignore ├── LICENSE ├── README.md ├── config.json ├── css ├── img │ └── jsoneditor-icons.svg ├── jsoneditor.min.css └── main.css ├── fonts ├── woff │ ├── JetBrainsMono-Bold-Italic.woff │ ├── JetBrainsMono-Bold.woff │ ├── JetBrainsMono-ExtraBold-Italic.woff │ ├── JetBrainsMono-ExtraBold.woff │ ├── JetBrainsMono-Italic.woff │ ├── JetBrainsMono-Medium-Italic.woff │ ├── JetBrainsMono-Medium.woff │ └── JetBrainsMono-Regular.woff └── woff2 │ ├── JetBrainsMono-Bold-Italic.woff2 │ ├── JetBrainsMono-Bold.woff2 │ ├── JetBrainsMono-ExtraBold-Italic.woff2 │ ├── JetBrainsMono-ExtraBold.woff2 │ ├── JetBrainsMono-Italic.woff2 │ ├── JetBrainsMono-Medium-Italic.woff2 │ ├── JetBrainsMono-Medium.woff2 │ └── JetBrainsMono-Regular.woff2 ├── img └── icon64.png ├── index.html ├── js ├── autocomplete.js ├── jsoneditor.min.js ├── main.js └── settings.js ├── manifest.json └── scss └── main.scss /.github/startpage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/.github/startpage.gif -------------------------------------------------------------------------------- /.github/startpage.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/.github/startpage.mp4 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | web-ext*/* -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [2020] [Deepjyoti Barman] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | my fork of [this](https://github.com/deepjyoti30/startpage/) start page 2 | 3 | i just changed the color palette to onedark, 4 | you will find the documentations and everything on the original repo 5 | # SCREENSHOTS 6 | 7 | 8 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "squares": [ 3 | { "name": "media", 4 | "color": "#61afef", 5 | "links": [ 6 | { "name": "Spotify", "url": "https://open.spotify.com/" }, 7 | { "name": "YoutubeMusic", "url": "https://music.youtube.com/" }, 8 | { "name": "Netflix", "url": "https://netflix.com" }, 9 | { "name": "Youtube", "url": "https://youtube.com" } 10 | ] 11 | }, 12 | { "name": "work", 13 | "color": "#e06c75", 14 | "links": [ 15 | { "name": "Github", "url": "https://github.com" }, 16 | { "name": "Heroku", "url": "http://heroku.com/" }, 17 | { "name": "localhost", "url": "http://localhost:8000/" } 18 | ] 19 | }, 20 | { "name": "social", 21 | "color": "#e5c07b", 22 | "links": [ 23 | { "name": "Reddit", "url": "https://reddit.com" }, 24 | { "name": "Unixporn Love", "url": "https://deepjyoti30.github.io/unixporn-love/" }, 25 | { "name": "r/unixporn", "url": "https://www.reddit.com/r/unixporn/" }, 26 | { "name": "r/mk", "url": "https://www.reddit.com/r/MechanicalKeyboards/" } 27 | ] 28 | }, 29 | { 30 | "name": "Others", 31 | "color": "#98c379", 32 | "links": [ 33 | {"name": "Material Colors", "url": "http://materialuicolors.co/"}, 34 | {"name": "Gmail", "url": "http://gmail.com/"}, 35 | {"name": "neo4j Local", "url": "http://localhost:7474/"}, 36 | {"name": "rarbg", "url": "http://rarbg.to"} 37 | ] 38 | } 39 | ], 40 | "searchEngine":"Brave", 41 | "user": "Pirate", 42 | "disableMessage": false, 43 | "disableDate": false, 44 | "disableSearchBar": false, 45 | "disable24Hour": true, 46 | "disableWeather": false, 47 | "timeZone": "Africa/Cairo", 48 | "weatherConf": { 49 | "location": "Giza Egypt", 50 | "unit": "cel" 51 | }, 52 | "settingsIcon": false, 53 | "style": { 54 | "backgroundColor": "#282c34", 55 | "messageColor": "#fff", 56 | "dateColor": "#c8ccd4", 57 | "lineColor": "#fff", 58 | "weatherColor": "#c8ccd4", 59 | "searchColor": "#c8ccd4", 60 | "searchBackgroundColor": "#1e222a", 61 | "squareColor": "#abb2bf", 62 | "squareBackgroundColor": "#1e222a", 63 | "autocompleteHighlightBackgroundColor": "#3e4451" 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /css/img/jsoneditor-icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 16 | JSON Editor Icons 18 | 20 | 21 | 23 | image/svg+xml 24 | 26 | JSON Editor Icons 27 | 28 | 29 | 30 | 32 | 56 | 60 | 61 | 62 | 69 | 76 | 83 | 90 | 97 | 100 | 107 | 114 | 115 | 119 | 126 | 133 | 134 | 141 | 148 | 155 | 157 | 164 | 171 | 178 | 179 | 182 | 189 | 196 | 203 | 204 | 211 | 217 | 223 | 230 | 235 | 240 | 247 | 253 | 258 | 265 | 271 | 277 | 284 | 291 | 298 | 305 | 312 | 319 | 326 | 332 | 340 | 346 | 352 | 359 | 367 | 375 | 382 | 389 | 396 | 403 | 410 | 417 | 424 | 431 | 437 | 445 | 451 | 457 | 464 | 472 | 480 | 487 | 494 | 501 | 508 | 515 | 522 | 529 | 536 | 541 | 546 | 551 | 557 | 563 | 568 | 573 | 578 | 583 | 588 | 604 | 621 | 638 | 655 | 661 | 667 | 673 | 679 | 686 | 692 | 695 | 702 | 709 | 716 | 723 | 729 | 730 | 736 | 743 | 749 | 750 | -------------------------------------------------------------------------------- /css/jsoneditor.min.css: -------------------------------------------------------------------------------- 1 | .jsoneditor input,.jsoneditor input:not([type]),.jsoneditor input[type=search],.jsoneditor input[type=text],.jsoneditor-modal input,.jsoneditor-modal input:not([type]),.jsoneditor-modal input[type=search],.jsoneditor-modal input[type=text]{height:auto;border:inherit;box-shadow:none;font-size:inherit;box-sizing:inherit;padding:inherit;font-family:inherit;transition:none;line-height:inherit}.jsoneditor input:focus,.jsoneditor input:not([type]):focus,.jsoneditor input[type=search]:focus,.jsoneditor input[type=text]:focus,.jsoneditor-modal input:focus,.jsoneditor-modal input:not([type]):focus,.jsoneditor-modal input[type=search]:focus,.jsoneditor-modal input[type=text]:focus{border:inherit;box-shadow:inherit}.jsoneditor textarea,.jsoneditor-modal textarea{height:inherit}.jsoneditor select,.jsoneditor-modal select{display:inherit;height:inherit}.jsoneditor label,.jsoneditor-modal label{font-size:inherit;font-weight:inherit;color:inherit}.jsoneditor table,.jsoneditor-modal table{border-collapse:collapse;width:auto}.jsoneditor td,.jsoneditor th,.jsoneditor-modal td,.jsoneditor-modal th{padding:0;display:table-cell;text-align:left;vertical-align:inherit;border-radius:inherit}.jsoneditor .autocomplete.dropdown{position:absolute;background:#fff;box-shadow:2px 2px 12px rgba(128,128,128,.3);border:1px solid #d3d3d3;overflow-x:hidden;overflow-y:auto;cursor:default;margin:0;padding:5px;text-align:left;outline:0;font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif;font-size:10pt}.jsoneditor .autocomplete.dropdown .item{color:#333}.jsoneditor .autocomplete.dropdown .item.hover{background-color:#ddd}.jsoneditor .autocomplete.hint{color:#aaa;top:4px;left:4px}.jsoneditor-contextmenu-root{position:relative;width:0;height:0}.jsoneditor-contextmenu{position:absolute;box-sizing:content-box;z-index:1}.jsoneditor-contextmenu .jsoneditor-menu{position:relative;left:0;top:0;width:128px;height:auto;background:#fff;border:1px solid #d3d3d3;box-shadow:2px 2px 12px rgba(128,128,128,.3);list-style:none;margin:0;padding:0}.jsoneditor-contextmenu .jsoneditor-menu button{position:relative;padding:0 4px 0 0;margin:0;width:128px;height:auto;border:none;cursor:pointer;color:#4d4d4d;background:0 0;font-size:10pt;font-family:arial,sans-serif;box-sizing:border-box;text-align:left}.jsoneditor-contextmenu .jsoneditor-menu button::-moz-focus-inner{padding:0;border:0}.jsoneditor-contextmenu .jsoneditor-menu button.jsoneditor-default{width:96px}.jsoneditor-contextmenu .jsoneditor-menu button.jsoneditor-expand{float:right;width:32px;height:24px;border-left:1px solid #e5e5e5}.jsoneditor-contextmenu .jsoneditor-menu li{overflow:hidden}.jsoneditor-contextmenu .jsoneditor-menu li ul{display:none;position:relative;left:-10px;top:0;border:none;box-shadow:inset 0 0 10px rgba(128,128,128,.5);padding:0 10px;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}.jsoneditor-contextmenu .jsoneditor-menu li ul .jsoneditor-icon{margin-left:24px}.jsoneditor-contextmenu .jsoneditor-menu li ul li button{padding-left:24px;animation:all ease-in-out 1s}.jsoneditor-contextmenu .jsoneditor-menu li button .jsoneditor-expand{position:absolute;top:0;right:0;width:24px;height:24px;padding:0;margin:0 4px 0 0;background:url(img/jsoneditor-icons.svg) 0 -72px}.jsoneditor-contextmenu .jsoneditor-icon{position:absolute;top:0;left:0;width:24px;height:24px;border:none;padding:0;margin:0;background-image:url(img/jsoneditor-icons.svg)}.jsoneditor-contextmenu .jsoneditor-text{padding:4px 0 4px 24px;word-wrap:break-word}.jsoneditor-contextmenu .jsoneditor-text.jsoneditor-right-margin{padding-right:24px}.jsoneditor-contextmenu .jsoneditor-separator{height:0;border-top:1px solid #e5e5e5;padding-top:5px;margin-top:5px}.jsoneditor-contextmenu button.jsoneditor-remove .jsoneditor-icon{background-position:-24px 0}.jsoneditor-contextmenu button.jsoneditor-append .jsoneditor-icon{background-position:0 0}.jsoneditor-contextmenu button.jsoneditor-insert .jsoneditor-icon{background-position:0 0}.jsoneditor-contextmenu button.jsoneditor-duplicate .jsoneditor-icon{background-position:-48px 0}.jsoneditor-contextmenu button.jsoneditor-sort-asc .jsoneditor-icon{background-position:-168px 0}.jsoneditor-contextmenu button.jsoneditor-sort-desc .jsoneditor-icon{background-position:-192px 0}.jsoneditor-contextmenu button.jsoneditor-transform .jsoneditor-icon{background-position:-216px 0}.jsoneditor-contextmenu button.jsoneditor-extract .jsoneditor-icon{background-position:0 -24px}.jsoneditor-contextmenu button.jsoneditor-type-string .jsoneditor-icon{background-position:-144px 0}.jsoneditor-contextmenu button.jsoneditor-type-auto .jsoneditor-icon{background-position:-120px 0}.jsoneditor-contextmenu button.jsoneditor-type-object .jsoneditor-icon{background-position:-72px 0}.jsoneditor-contextmenu button.jsoneditor-type-array .jsoneditor-icon{background-position:-96px 0}.jsoneditor-contextmenu button.jsoneditor-type-modes .jsoneditor-icon{background-image:none;width:6px}.jsoneditor-contextmenu li,.jsoneditor-contextmenu ul{box-sizing:content-box;position:relative}.jsoneditor-contextmenu .jsoneditor-menu button:focus,.jsoneditor-contextmenu .jsoneditor-menu button:hover{color:#1a1a1a;background-color:#f5f5f5;outline:0}.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected,.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected:focus,.jsoneditor-contextmenu .jsoneditor-menu li button.jsoneditor-selected:hover{color:#fff;background-color:#ee422e}.jsoneditor-contextmenu .jsoneditor-menu li ul li button:focus,.jsoneditor-contextmenu .jsoneditor-menu li ul li button:hover{background-color:#f5f5f5}.jsoneditor-modal{max-width:95%;border-radius:2px!important;padding:45px 15px 15px 15px!important;box-shadow:2px 2px 12px rgba(128,128,128,.3);color:#4d4d4d;line-height:1.3em}.jsoneditor-modal.jsoneditor-modal-transform{width:600px!important}.jsoneditor-modal .pico-modal-header{position:absolute;box-sizing:border-box;top:0;left:0;width:100%;padding:0 10px;height:30px;line-height:30px;font-family:arial,sans-serif;font-size:11pt;background:#3883fa;color:#fff}.jsoneditor-modal table{width:100%}.jsoneditor-modal table td{padding:3px 0}.jsoneditor-modal table td.jsoneditor-modal-input{text-align:right;padding-right:0;white-space:nowrap}.jsoneditor-modal table td.jsoneditor-modal-actions{padding-top:15px}.jsoneditor-modal table th{vertical-align:middle}.jsoneditor-modal p:first-child{margin-top:0}.jsoneditor-modal a{color:#3883fa}.jsoneditor-modal .jsoneditor-jmespath-block{margin-bottom:10px}.jsoneditor-modal .pico-close{background:0 0!important;font-size:24px!important;top:7px!important;right:7px!important;color:#fff}.jsoneditor-modal input{padding:4px}.jsoneditor-modal input[type=text]{cursor:inherit}.jsoneditor-modal input[disabled]{background:#d3d3d3;color:grey}.jsoneditor-modal .jsoneditor-select-wrapper{position:relative;display:inline-block}.jsoneditor-modal .jsoneditor-select-wrapper:after{content:"";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #666;position:absolute;right:8px;top:14px;pointer-events:none}.jsoneditor-modal select{padding:3px 24px 3px 10px;min-width:180px;max-width:350px;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-indent:0;text-overflow:"";font-size:10pt;line-height:1.5em}.jsoneditor-modal select::-ms-expand{display:none}.jsoneditor-modal .jsoneditor-button-group input{padding:4px 10px;margin:0;border-radius:0;border-left-style:none}.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-first{border-top-left-radius:3px;border-bottom-left-radius:3px;border-left-style:solid}.jsoneditor-modal .jsoneditor-button-group input.jsoneditor-button-last{border-top-right-radius:3px;border-bottom-right-radius:3px}.jsoneditor-modal .jsoneditor-transform-preview{background:#f5f5f5;height:200px}.jsoneditor-modal .jsoneditor-transform-preview.jsoneditor-error{color:#ee422e}.jsoneditor-modal .jsoneditor-jmespath-wizard{line-height:1.2em;width:100%;padding:0;border-radius:3px}.jsoneditor-modal .jsoneditor-jmespath-label{font-weight:700;color:#1e90ff;margin-top:20px;margin-bottom:5px}.jsoneditor-modal .jsoneditor-jmespath-wizard-table{width:100%;border-collapse:collapse}.jsoneditor-modal .jsoneditor-jmespath-wizard-label{font-style:italic;margin:4px 0 2px 0}.jsoneditor-modal .jsoneditor-inline{position:relative;display:inline-block;width:100%;padding-top:2px;padding-bottom:2px}.jsoneditor-modal .jsoneditor-inline:not(:last-child){padding-right:2px}.jsoneditor-modal .jsoneditor-jmespath-filter{display:flex;flex-wrap:wrap}.jsoneditor-modal .jsoneditor-jmespath-filter-field{width:180px}.jsoneditor-modal .jsoneditor-jmespath-filter-relation{width:100px}.jsoneditor-modal .jsoneditor-jmespath-filter-value{min-width:180px;flex:1}.jsoneditor-modal .jsoneditor-jmespath-sort-field{width:170px}.jsoneditor-modal .jsoneditor-jmespath-sort-order{width:150px}.jsoneditor-modal .jsoneditor-jmespath-select-fields{width:100%}.jsoneditor-modal .selectr-selected{border-color:#d3d3d3;padding:4px 28px 4px 8px}.jsoneditor-modal .selectr-selected .selectr-tag{background-color:#3883fa;border-radius:5px}.jsoneditor-modal table td,.jsoneditor-modal table th{text-align:left;vertical-align:middle;font-weight:400;color:#4d4d4d;border-spacing:0;border-collapse:collapse}.jsoneditor-modal #query,.jsoneditor-modal input,.jsoneditor-modal input[type=text],.jsoneditor-modal input[type=text]:focus,.jsoneditor-modal select,.jsoneditor-modal textarea{background:#fff;border:1px solid #d3d3d3;color:#4d4d4d;border-radius:3px;padding:4px}.jsoneditor-modal,.jsoneditor-modal #query,.jsoneditor-modal input,.jsoneditor-modal input[type=text],.jsoneditor-modal option,.jsoneditor-modal select,.jsoneditor-modal table td,.jsoneditor-modal table th,.jsoneditor-modal textarea{font-size:10.5pt;font-family:arial,sans-serif}.jsoneditor-modal #query,.jsoneditor-modal .jsoneditor-transform-preview{font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif;font-size:10pt;width:100%;box-sizing:border-box}.jsoneditor-modal input[type=button],.jsoneditor-modal input[type=submit]{background:#f5f5f5;padding:4px 20px}.jsoneditor-modal input,.jsoneditor-modal select{cursor:pointer}.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-asc input.jsoneditor-button-asc,.jsoneditor-modal .jsoneditor-button-group.jsoneditor-button-group-value-desc input.jsoneditor-button-desc{background:#3883fa;border-color:#3883fa;color:#fff}.jsoneditor{color:#1a1a1a;border:thin solid #3883fa;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;height:100%;position:relative;padding:0;line-height:100%}div.jsoneditor-default,div.jsoneditor-field,div.jsoneditor-readonly,div.jsoneditor-value{border:1px solid transparent;min-height:16px;min-width:32px;padding:2px;margin:1px;word-wrap:break-word;float:left}div.jsoneditor-field p,div.jsoneditor-value p{margin:0}div.jsoneditor-value{word-break:break-word}div.jsoneditor-value.jsoneditor-empty::after{content:"value"}div.jsoneditor-value.jsoneditor-string{color:#006000}div.jsoneditor-value.jsoneditor-number{color:#ee422e}div.jsoneditor-value.jsoneditor-boolean{color:#ff8c00}div.jsoneditor-value.jsoneditor-null{color:#004ed0}div.jsoneditor-value.jsoneditor-invalid{color:#000}div.jsoneditor-readonly{min-width:16px;color:grey}div.jsoneditor-empty{border-color:#d3d3d3;border-style:dashed;border-radius:2px}div.jsoneditor-field.jsoneditor-empty::after{content:"field"}div.jsoneditor td{vertical-align:top}div.jsoneditor td.jsoneditor-separator{padding:3px 0;vertical-align:top;color:grey}div.jsoneditor td.jsoneditor-tree{vertical-align:top}div.jsoneditor.busy pre.jsoneditor-preview{background:#f5f5f5;color:grey}div.jsoneditor.busy div.jsoneditor-busy{display:inherit}div.jsoneditor code.jsoneditor-preview{background:0 0}div.jsoneditor.jsoneditor-mode-preview pre.jsoneditor-preview{width:100%;height:100%;box-sizing:border-box;overflow:auto;padding:2px;margin:0;white-space:pre-wrap;word-break:break-all}div.jsoneditor-default{color:grey;padding-left:10px}div.jsoneditor-tree{width:100%;height:100%;position:relative;overflow:auto}div.jsoneditor-tree button.jsoneditor-button{width:24px;height:24px;padding:0;margin:0;border:none;cursor:pointer;background:transparent url(img/jsoneditor-icons.svg)}div.jsoneditor-tree button.jsoneditor-button:focus{background-color:#f5f5f5;outline:#e5e5e5 solid 1px}div.jsoneditor-tree button.jsoneditor-collapsed{background-position:0 -48px}div.jsoneditor-tree button.jsoneditor-expanded{background-position:0 -72px}div.jsoneditor-tree button.jsoneditor-contextmenu-button{background-position:-48px -72px}div.jsoneditor-tree button.jsoneditor-invisible{visibility:hidden;background:0 0}div.jsoneditor-tree button.jsoneditor-dragarea{background:url(img/jsoneditor-icons.svg) -72px -72px;cursor:move}div.jsoneditor-tree :focus{outline:0}div.jsoneditor-tree div.jsoneditor-show-more{display:inline-block;padding:3px 4px;margin:2px 0;background-color:#e5e5e5;border-radius:3px;color:grey;font-family:arial,sans-serif;font-size:10pt}div.jsoneditor-tree div.jsoneditor-show-more a{display:inline-block;color:grey}div.jsoneditor-tree div.jsoneditor-color{display:inline-block;width:12px;height:12px;margin:4px;border:1px solid grey;cursor:pointer}div.jsoneditor-tree div.jsoneditor-date{background:#a1a1a1;color:#fff;font-family:arial,sans-serif;border-radius:3px;display:inline-block;padding:3px;margin:0 3px}div.jsoneditor-tree table.jsoneditor-tree{border-collapse:collapse;border-spacing:0;width:100%}div.jsoneditor-tree .jsoneditor-button.jsoneditor-schema-error{width:24px;height:24px;padding:0;margin:0 4px 0 0;background:url(img/jsoneditor-icons.svg) -168px -48px}div.jsoneditor-outer{position:static;width:100%;height:100%;margin:0;padding:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}div.jsoneditor-outer.has-nav-bar{margin-top:-26px;padding-top:26px}div.jsoneditor-outer.has-nav-bar.has-main-menu-bar{margin-top:-61px;padding-top:61px}div.jsoneditor-outer.has-status-bar{margin-bottom:-26px;padding-bottom:26px}div.jsoneditor-outer.has-main-menu-bar{margin-top:-35px;padding-top:35px}div.jsoneditor-busy{position:absolute;top:15%;left:0;box-sizing:border-box;width:100%;text-align:center;display:none}div.jsoneditor-busy span{background-color:#ffffab;border:1px solid #fe0;border-radius:3px;padding:5px 15px;box-shadow:0 0 5px rgba(0,0,0,.4)}div.jsoneditor-field.jsoneditor-empty::after,div.jsoneditor-value.jsoneditor-empty::after{pointer-events:none;color:#d3d3d3;font-size:8pt}a.jsoneditor-value.jsoneditor-url,div.jsoneditor-value.jsoneditor-url{color:#006000;text-decoration:underline}a.jsoneditor-value.jsoneditor-url{display:inline-block;padding:2px;margin:2px}a.jsoneditor-value.jsoneditor-url:focus,a.jsoneditor-value.jsoneditor-url:hover{color:#ee422e}div.jsoneditor-field.jsoneditor-highlight,div.jsoneditor-field[contenteditable=true]:focus,div.jsoneditor-field[contenteditable=true]:hover,div.jsoneditor-value.jsoneditor-highlight,div.jsoneditor-value[contenteditable=true]:focus,div.jsoneditor-value[contenteditable=true]:hover{background-color:#ffffab;border:1px solid #fe0;border-radius:2px}div.jsoneditor-field.jsoneditor-highlight-active,div.jsoneditor-field.jsoneditor-highlight-active:focus,div.jsoneditor-field.jsoneditor-highlight-active:hover,div.jsoneditor-value.jsoneditor-highlight-active,div.jsoneditor-value.jsoneditor-highlight-active:focus,div.jsoneditor-value.jsoneditor-highlight-active:hover{background-color:#fe0;border:1px solid #ffc700;border-radius:2px}div.jsoneditor-value.jsoneditor-array,div.jsoneditor-value.jsoneditor-object{min-width:16px}div.jsoneditor-tree button.jsoneditor-contextmenu-button.jsoneditor-selected,div.jsoneditor-tree button.jsoneditor-contextmenu-button:focus,div.jsoneditor-tree button.jsoneditor-contextmenu-button:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu-button{background-position:-48px -48px}div.jsoneditor-tree div.jsoneditor-show-more a:focus,div.jsoneditor-tree div.jsoneditor-show-more a:hover{color:#ee422e}.ace-jsoneditor,textarea.jsoneditor-text{min-height:150px}.ace-jsoneditor *,textarea.jsoneditor-text *{font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif}textarea.jsoneditor-text{width:100%;height:100%;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;outline-width:0;border:none;background-color:#fff;resize:none}tr.jsoneditor-highlight,tr.jsoneditor-selected{background-color:#d3d3d3}tr.jsoneditor-selected button.jsoneditor-contextmenu-button,tr.jsoneditor-selected button.jsoneditor-dragarea{visibility:hidden}tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu-button,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{visibility:visible}div.jsoneditor-tree button.jsoneditor-dragarea:focus,div.jsoneditor-tree button.jsoneditor-dragarea:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{background-position:-72px -48px}div.jsoneditor td,div.jsoneditor th,div.jsoneditor tr{padding:0;margin:0}.jsoneditor-popover,.jsoneditor-schema-error,div.jsoneditor td,div.jsoneditor textarea,div.jsoneditor th,div.jsoneditor-field,div.jsoneditor-value,pre.jsoneditor-preview{font-family:"dejavu sans mono","droid sans mono",consolas,monaco,"lucida console","courier new",courier,monospace,sans-serif;font-size:10pt;color:#1a1a1a}.jsoneditor-schema-error{cursor:default;display:inline-block;height:24px;line-height:24px;position:relative;text-align:center;width:24px}.jsoneditor-popover{background-color:#4c4c4c;border-radius:3px;box-shadow:0 0 5px rgba(0,0,0,.4);color:#fff;padding:7px 10px;position:absolute;cursor:auto;width:200px}.jsoneditor-popover.jsoneditor-above{bottom:32px;left:-98px}.jsoneditor-popover.jsoneditor-above:before{border-top:7px solid #4c4c4c;bottom:-7px}.jsoneditor-popover.jsoneditor-below{top:32px;left:-98px}.jsoneditor-popover.jsoneditor-below:before{border-bottom:7px solid #4c4c4c;top:-7px}.jsoneditor-popover.jsoneditor-left{top:-7px;right:32px}.jsoneditor-popover.jsoneditor-left:before{border-left:7px solid #4c4c4c;border-top:7px solid transparent;border-bottom:7px solid transparent;content:"";top:19px;right:-14px;left:inherit;margin-left:inherit;margin-top:-7px;position:absolute}.jsoneditor-popover.jsoneditor-right{top:-7px;left:32px}.jsoneditor-popover.jsoneditor-right:before{border-right:7px solid #4c4c4c;border-top:7px solid transparent;border-bottom:7px solid transparent;content:"";top:19px;left:-14px;margin-left:inherit;margin-top:-7px;position:absolute}.jsoneditor-popover:before{border-right:7px solid transparent;border-left:7px solid transparent;content:"";display:block;left:50%;margin-left:-7px;position:absolute}.jsoneditor-text-errors tr.jump-to-line:hover{text-decoration:underline;cursor:pointer}.jsoneditor-schema-error:focus .jsoneditor-popover,.jsoneditor-schema-error:hover .jsoneditor-popover{display:block;animation:fade-in .3s linear 1,move-up .3s linear 1}@keyframes fade-in{from{opacity:0}to{opacity:1}}.jsoneditor .jsoneditor-validation-errors-container{max-height:130px;overflow-y:auto}.jsoneditor .jsoneditor-validation-errors{width:100%;overflow:hidden}.jsoneditor .jsoneditor-additional-errors{position:absolute;margin:auto;bottom:31px;left:calc(50% - 92px);color:grey;background-color:#ebebeb;padding:7px 15px;border-radius:8px}.jsoneditor .jsoneditor-additional-errors.visible{visibility:visible;opacity:1;transition:opacity 2s linear}.jsoneditor .jsoneditor-additional-errors.hidden{visibility:hidden;opacity:0;transition:visibility 0s 2s,opacity 2s linear}.jsoneditor .jsoneditor-text-errors{width:100%;border-collapse:collapse;border-top:1px solid #ffc700}.jsoneditor .jsoneditor-text-errors td{padding:3px 6px;vertical-align:middle}.jsoneditor .jsoneditor-text-errors td pre{margin:0;white-space:normal}.jsoneditor .jsoneditor-text-errors tr{background-color:#ffffab}.jsoneditor .jsoneditor-text-errors tr.parse-error{background-color:#ee2e2e70}.jsoneditor-text-errors .jsoneditor-schema-error{border:none;width:24px;height:24px;padding:0;margin:0 4px 0 0;cursor:pointer}.jsoneditor-text-errors tr .jsoneditor-schema-error{background:url(img/jsoneditor-icons.svg) -168px -48px}.jsoneditor-text-errors tr.parse-error .jsoneditor-schema-error{background:url(img/jsoneditor-icons.svg) -25px 0}.jsoneditor-anchor{cursor:pointer}.jsoneditor-anchor .picker_wrapper.popup.popup_bottom{top:28px;left:-10px}.fadein{-webkit-animation:fadein .3s;animation:fadein .3s;-moz-animation:fadein .3s;-o-animation:fadein .3s}@keyframes fadein{0%{opacity:0}100%{opacity:1}}.jsoneditor-modal input[type=search].selectr-input{border:1px solid #d3d3d3;width:calc(100% - 4px);margin:2px;padding:4px;box-sizing:border-box}.jsoneditor-modal button.selectr-input-clear{right:8px}.jsoneditor-menu{width:100%;height:35px;padding:2px;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:#fff;background-color:#3883fa;border-bottom:1px solid #3883fa}.jsoneditor-menu>.jsoneditor-modes>button,.jsoneditor-menu>button{width:26px;height:26px;margin:2px;padding:0;border-radius:2px;border:1px solid transparent;background:transparent url(img/jsoneditor-icons.svg);color:#fff;opacity:.8;font-family:arial,sans-serif;font-size:10pt;float:left}.jsoneditor-menu>.jsoneditor-modes>button:hover,.jsoneditor-menu>button:hover{background-color:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.4)}.jsoneditor-menu>.jsoneditor-modes>button:active,.jsoneditor-menu>.jsoneditor-modes>button:focus,.jsoneditor-menu>button:active,.jsoneditor-menu>button:focus{background-color:rgba(255,255,255,.3)}.jsoneditor-menu>.jsoneditor-modes>button:disabled,.jsoneditor-menu>button:disabled{opacity:.5;background-color:transparent;border:none}.jsoneditor-menu>button.jsoneditor-collapse-all{background-position:0 -96px}.jsoneditor-menu>button.jsoneditor-expand-all{background-position:0 -120px}.jsoneditor-menu>button.jsoneditor-sort{background-position:-120px -96px}.jsoneditor-menu>button.jsoneditor-transform{background-position:-144px -96px}.jsoneditor.jsoneditor-mode-form>.jsoneditor-menu>button.jsoneditor-sort,.jsoneditor.jsoneditor-mode-form>.jsoneditor-menu>button.jsoneditor-transform,.jsoneditor.jsoneditor-mode-view>.jsoneditor-menu>button.jsoneditor-sort,.jsoneditor.jsoneditor-mode-view>.jsoneditor-menu>button.jsoneditor-transform{display:none}.jsoneditor-menu>button.jsoneditor-undo{background-position:-24px -96px}.jsoneditor-menu>button.jsoneditor-undo:disabled{background-position:-24px -120px}.jsoneditor-menu>button.jsoneditor-redo{background-position:-48px -96px}.jsoneditor-menu>button.jsoneditor-redo:disabled{background-position:-48px -120px}.jsoneditor-menu>button.jsoneditor-compact{background-position:-72px -96px}.jsoneditor-menu>button.jsoneditor-format{background-position:-72px -120px}.jsoneditor-menu>button.jsoneditor-repair{background-position:-96px -96px}.jsoneditor-menu>.jsoneditor-modes{display:inline-block;float:left}.jsoneditor-menu>.jsoneditor-modes>button{background-image:none;width:auto;padding-left:6px;padding-right:6px}.jsoneditor-menu>.jsoneditor-modes>button.jsoneditor-separator,.jsoneditor-menu>button.jsoneditor-separator{margin-left:10px}.jsoneditor-menu a{font-family:arial,sans-serif;font-size:10pt;color:#fff;opacity:.8;vertical-align:middle}.jsoneditor-menu a:hover{opacity:1}.jsoneditor-menu a.jsoneditor-poweredBy{font-size:8pt;position:absolute;right:0;top:0;padding:10px}.jsoneditor-navigation-bar{width:100%;height:26px;line-height:26px;padding:0;margin:0;border-bottom:1px solid #d3d3d3;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;color:grey;background-color:#ebebeb;overflow:hidden;font-family:arial,sans-serif;font-size:10pt}.jsoneditor-search{font-family:arial,sans-serif;position:absolute;right:4px;top:4px;border-collapse:collapse;border-spacing:0;display:flex}.jsoneditor-search input{color:#1a1a1a;width:120px;border:none;outline:0;margin:1px;line-height:20px;font-family:arial,sans-serif}.jsoneditor-search button{width:16px;height:24px;padding:0;margin:0;border:none;background:url(img/jsoneditor-icons.svg);vertical-align:top}.jsoneditor-search button:hover{background-color:transparent}.jsoneditor-search button.jsoneditor-refresh{width:18px;background-position:-99px -73px}.jsoneditor-search button.jsoneditor-next{cursor:pointer;background-position:-124px -73px}.jsoneditor-search button.jsoneditor-next:hover{background-position:-124px -49px}.jsoneditor-search button.jsoneditor-previous{cursor:pointer;background-position:-148px -73px;margin-right:2px}.jsoneditor-search button.jsoneditor-previous:hover{background-position:-148px -49px}.jsoneditor-results{font-family:arial,sans-serif;color:#fff;padding-right:5px;line-height:26px}.jsoneditor-frame{border:1px solid transparent;background-color:#fff;padding:0 2px;margin:0}.jsoneditor-statusbar{line-height:26px;height:26px;color:grey;background-color:#ebebeb;border-top:1px solid #d3d3d3;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;font-size:10pt}.jsoneditor-statusbar>.jsoneditor-curserinfo-val{margin-right:12px}.jsoneditor-statusbar>.jsoneditor-curserinfo-count{margin-left:4px}.jsoneditor-statusbar>.jsoneditor-validation-error-icon{float:right;width:24px;height:24px;padding:0;margin-top:1px;background:url(img/jsoneditor-icons.svg) -168px -48px;cursor:pointer}.jsoneditor-statusbar>.jsoneditor-validation-error-count{float:right;margin:0 4px 0 0;cursor:pointer}.jsoneditor-statusbar>.jsoneditor-parse-error-icon{float:right;width:24px;height:24px;padding:0;margin:1px;background:url(img/jsoneditor-icons.svg) -25px 0}.jsoneditor-statusbar .jsoneditor-array-info a{color:inherit}div.jsoneditor-statusbar>.jsoneditor-curserinfo-label,div.jsoneditor-statusbar>.jsoneditor-size-info{margin:0 4px}.jsoneditor-treepath{padding:0 5px;overflow:hidden;white-space:nowrap;outline:0}.jsoneditor-treepath.show-all{word-wrap:break-word;white-space:normal;position:absolute;background-color:#ebebeb;z-index:1;box-shadow:2px 2px 12px rgba(128,128,128,.3)}.jsoneditor-treepath.show-all span.jsoneditor-treepath-show-all-btn{display:none}.jsoneditor-treepath div.jsoneditor-contextmenu-root{position:absolute;left:0}.jsoneditor-treepath .jsoneditor-treepath-show-all-btn{position:absolute;background-color:#ebebeb;left:0;height:20px;padding:0 3px;cursor:pointer}.jsoneditor-treepath .jsoneditor-treepath-element{margin:1px;font-family:arial,sans-serif;font-size:10pt}.jsoneditor-treepath .jsoneditor-treepath-seperator{margin:2px;font-size:9pt;font-family:arial,sans-serif}.jsoneditor-treepath span.jsoneditor-treepath-element:hover,.jsoneditor-treepath span.jsoneditor-treepath-seperator:hover{cursor:pointer;text-decoration:underline}/*! 2 | * Selectr 2.4.0 3 | * https://github.com/Mobius1/Selectr 4 | * 5 | * Released under the MIT license 6 | */.selectr-container{position:relative}.selectr-container li{list-style:none}.selectr-hidden{position:absolute;overflow:hidden;clip:rect(0,0,0,0);width:1px;height:1px;margin:-1px;padding:0;border:0 none}.selectr-visible{position:absolute;left:0;top:0;width:100%;height:100%;opacity:0;z-index:11}.selectr-desktop.multiple .selectr-visible{display:none}.selectr-desktop.multiple.native-open .selectr-visible{top:100%;min-height:200px!important;height:auto;opacity:1;display:block}.selectr-container.multiple.selectr-mobile .selectr-selected{z-index:0}.selectr-selected{position:relative;z-index:1;box-sizing:border-box;width:100%;padding:7px 28px 7px 14px;cursor:pointer;border:1px solid #999;border-radius:3px;background-color:#fff}.selectr-selected::before{position:absolute;top:50%;right:10px;width:0;height:0;content:'';-o-transform:rotate(0) translate3d(0,-50%,0);-ms-transform:rotate(0) translate3d(0,-50%,0);-moz-transform:rotate(0) translate3d(0,-50%,0);-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0);border-width:4px 4px 0 4px;border-style:solid;border-color:#6c7a86 transparent transparent}.selectr-container.native-open .selectr-selected::before,.selectr-container.open .selectr-selected::before{border-width:0 4px 4px 4px;border-style:solid;border-color:transparent transparent #6c7a86}.selectr-label{display:none;overflow:hidden;width:100%;white-space:nowrap;text-overflow:ellipsis}.selectr-placeholder{color:#6c7a86}.selectr-tags{margin:0;padding:0;white-space:normal}.has-selected .selectr-tags{margin:0 0 -2px}.selectr-tag{list-style:none;position:relative;float:left;padding:2px 25px 2px 8px;margin:0 2px 2px 0;cursor:default;color:#fff;border:medium none;border-radius:10px;background:#acb7bf none repeat scroll 0 0}.selectr-container.multiple.has-selected .selectr-selected{padding:5px 28px 5px 5px}.selectr-options-container{position:absolute;z-index:10000;top:calc(100% - 1px);left:0;display:none;box-sizing:border-box;width:100%;border-width:0 1px 1px;border-style:solid;border-color:transparent #999 #999;border-radius:0 0 3px 3px;background-color:#fff}.selectr-container.open .selectr-options-container{display:block}.selectr-input-container{position:relative;display:none}.selectr-clear,.selectr-input-clear,.selectr-tag-remove{position:absolute;top:50%;right:22px;width:20px;height:20px;padding:0;cursor:pointer;-o-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);border:medium none;background-color:transparent;z-index:11}.selectr-clear,.selectr-input-clear{display:none}.selectr-container.has-selected .selectr-clear,.selectr-input-container.active .selectr-input-clear{display:block}.selectr-selected .selectr-tag-remove{right:2px}.selectr-clear::after,.selectr-clear::before,.selectr-input-clear::after,.selectr-input-clear::before,.selectr-tag-remove::after,.selectr-tag-remove::before{position:absolute;top:5px;left:9px;width:2px;height:10px;content:' ';background-color:#6c7a86}.selectr-tag-remove::after,.selectr-tag-remove::before{top:4px;width:3px;height:12px;background-color:#fff}.selectr-clear:before,.selectr-input-clear::before,.selectr-tag-remove::before{-o-transform:rotate(45deg);-ms-transform:rotate(45deg);-moz-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.selectr-clear:after,.selectr-input-clear::after,.selectr-tag-remove::after{-o-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.selectr-input-container.active,.selectr-input-container.active .selectr-clear{display:block}.selectr-input{top:5px;left:5px;box-sizing:border-box;width:calc(100% - 30px);margin:10px 15px;padding:7px 30px 7px 9px;border:1px solid #999;border-radius:3px}.selectr-notice{display:none;box-sizing:border-box;width:100%;padding:8px 16px;border-top:1px solid #999;border-radius:0 0 3px 3px;background-color:#fff}.selectr-container.notice .selectr-notice{display:block}.selectr-container.notice .selectr-selected{border-radius:3px 3px 0 0}.selectr-options{position:relative;top:calc(100% + 2px);display:none;overflow-x:auto;overflow-y:scroll;max-height:200px;margin:0;padding:0}.selectr-container.notice .selectr-options-container,.selectr-container.open .selectr-input-container,.selectr-container.open .selectr-options{display:block}.selectr-option{position:relative;display:block;padding:5px 20px;list-style:outside none none;cursor:pointer;font-weight:400}.selectr-options.optgroups>.selectr-option{padding-left:25px}.selectr-optgroup{font-weight:700;padding:0}.selectr-optgroup--label{font-weight:700;margin-top:10px;padding:5px 15px}.selectr-match{text-decoration:underline}.selectr-option.selected{background-color:#ddd}.selectr-option.active{color:#fff;background-color:#5897fb}.selectr-option.disabled{opacity:.4}.selectr-option.excluded{display:none}.selectr-container.open .selectr-selected{border-color:#999 #999 transparent #999;border-radius:3px 3px 0 0}.selectr-container.open .selectr-selected::after{-o-transform:rotate(180deg) translate3d(0,50%,0);-ms-transform:rotate(180deg) translate3d(0,50%,0);-moz-transform:rotate(180deg) translate3d(0,50%,0);-webkit-transform:rotate(180deg) translate3d(0,50%,0);transform:rotate(180deg) translate3d(0,50%,0)}.selectr-disabled{opacity:.6}.has-selected .selectr-placeholder,.selectr-empty{display:none}.has-selected .selectr-label{display:block}.taggable .selectr-selected{padding:4px 28px 4px 4px}.taggable .selectr-selected::after{display:table;content:" ";clear:both}.taggable .selectr-label{width:auto}.taggable .selectr-tags{float:left;display:block}.taggable .selectr-placeholder{display:none}.input-tag{float:left;min-width:90px;width:auto}.selectr-tag-input{border:medium none;padding:3px 10px;width:100%;font-family:inherit;font-weight:inherit;font-size:inherit}.selectr-input-container.loading::after{position:absolute;top:50%;right:20px;width:20px;height:20px;content:'';-o-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-50%,0);-o-transform-origin:50% 0 0;-ms-transform-origin:50% 0 0;-moz-transform-origin:50% 0 0;-webkit-transform-origin:50% 0 0;transform-origin:50% 0 0;-moz-animation:.5s linear 0s normal forwards infinite running spin;-webkit-animation:.5s linear 0s normal forwards infinite running spin;animation:.5s linear 0s normal forwards infinite running spin;border-width:3px;border-style:solid;border-color:#aaa #ddd #ddd;border-radius:50%}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}100%{-webkit-transform:rotate(360deg) translate3d(0,-50%,0);transform:rotate(360deg) translate3d(0,-50%,0)}}@keyframes spin{0%{-webkit-transform:rotate(0) translate3d(0,-50%,0);transform:rotate(0) translate3d(0,-50%,0)}100%{-webkit-transform:rotate(360deg) translate3d(0,-50%,0);transform:rotate(360deg) translate3d(0,-50%,0)}}.selectr-container.open.inverted .selectr-selected{border-color:transparent #999 #999;border-radius:0 0 3px 3px}.selectr-container.inverted .selectr-options-container{border-width:1px 1px 0;border-color:#999 #999 transparent;border-radius:3px 3px 0 0;background-color:#fff}.selectr-container.inverted .selectr-options-container{top:auto;bottom:calc(100% - 1px)}.selectr-container ::-webkit-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::-moz-placeholder{color:#6c7a86;opacity:1}.selectr-container :-ms-input-placeholder{color:#6c7a86;opacity:1}.selectr-container ::placeholder{color:#6c7a86;opacity:1} -------------------------------------------------------------------------------- /css/main.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap"); 2 | .roboto { 3 | font-family: 'Roboto', sans-serif; } 4 | 5 | @font-face { 6 | font-family: "JetBrains Mono"; 7 | src: url("../fonts/woff/JetBrainsMono-Regular.woff") format("woff"), url("../fonts/woff2/JetBrainsMono-Regular.woff2") format("woff2"); } 8 | 9 | .jetbrains-mono, body { 10 | font-family: 'JetBrains Mono'; } 11 | 12 | body { 13 | height: 97.5vh; 14 | display: flex; 15 | align-items: center; 16 | justify-content: center; 17 | background: #212121; 18 | color: #fff; } 19 | 20 | .main { 21 | width: 100%; 22 | text-align: center; } 23 | .main #date h2 { 24 | padding-top: 15px; 25 | display: inline-block; 26 | vertical-align: top; } 27 | .main #date-text, .main #weather-text { 28 | color: #d9d9d9; } 29 | .main #message-text { 30 | font-size: 23px; } 31 | .main #search-bar { 32 | width: 50%; 33 | margin: 0 auto 50px auto; 34 | height: 45px; 35 | padding-top: 35px; 36 | position: relative; 37 | display: inline-block; } 38 | .main #search-bar #search-bar-input { 39 | height: 50px; 40 | width: 100%; 41 | background: #2e2e2e; 42 | box-shadow: none; 43 | border: none; 44 | text-align: center; 45 | border-radius: 6px; 46 | outline: none; 47 | padding: 7px 14px; 48 | font-size: 18px; 49 | color: #fff; 50 | box-sizing: border-box; } 51 | .main #search-bar #search-bar-input:focus { 52 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); 53 | transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } 54 | .main #search-bar .autocomplete-items-container { 55 | position: absolute; 56 | top: 100%; 57 | left: 0; 58 | right: 0; 59 | z-index: 99; 60 | border-radius: 6px; 61 | background: #2e2e2e; 62 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); 63 | transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } 64 | .main #search-bar .autocomplete-items-container .autocomplete-item { 65 | width: 100%; 66 | background: #2e2e2e; 67 | box-shadow: none; 68 | border: none; 69 | text-align: center; 70 | outline: none; 71 | padding: 7px 14px; 72 | font-size: 18px; 73 | color: #fff; 74 | box-sizing: border-box; 75 | z-index: -1; 76 | cursor: pointer; } 77 | .main #search-bar .autocomplete-items-container .autocomplete-item:hover { 78 | background: #3b3b3b; } 79 | .main #search-bar .autocomplete-items-container .autocomplete-active { 80 | background: #353535; } 81 | @media only screen and (max-width: 791px) { 82 | .main #search-bar { 83 | width: 65%; } } 84 | .main #other-content { 85 | margin: 40px auto; 86 | padding: 10px 0; } 87 | .main #other-content .sqr { 88 | vertical-align: top; 89 | display: inline-block; 90 | margin-left: 5px; 91 | margin-right: 5px; 92 | width: 170px; 93 | background: #2e2e2e; 94 | padding: 15px 15px; 95 | border-radius: 6px; 96 | min-height: 150px; 97 | margin-top: 10px; } 98 | .main #other-content .sqr h4 { 99 | font-size: 18px; 100 | margin: 15px; } 101 | .main #other-content .sqr h4 a { 102 | color: inherit; 103 | font-size: inherit; } 104 | .main #other-content .sqr:hover { 105 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); 106 | transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); } 107 | .main #other-content .sqr a { 108 | color: #9E9E9E; 109 | font-size: 16px; 110 | transition: .1s ease-in; 111 | display: block; 112 | text-decoration: none; 113 | line-height: 22px; } 114 | .main #other-content .sqr a:hover { 115 | color: #fff; 116 | text-decoration: none; 117 | transition: .1s ease-in; } 118 | .main #other-content .media h4, .main #other-content .media a:hover { 119 | color: #4DD0E1; } 120 | .main #other-content .work h4, .main #other-content .work a:hover { 121 | color: #F06292; } 122 | .main #other-content .social h4, .main #other-content .social a:hover { 123 | color: #FFF176; } 124 | .main #other-content .others h4, .main #other-content .others a:hover { 125 | color: #81C784; } 126 | .main #other-content .funky h4, .main #other-content .funky a:hover { 127 | color: #4DB6AC; } 128 | .main #other-content .purple h4, .main #other-content .purple a:hover { 129 | color: #9575CD; } 130 | .main #other-content .upvoty h4, .main #other-content .upvoty a:hover { 131 | color: #FF8A65; } 132 | .main #other-content .indigo h4, .main #other-content .indigo a:hover { 133 | color: #7986CB; } 134 | .main #other-content .foxxy h4, .main #other-content .foxxy a:hover { 135 | color: #A1887F; } 136 | 137 | .settings-modal { 138 | display: none; 139 | position: fixed; 140 | z-index: 3; 141 | width: 80vw; 142 | height: 80vh; 143 | overflow: auto; 144 | background: #fff; 145 | color: #212121; 146 | padding: 15px; } 147 | .settings-modal .modal-content { 148 | width: 100%; 149 | height: 100%; } 150 | .settings-modal .close { 151 | color: #aaa; 152 | float: right; 153 | font-size: 28px; 154 | font-weight: bold; } 155 | .settings-modal .close:hover, .settings-modal .close:focus { 156 | color: black; 157 | text-decoration: none; 158 | cursor: pointer; } 159 | 160 | #settings-cog { 161 | width: 23px; 162 | height: 23px; 163 | position: absolute; 164 | bottom: 25px; 165 | right: 25px; 166 | transition: 2s ease-in; 167 | display: none; } 168 | #settings-cog:hover .cog { 169 | fill: white; 170 | stroke: white; 171 | transition: 2s ease-in; } 172 | -------------------------------------------------------------------------------- /fonts/woff/JetBrainsMono-Bold-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff/JetBrainsMono-Bold-Italic.woff -------------------------------------------------------------------------------- /fonts/woff/JetBrainsMono-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff/JetBrainsMono-Bold.woff -------------------------------------------------------------------------------- /fonts/woff/JetBrainsMono-ExtraBold-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff/JetBrainsMono-ExtraBold-Italic.woff -------------------------------------------------------------------------------- /fonts/woff/JetBrainsMono-ExtraBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff/JetBrainsMono-ExtraBold.woff -------------------------------------------------------------------------------- /fonts/woff/JetBrainsMono-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff/JetBrainsMono-Italic.woff -------------------------------------------------------------------------------- /fonts/woff/JetBrainsMono-Medium-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff/JetBrainsMono-Medium-Italic.woff -------------------------------------------------------------------------------- /fonts/woff/JetBrainsMono-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff/JetBrainsMono-Medium.woff -------------------------------------------------------------------------------- /fonts/woff/JetBrainsMono-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff/JetBrainsMono-Regular.woff -------------------------------------------------------------------------------- /fonts/woff2/JetBrainsMono-Bold-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff2/JetBrainsMono-Bold-Italic.woff2 -------------------------------------------------------------------------------- /fonts/woff2/JetBrainsMono-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff2/JetBrainsMono-Bold.woff2 -------------------------------------------------------------------------------- /fonts/woff2/JetBrainsMono-ExtraBold-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff2/JetBrainsMono-ExtraBold-Italic.woff2 -------------------------------------------------------------------------------- /fonts/woff2/JetBrainsMono-ExtraBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff2/JetBrainsMono-ExtraBold.woff2 -------------------------------------------------------------------------------- /fonts/woff2/JetBrainsMono-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff2/JetBrainsMono-Italic.woff2 -------------------------------------------------------------------------------- /fonts/woff2/JetBrainsMono-Medium-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff2/JetBrainsMono-Medium-Italic.woff2 -------------------------------------------------------------------------------- /fonts/woff2/JetBrainsMono-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff2/JetBrainsMono-Medium.woff2 -------------------------------------------------------------------------------- /fonts/woff2/JetBrainsMono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/fonts/woff2/JetBrainsMono-Regular.woff2 -------------------------------------------------------------------------------- /img/icon64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AbdelrhmanNile/startpage-onedark/97a194d962a2be41c4ee30a73186b403e0c4ab2f/img/icon64.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | New Tab 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 21 |
22 |
23 |
24 |

Good Morning!

25 |
26 |
27 |

28 |

|

29 |

Fetching Weather...

30 |
31 | 36 |
37 |
38 | 39 | 40 | 41 | 42 | 43 |
44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /js/autocomplete.js: -------------------------------------------------------------------------------- 1 | function autocomplete(inp, passedValues, style) { 2 | var currentFocus; 3 | 4 | /*execute a function when someone writes in the text field:*/ 5 | inp.addEventListener("input", function(e) { 6 | var item, val = this.value; 7 | var parentContainer = document.getElementsByClassName('autocomplete-items-container')[0]; 8 | 9 | /*close any already open lists of autocompleted values*/ 10 | closeAllLists(); 11 | if (!val) { 12 | parentContainer.style.paddingBottom = "0"; 13 | return false; 14 | } 15 | currentFocus = -1; 16 | 17 | // Update some values of the parent container 18 | parentContainer.setAttribute("id", this.id + "-autocomplete-list"); 19 | parentContainer.style.paddingBottom = "1rem"; 20 | 21 | if(style["searchBackgroundColor"]) { 22 | parentContainer.style.backgroundColor = style["searchBackgroundColor"]; 23 | } 24 | 25 | /*for each item in the array...*/ 26 | Object.keys(passedValues).forEach((el, i, arr) => { 27 | 28 | /*check if the item starts with the same letters as the text field value:*/ 29 | if (arr[i].toLowerCase().includes(val.toLowerCase())) { 30 | /*create a DIV element for each matching element:*/ 31 | item = document.createElement("DIV"); 32 | item.setAttribute("class", "autocomplete-item"); 33 | // Add the url as an attribute 34 | item.setAttribute('url', passedValues[el]); 35 | 36 | if(style["searchBackgroundColor"]) { 37 | item.style.backgroundColor = style["searchBackgroundColor"]; 38 | } 39 | 40 | if(style["searchColor"]) { 41 | item.style.color = style["searchColor"]; 42 | } 43 | 44 | /*make the matching letters bold:*/ 45 | item.innerHTML = "" + arr[i].substr(0, val.length) + ""; 46 | item.innerHTML += arr[i].substr(val.length); 47 | /*insert a input field that will hold the current array item's value:*/ 48 | item.innerHTML += ""; 49 | /*execute a function when someone clicks on the item value (DIV element):*/ 50 | item.addEventListener("click", function(e) { 51 | /*insert the value for the autocomplete text field:*/ 52 | inp.value = this.getElementsByTagName("input")[0].value; 53 | /*close the list of autocompleted values, 54 | (or any other open lists of autocompleted values:*/ 55 | closeAllLists(); 56 | }); 57 | parentContainer.appendChild(item); 58 | } 59 | }) 60 | }); 61 | 62 | /*execute a function presses a key on the keyboard:*/ 63 | inp.addEventListener("keydown", function(e) { 64 | var x = document.getElementById(this.id + "-autocomplete-list"); 65 | if (x) x = x.getElementsByTagName("div"); 66 | if (e.keyCode == 40) { 67 | /*If the arrow DOWN key is pressed, 68 | increase the currentFocus variable:*/ 69 | currentFocus++; 70 | /*and and make the current item more visible:*/ 71 | addActive(x); 72 | } 73 | else if (e.keyCode == 38) { 74 | /*If the arrow UP key is pressed, 75 | decrease the currentFocus variable:*/ 76 | currentFocus--; 77 | /*and and make the current item more visible:*/ 78 | addActive(x); 79 | } 80 | else if (e.keyCode == 13) { 81 | /*If the ENTER key is pressed, prevent the form from being submitted,*/ 82 | if (currentFocus > -1) { 83 | e.preventDefault(); 84 | /*and simulate a click on the "active" item:*/ 85 | if (x) window.location = x[0].getAttribute('url'); 86 | } 87 | } 88 | }); 89 | 90 | function addActive(x) { 91 | /*a function to classify an item as "active":*/ 92 | if (!x) return false; 93 | /*start by removing the "active" class on all items:*/ 94 | removeActive(x); 95 | if (currentFocus >= x.length) currentFocus = 0; 96 | if (currentFocus < 0) currentFocus = (x.length - 1); 97 | /*add class "autocomplete-active":*/ 98 | x[currentFocus].classList.add("autocomplete-active"); 99 | } 100 | 101 | function removeActive(x) { 102 | /*a function to remove the "active" class from all autocomplete items:*/ 103 | for (var i = 0; i < x.length; i++) { 104 | x[i].classList.remove("autocomplete-active"); 105 | } 106 | } 107 | 108 | function closeAllLists(elmnt) { 109 | /*close all autocomplete lists in the document, 110 | except the one passed as an argument:*/ 111 | document.getElementsByClassName("autocomplete-items-container")[0].innerHTML = ""; 112 | } 113 | 114 | /*execute a function when someone clicks in the document:*/ 115 | document.addEventListener("click", function (e) { 116 | closeAllLists(e.target); 117 | }); 118 | } -------------------------------------------------------------------------------- /js/main.js: -------------------------------------------------------------------------------- 1 | window.onload = function() { 2 | this.initBody(); 3 | this.listenForSettings(); 4 | } 5 | 6 | 7 | debug = false; // Enable while testing on local 8 | searchBarDivId = "search-bar" 9 | searchBarId = "search-bar-input" 10 | messageDivId = "message" 11 | dateDivId = "date" 12 | dateId = "date-text" 13 | weatherId = "weather-text" 14 | lineId = "line" 15 | messageId = "message-text" 16 | timeZ = undefined 17 | otherContentId = "other-content" 18 | userName = "" 19 | disable24Hour = false; 20 | appId = "fd2c04ed7f9802656bd2cc23bddc7ad9" 21 | apiUrl = "http://api.openweathermap.org/data/2.5/weather" 22 | bgClassContainer = [ 23 | "media", 24 | "work", 25 | "social", 26 | "others", 27 | "funky", 28 | "purple", 29 | "upvoty", 30 | "indigo", 31 | "foxxy" 32 | ] 33 | searchEngines = { 34 | "Google": "https://www.google.com/search?q=", 35 | "DuckDuckGo": "https://duckduckgo.com/?q=", 36 | "Brave": "https://search.brave.com/search?q=", 37 | "Yahoo": "https://search.yahoo.com/search?p=", 38 | "Ecosia": "https://www.ecosia.org/search?q=" 39 | } 40 | validWeatherUnit = [ 41 | "fah", "cel" 42 | ] 43 | validQuickLinks = {} 44 | 45 | 46 | function initBody() { 47 | /** 48 | * Function called when the body is loaded. 49 | * 50 | * Do everything like adding an event listener to 51 | * other things. 52 | */ 53 | // If running on local, just read the conf 54 | if (debug) { 55 | readJSON("config.json"); 56 | return; 57 | } 58 | 59 | // Read the json file 60 | BROWSER.storage.sync.get(result => { 61 | Object.keys(result).length == 0 ? readJSON("config.json") : parseAndCreate(result) 62 | }) 63 | } 64 | 65 | function initSearchBar(jsonData) { 66 | // Clear the search bar on load, just in case 67 | document.getElementById(searchBarId).value = "" 68 | document.getElementById(searchBarId).focus() 69 | searchEngine = jsonData["searchEngine"] 70 | if(!Object.keys(this.searchEngines).includes(searchEngine)){ 71 | searchEngine = "Google" 72 | } 73 | searchUrl = this.searchEngines[searchEngine] 74 | document.getElementById(searchBarId).placeholder = `${searchEngine} Search` 75 | document.getElementById(searchBarId).addEventListener("keypress", (event) => { 76 | if (event.key != 'Enter') return 77 | 78 | // Do whatever the user wants to do 79 | query = document.getElementById(searchBarId).value 80 | 81 | // Open settings 82 | if (query == "--setting" || query == "--settings") { 83 | showSettings() 84 | document.getElementById(searchBarId).value = "" 85 | // Remove the autocomplete boxes 86 | document.getElementById("search-bar-input-autocomplete-list").style.display = "none"; 87 | return 88 | } 89 | 90 | // If not others, then it's probably a search 91 | query = query.replace(/\ /g, "+") 92 | document.location = searchUrl + query 93 | }) 94 | } 95 | 96 | function buildMsg() { 97 | /** 98 | * Build a nice message for the user. 99 | * 100 | * Following is how the message would be decided. 101 | * 0 - 5:59 : It's too late, take some sleep 102 | * 6 - 8:59 : You're up early 103 | * 9 - 11:59 : Have a good day ahead 104 | * 12 - 16:59 : Good Afternoon 105 | * 17 - 19:59 : Good Evening 106 | * 20 - 23:59 : It's time to wrap up for the day 107 | */ 108 | date = new Date() 109 | currentHour = date.getHours() 110 | currentMinute = date.getMinutes() 111 | currentTime = currentHour + (0.01 * currentMinute) 112 | 113 | if (inRange(currentTime, 0, 5.59)) 114 | return "It's too late, take some sleep" 115 | if (inRange(currentTime, 6, 8.59)) 116 | return "You're up early" 117 | if (inRange(currentTime, 9, 11.59)) 118 | return "Have a good day ahead" 119 | if (inRange(currentTime, 12, 16.59)) 120 | return "Good Afternoon" 121 | if (inRange(currentTime, 17, 19.59)) 122 | return "Good Evening" 123 | if (inRange(currentTime, 20, 24)) 124 | return "It's time to wrap up for the day" 125 | else 126 | return "" 127 | } 128 | 129 | function handleMessage(userName) { 130 | /** 131 | * Handle the creation of the message 132 | * 133 | * Build the message based on the time of the day. 134 | * If the message is null then add just the username 135 | * Else, add the username before the message. 136 | */ 137 | var builtMsg = buildMsg() 138 | builtMsg == "" ? 139 | builtMsg = `Hello ${userName}` : builtMsg = `Hey ${userName}, ${builtMsg}!` 140 | return builtMsg; 141 | } 142 | 143 | function updateTime() { 144 | /** 145 | * Get the current time and date and return it. 146 | */ 147 | currentDate = new Date() 148 | options = { 149 | day: 'numeric', 150 | month: 'short', 151 | hour: 'numeric', 152 | minute: 'numeric', 153 | hour12: disable24Hour, 154 | timeZone: timeZ 155 | } 156 | finalDate = currentDate.toLocaleString(undefined, options) 157 | document.getElementById(dateId).textContent = finalDate 158 | } 159 | 160 | function updateTimeHook() { 161 | updateTime() 162 | interval = setInterval(() => { 163 | updateTime() 164 | }, 30 * 1000) 165 | } 166 | 167 | function updateWeather(weatherConfig) { 168 | /** 169 | * Get the weather using the location passed by the user using 170 | * the config and update it in a formatted way according to 171 | * the unit. 172 | */ 173 | userLocation = weatherConfig["location"].replace(/\ /g, ",") 174 | passedUnit = weatherConfig["unit"] 175 | unit = validWeatherUnit.includes(passedUnit.substring(0, 3)) ? 176 | passedUnit : "cel" 177 | 178 | fetchUrl = apiUrl + `?q=${userLocation}&appid=${appId}&units=metric` 179 | 180 | fetch(fetchUrl) 181 | .then(response => {return response.json()}) 182 | .then(jsonData => { 183 | temp = Math.floor(jsonData["main"]["temp"]) 184 | weatherType = jsonData["weather"][0]["main"] 185 | 186 | temp = !unit.includes("cel") ? 187 | getFahrenheit(temp) + "°F" : temp + "°C" 188 | weatherText = temp + ", " + indexUppercase(weatherType) 189 | document.getElementById(weatherId).innerHTML = weatherText 190 | }) 191 | } 192 | 193 | function readJSON(fileName) { 194 | // Load the data of the passed file. 195 | fetch(fileName) 196 | .then(response => {return response.json()}) 197 | .then(jsonData => { 198 | parseAndCreate(jsonData) 199 | saveSettings(jsonData) 200 | }) 201 | } 202 | 203 | function saveSettings(settings) { 204 | if (debug) return; 205 | 206 | BROWSER.storage.sync.set(settings) 207 | } 208 | 209 | function parseAndCreate(jsonData) { 210 | /** 211 | * Parse the passed jsonData and create div's accordingly. 212 | */ 213 | this.userName = jsonData["user"] 214 | 215 | // Enable the settings button if it is enabled 216 | if (jsonData["settingsIcon"]) enableCog(); 217 | 218 | // If the user has not passed any custom message 219 | if (Object.keys(jsonData).includes("message") && 220 | typeof(jsonData["message"]) == "string" && 221 | jsonData["message"] != "") 222 | builtMsg = jsonData["message"] 223 | else 224 | builtMsg = this.handleMessage(this.userName); 225 | 226 | document.getElementById(messageId).textContent = builtMsg 227 | // Check if 24 hour is disabled 228 | disable24Hour = jsonData["disable24Hour"] 229 | timeZ = jsonData["timeZone"] 230 | timeZ = isValidTimeZone(timeZ) ? timeZ : undefined 231 | // Check if welcome message is supposed to be disabled 232 | if (jsonData["disableMessage"]) 233 | document.getElementById(messageDivId).style.display = "none" 234 | if (jsonData["disableDate"]) { 235 | // Hide the date and the line 236 | document.getElementById(dateId).style.display = "none" 237 | document.getElementById(lineId).style.display = "none" 238 | } 239 | else 240 | updateTimeHook() 241 | if (jsonData["disableWeather"]){ 242 | // Hide the date and the line 243 | document.getElementById(weatherId).style.display = "none" 244 | document.getElementById(lineId).style.display = "none" 245 | } 246 | else 247 | updateWeather(jsonData["weatherConf"]) 248 | if (jsonData["disableSearchBar"]) 249 | document.getElementById(searchBarDivId).style.display = "none" 250 | else 251 | initSearchBar(jsonData) 252 | 253 | sqrs = jsonData["squares"] 254 | 255 | sqrs.forEach((element, index) => { 256 | sqr = createSqr(element, index) 257 | document.getElementById(otherContentId).appendChild(sqr) 258 | }) 259 | 260 | // Apply styling if present 261 | if (jsonData["style"]) { 262 | styleData = jsonData["style"] 263 | if (styleData["backgroundColor"]) { 264 | document.body.style.backgroundColor = styleData["backgroundColor"] 265 | } 266 | if (styleData["messageColor"]) { 267 | document.getElementById(messageId).style.color = styleData["messageColor"] 268 | } 269 | if (styleData["dateColor"]) { 270 | document.getElementById(dateId).style.color = styleData["dateColor"] 271 | } 272 | if (styleData["lineColor"]) { 273 | document.getElementById(lineId).style.color = styleData["lineColor"] 274 | } 275 | if (styleData["weatherColor"]) { 276 | document.getElementById(weatherId).style.color = styleData["weatherColor"] 277 | } 278 | if (styleData["searchColor"]) { 279 | document.getElementById(searchBarId).style.color = styleData["searchColor"] 280 | } 281 | if (styleData["searchBackgroundColor"]) { 282 | document.getElementById(searchBarId).style.backgroundColor = styleData["searchBackgroundColor"] 283 | autocompleteBackgroundColor = styleData["searchBackgroundColor"] 284 | } 285 | if (styleData["searchPlaceholderColor"]) { 286 | document.getElementById(searchBarId).classList.add(createPlaceholderStyleClass(styleData["searchPlaceholderColor"])); 287 | } 288 | if (styleData["autocompleteHighlightBackgroundColor"]) { 289 | addAutocompleteStyleClass(styleData["autocompleteHighlightBackgroundColor"]); 290 | } 291 | if (styleData["squareBackgroundColor"]) { 292 | elements = document.getElementsByClassName("sqr") 293 | var i; 294 | for (i = 0; i < elements.length; i++) { 295 | elements[i].style.backgroundColor = styleData["squareBackgroundColor"] 296 | } 297 | } 298 | if (styleData["squareColor"]) { 299 | elements = document.querySelectorAll(".sqr a") 300 | var i; 301 | for (i = 0; i < elements.length; i++) { 302 | elements[i].style.color = styleData["squareColor"] 303 | } 304 | } 305 | } 306 | 307 | // Extract the quicklinks from the sqrs 308 | extractQuickLinks(sqrs, jsonData["style"]); 309 | } 310 | 311 | function createSqr(sqrData, index) { 312 | // Create a new square division with the passed element 313 | name = sqrData["name"]; 314 | link = sqrData["url"]; 315 | links = sqrData["links"]; 316 | color = sqrData["color"]; 317 | 318 | // Sometimes, the user might not have set a value for the color, 319 | // in which case it will be undefined. 320 | colorValid = (color == undefined) ? false : isColorValid(color); 321 | 322 | div = document.createElement("div") 323 | cls = document.createAttribute("class") 324 | div.setAttributeNode(cls) 325 | div.classList.add("sqr") 326 | 327 | if (colorValid) 328 | customClass = createClass(color); 329 | else if (index > bgClassContainer.length - 1) 330 | customClass = 'media'; 331 | else 332 | customClass = bgClassContainer[index]; 333 | 334 | div.classList.add(customClass); 335 | 336 | h4 = getTitle(name, link); 337 | 338 | div.appendChild(h4) 339 | 340 | links.forEach(element => { 341 | aName = element["name"] 342 | aHref = element["url"] 343 | 344 | a = document.createElement("a") 345 | attrHref = document.createAttribute("href") 346 | attrHref.value = aHref 347 | a.setAttributeNode(attrHref) 348 | 349 | a.textContent = aName 350 | 351 | div.appendChild(a) 352 | }) 353 | 354 | return div 355 | } 356 | 357 | function getTitle(titleContent, linkHref=null) { 358 | /** 359 | * Create the title for the sqr card. 360 | * 361 | * The card will be optionally clicable and will open 362 | * a new link. 363 | * 364 | * If the link is not passed in the config then the title 365 | * will not be clickable. 366 | */ 367 | h4 = document.createElement("h4"); 368 | 369 | if (!linkHref) { 370 | h4.textContent = titleContent; 371 | return h4; 372 | } 373 | 374 | // If the link is passed, create a nested child 375 | a = document.createElement("a"); 376 | a.setAttribute("href", linkHref); 377 | a.textContent = titleContent; 378 | 379 | h4.appendChild(a); 380 | return h4; 381 | } 382 | 383 | // Utility functions 384 | 385 | function isValidTimeZone(tz) { 386 | if (!Intl || !Intl.DateTimeFormat().resolvedOptions().timeZone) { 387 | throw 'Time zones are not available in this environment'; 388 | } 389 | 390 | try { 391 | Intl.DateTimeFormat(undefined, {timeZone: tz}); 392 | return true; 393 | } 394 | catch (ex) { 395 | return false; 396 | } 397 | } 398 | 399 | function getFahrenheit(inCelcius) { 400 | return Math.floor((inCelcius * 9 / 5) + 32) 401 | } 402 | 403 | function indexUppercase(unformatted) { 404 | return unformatted.split(" ").map(w => { 405 | return w[0].toUpperCase() + w.substring(1) 406 | }).join(" ") 407 | } 408 | 409 | function inRange(number, min, max) { 410 | return (number >= min && number <= max) 411 | } 412 | 413 | function isColorValid(color) { 414 | /** 415 | * Check if the passed color is valid. 416 | * 417 | * Currently supports only css color names 418 | * or hex colors having 3 or 6 characters. 419 | */ 420 | // Check CSS match 421 | let defaultStyles = new Option().style; 422 | defaultStyles.color = color 423 | if (defaultStyles.color == color) return true; 424 | 425 | // In case the above failed, check if it's a hex 426 | return /^#([0-9A-F]{3}){1,2}$/i.test(color); 427 | } 428 | 429 | function createClass(color) { 430 | /** 431 | * Create a new class in a style and add it to 432 | * the head. 433 | * 434 | * I did check other alternatives since adding something like 435 | * this in the innerHTML is not a preferred way to go, 436 | * especially since I'm building this as an extension, 437 | * however, there's no other way. 438 | * 439 | * Since I also want to add hover effects, there seriously 440 | * is no other way to do that without adding a style or using 441 | * a library (cannot/don't want to do that because this is an extension). 442 | */ 443 | var style = document.createElement('style'); 444 | const newClassName = `bg-${Math.random().toString(36).substring(7)}`; 445 | style.type = 'text/css'; 446 | style.innerHTML = `.${newClassName} h4 {color: ${color} !important;} .${newClassName} a:hover {color: ${color} !important;}`; 447 | document.getElementsByTagName('head')[0].appendChild(style); 448 | 449 | return newClassName; 450 | } 451 | 452 | function createPlaceholderStyleClass(color) { 453 | /** 454 | * Create a new class with for placeholder styling. 455 | * 456 | * This is pretty much a continuation of what has done preivously 457 | * in the createClass function. 458 | */ 459 | var style = document.createElement('style'); 460 | const newClassName = `bg-${Math.random().toString(36).substring(7)}`; 461 | style.type = 'text/css'; 462 | style.innerHTML = `::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */ 463 | color: ${color} !important; 464 | opacity: 1; /* Firefox */ 465 | } 466 | 467 | :-ms-input-placeholder { /* Internet Explorer 10-11 */ 468 | color: ${color} !important; 469 | } 470 | 471 | ::-ms-input-placeholder { /* Microsoft Edge */color: ${color} !important;}`; 472 | document.getElementsByTagName('head')[0].appendChild(style); 473 | 474 | return newClassName; 475 | } 476 | 477 | function addAutocompleteStyleClass(color) { 478 | /** 479 | * Add some colors for the autocomplete classes in order to 480 | * keep. We need to add styles for :hover property so it is 481 | * easier to just inject some CSS. 482 | */ 483 | var style = document.createElement("style"); 484 | style.type = "text/css"; 485 | style.innerHTML = ` 486 | .autocomplete-item:hover { 487 | background: ${color} !important; 488 | } 489 | 490 | .autocomplete-active { 491 | background: ${color} !important; 492 | } 493 | `; 494 | document.getElementsByTagName('head')[0].appendChild(style); 495 | } 496 | 497 | 498 | function extractQuickLinks(passedSqrs, style) { 499 | /** 500 | * Extract the quicklinks passed in the config 501 | * 502 | * Cache the quicklinks passed by the user in the config JSON 503 | * so that they can be used as a shortcut called from the 504 | * search bar. 505 | */ 506 | passedSqrs.forEach(linksContainer => { 507 | linksContainer.links.forEach(linkObject => this.validQuickLinks[linkObject.name] = linkObject.url); 508 | }); 509 | 510 | // Start the autocomplete 511 | autocomplete(document.getElementById("search-bar-input"), this.validQuickLinks, style); 512 | } 513 | 514 | // Listen to key click 515 | 516 | function listenForSettings() { 517 | document.onkeyup = event => { 518 | // Show the settings if ctrl and , is pressed 519 | if (event.ctrlKey && event.which == 188) 520 | showSettings(); 521 | } 522 | } 523 | 524 | // Handle the settings cog 525 | 526 | function enableCog() { 527 | /** 528 | * Enable the settings cog. 529 | * 530 | * It will be disabled by default, however, if the user 531 | * wishes to enable it through the config, it will be shown. 532 | * 533 | * Once shown, we need to add some event listeners to it as 534 | * well so it works the right way. 535 | */ 536 | settingsCogElement = document.getElementById("settings-cog"); 537 | 538 | // Unhide it 539 | settingsCogElement.style.display = "block"; 540 | 541 | // Add event listener 542 | settingsCogElement.onclick = function() { 543 | editor = showSettings() 544 | 545 | // Add an onclick listener to hide settings if the button is clicked 546 | // again. 547 | settingsCogElement.onclick = () => { 548 | hideSettings(editor); 549 | } 550 | } 551 | } 552 | -------------------------------------------------------------------------------- /js/settings.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File to handle editing the settings from the menu itself. 3 | * 4 | * A modal will be shown where the user can edit settings 5 | * and finally when submitted, the settings will be written to 6 | * the config.json and this config is read each time the page 7 | * loads. 8 | */ 9 | 10 | modalId = "settings" 11 | closeId = "close" 12 | jsonContainer = "jsoneditor" 13 | 14 | // Detect browser 15 | BROWSER = detectBrowser() 16 | 17 | function showSettings() { 18 | modalEl = document.getElementById(modalId) 19 | closeBtn = document.getElementsByClassName(closeId)[0] 20 | modalEl.style.display = "block" 21 | 22 | // Define the jsonEditor 23 | container = document.getElementById(jsonContainer) 24 | const options = { 25 | mode: 'tree', 26 | modes: ['code', 'tree', 'view'] 27 | } 28 | const editor = new JSONEditor(container, options) 29 | loadJson(editor) 30 | 31 | closeBtn.onclick = () => { 32 | hideSettings(editor); 33 | } 34 | 35 | return editor 36 | } 37 | 38 | function hideSettings(editor) { 39 | /** 40 | * Hide the settings. 41 | * 42 | * This function is to be called when the settings window 43 | * is supposed to be hidden, This will automatically 44 | * handle saving the updated settings to the localstorage. 45 | */ 46 | modalEl.style.display = "none" 47 | // Get the updated JSON 48 | updatedJson = editor.get() 49 | BROWSER.storage.sync.set(updatedJson) 50 | document.getElementById(jsonContainer).innerHTML = "" 51 | location.reload() 52 | } 53 | 54 | async function loadJson(editor) { 55 | BROWSER.storage.sync.get(async result => { 56 | if (Object.keys(result).length == 0) { 57 | const response = await fetch("config.json") 58 | result = await response.json() 59 | } 60 | // Populate the editor 61 | editor.set(result) 62 | }) 63 | }; 64 | 65 | function detectBrowser() { 66 | // Firefox 67 | if (typeof InstallTrigger !== 'undefined') 68 | BROWSER = browser 69 | else if (!!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime)) 70 | BROWSER = chrome 71 | 72 | return BROWSER; 73 | }; 74 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "minimal-startpage", 4 | "short_name": "minimal-startpage", 5 | "version": "0.2", 6 | "description": "Overrides the browsers newtab page with a custom startpage.", 7 | "author": "deepjyoti30", 8 | 9 | "icons": { 10 | "64": "img/icon64.png" 11 | }, 12 | "chrome_url_overrides": { 13 | "newtab": "index.html" 14 | }, 15 | "permissions": ["storage"] 16 | } 17 | -------------------------------------------------------------------------------- /scss/main.scss: -------------------------------------------------------------------------------- 1 | $background: #282c34; 2 | $foreground: #abb2bf; 3 | @import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap'); 4 | $media: #61afef; 5 | $work: #e06c75; 6 | $social: #e5c07b; 7 | $others: #98c379; 8 | $funky: #56b6c2; 9 | $purple: #c678dd; 10 | $upvoty: #FF8A65; 11 | $indigo: #7986CB; 12 | $foxxy: #A1887F; 13 | 14 | .roboto { 15 | font-family: 'Roboto', sans-serif; 16 | } 17 | 18 | // JetBrains Mono 19 | @font-face { 20 | font-family: "JetBrains Mono"; 21 | src: url("../fonts/woff/JetBrainsMono-Regular.woff") format("woff"), 22 | url("../fonts/woff2/JetBrainsMono-Regular.woff2") format("woff2"); 23 | } 24 | 25 | .jetbrains-mono { 26 | font-family: 'JetBrains Mono'; 27 | } 28 | 29 | body { 30 | height: 97.5vh; 31 | display: flex; 32 | align-items: center; 33 | justify-content: center; 34 | background: $background; 35 | color: $foreground; 36 | @extend .jetbrains-mono; 37 | } 38 | 39 | .main { 40 | width: 100%; 41 | text-align: center; 42 | 43 | #date { 44 | h2 { 45 | padding-top: 15px; 46 | display: inline-block; 47 | vertical-align: top; 48 | } 49 | } 50 | 51 | #date-text, #weather-text { 52 | color: darken($foreground, 15); 53 | } 54 | 55 | #message-text { 56 | font-size: 23px; 57 | } 58 | 59 | #search-bar { 60 | width: 50%; 61 | margin: 0 auto 50px auto; 62 | height: 45px; 63 | padding-top: 35px; 64 | position: relative; 65 | display: inline-block; 66 | 67 | 68 | #search-bar-input { 69 | height: 50px; 70 | width: 100%; 71 | background: lighten($background, 5); 72 | box-shadow: none; 73 | border: none; 74 | text-align: center; 75 | border-radius: 6px; 76 | outline: none; 77 | padding: 7px 14px; 78 | font-size: 18px; 79 | color: $foreground; 80 | box-sizing: border-box; 81 | 82 | &:focus { 83 | box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); 84 | transition: all 0.3s cubic-bezier(.25,.8,.25,1); 85 | } 86 | } 87 | 88 | .autocomplete-items-container { 89 | position: absolute; 90 | top: 100%; 91 | left: 0; 92 | right: 0; 93 | z-index: 99; 94 | border-radius: 6px; 95 | background: lighten($background, 5); 96 | box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); 97 | transition: all 0.3s cubic-bezier(.25,.8,.25,1); 98 | 99 | .autocomplete-item { 100 | width: 100%; 101 | background: lighten($background, 5); 102 | box-shadow: none; 103 | border: none; 104 | text-align: center; 105 | outline: none; 106 | padding: 7px 14px; 107 | font-size: 18px; 108 | color: $foreground; 109 | box-sizing: border-box; 110 | z-index: -1; 111 | cursor: pointer; 112 | 113 | &:hover { 114 | background: lighten($background, 10); 115 | } 116 | } 117 | 118 | .autocomplete-active { 119 | background: lighten($background, 8); 120 | } 121 | } 122 | 123 | @media only screen and (max-width: 791px) { 124 | width: 65%; 125 | } 126 | } 127 | 128 | #other-content { 129 | margin: 40px auto; 130 | padding: 10px 0; 131 | 132 | .sqr { 133 | vertical-align: top; 134 | display: inline-block; 135 | margin-left: 5px; 136 | margin-right: 5px; 137 | width: 170px; 138 | background: lighten($background, 5); 139 | padding: 15px 15px; 140 | border-radius: 6px; 141 | min-height: 150px; 142 | margin-top: 10px; 143 | 144 | h4 { 145 | font-size: 18px; 146 | margin: 15px; 147 | 148 | a { 149 | color: inherit; 150 | font-size: inherit; 151 | } 152 | } 153 | 154 | &:hover { 155 | box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); 156 | transition: all 0.3s cubic-bezier(.25,.8,.25,1); 157 | } 158 | 159 | a { 160 | color: #9E9E9E; 161 | font-size: 16px; 162 | transition: .1s ease-in; 163 | display: block; 164 | text-decoration: none; 165 | line-height: 22px; 166 | 167 | &:hover { 168 | color: $foreground; 169 | text-decoration: none; 170 | transition: .1s ease-in; 171 | } 172 | } 173 | } 174 | 175 | .media { 176 | h4, a:hover { 177 | color: $media; 178 | } 179 | } 180 | 181 | .work { 182 | h4, a:hover { 183 | color: $work; 184 | } 185 | } 186 | 187 | .social { 188 | h4, a:hover { 189 | color: $social; 190 | } 191 | 192 | } 193 | 194 | .others { 195 | h4, a:hover { 196 | color: $others; 197 | } 198 | } 199 | 200 | .funky { 201 | h4, a:hover { 202 | color: $funky; 203 | } 204 | } 205 | 206 | .purple { 207 | h4, a:hover { 208 | color: $purple; 209 | } 210 | } 211 | 212 | .upvoty { 213 | h4, a:hover { 214 | color: $upvoty; 215 | } 216 | } 217 | 218 | .indigo { 219 | h4, a:hover { 220 | color: $indigo; 221 | } 222 | } 223 | 224 | .foxxy { 225 | h4, a:hover { 226 | color: $foxxy; 227 | } 228 | } 229 | } 230 | } 231 | 232 | .settings-modal { 233 | display: none; 234 | position: fixed; 235 | z-index: 3; 236 | width: 80vw; 237 | height: 80vh; 238 | overflow: auto; 239 | background: $foreground; 240 | color: #212121; 241 | padding: 15px; 242 | 243 | .modal-content { 244 | width: 100%; 245 | height: 100%; 246 | } 247 | 248 | .close { 249 | color: #aaa; 250 | float: right; 251 | font-size: 28px; 252 | font-weight: bold; 253 | 254 | &:hover, &:focus { 255 | color: black; 256 | text-decoration: none; 257 | cursor: pointer; 258 | } 259 | } 260 | } 261 | 262 | #settings-cog { 263 | width: 23px; 264 | height: 23px; 265 | position: absolute; 266 | bottom: 25px; 267 | right: 25px; 268 | transition: 2s ease-in; 269 | display: none; 270 | 271 | &:hover .cog { 272 | fill: white; 273 | stroke: white; 274 | transition: 2s ease-in; 275 | } 276 | } 277 | --------------------------------------------------------------------------------