Compare commits
185 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a17ce90e07 | ||
|
|
3f6aea4ae4 | ||
|
|
563804c415 | ||
|
|
7c055d6aff | ||
|
|
3e80586620 | ||
|
|
0464afea27 | ||
|
|
298a7da3b7 | ||
|
|
9c7bfafa23 | ||
|
|
752ce62f24 | ||
|
|
f458a69781 | ||
|
|
e967cebdc8 | ||
|
|
d9a4c76a8e | ||
|
|
771b374a0b | ||
|
|
10d11a39c6 | ||
|
|
2e36a58b78 | ||
|
|
2283492c2c | ||
|
|
0d017fa362 | ||
|
|
0c6022aa2d | ||
|
|
da5a4da97b | ||
|
|
69189fce79 | ||
|
|
93b90eda5d | ||
|
|
10738a5f8b | ||
|
|
d8620b64de | ||
|
|
d0874f7f6a | ||
|
|
99c3a0525c | ||
|
|
88cc56d9d4 | ||
|
|
aa600ba8c9 | ||
|
|
69b3a983db | ||
|
|
148c38085a | ||
|
|
dc5757f7db | ||
|
|
6a7ecd005e | ||
|
|
839d7bab79 | ||
|
|
da4e1cbc81 | ||
|
|
127045bbf6 | ||
|
|
267d38f06e | ||
|
|
7db55dddbd | ||
|
|
6970984941 | ||
|
|
2ad283abb8 | ||
|
|
8091fc7dbd | ||
|
|
4054b10714 | ||
|
|
b5ef757a00 | ||
|
|
389a8bfdb8 | ||
|
|
f54ce58b21 | ||
|
|
20b33346d0 | ||
|
|
8843fac900 | ||
|
|
bb4760d2c9 | ||
|
|
48e4e50fc7 | ||
|
|
e396ba2465 | ||
|
|
2ee44a6e18 | ||
|
|
ad094ccfdc | ||
|
|
5c5ec92eb6 | ||
|
|
2857c13434 | ||
|
|
9cb00fffba | ||
|
|
b6907a5aa0 | ||
|
|
45af502520 | ||
|
|
e05d65401e | ||
|
|
2ab09ff582 | ||
|
|
c871512e87 | ||
|
|
f821cf2314 | ||
|
|
76d24340c1 | ||
|
|
e2b7789eba | ||
|
|
e6ead89cdc | ||
|
|
a97b969e6f | ||
|
|
f9c129786c | ||
|
|
e149b57fb6 | ||
|
|
82417dc230 | ||
|
|
c5ae4fc9b4 | ||
|
|
e8ba860592 | ||
|
|
62bfd162e3 | ||
|
|
80c5c9cfb0 | ||
|
|
19e3fce5b6 | ||
|
|
5aafb4228b | ||
|
|
43101b7ded | ||
|
|
88c8428ae2 | ||
|
|
1055427e33 | ||
|
|
85a3ce0769 | ||
|
|
5c682eac26 | ||
|
|
4db5104181 | ||
|
|
d18020e4bd | ||
|
|
2772cfdefc | ||
|
|
92efb3ed23 | ||
|
|
f7acd0188d | ||
|
|
7fa5cf7f7d | ||
|
|
722f2711ae | ||
|
|
30dcc789ed | ||
|
|
dc013deaad | ||
|
|
7f49a412aa | ||
|
|
4e774d9ea3 | ||
|
|
30c05f03bf | ||
|
|
2edd9b4b07 | ||
|
|
24e261165b | ||
|
|
39188d5988 | ||
|
|
e175a1edfa | ||
|
|
6f7b6d2337 | ||
|
|
97c6fa58d9 | ||
|
|
ec66e8c9f9 | ||
|
|
35a60f07b6 | ||
|
|
50da14cce6 | ||
|
|
d45fec5028 | ||
|
|
77f2522a80 | ||
|
|
92d0d7efae | ||
|
|
a6c1a21088 | ||
|
|
983a6727e2 | ||
|
|
5da8731017 | ||
|
|
b78f4ccf26 | ||
|
|
2fa7567cf3 | ||
|
|
cde3743ff8 | ||
|
|
1a165f4f1d | ||
|
|
56944b3a07 | ||
|
|
6c39a751a1 | ||
|
|
2f7fd62d5c | ||
|
|
af8223d818 | ||
|
|
298f43bda2 | ||
|
|
7c8c0cfb85 | ||
|
|
1e99676ff8 | ||
|
|
3638e67f28 | ||
|
|
2d42753e77 | ||
|
|
39969cde6d | ||
|
|
40452b71bf | ||
|
|
ab1a7cdf5f | ||
|
|
bdfae155ab | ||
|
|
4ff9ef3545 | ||
|
|
9f21ffe5f0 | ||
|
|
5be47d798b | ||
|
|
c7e19aad03 | ||
|
|
df630e953a | ||
|
|
b5a0cbe0b2 | ||
|
|
aa6400b41f | ||
|
|
735ee6def9 | ||
|
|
9414a35fe8 | ||
|
|
13e5beadf6 | ||
|
|
3c398df411 | ||
|
|
27fb91e9a9 | ||
|
|
5e5214ad0c | ||
|
|
90eb9a424a | ||
|
|
9f961ffdde | ||
|
|
576d829c40 | ||
|
|
c6e9e2226a | ||
|
|
fa117515fc | ||
|
|
70a0ea931d | ||
|
|
d8e2b6cd17 | ||
|
|
379b401d4e | ||
|
|
665a093e41 | ||
|
|
69ebcd7b8b | ||
|
|
4dc7b4564d | ||
|
|
8b809d6f7f | ||
|
|
5cd96e6d10 | ||
|
|
a7516c3b2b | ||
|
|
da04a4f997 | ||
|
|
cbdf5c2a0b | ||
|
|
0881c3de77 | ||
|
|
e5986d2f5b | ||
|
|
6301e548e2 | ||
|
|
4f78262b96 | ||
|
|
6ef77ff0f8 | ||
|
|
8cd9c73ae3 | ||
|
|
85b75f042a | ||
|
|
91eef6ae94 | ||
|
|
bb9e452fea | ||
|
|
6f9a76506d | ||
|
|
dc11ce79e9 | ||
|
|
8e3d72aaa4 | ||
|
|
d34dc6008e | ||
|
|
146223c13b | ||
|
|
5109bb725d | ||
|
|
5883811535 | ||
|
|
48562212e0 | ||
|
|
8b268d680b | ||
|
|
60079f16dc | ||
|
|
72a8bdc28f | ||
|
|
2c3f0a663c | ||
|
|
7f4716f637 | ||
|
|
4ecf43e594 | ||
|
|
d22f7ceb71 | ||
|
|
f6965a8ceb | ||
|
|
541c7dbd78 | ||
|
|
eba3150396 | ||
|
|
7217d0dcea | ||
|
|
7e03b33120 | ||
|
|
9ee061c8fd | ||
|
|
e018a1118a | ||
|
|
fd98cd4af1 | ||
|
|
e0a0f803a2 | ||
|
|
a513a9762a | ||
|
|
cbf63436fb |
59
.eslintrc
@@ -1,59 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"es6": true,
|
||||
"amd": true,
|
||||
"node": true,
|
||||
"browser": true,
|
||||
"commonjs": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 9,
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"jsx": true,
|
||||
"forOf": true,
|
||||
"spread": true,
|
||||
"modules": true,
|
||||
"classes": true,
|
||||
"generators": true,
|
||||
"restParams": true,
|
||||
"regexUFlag": true,
|
||||
"regexYFlag": true,
|
||||
"globalReturn": true,
|
||||
"destructuring": true,
|
||||
"impliedStrict": true,
|
||||
"blockBindings": true,
|
||||
"defaultParams": true,
|
||||
"octalLiterals": true,
|
||||
"arrowFunctions": true,
|
||||
"binaryLiterals": true,
|
||||
"templateStrings": true,
|
||||
"superInFunctions": true,
|
||||
"unicodeCodePointEscapes": true,
|
||||
"objectLiteralShorthandMethods": true,
|
||||
"objectLiteralComputedProperties": true,
|
||||
"objectLiteralDuplicateProperties": true,
|
||||
"objectLiteralShorthandProperties": true
|
||||
}
|
||||
},
|
||||
"plugins": [],
|
||||
"rules": {
|
||||
"semi": "error",
|
||||
"indent": [ 0, 2 ],
|
||||
"strict": "off",
|
||||
"eqeqeq": "error",
|
||||
"no-var": "warn",
|
||||
"no-undef": "warn",
|
||||
"comma-dangle": "warn",
|
||||
"no-dupe-args": "warn",
|
||||
"no-dupe-keys": "warn",
|
||||
"require-await": "warn",
|
||||
"no-global-assign": "warn",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-dupe-class-members": "error"
|
||||
},
|
||||
"globals": {
|
||||
"_config": false,
|
||||
"console": false
|
||||
}
|
||||
}
|
||||
1
.github/FUNDING.yml
vendored
@@ -1,2 +1,3 @@
|
||||
github: ohlookitsderpy
|
||||
patreon: ohlookitsderpy
|
||||
ko_fi: ohlookitsderpy
|
||||
|
||||
34
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Report a bug to help improve this project
|
||||
title: "[BUG]"
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Description**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behaviour:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
4. See error in console (Ctrl + Shift + I)
|
||||
|
||||
**Expected behaviour**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. Windows, Ubuntu]
|
||||
- OS Version: [e.g 10, 19.10]
|
||||
- Browser: [e.g. Chrome, Firefox]
|
||||
- Browser Version: [e.g. 70]
|
||||
- Mue Version: [e.g. 0.5]
|
||||
- Resolution: [e.g 1920x1080]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
14
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for this project
|
||||
title: "[Feature Request]"
|
||||
labels: enhancement
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Description**
|
||||
A clear and concise description of what you want in this new feature.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
7
.gitignore
vendored
@@ -1,8 +1,9 @@
|
||||
# Directories
|
||||
.vscode/
|
||||
node_modules/
|
||||
.vscode/
|
||||
build/
|
||||
|
||||
# Files
|
||||
yarn.lock
|
||||
yarn-error.log
|
||||
package-lock.json
|
||||
yarn-error.log
|
||||
yarn.lock
|
||||
|
||||
76
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at github@muetab.xyz. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
42
LICENSE
@@ -1,21 +1,29 @@
|
||||
MIT License
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2018-2019 David Ralph (ohlookitsderpy)
|
||||
Copyright (c) 2018-2020 Mue Tab
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
147
README.md
@@ -1,67 +1,101 @@
|
||||
<img src='assets/logo/logo_horizontal.png'>
|
||||
<img src="https://raw.githubusercontent.com/mue/branding/master/logo/logo_round.png" align="left" width="180px" height="180px"/>
|
||||
<img align="left" width="0" height="192px" hspace="10"/>
|
||||
|
||||
# Mue
|
||||
[](https://www.codacy.com/app/ohlookitsderpy/Mue?utm_source=github.com&utm_medium=referral&utm_content=ohlookitsderpy/Mue&utm_campaign=Badge_Grade)
|
||||
[](https://discord.gg/HJmmmTB)
|
||||
> <a href="https://muetab.xyz/">Mue</a>
|
||||
|
||||
<a href='https://ko-fi.com/ohlookitsderpy' target='_blank'><img height='36' src='assets/kofi.png' alt='Buy me a Coffee at ko-fi.com' /></a>
|
||||
<a href='https://patreon.com/ohlookitsderpy' target='_blank'><img height='36' src='assets/patreon.png' alt='Become a patron on patreon.com' /></a>
|
||||
[](/LICENSE) [](https://discord.gg/zv8C9F8) []()
|
||||
<br>
|
||||
[]() []() []()
|
||||
|
||||
Fast, open and free-to-use new tab page for most modern browsers
|
||||
Mue is a fast, open and free-to-use browser extension that gives a new, fresh and customizable tab page to most modern browsers
|
||||
|
||||
<br>
|
||||
|
||||
## Table of contents
|
||||
* [Screenshot](#screenshot)
|
||||
* [Features](#features)
|
||||
* [Planned Features](#planned-features)
|
||||
* [Installation](#installation)
|
||||
* [Chrome](#chrome)
|
||||
* [Firefox](#firefox)
|
||||
* [Chromium](#edge-chromium)
|
||||
* [Opera/Other](#operaother)
|
||||
* [Contributing](#development)
|
||||
* [Requirements](#requirements)
|
||||
* [Starting](#starting)
|
||||
* [Building](#building)
|
||||
* [Credits](#credits)
|
||||
* [Maintainers](#maintainers)
|
||||
* [Contributors]()
|
||||
* [Other](#other)
|
||||
|
||||
|
||||
## Screenshot
|
||||
*May be updated in the future*
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
* Fast and free
|
||||
* Supports multiple browsers
|
||||
* Actively developed and opensource
|
||||
* Multiple language support
|
||||
* Actively developed and open source
|
||||
* Automatically updating API (no tracking) with new photos, quotes and offline mode
|
||||
* Search bar
|
||||
* Settings - enable/disable various features and customise parts of Mue
|
||||
* Update modal, copy button and more!
|
||||
|
||||
## Planned Features
|
||||
* Multilingual support
|
||||
|
||||
## Installation
|
||||
*A demo of the tab can be found [here](https://mue.now.sh)*
|
||||
### Chrome
|
||||
<a href='https://chrome.google.com/webstore/detail/mue/bngmbednanpcfochchhgbkookpiaiaid'><img src='assets/chrome.png' target='_blank'></a>
|
||||
[](https://chrome.google.com/webstore/detail/mue/bngmbednanpcfochchhgbkookpiaiaid)
|
||||
<br>
|
||||
[Chrome Web Store](https://chrome.google.com/webstore/detail/mue/bngmbednanpcfochchhgbkookpiaiaid)
|
||||
|
||||
Link: [Chrome Web Store](https://chrome.google.com/webstore/detail/mue/bngmbednanpcfochchhgbkookpiaiaid)
|
||||
|
||||
Development: Read the [Development](#development) section
|
||||
### Firefox
|
||||
<a href='https://addons.mozilla.org/firefox/addon/mue'><img src='assets/firefox.png' target='_blank'></a>
|
||||
[](https://addons.mozilla.org/firefox/addon/mue)
|
||||
<br>
|
||||
[Firefox Add-ons](https://addons.mozilla.org/firefox/addon/mue)
|
||||
|
||||
Link: [Firefox Add-ons](https://addons.mozilla.org/firefox/addon/mue)
|
||||
### Edge (Chromium)
|
||||
[Microsoft Edge Addons](https://microsoftedge.microsoft.com/addons/detail/aepnglgjfokepefimhbnibfjekidhmja)
|
||||
|
||||
Development: Read the [Development](#development) section
|
||||
### Opera/Other
|
||||
Development: Read the [Development](#development) section
|
||||
Link: [GitHub Releases](https://github.com/mue/mue/releases)
|
||||
|
||||
### Development
|
||||
<h5>Requirements</h5>
|
||||
#### Requirements
|
||||
<ol>
|
||||
<li>Git (optional)</li>
|
||||
<li>Node.js</li>
|
||||
<li><a href='https://git-scm.com'>Git</a> (optional)</li>
|
||||
<li><a href='https://nodejs.org'>Node.JS</a></li>
|
||||
<li>A suitable browser</li>
|
||||
</ol>
|
||||
<h5>Starting</h5>
|
||||
<ol>
|
||||
<li> <code>git clone https://github.com/ohlookitsderpy/Mue</code> (If you don't have Git just go to <b>Clone or
|
||||
download</b> and click <b>Download ZIP</b>)
|
||||
<li>Open a terminal and run these commands: (in the Mue directory)
|
||||
<li> <code>yarn</code> (or <code>npm install</code>)
|
||||
<li> <code>yarn run sass-watch</code> (or <code>npm run sass-watch</code>)
|
||||
<li>Open another terminal and run this command: (in the Mue directory)
|
||||
<li> <code>yarn run js-watch</code> (or <code>npm run js-watch</code>)
|
||||
<li>Start developing! (See the sections below for how to set it up with your browser)
|
||||
<li> clone the repository using <code>git clone https://github.com/mue/mue.git</code>
|
||||
<li> run <code>yarn</code> or <code>npm i</code> to install all needed dependencies
|
||||
<li> run <code>yarn start</code> or <code>npm start</code> to start testing
|
||||
<li> Code your heart out! (See the sections below for how to build the extension)
|
||||
</ol>
|
||||
<h2>Building</h5>
|
||||
<details>
|
||||
<summary><b>Chrome</b> (Click to expand)</summary>
|
||||
<summary><b>Chrome/Edge (Chromium)</b> (Click to expand)</summary>
|
||||
<ol>
|
||||
<li> Rename <code>manifest-chrome.json</code> to <code>manifest.json</code>
|
||||
<li> <code>yarn run build</code> or <code>npm run build</code>
|
||||
<li> Rename <code>manifest-chrome.json</code> in the "manfiest" folder to <code>manifest.json</code> in "build"
|
||||
<li> Visit <code>chrome://extensions</code> in Chrome
|
||||
<li> Click <b>Load unpacked</b> (Make sure <b>Developer Mode</b> is on)
|
||||
<li> Go to the directory containing Mue and click <b>ok</b>
|
||||
<li> Go to the directory containing the built copy of Mue and click <b>ok</b>
|
||||
<li> Enjoy your new tab!
|
||||
</details>
|
||||
<details>
|
||||
<summary><b>Opera</b> (Click to expand)</summary>
|
||||
<ol>
|
||||
<li> Rename <code>manifest-opera.json</code> to <code>manifest.json</code>
|
||||
<li> <code>yarn run build</code> or <code>npm run build</code>
|
||||
<li> Rename <code>manifest-opera.json</code> in the "manfiest" folder to <code>manifest.json</code> in "build"
|
||||
<li> Copy <codebackground-opera.js</code> in the "manifest" folder to "build"
|
||||
<li> Visit <code>about://extensions</code> in Opera
|
||||
<li> Click <b>Load unpacked extension...</b> (Make sure <b>Developer Mode</b> is on)
|
||||
<li> Go to the directory containing Mue and click <b>ok</b>
|
||||
@@ -69,9 +103,10 @@ Development: Read the [Development](#development) section
|
||||
</details>
|
||||
<details>
|
||||
<summary><b>Firefox</b> (Click to expand)</summary>
|
||||
<i>Note: I'm currently trying to find a better method to do this, but this works for now.</i>
|
||||
<ol>
|
||||
<li> Rename <code>manifest-firefox.json</code> to <code>manifest.json</code>
|
||||
<li> <code>yarn run build</code> or <code>npm run build</code>
|
||||
<li> Rename <code>manifest-firefox.json</code> in the "manfiest" folder to <code>manifest.json</code> in "build"
|
||||
<li> Move <code>manifest/background-opera.js</code> to <code>build/background-opera.js</code>
|
||||
<li> Visit <code>about:debugging#addons</code> in Firefox
|
||||
<li> Click <b>Load Temporary Add-on</b>
|
||||
<li> Go to the directory containing Mue and click on the <b>manifest.json</b>
|
||||
@@ -82,45 +117,27 @@ Development: Read the [Development](#development) section
|
||||
<summary><b>Other</b> (Click to expand)</summary>
|
||||
<i>Note: To get the full new tab experience, set your browser to open the <code>index.html</code> on startup and tab open!</i>
|
||||
<ol>
|
||||
<li> <code>yarn run build</code> or <code>npm run build</code>
|
||||
<li> Open the <code>index.html</code> in your browser
|
||||
<li> Enjoy your new tab!
|
||||
</ol>
|
||||
</details>
|
||||
|
||||
## Screenshot
|
||||
*Will be updated if needed*
|
||||
|
||||
<img src='assets/screenshot.jpg'>
|
||||
|
||||
## Credits
|
||||
### Maintainers
|
||||
[ohlookitsderpy](https://github.com/ohlookitsderpy) - Founder, Lead development, Photographer <br>
|
||||
[TurboMarshmello](https://github.com/TurboMarshmello) - Name, Lead design, Photographer <br>
|
||||
|
||||
[Turbomarshmello](https://github.com/TurboMarshmello) - Portions of original code, name idea
|
||||
### Contributors
|
||||
[Wessel](https://github.com/Wessel) - Development <br>
|
||||
[Isaac](https://github.com/eartharoid) - QA, Development, Photographer <br>
|
||||
[Chris](https://github.com/auguwu) - Development <br>
|
||||
|
||||
[Pexels](https://pexels.com) - Stock photos used
|
||||
### Other
|
||||
[Pexels](https://pexels.com) - Stock photos used for offline mode
|
||||
|
||||
[Opera Forum](https://forums.opera.com/topic/25046/how-to-disable-completely-the-speed-dial/14) - Portions of code to add Opera support
|
||||
[Opera Forum](https://forums.opera.com/topic/25046/how-to-disable-completely-the-speed-dial/14) - Portions of code to add Opera support <br>
|
||||
[Google Fonts](https://fonts.google.com/specimen/Lexend+Deca) - Lexend Deca font
|
||||
|
||||
[Animate.css](https://daneden.github.io/animate.css) - Portions of code used to add animations
|
||||
|
||||
### Translations
|
||||
[ohlookitsderpy](https://github.com/ohlookitsderpy) - English (Quotes and Messages)
|
||||
|
||||
[Yanderella](https://github.com/Chivi19) - Italian (Quotes and Messages)
|
||||
|
||||
Pepehound - Spanish (Quotes and Messages)
|
||||
|
||||
Candystick - Portuguese (Some Quotes)
|
||||
|
||||
[PassTheWessel](https://github.com/PassTheWessel) - Dutch (Messages)
|
||||
|
||||
[Yanderella](https://github.com/Chivi19) and [ohlookitsderpy](https://github.com/ohlookitsderpy) - French (Messages)
|
||||
|
||||
[untocodes](https://github.com/untocodes) - Finnish and German (Messages)
|
||||
|
||||
[dondish](https://github.com/dondish) - Hebrew and Russian (Messages)
|
||||
|
||||
[MrSheldon](https://github.com/MrSheldon) - Arabic and Swedish (Messages)
|
||||
|
||||
*Feel free to pull request with other translations!*
|
||||
|
||||
and all the contributors <3
|
||||
And many thanks to [Highholding](https://discord.bio/p/highholding), [Noa Shapira](#), [Roee Lupo](https://github.com/MrSheldon), [Jeroen](#), [Glasvegas](https://twitter.com/_glasvegas), [Anders](https://github.com/FuryingFox/), [Oded Shapira](https://twitter.com/dondishdev) and [Nikka Lai](#) for letting us use their wonderful photographs
|
||||
|
||||
BIN
assets/kofi.png
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 925 B |
|
Before Width: | Height: | Size: 351 KiB After Width: | Height: | Size: 276 KiB |
14
manifest/background-opera.js
Normal file
@@ -0,0 +1,14 @@
|
||||
/* eslint-disable no-undef */
|
||||
// Original code sourced from https://forums.opera.com/topic/25046/how-to-disable-completely-the-speed-dial/14
|
||||
|
||||
chrome.tabs.onCreated.addListener((tab) => {
|
||||
if (tab.status === 'complete' && tab.url === 'chrome://startpage/') chrome.tabs.update(tab.id, {
|
||||
url: chrome.extension.getURL('index.html')
|
||||
});
|
||||
});
|
||||
|
||||
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
|
||||
if (changeInfo.status === 'complete' && tab.url === 'chrome://startpage/') chrome.tabs.update(tabId, {
|
||||
url: chrome.extension.getURL('index.html')
|
||||
});
|
||||
});
|
||||
18
manifest/chrome.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"offline_enabled": true,
|
||||
"name": "Mue",
|
||||
"description": "Fast, open and free-to-use new tab page for most modern browsers.",
|
||||
"version": "3.0.0",
|
||||
"browser_action": {
|
||||
"default_icon": "./icons/extension-icon.png"
|
||||
},
|
||||
"chrome_url_overrides": {
|
||||
"newtab": "index.html"
|
||||
},
|
||||
"icons": {
|
||||
"16": "./icons/16x16-circle.png",
|
||||
"48": "./icons/48x48-circle.png",
|
||||
"128": "./icons/128x128-circle.png"
|
||||
}
|
||||
}
|
||||
15
manifest/firefox.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Mue",
|
||||
"description": "Fast, open and free-to-use new tab page for most modern browsers.",
|
||||
"version": "3.0.0",
|
||||
"browser_action": {
|
||||
"default_icon": "./icons/extension-icon.png"
|
||||
},
|
||||
"chrome_url_overrides": {
|
||||
"newtab": "index.html"
|
||||
},
|
||||
"chrome_settings_overrides": {
|
||||
"homepage": "index.html"
|
||||
}
|
||||
}
|
||||
17
manifest/opera.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Mue",
|
||||
"description": "Fast, open and free-to-use new tab page for most modern browsers.",
|
||||
"version": "3.0.0",
|
||||
"browser_action": {
|
||||
"default_icon": "./icons/extension-icon.png"
|
||||
},
|
||||
"background": {
|
||||
"scripts": [
|
||||
"./background-opera.js"
|
||||
]
|
||||
},
|
||||
"permissions": [
|
||||
"tabs"
|
||||
]
|
||||
}
|
||||
70
package.json
@@ -1,17 +1,53 @@
|
||||
{
|
||||
"name": "mue",
|
||||
"description": "Fast, open and free-to-use new tab page for most modern browsers",
|
||||
"author": "ohlookitsderpy",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/ohlookitsderpy/Mue",
|
||||
"scripts": {
|
||||
"sass-watch": "sass --watch src/assets/scss:src/assets/css --style compressed",
|
||||
"js-watch": "webpack --progress --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "6.0.0",
|
||||
"sass": "1.20.3",
|
||||
"webpack": "4.32.2",
|
||||
"webpack-cli": "3.3.4"
|
||||
}
|
||||
}
|
||||
{
|
||||
"name": "mue",
|
||||
"private": true,
|
||||
"author": "David \"ohlookitsderpy\" Ralph <d.ralph@muetab.xyz> (https://derpyenterprises.org)",
|
||||
"maintainers": [
|
||||
"David \"ohlookitsderpy\" Ralph <d.ralph@muetab.xyz> (https://derpyenterprises.org)",
|
||||
"Alex \"TurboMarshmello\" Sparkes <a.sparkes@muetab.xyz> (https://github.com/TurboMarshmello)"
|
||||
],
|
||||
"description": "Fast, open and free-to-use new tab page for most modern browsers.",
|
||||
"repository": {
|
||||
"url": "github:mue/mue"
|
||||
},
|
||||
"homepage": "https://muetab.xyz",
|
||||
"bugs": "https://github.com/mue/mue/issues/new?assignees=&labels=bug&template=bug-report.md&title=%5BBUG%5D",
|
||||
"license": "BSD-3-Clause",
|
||||
"version": "3.0.0",
|
||||
"dependencies": {
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@muetab/quotes": "^1.0.0",
|
||||
"copy-text-to-clipboard": "^2.2.0",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"react-modal": "^3.11.2",
|
||||
"react-scripts": "3.4.1",
|
||||
"supports-webp": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.3.0",
|
||||
"node-sass": "^4.14.1"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"chrome": "cp manifest/chrome.json build/manifest.json",
|
||||
"firefox": "cp manifest/firefox.json build/manifest.json",
|
||||
"opera": "cp manifest/opera.json build/manifest.json && cp manifest/background-opera.js build/"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
BIN
public/fonts/LexendDeca-Regular.woff2
Normal file
BIN
public/icons/128x128-circle.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
public/icons/16x16-circle.png
Normal file
|
After Width: | Height: | Size: 673 B |
BIN
public/icons/48x48-circle.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
public/icons/extension-icon.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/icons/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
public/icons/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
17
public/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
|
||||
<head>
|
||||
<meta charset='utf-8' />
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1' />
|
||||
<link rel='icon' type='image/png' sizes='32x32' href='./icons/favicon-32x32.png'>
|
||||
<link rel='icon' type='image/png' sizes='16x16' href='./icons/favicon-16x16.png'>
|
||||
<title>New Tab</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to use Mue.</noscript>
|
||||
<div id='root'></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 146 KiB |
|
Before Width: | Height: | Size: 230 KiB After Width: | Height: | Size: 230 KiB |
|
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 737 KiB After Width: | Height: | Size: 737 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 390 KiB After Width: | Height: | Size: 390 KiB |
|
Before Width: | Height: | Size: 225 KiB After Width: | Height: | Size: 225 KiB |
|
Before Width: | Height: | Size: 251 KiB After Width: | Height: | Size: 251 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 300 KiB After Width: | Height: | Size: 300 KiB |
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 290 KiB After Width: | Height: | Size: 290 KiB |
|
Before Width: | Height: | Size: 324 KiB After Width: | Height: | Size: 324 KiB |
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 264 KiB |
|
Before Width: | Height: | Size: 495 KiB After Width: | Height: | Size: 495 KiB |
|
Before Width: | Height: | Size: 472 KiB After Width: | Height: | Size: 472 KiB |
|
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 280 KiB |
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
]
|
||||
}
|
||||
91
src/App.jsx
Normal file
@@ -0,0 +1,91 @@
|
||||
//* Imports
|
||||
import React from 'react';
|
||||
import Background from './components/Background';
|
||||
import Clock from './components/Clock';
|
||||
import Greeting from './components/Greeting';
|
||||
import Quote from './components/Quote';
|
||||
import Search from './components/Search';
|
||||
import Credit from './components/Credit';
|
||||
import Navbar from './components/Navbar';
|
||||
import Toast from './components/Toast';
|
||||
import Modal from 'react-modal';
|
||||
import './scss/index.scss';
|
||||
|
||||
const Settings = React.lazy(() => import('./components/Settings'));
|
||||
const Update = React.lazy(() => import('./components/Update'));
|
||||
const renderLoader = () => <div></div>;
|
||||
|
||||
//* App
|
||||
export default class App extends React.Component {
|
||||
// Modal stuff
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
settingsModal: false,
|
||||
updateModal: false
|
||||
};
|
||||
}
|
||||
|
||||
setDefaultSettings() {
|
||||
localStorage.clear();
|
||||
|
||||
localStorage.setItem('time', true);
|
||||
localStorage.setItem('greeting', true);
|
||||
localStorage.setItem('background', true);
|
||||
localStorage.setItem('quote', true);
|
||||
localStorage.setItem('searchBar', true);
|
||||
localStorage.setItem('blur', 0);
|
||||
localStorage.setItem('copyButton', false);
|
||||
localStorage.setItem('seconds', false);
|
||||
localStorage.setItem('24hour', false);
|
||||
localStorage.setItem('offlineMode', false);
|
||||
localStorage.setItem('webp', false);
|
||||
localStorage.setItem('events', true);
|
||||
localStorage.setItem('customBackgroundColour', '');
|
||||
localStorage.setItem('customBackground', '');
|
||||
localStorage.setItem('greetingName', '');
|
||||
|
||||
// Set theme depending on user preferred
|
||||
//if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) localStorage.setItem('darkTheme', true);
|
||||
//else localStorage.setItem('darkTheme', false);
|
||||
localStorage.setItem('darkTheme', false);
|
||||
|
||||
// Finally we set this to true so it doesn't run the function on every load
|
||||
localStorage.setItem('firstRun', true);
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
// Render all the components
|
||||
render() {
|
||||
if (!localStorage.getItem('firstRun')) this.setDefaultSettings();
|
||||
|
||||
let modalClassList = 'Modal';
|
||||
const darkTheme = localStorage.getItem('darkTheme');
|
||||
if (darkTheme === 'true') modalClassList = 'Modal dark';
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div id='backgroundImage'></div>
|
||||
<Background/>
|
||||
<div id='center'>
|
||||
<Search/>
|
||||
<Navbar settingsModalOpen={() => this.setState({ settingsModal: true })} updateModalOpen={() => this.setState({ updateModal: true })} />
|
||||
<Greeting/>
|
||||
<Clock/>
|
||||
<Quote />
|
||||
<Credit/>
|
||||
<Toast/>
|
||||
<React.Suspense fallback={renderLoader()}>
|
||||
<Modal isOpen={this.state.settingsModal} className={modalClassList} overlayClassName="Overlay" ariaHideApp={false}>
|
||||
<Settings modalClose={() => this.setState({ settingsModal: false })} setDefaultSettings={() => this.setDefaultSettings()} />
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.updateModal} className={modalClassList} overlayClassName="Overlay" ariaHideApp={false}>
|
||||
<Update modalClose={() => this.setState({ updateModal: false })} />
|
||||
</Modal>
|
||||
</React.Suspense>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
9
src/assets/css/animate.css
vendored
@@ -1,9 +0,0 @@
|
||||
/*!
|
||||
* animate.css -http://daneden.me/animate
|
||||
* Version - 3.7.0
|
||||
* Licensed under the MIT license - http://opensource.org/licenses/MIT
|
||||
*
|
||||
* Copyright (c) 2018 Daniel Eden
|
||||
* Modified by ohlookitsderpy
|
||||
*/
|
||||
@-webkit-keyframes animate{from{opacity:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes animate{from{opacity:0;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.animate{-webkit-animation-name:amimated;animation-name:animate;-webkit-animation-duration:0.75s;animation-duration:0.75s;-webkit-animation-fill-mode:both;animation-fill-mode:both}
|
||||
@@ -1 +0,0 @@
|
||||
.mountain{background-image:url("../img/1.jpeg")}.sunrise{background-image:url("../img/2.jpeg")}.butterfly{background-image:url("../img/3.jpeg")}.leaves{background-image:url("../img/4.jpeg")}.river{background-image:url("../img/5.jpeg")}.sea{background-image:url("../img/6.jpeg")}.space{background-image:url("../img/7.jpeg")}.ice{background-image:url("../img/8.jpeg")}.waterfall{background-image:url("../img/9.jpeg")}.lake{background-image:url("../img/10.jpeg")}.sunset{background-image:url("../img/11.jpeg")}.desert{background-image:url("../img/12.jpeg")}.canyon{background-image:url("../img/13.jpeg")}.rose{background-image:url("../img/14.jpeg")}.forest{background-image:url("../img/15.jpeg")}.cherry{background-image:url("../img/16.jpeg")}.clouds{background-image:url("../img/17.jpeg")}.winter{background-image:url("../img/18.jpeg")}.autumn{background-image:url("../img/19.jpeg")}.flowers{background-image:url("../img/20.jpeg")}.sunrise{background-image:url("../img/21.jpeg")}.rocks{background-image:url("../img/22.jpeg")}.trees{background-image:url("../img/23.jpeg")}.mountains{background-image:url("../img/24.jpeg")}.beach{background-image:url("../img/25.jpeg")}html,body{height:100%}body{display:flex;flex-direction:column;justify-content:space-around;align-items:center;margin:0;background-size:cover;background-position:50%;background-color:#000;font-family:"Roboto";color:#fff;overflow:hidden;-moz-user-select:none;user-select:none}@font-face{font-family:"Roboto";font-style:normal;font-weight:400;src:local("Roboto"),local("Roboto-Regular"),url("../font/roboto-v18-latin-regular.woff2") format("woff2")}:root{--shadow-color: #111111CC}.greeting,time,.quote{filter:drop-shadow(var(--shadow-shift) var(--shadow-shift) 0 var(--shadow-color))}.quote{--shadow-shift: 0.125rem;width:37.5%;max-width:37.5rem;font-size:1.5rem;text-align:center}.quote blockquote{margin:0 0 .25rem 0;line-height:1.125}.quote blockquote ::before{content:"“";margin-right:.25ch}.quote blockquote ::after{content:"”";margin-left:.25ch}.quote cite{font-size:83.33%}.greeting{--shadow-shift: 0.2rem;font-size:3.25rem}time{--shadow-shift: 0.4rem;font-size:12rem}/*# sourceMappingURL=base.css.map */
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sourceRoot":"","sources":["../scss/modules/_bg.scss","../scss/modules/_misc.scss","../scss/modules/_quote.scss","../scss/modules/_time-greeting.scss"],"names":[],"mappings":"CAkBA,gDACA,+CACA,iDACA,8CACA,6CACA,2CACA,6CACA,2CACA,iDACA,6CACA,+CACA,+CACA,+CACA,6CACA,+CACA,+CACA,+CACA,+CACA,+CACA,gDACA,gDACA,8CACA,8CACA,kDACA,8CCzCA,sBACA,KAEC,aACA,sBACA,6BACA,mBAEA,SAEA,sBACA,wBACA,sBAEA,qBACA,WAEA,gBAEG,sBACH,iBAID,WACC,qBACA,kBACA,gBACA,0GAKD,MACC,0BAGD,sBAGC,kFCvBD,OACI,yBAEA,YACA,kBAEA,iBACA,kBAEA,kBACI,oBACA,kBAEA,2BACI,YACA,mBAGJ,0BACI,YACA,kBAIR,YACI,iBCvBR,UACC,uBACA,kBAKD,KACC,uBACA","file":"base.css"}
|
||||
|
Before Width: | Height: | Size: 174 KiB |
|
Before Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 401 KiB |
|
Before Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 322 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
@@ -1,9 +0,0 @@
|
||||
// Original code sourced from https://forums.opera.com/topic/25046/how-to-disable-completely-the-speed-dial/14
|
||||
|
||||
chrome.tabs.onCreated.addListener((tab) => {
|
||||
if (tab.status === 'complete' && tab.url === 'chrome://startpage/') chrome.tabs.update(tab.id, { url: chrome.extension.getURL('index.html') });
|
||||
});
|
||||
|
||||
chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
|
||||
if (changeInfo.status === 'complete' && tab.url === 'chrome://startpage/') chrome.tabs.update(tabId, { url: chrome.extension.getURL('index.html') });
|
||||
});
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
const func = require('./modules/func.js');
|
||||
|
||||
const init = () => {
|
||||
// init() gets executed only when the page is fully loaded
|
||||
func.setDaytimeMsg();
|
||||
func.setRandBg();
|
||||
func.setRandQuote();
|
||||
func.setTime();
|
||||
// set interval to update time every second
|
||||
setInterval(func.setTime, 1000);
|
||||
};
|
||||
|
||||
// initialize on page load through a listener
|
||||
document.addEventListener('DOMContentLoaded', init);
|
||||
|
||||
// Disable right click
|
||||
const rightClick = () => { return false; };
|
||||
document.oncontextmenu=rightClick;
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
module.exports = [
|
||||
'mountain',
|
||||
'sunrise',
|
||||
'butterfly',
|
||||
'leaves',
|
||||
'river',
|
||||
'sea',
|
||||
'space',
|
||||
'ice',
|
||||
'waterfall',
|
||||
'lake',
|
||||
'sunset',
|
||||
'desert',
|
||||
'canyon',
|
||||
'rose',
|
||||
'forest',
|
||||
'cherry',
|
||||
'clouds',
|
||||
'autumn',
|
||||
'winter',
|
||||
'flowers',
|
||||
'sunrise',
|
||||
'rocks',
|
||||
'trees',
|
||||
'mountains',
|
||||
'beach'
|
||||
];
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
itcodes: ['it', 'it-IT', 'it-CH'],
|
||||
nlcodes: ['nl', 'nl-BE'],
|
||||
frcodes: ['fr', 'fr-BE', 'fr-CA', 'fr-FR', 'fr-LU', 'fr-MC', 'fr-CH'],
|
||||
ptcodes: ['pt', 'pt-BR'],
|
||||
spcodes: ['es', 'es-AR', 'es-BO', 'es-CL', 'es-CO', 'es-CR', 'es-DO', 'es-EC', 'es-ES', 'es-GT', 'es-HN', 'es-MX', 'es-NI', 'es-PA', 'es-PE', 'es-PR', 'es-PY', 'es-SV', 'es-UY', 'es-VE'],
|
||||
ficodes: ['fi'],
|
||||
decodes: ['de', 'de-AT', 'de-DE', 'de-LI', 'de-LU', 'de-CH'],
|
||||
hecodes: ['he'],
|
||||
rucodes: ['ru', 'ru-MO'],
|
||||
arcodes: ['ar', 'ar-DZ', 'ar-BH', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-QA', 'ar-SA', 'ar-SY', 'ar-TN', 'ar-AE', 'ar-YE'],
|
||||
svcodes: ['sv', 'sv-FI', 'sv-SV']
|
||||
};
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
const bg = require('./bg.js');
|
||||
const msg = require('./msg.js');
|
||||
const util = require('./util.js');
|
||||
const codes = require('./code.js');
|
||||
const quotes = require('./quote.js');
|
||||
|
||||
const nal = navigator.language;
|
||||
|
||||
module.exports = class Func {
|
||||
static setDaytimeMsg() {
|
||||
if (util.contains.call(codes.itcodes, nal)) msg.itMsgSet(); // Italian
|
||||
if (util.contains.call(codes.nlcodes, nal)) msg.nlMsgSet(); // Dutch
|
||||
if (util.contains.call(codes.frcodes, nal)) msg.frMsgSet(); // French
|
||||
//else if (util.contains.call(codes.ptcodes, nal)) msg.ptMsgSet(); // Portuguese
|
||||
if (util.contains.call(codes.spcodes, nal)) msg.spMsgSet(); // Spanish
|
||||
if (util.contains.call(codes.ficodes, nal)) msg.fiMsgSet(); // Finnish
|
||||
if (util.contains.call(codes.decodes, nal)) msg.spMsgSet(); // German
|
||||
if (util.contains.call(codes.hecodes, nal)) msg.heMsgSet(); // Hebrew
|
||||
if (util.contains.call(codes.rucodes, nal)) msg.ruMsgSet(); // Russian
|
||||
if (util.contains.call(codes.arcodes, nal)) msg.arMsgSet(); // Arabic
|
||||
if (util.contains.call(codes.svcodes, nal)) msg.svMsgSet(); // Swedish
|
||||
else msg.engMsgSet(); // English
|
||||
}
|
||||
|
||||
static setRandBg() {
|
||||
document.body.classList.add(util.pickFromArray(bg));
|
||||
}
|
||||
|
||||
static setRandQuote() {
|
||||
const id = util.getRandIndex(quotes.authors);
|
||||
if (util.contains.call(codes.itcodes, nal)) document.querySelector('blockquote').innerHTML = `"${quotes.it[id]}"`; // Italian
|
||||
if (util.contains.call(codes.ptcodes, nal)) document.querySelector('blockquote').innerHTML = `"${quotes.pt[id]}"` || `"${quotes.eng[id]}"`; // Portuguese
|
||||
if (util.contains.call(codes.spcodes, nal)) document.querySelector('blockquote').innerHTML = `"${quotes.sp[id]}"`; // Spanish
|
||||
else document.querySelector('blockquote').innerHTML = `"${quotes.eng[id]}"`; // English
|
||||
document.querySelector('cite').innerHTML = quotes.authors[id];
|
||||
}
|
||||
|
||||
static setTime() {
|
||||
const date = new Date(),
|
||||
time = [
|
||||
util.formatTimeUnit(date.getHours()),
|
||||
util.formatTimeUnit(date.getMinutes()),
|
||||
util.formatTimeUnit(date.getSeconds())
|
||||
];
|
||||
// Joins all of the array elements into a string using the ':' separator
|
||||
// Example: [16, 32, 03] -> "16:32:03"
|
||||
document.querySelector('time').innerHTML = time.join(':');
|
||||
}
|
||||
};
|
||||
@@ -1,107 +0,0 @@
|
||||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
const hour = new Date().getHours(); // Get the current hour
|
||||
|
||||
module.exports = class Msg {
|
||||
// English
|
||||
static engMsgSet() {
|
||||
let time = 'Good evening'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Good morning'; //If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour < 18) time = 'Good afternoon'; //If it's before 6pm, set the time string to "Good afternoon"
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Italian
|
||||
static itMsgSet() {
|
||||
let time = 'Buongiorno'; // Set the default time string
|
||||
if (hour > 18) time = 'Buonasera'; // In Italian there is just Buongiorno or Buonasera, if it's before 6pm then set the time string to Buonasera
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Dutch
|
||||
static nlMsgSet() { // Everything below is the same as English, check the comments there for information
|
||||
let time = 'Goedemiddag';
|
||||
if (hour < 12) time = 'Goedemorgen';
|
||||
else if (hour > 18) time = 'Goedenavond';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// French
|
||||
static frMsgSet() {
|
||||
let time = 'Bonsoir';
|
||||
if (hour < 12) time = 'Bonjour';
|
||||
else if (hour > 18) time = 'Bonne après-midi';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// Spanish
|
||||
static spMsgSet() {
|
||||
let time = 'Buenas Tardes'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Buenos Días'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Buenas Noches'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Finnish
|
||||
static fiMsgSet() {
|
||||
let time = 'Hyvää iltaa'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Hyvää huomenta'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Hyvää iltapäivää'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
document.querySelector('.greeting').innerHTML = time; // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// German
|
||||
static deMsgSet() {
|
||||
let time = 'Guten Abend';
|
||||
if (hour < 12) time = 'Guten Morgen';
|
||||
else if (hour > 18) time = 'Guten Nachmittag';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// Hebrew
|
||||
static heMsgSet() {
|
||||
let time = 'ערב טוב';
|
||||
if (hour < 12) time = 'בוקר טוב';
|
||||
else if (hour > 18) time = 'אחר הצהריים טובים';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// Russian
|
||||
static ruMsgSet() {
|
||||
let time = 'Добрый Вечер';
|
||||
if (hour < 12) time = 'добрый утро';
|
||||
else if (hour > 18) time = 'добрый день';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// Arabic
|
||||
static arMsgSet() {
|
||||
let time = 'مساء الخير';
|
||||
if (hour < 12) time = 'صباح الخير';
|
||||
else if (hour > 18) time = 'مساء الخير';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
|
||||
// Swedish
|
||||
static svMsgSet() {
|
||||
let time = 'God kväll';
|
||||
if (hour < 12) time = 'God morgon';
|
||||
document.querySelector('.greeting').innerHTML = time;
|
||||
}
|
||||
};
|
||||
@@ -1,115 +0,0 @@
|
||||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
eng: [
|
||||
'Time goes on. So whatever you’re going to do, do it. Do it now. Don’t wait.',
|
||||
'All our dreams can come true, if we have the courage to pursue them.',
|
||||
'It does not matter how slowly you go as long as you do not stop.',
|
||||
'Believe in yourself. You are braver than you think, more talented than you know, and capable of more than you imagine.',
|
||||
'If you believe it will work out, you’ll see opportunities. If you believe it won’t, you will see obstacles',
|
||||
'Everything you’ve ever wanted is on the other side of fear.',
|
||||
'Success is not final, failure is not fatal: it is the courage to continue that counts.',
|
||||
'There is only one thing that makes a dream impossible to achieve: the fear of failure.',
|
||||
'Your true success in life begins only when you make the commitment to become excellent at what you do.',
|
||||
'Believe in yourself, take on your challenges, dig deep within yourself to conquer fears. Never let anyone bring you down. You got to keep going.',
|
||||
'Too many of us are not living our dreams because we are living our fears.',
|
||||
'Hard times don’t create heroes. It is during the hard times when the ‘hero’ within us is revealed.',
|
||||
'If you can tune into your purpose and really align with it, setting goals so that your vision is an expression of that purpose, then life flows much more easily.',
|
||||
'Whatever the mind can conceive and believe, it can achieve.',
|
||||
'Don’t wish it were easier. Wish you were better.',
|
||||
'A champion is defined not by their wins but by how they can recover when they fall.',
|
||||
'Motivation comes from working on things we care about.',
|
||||
'With the right kind of coaching and determination you can accomplish anything.',
|
||||
'Some people look for a beautiful place. Others make a place beautiful.',
|
||||
'Life is like riding a bicycle. To keep your balance, you must keep moving.'
|
||||
|
||||
],
|
||||
ita: [
|
||||
'Il tempo passa. Quindi qualunque cosa che farai, falla. Falla ora. Non aspettare',
|
||||
'Tutti i nostri sogni possono diventare reali, se abbiamo il coraggio di seguirli.',
|
||||
'Non importa quanto lentamente vai fino a quando non ti fermi',
|
||||
'Credi in te stesso. Sei più coraggioso di quanto pensi, più talentuoso di quanto credi, e capace più di quanto puoi immaginare.',
|
||||
'Se ci credi funzionerà, vedrai delle opportunità. Se non ci credi, vedrai solamente ostacoli',
|
||||
'Tutti i tuoi desideri sono opposti alla paura',
|
||||
'Il successo non è la fine, il fallimento non è fatale: è il coraggio per continuare quello che conta.',
|
||||
"C'è solo una cosa che fa i sogni impossibili: la paura di fallire",
|
||||
'Il vero successo nella tua vita inizia solo quando fai il sacrificio per diventare eccellente a quello che ami.',
|
||||
"Credi in te stesso, sfida i tuoi problemi, scava nel profondo del tuo io per sconfiggere le tue paure. Mai arrendersi per qualcun'altro. Tu devi continuare.",
|
||||
"Troppe persone non vivono i loro sogni per vivere nelle loro paure",
|
||||
"Tempi difficili non fanno eroi. È durante i tempi duri che \"l'eroe\" in noi viene rivelato.",
|
||||
"Se puoi sintonizzare sul tuo senso e allinearti a quest'ultimo, impostando i tuoi obiettivi in modo che la tua visione sia un'espressione di quel senso, La tua vita scorre molto più facilmente",
|
||||
"Qualunque cosa la mente può immaginare e crederese, si può realizzare",
|
||||
"Non desiderare che fosse stato più facile. Desidera che tu fossi stato migliore.",
|
||||
"Un campione si definisce non dalle sue vittorie ma da come recupera quando cade",
|
||||
"La motivazione viene dal lavorare so cose che amiamo",
|
||||
"Con il giusto tipo di allenamento e determinazione puoi fare tutto",
|
||||
"Alcune persone cercano un posto indimenticabile. Altre lo transformano in un posto mozzafiato.",
|
||||
"La vita è come andare in bicicletta. Per tenerti in equilibrio, devi continuare a muoverti"
|
||||
],
|
||||
spa: [
|
||||
'El tiempo continúa. Así que lo que sea que vayas a hacer, hazlo. Hazlo ahora. No esperes',
|
||||
'Todos nuestros sueños pueden hacerse realidad, si tenemos el coraje de perseguirlos.',
|
||||
'No importa qué tan lento vayas, siempre y cuando no te detengas.',
|
||||
'Cree en ti mismo. Eres más valiente de lo que crees, más talentoso de lo que sabes y capaz de más de lo que imaginas.',
|
||||
'Si crees que funcionará, verás oportunidades. Si crees que no, verás obstáculos ',
|
||||
'Todo lo que siempre has querido está al otro lado del miedo',
|
||||
'El éxito no es definitivo, el fracaso no es fatal: el coraje para continuar es lo que cuenta',
|
||||
'Solo hay una cosa que hace que un sueño sea imposible de lograr: el miedo al fracaso',
|
||||
'Tu verdadero éxito en la vida comienza solo cuando te comprometes a ser excelente en lo que haces',
|
||||
'Cree en ti mismo, asume tus desafíos, excava profundo dentro de ti mismo para vencer tus miedos. Nunca dejes que nadie te derribe. Tienes que seguir adelante.',
|
||||
'Muchos de nosotros no estamos viviendo nuestros sueños porque estamos viviendo nuestros miedos',
|
||||
'Los tiempos difíciles no crean héroes. Es durante los momentos difíciles en que se revela el héroe dentro de nosotros.',
|
||||
'Si puedes sincornizarte con tu propósito, y realmente alinearte con él, estableciendo metas para que tu visión sea una expresión de ese propósito, entonces la vida fluye mucho más fácilmente',
|
||||
'Lo que la mente pueda concebir y creer, lo puede lograr',
|
||||
'No desees que sea fácil. Desea ser mejor.',
|
||||
'Un campeón se define no por sus victorias, sino por cómo pueden recuperarse cuando caen',
|
||||
'La motivación viene de trabajar en cosas que nos importan',
|
||||
'Con el entrenamiento y la determinación adecuados, puedes lograr cualquier cosa',
|
||||
'Algunas personas buscan un lugar hermoso. Otras, hacen un lugar hermoso.'
|
||||
],
|
||||
pt: [
|
||||
'O tempo continua. Então o que quer que você vai fazer,faça. Faça agora. Não espere.',
|
||||
'Todos os sonhos podem virar verdade,se tivermos a coragem de persegui-los.',
|
||||
'Não importa o quão devagar você for,desde que você não pare.',
|
||||
'Acredite em si mesmo. Você é mais corajoso que pensa,mais talentoso que sabe,e capaz de mais que imagina.',
|
||||
'Se você acredita que vai dar certo,você verá oportunidades. Se você acredita que não vai,você vera obstáculos.'
|
||||
],
|
||||
authors: [
|
||||
'Robert De Niro',
|
||||
'Walt Disney',
|
||||
'Confucius',
|
||||
'Roy T. Bennett',
|
||||
'Wayne Dyer',
|
||||
'George Addair',
|
||||
'Winston Churchill',
|
||||
'Paulo Coelho',
|
||||
'Brian Tracy',
|
||||
'Chantal Sutherland',
|
||||
'Les Brown',
|
||||
'Bob Riley',
|
||||
'Jack Canfield',
|
||||
'Napoleon Hill',
|
||||
'Jim Rohn',
|
||||
'Serena Williams',
|
||||
'Sheryl Sandberg',
|
||||
'Reese Witherspoon',
|
||||
'Hazrat Inayat Khan',
|
||||
'Albert Einstein'
|
||||
]
|
||||
};
|
||||
@@ -1,55 +0,0 @@
|
||||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
module.exports = class Util {
|
||||
// Format time
|
||||
static formatTimeUnit(unit) {
|
||||
return unit < 10 ? '0' + unit : unit;
|
||||
}
|
||||
|
||||
// Get random item
|
||||
static getRandIndex(array) {
|
||||
return Math.floor(Math.random() * (array.length - 1));
|
||||
}
|
||||
|
||||
// Pick random from array
|
||||
static pickFromArray(array) {
|
||||
return array[Math.floor(Math.random() * (array.length - 1))];
|
||||
}
|
||||
|
||||
static contains(needle) {
|
||||
const findNaN = needle !== needle;
|
||||
let indexOf;
|
||||
if (!findNaN && typeof Array.prototype.indexOf === 'function') indexOf = Array.prototype.indexOf;
|
||||
else {
|
||||
indexOf = (needle) => {
|
||||
let i = -1,
|
||||
index = -1;
|
||||
for (i = 0; i < this.length; i++) {
|
||||
const item = this[i];
|
||||
if ((findNaN && item !== item) || item === needle) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return index;
|
||||
};
|
||||
}
|
||||
return indexOf.call(this, needle) > -1;
|
||||
}
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
@import 'modules/bg';
|
||||
@import 'modules/misc';
|
||||
@import 'modules/quote';
|
||||
@import 'modules/time-greeting';
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
.mountain { background-image: url('../img/1.jpeg'); }
|
||||
.sunrise { background-image: url('../img/2.jpeg'); }
|
||||
.butterfly { background-image: url('../img/3.jpeg'); }
|
||||
.leaves { background-image: url('../img/4.jpeg'); }
|
||||
.river { background-image: url('../img/5.jpeg'); }
|
||||
.sea { background-image: url('../img/6.jpeg'); }
|
||||
.space { background-image: url('../img/7.jpeg'); }
|
||||
.ice { background-image: url('../img/8.jpeg'); }
|
||||
.waterfall { background-image: url('../img/9.jpeg'); }
|
||||
.lake { background-image: url('../img/10.jpeg'); }
|
||||
.sunset { background-image: url('../img/11.jpeg'); }
|
||||
.desert { background-image: url('../img/12.jpeg'); }
|
||||
.canyon { background-image: url('../img/13.jpeg'); }
|
||||
.rose { background-image: url('../img/14.jpeg'); }
|
||||
.forest { background-image: url('../img/15.jpeg'); }
|
||||
.cherry { background-image: url('../img/16.jpeg'); }
|
||||
.clouds { background-image: url('../img/17.jpeg'); }
|
||||
.winter { background-image: url('../img/18.jpeg'); }
|
||||
.autumn { background-image: url('../img/19.jpeg'); }
|
||||
.flowers { background-image: url('../img/20.jpeg'); }
|
||||
.sunrise { background-image: url('../img/21.jpeg'); }
|
||||
.rocks { background-image: url('../img/22.jpeg'); }
|
||||
.trees { background-image: url('../img/23.jpeg'); }
|
||||
.mountains { background-image: url('../img/24.jpeg'); }
|
||||
.beach { background-image: url('../img/25.jpeg'); }
|
||||
@@ -1,43 +0,0 @@
|
||||
/* Body */
|
||||
html, body { height: 100%; }
|
||||
body {
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
margin: 0;
|
||||
|
||||
background-size: cover;
|
||||
background-position: 50%;
|
||||
background-color: black; /* Prevent white flash on page load */
|
||||
|
||||
font-family: 'Roboto';
|
||||
color: white;
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
-moz-user-select: none; /* Firefox */
|
||||
user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
|
||||
}
|
||||
|
||||
/* Font */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Roboto'), local('Roboto-Regular'),
|
||||
url('../font/roboto-v18-latin-regular.woff2') format('woff2');
|
||||
}
|
||||
|
||||
/* Shadow */
|
||||
:root {
|
||||
--shadow-color: #111111CC;
|
||||
}
|
||||
|
||||
.greeting,
|
||||
time,
|
||||
.quote {
|
||||
filter: drop-shadow(var(--shadow-shift) var(--shadow-shift) 0 var(--shadow-color));
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
.quote {
|
||||
--shadow-shift: 0.125rem;
|
||||
|
||||
width: 37.5%;
|
||||
max-width: 37.5rem; /* 600px on desktop */
|
||||
|
||||
font-size: 1.5rem;
|
||||
text-align: center;
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 0.25rem 0;
|
||||
line-height: 1.125;
|
||||
|
||||
::before {
|
||||
content: '“';
|
||||
margin-right: 0.25ch;
|
||||
}
|
||||
|
||||
::after {
|
||||
content: '”';
|
||||
margin-left: 0.25ch;
|
||||
}
|
||||
}
|
||||
|
||||
cite {
|
||||
font-size: 83.33%;
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
/* Greeting */
|
||||
|
||||
.greeting {
|
||||
--shadow-shift: 0.2rem;
|
||||
font-size: 3.25rem;
|
||||
}
|
||||
|
||||
/* Time */
|
||||
|
||||
time {
|
||||
--shadow-shift: 0.4rem;
|
||||
font-size: 12rem;
|
||||
}
|
||||
70
src/components/Background.jsx
Normal file
@@ -0,0 +1,70 @@
|
||||
//* Imports
|
||||
import React from 'react';
|
||||
import supportsWebP from 'supports-webp';
|
||||
|
||||
export default class Background extends React.Component {
|
||||
doOffline() {
|
||||
const photo = Math.floor(Math.random() * (20 - 1 + 1)) + 1; // There are 20 images in the offline-images folder
|
||||
document.getElementById('backgroundCredits').style.display = 'none'; // Hide the location icon
|
||||
|
||||
let photographer; // Photographer credit
|
||||
let pixabayNumbers = [2, 3, 9, 11, 13, 14, 15]; // As there are a lot of Pixabay photos, we shorten the code a bit here
|
||||
if (pixabayNumbers.includes(photo)) photographer = 'Pixabay';
|
||||
else switch (photo) {
|
||||
case 1: photographer = 'Tirachard Kumtanom'; break;
|
||||
case 4: photographer = 'Sohail Na'; break;
|
||||
case 7: photographer = 'Miriam Espacio'; break;
|
||||
case 10: photographer = 'NO NAME'; break;
|
||||
case 20: photographer = 'Fabian Wiktor'; break;
|
||||
default: photographer = 'Unknown'; break;
|
||||
}
|
||||
|
||||
document.getElementById('backgroundImage').setAttribute('style', `-webkit-filter:blur(${localStorage.getItem('blur')}px); background-image: url(../offline-images/${photo}.jpeg)`); // Set background and blur etc
|
||||
document.getElementById('photographer').innerText = `Photo by ${photographer} (Pexels)`; // Set the credit
|
||||
}
|
||||
|
||||
async setBackground() {
|
||||
const enabled = localStorage.getItem('offlineMode');
|
||||
if (enabled === 'true') return this.doOffline();
|
||||
|
||||
const colour = localStorage.getItem('customBackgroundColour');
|
||||
if (colour) {
|
||||
document.getElementById('backgroundCredits').style.display = 'none'; // Hide the location icon
|
||||
return document.getElementById('backgroundImage').setAttribute('style', `-webkit-filter:blur(${localStorage.getItem('blur')}px); background-color: ${colour}`); // Set background and blur etc
|
||||
}
|
||||
|
||||
const custom = localStorage.getItem('customBackground');
|
||||
if (custom) {
|
||||
document.getElementById('backgroundCredits').style.display = 'none'; // Hide the location icon
|
||||
return document.getElementById('backgroundImage').setAttribute('style', `-webkit-filter:blur(${localStorage.getItem('blur')}px); background-image: url(${custom})`); // Set background and blur etc
|
||||
}
|
||||
|
||||
try { // First we try and get an image from the API...
|
||||
let requestURL;
|
||||
const enabled = localStorage.getItem('webp');
|
||||
if (await supportsWebP && enabled === 'true') requestURL = 'https://api.muetab.xyz/getImage?webp=true';
|
||||
else requestURL = 'https://api.muetab.xyz/getImage?category=Outdoors';
|
||||
let data = await fetch(requestURL);
|
||||
data = await data.json();
|
||||
|
||||
document.getElementById('backgroundImage').setAttribute('style', `-webkit-filter:blur(${localStorage.getItem('blur')}px); background-image: url(${data.file})`); // Set background and blur etc
|
||||
document.getElementById('photographer').innerText = `Photo by ${data.photographer}`; // Set the credit
|
||||
document.getElementById('location').innerText = `${data.location}`; // Set the location tooltip
|
||||
} catch (e) { // ..and if that fails we load one locally
|
||||
this.doOffline();
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const enabled = localStorage.getItem('background');
|
||||
if (enabled === 'false') {
|
||||
document.getElementById('backgroundCredits').style.display = 'none';
|
||||
return;
|
||||
}
|
||||
this.setBackground();
|
||||
}
|
||||
|
||||
render() {
|
||||
return null; // React gets annoyed if I don't put anything here or use "return;"
|
||||
}
|
||||
}
|
||||
54
src/components/Clock.jsx
Normal file
@@ -0,0 +1,54 @@
|
||||
import React from 'react';
|
||||
|
||||
export default class Clock extends React.Component {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
|
||||
this.timer = undefined;
|
||||
this.state = {
|
||||
date: '',
|
||||
ampm: ''
|
||||
};
|
||||
}
|
||||
|
||||
startTime(time = localStorage.getItem('seconds') === 'true' ? (1000 - Date.now() % 1000) : (60000 - Date.now() % 60000)) {
|
||||
this.timer = setTimeout(() => {
|
||||
const now = new Date();
|
||||
let sec = '';
|
||||
|
||||
if (localStorage.getItem('seconds') === 'true') sec = `:${('00' + now.getSeconds()).slice(-2)}`;
|
||||
|
||||
if (localStorage.getItem('24hour') === 'true') {
|
||||
this.setState({
|
||||
date: `${('00' + now.getHours()).slice(-2)}:${('00' + now.getMinutes()).slice(-2)}${sec}`
|
||||
});
|
||||
} else {
|
||||
// 12 hour support
|
||||
let hours = now.getHours();
|
||||
if (hours > 12) hours -= 12;
|
||||
|
||||
this.setState({
|
||||
date: `${('00' + hours).slice(-2)}:${('00' + now.getMinutes()).slice(-2)}${sec}`,
|
||||
ampm: now.getHours() > 11 ? 'PM' : 'AM'
|
||||
});
|
||||
}
|
||||
|
||||
this.startTime();
|
||||
}, time);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const enabled = localStorage.getItem('time');
|
||||
if (enabled === 'false') return;
|
||||
this.startTime(0);
|
||||
}
|
||||
|
||||
render() {
|
||||
return <h1 className='clock'>
|
||||
{this.state.date}
|
||||
<span className='ampm'>
|
||||
{this.state.ampm}
|
||||
</span>
|
||||
</h1>;
|
||||
}
|
||||
}
|
||||
19
src/components/Credit.jsx
Normal file
@@ -0,0 +1,19 @@
|
||||
/* eslint-disable */
|
||||
//* Imports
|
||||
import RoomIcon from '@material-ui/icons/Room';
|
||||
import React from 'react';
|
||||
|
||||
export default class Credit extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className='credits'>
|
||||
{/*<h1 id='location'></h1>*/}
|
||||
<h1 id='photographer'/>
|
||||
<div id='backgroundCredits' className='tooltip'>
|
||||
<RoomIcon className='locationicon'/>
|
||||
<span className='tooltiptext' id='location'/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
63
src/components/Greeting.jsx
Normal file
@@ -0,0 +1,63 @@
|
||||
import React from 'react';
|
||||
|
||||
export default class Greeting extends React.Component {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
this.state = {
|
||||
greeting: ''
|
||||
};
|
||||
}
|
||||
|
||||
doEvents(time, message) {
|
||||
const enabled = localStorage.getItem('events');
|
||||
if (enabled === 'false') return message;
|
||||
|
||||
// Get current month & day
|
||||
const m = time.getMonth(); // Current month
|
||||
const d = time.getDate(); // Current Date
|
||||
|
||||
if (m === 11 && d === 25) message = 'Merry Christmas'; // If it's December 25th, set the greeting string to "Merry Christmas"
|
||||
else if (m === 0 && d === 1) message = 'Happy new year'; // If the date is January 1st, set the greeting string to "Happy new year"
|
||||
else if (m === 9 && d === 31) message = 'Happy Halloween'; // If it's October 31st, set the greeting string to "Happy Halloween"
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
getGreeting() {
|
||||
const now = new Date();
|
||||
const hour = now.getHours();
|
||||
|
||||
let message = 'Good evening'; // Set the default greeting string to "Good evening"
|
||||
if (hour < 12) message = 'Good morning'; // If it's before 12am, set the greeting string to "Good morning"
|
||||
else if (hour < 18) message = 'Good afternoon'; // If it's before 6pm, set the greeting string to "Good afternoon"
|
||||
|
||||
// Events
|
||||
message = this.doEvents(now, message);
|
||||
|
||||
// Name
|
||||
let name = '';
|
||||
let data = localStorage.getItem('greetingName');
|
||||
|
||||
if (typeof data === 'string') {
|
||||
data = data.replace(/\s/g, ' ');
|
||||
if (data.length > 0) name = `, ${data}`;
|
||||
}
|
||||
|
||||
// Set the state to the greeting string
|
||||
this.setState({
|
||||
greeting: `${message}${name}`
|
||||
});
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const enabled = localStorage.getItem('greeting');
|
||||
if (enabled === 'false') return;
|
||||
this.getGreeting();
|
||||
}
|
||||
|
||||
render() {
|
||||
return <h1 className='greeting'>
|
||||
{this.state.greeting}
|
||||
</h1>;
|
||||
}
|
||||
}
|
||||
23
src/components/Navbar.jsx
Normal file
@@ -0,0 +1,23 @@
|
||||
//* Imports
|
||||
import RefreshIcon from '@material-ui/icons/Refresh';
|
||||
import Gear from '@material-ui/icons/Settings';
|
||||
import NewReleases from '@material-ui/icons/NewReleases';
|
||||
import React from 'react';
|
||||
|
||||
export default class Navbar extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className='navbar-container'>
|
||||
<div className='navbar1'>
|
||||
<Gear className='settings-icon' onClick={this.props.settingsModalOpen} />
|
||||
</div>
|
||||
<div className='navbar2'>
|
||||
<RefreshIcon className='refreshicon' onClick={() => window.location.reload()} />
|
||||
</div>
|
||||
<div className='navbar3'>
|
||||
<NewReleases className='refreshicon' onClick={this.props.updateModalOpen} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
64
src/components/Quote.jsx
Normal file
@@ -0,0 +1,64 @@
|
||||
//* Imports
|
||||
import React from 'react';
|
||||
import Quotes from '@muetab/quotes';
|
||||
import copy from 'copy-text-to-clipboard';
|
||||
import FileCopy from '@material-ui/icons/AttachFile';
|
||||
|
||||
export default class Quote extends React.Component {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
this.state = {
|
||||
quote: '',
|
||||
author: ''
|
||||
};
|
||||
}
|
||||
|
||||
doOffline() {
|
||||
const quote = Quotes.random(); // Get a random quote from our local package
|
||||
this.setState({
|
||||
quote: '"' + quote.quote + '"',
|
||||
author: quote.author
|
||||
}); // Set the quote
|
||||
}
|
||||
|
||||
async getQuote() {
|
||||
const enabled = localStorage.getItem('offlineMode');
|
||||
if (enabled === 'true') return this.doOffline();
|
||||
|
||||
try { // First we try and get a quote from the API...
|
||||
let data = await fetch('https://api.muetab.xyz/getQuote');
|
||||
data = await data.json();
|
||||
if (data.statusCode === 429) this.doOffline(); // If we hit the ratelimit, we fallback to local quotes
|
||||
this.setState({
|
||||
quote: '"' + data.quote + '"',
|
||||
author: data.author
|
||||
});
|
||||
} catch (e) { // ..and if that fails we load one locally
|
||||
this.doOffline();
|
||||
}
|
||||
}
|
||||
|
||||
copyQuote() {
|
||||
copy(`${this.state.quote} - ${this.state.author}`);
|
||||
let toast = document.getElementById('toast');
|
||||
toast.className = 'show';
|
||||
setTimeout(() => { toast.className = toast.className.replace('show', ''); }, 3000);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const enabled = localStorage.getItem('quote');
|
||||
if (enabled === 'false') return;
|
||||
this.getQuote();
|
||||
}
|
||||
|
||||
render() {
|
||||
let copy = <FileCopy className='copyButton' onClick={() => this.copyQuote() }></FileCopy>;
|
||||
const enabled = localStorage.getItem('copyButton');
|
||||
if (enabled === 'false') copy = '';
|
||||
|
||||
return [
|
||||
<h1 className='quote'>{`${this.state.quote}`}</h1>,
|
||||
<h1 className='quoteauthor'>{this.state.author} {copy}</h1>,
|
||||
];
|
||||
}
|
||||
}
|
||||
28
src/components/Search.jsx
Normal file
@@ -0,0 +1,28 @@
|
||||
//* Imports
|
||||
import React from 'react';
|
||||
|
||||
export default class Search extends React.Component {
|
||||
render() {
|
||||
const enabled = localStorage.getItem('searchbar');
|
||||
if (enabled === 'false') return (<div></div>);
|
||||
|
||||
const searchEngine = localStorage.getItem('searchEngine');
|
||||
let url;
|
||||
|
||||
switch (searchEngine) {
|
||||
case 'duckduckgo': url = 'https://duckduckgo.com'; break;
|
||||
case 'google': url = 'https://google.com/search'; break;
|
||||
case 'bing': url = 'https://bing.com/search'; break;
|
||||
default: url = 'https://duckduckgo.com'; break;
|
||||
}
|
||||
|
||||
return (
|
||||
<div id='searchBar' className='searchbar'>
|
||||
<form id='searchBar' className='searchbarform' action={url}>
|
||||
<input type='text' placeholder='Search' name='q' id='searchtext' className='searchtext'/>
|
||||
<div className='blursearcbBG'/>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
223
src/components/Settings.jsx
Normal file
@@ -0,0 +1,223 @@
|
||||
// eslint-disable
|
||||
import React from 'react';
|
||||
import ExpandMore from '@material-ui/icons/ExpandMore';
|
||||
|
||||
export default class Settings extends React.Component {
|
||||
setItem(key, value) {
|
||||
let old = localStorage.getItem(key);
|
||||
let val = true;
|
||||
|
||||
if (old !== null && !value) {
|
||||
if (old === 'true') val = false;
|
||||
if (old === 'false') val = true;
|
||||
}
|
||||
|
||||
localStorage.setItem(key, val);
|
||||
//document.getElementById(`${key}Status`).innerHTML = val === true ? 'ON' : 'OFF';
|
||||
// console.log(`[DEBUG] setItem(${key}, ${old} -> ${val})`);
|
||||
}
|
||||
|
||||
toggleExtra(element, element2) {
|
||||
(element.style.display === 'none' || !element.style.display) ? element.style.display = 'block' : element.style.display = 'none';
|
||||
(element2.style.transform === 'rotate(-180deg)') ? element2.style.transform = 'rotate(0)' : element2.style.transform = 'rotate(-180deg)';
|
||||
}
|
||||
|
||||
saveStuff() {
|
||||
localStorage.setItem('blur', document.getElementById('blurRange').value); // this is better than inline onChange for performance
|
||||
localStorage.setItem('greetingName', document.getElementById('greetingName').value);
|
||||
localStorage.setItem('customBackground', document.getElementById('customBackground').value);
|
||||
//if (!document.getElementById('customBackgroundColour').enabled === 'false') localStorage.setItem('customBackgroundColour', document.getElementById('customBackgroundColour').value);
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
resetItem(key) {
|
||||
switch (key) {
|
||||
case 'greetingName': document.getElementById('greetingName').value = ''; break;
|
||||
case 'customBackgroundColour':
|
||||
localStorage.setItem('customBackgroundColour', '');
|
||||
document.getElementById('customBackgroundColour').enabled = 'false';
|
||||
break;
|
||||
case 'customBackground': document.getElementById('customBackground').value = ''; break;
|
||||
case 'blur':
|
||||
localStorage.setItem('blur', 0);
|
||||
document.getElementById('blurRange').value = 0;
|
||||
document.getElementById('blurAmount').innerText = '0';
|
||||
break;
|
||||
default: console.log('[ERROR] resetItem requires a key!');
|
||||
}
|
||||
this.showToast();
|
||||
}
|
||||
|
||||
showToast() {
|
||||
let toast = document.getElementById('toast');
|
||||
toast.innerText = 'Reset successfully!';
|
||||
toast.className = 'show';
|
||||
setTimeout(() => { toast.className = toast.className.replace('show', ''); }, 3000);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
document.getElementById('greetingName').value = localStorage.getItem('greetingName');
|
||||
document.getElementById('customBackground').value = localStorage.getItem('customBackground');
|
||||
/*const hex = localStorage.getItem('customBackgroundColour');
|
||||
if (!hex === '') {
|
||||
document.getElementById('customBackgroundColour').value = hex;
|
||||
document.getElementById('customBackgroundHex').innerText = hex;
|
||||
}*/
|
||||
|
||||
for (const key of Object.keys(localStorage)) {
|
||||
let value = localStorage.getItem(key);
|
||||
|
||||
if (key === 'blur') {
|
||||
document.getElementById('blurAmount').innerText = value;
|
||||
document.getElementById('blurRange').value = value;
|
||||
}
|
||||
|
||||
const tag = document.getElementById(`${key}Status`);
|
||||
|
||||
if (tag) {
|
||||
switch (value) {
|
||||
case 'true': value = true; break;
|
||||
case 'false': value = false; break;
|
||||
default: value = true;
|
||||
}
|
||||
|
||||
tag.checked = value;
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('keyup', (event) => {
|
||||
if (event.keyCode === 13) this.saveStuff();
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return <div className="content">
|
||||
<span className="closeModal" onClick={this.props.modalClose}>×</span>
|
||||
<h1>Settings</h1>
|
||||
<p>Edit different components to make Mue your new tab.</p>
|
||||
<div className='columns'>
|
||||
<div className='group'>
|
||||
<div className='section'>
|
||||
<h4>Time</h4>
|
||||
<ExpandMore className='expandIcons' onClick={() => this.toggleExtra(document.getElementsByClassName('extraSettings')[0], document.getElementsByClassName('expandIcons')[0])} />
|
||||
<label className="switch">
|
||||
<input type="checkbox" onClick={()=> this.setItem('time')} id='timeStatus' />
|
||||
<span className="slider round"></span>
|
||||
</label>
|
||||
<li className="extraSettings">
|
||||
<ul>
|
||||
<input name="1" type="checkbox" onClick={()=> this.setItem('seconds')} id='secondsStatus' />
|
||||
<label htmlFor="1">Seconds</label>
|
||||
</ul>
|
||||
<ul>
|
||||
<input name="2" type="checkbox" onClick={()=> this.setItem('24hour')} id='24hourStatus' />
|
||||
<label htmlFor="2">24 Hour</label>
|
||||
</ul>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ "lineHeight": "1px" }} className='section'>
|
||||
<h4>Greeting</h4>
|
||||
<ExpandMore className='expandIcons' onClick={() => this.toggleExtra(document.getElementsByClassName('extraSettings')[1], document.getElementsByClassName('expandIcons')[1])} />
|
||||
<label className="switch">
|
||||
<input type="checkbox" onClick={()=> this.setItem('greeting')} id='greetingStatus' />
|
||||
<span className="slider round"></span>
|
||||
</label>
|
||||
<li className="extraSettings">
|
||||
<ul>
|
||||
<input name="3" type="checkbox" onClick={()=> this.setItem('events')} id='eventsStatus' />
|
||||
<label htmlFor="3">Events</label>
|
||||
</ul>
|
||||
<ul>
|
||||
<p>Name for greeting <span className="modalLink" onClick={() => this.resetItem('greetingName')}>Reset</span></p>
|
||||
<input type='text' id='greetingName'></input>
|
||||
</ul>
|
||||
</li>
|
||||
</div>
|
||||
<div className='section'>
|
||||
<h4>Quote</h4>
|
||||
<ExpandMore className='expandIcons' onClick={() => this.toggleExtra(document.getElementsByClassName('extraSettings')[2], document.getElementsByClassName('expandIcons')[2])} />
|
||||
<label className="switch">
|
||||
<input type="checkbox" onClick={()=> this.setItem('quote')} id='quoteStatus' />
|
||||
<span className="slider"></span>
|
||||
</label>
|
||||
<li className="extraSettings">
|
||||
<ul>
|
||||
<input name="5" type="checkbox" onClick={()=> this.setItem('copyButton')} id='copyButtonStatus' />
|
||||
<label htmlFor="5">Copy Button</label>
|
||||
</ul>
|
||||
</li>
|
||||
</div>
|
||||
<div className='section'>
|
||||
<h4>Background</h4>
|
||||
<ExpandMore className='expandIcons' onClick={() => this.toggleExtra(document.getElementsByClassName('extraSettings')[3], document.getElementsByClassName('expandIcons')[3])} />
|
||||
<label className="switch">
|
||||
<input type="checkbox" onClick={()=> this.setItem('background')} id='backgroundStatus' />
|
||||
<span className="slider"></span>
|
||||
</label>
|
||||
<li className="extraSettings">
|
||||
<ul>
|
||||
<p>Adjust Blur (<span id='blurAmount'></span>%) <span className="modalLink" onClick={() => this.resetItem('blur')}>Reset</span></p>
|
||||
</ul>
|
||||
<ul>
|
||||
<input className="range" type="range" min="0" max="100" id='blurRange' onInput={() => document.getElementById('blurAmount').innerText = document.getElementById('blurRange').value} />
|
||||
</ul>
|
||||
<ul>
|
||||
<p>Custom Background URL <span className="modalLink" onClick={() => this.resetItem('customBackground')}>Reset</span></p>
|
||||
<input type='text' id='customBackground'></input>
|
||||
</ul>
|
||||
{ /*<ul>
|
||||
<p>Custom Background Colour <span className="modalLink" onClick={() => this.resetItem('customBackgroundColour')}>Reset</span></p>
|
||||
<input name='colour' type='color' id='customBackgroundColour' onChange={() => document.getElementById('customBackgroundHex').innerText = document.getElementById('customBackgroundColour').value}></input>
|
||||
<label for='colour' id='customBackgroundHex'>#00000</label>
|
||||
</ul> */}
|
||||
</li>
|
||||
</div>
|
||||
<div className='section'>
|
||||
<h4>Search Bar</h4>
|
||||
{/* <ExpandMore className='expandIcons' onClick={() => this.toggleExtra(document.getElementsByClassName('extraSettings')[4], document.getElementsByClassName('expandIcons')[4])} /> */ }
|
||||
<label className="switch">
|
||||
<input type="checkbox" onClick={()=> this.setItem('searchBar')} id='searchBarStatus' />
|
||||
<span className="slider"></span>
|
||||
</label>
|
||||
{/* <li className="extraSettings">
|
||||
<ul>
|
||||
<label htmlFor="4">Search Engine</label>
|
||||
<select name="4" id='searchBar'>
|
||||
<option value="duckduckgo">DuckDuckGo</option>
|
||||
<option value="google">Google</option>
|
||||
<option value="bing">Bing</option>
|
||||
<option value="custom">Custom</option>
|
||||
</select>
|
||||
</ul>
|
||||
</li> */}
|
||||
</div>
|
||||
<div className='section'>
|
||||
<h4>Offline Mode</h4>
|
||||
<label className="switch">
|
||||
<input type="checkbox" onClick={()=> this.setItem('offlineMode')} id='offlineModeStatus' />
|
||||
<span className="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<h3>Experimental</h3>
|
||||
<div className='section'>
|
||||
<h4>Enable WebP</h4>
|
||||
<label className="switch">
|
||||
<input type="checkbox" onClick={()=> this.setItem('webp')} id='webpStatus' />
|
||||
<span className="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div className='section'>
|
||||
<h4>Dark Theme</h4>
|
||||
<label className="switch">
|
||||
<input type="checkbox" onClick={()=> this.setItem('darkTheme')} id='darkThemeStatus' />
|
||||
<span className="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<button className="apply" onClick={() => this.saveStuff()}>Apply</button>
|
||||
<button className="reset" onClick={() => this.props.setDefaultSettings()}>Reset</button>
|
||||
</div>
|
||||
|
||||
</div>;
|
||||
}
|
||||
}
|
||||
15
src/components/Toast.jsx
Normal file
@@ -0,0 +1,15 @@
|
||||
//* Imports
|
||||
import React from 'react';
|
||||
import FileCopy from '@material-ui/icons/AttachFile';
|
||||
|
||||
export default class Toast extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div id='toast'>
|
||||
<FileCopy className="copyButton"/>
|
||||
<hr />
|
||||
Quote Copied!
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
46
src/components/Update.jsx
Normal file
@@ -0,0 +1,46 @@
|
||||
import React from 'react';
|
||||
|
||||
export default class Update extends React.Component {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
this.state = {
|
||||
title: 'Loading...',
|
||||
date: '',
|
||||
content: 'Loading...'
|
||||
};
|
||||
}
|
||||
|
||||
async getUpdate() {
|
||||
const enabled = localStorage.getItem('offlineMode');
|
||||
if (enabled === 'true') return this.setState({
|
||||
title: 'Offline',
|
||||
content: 'Cannot get update logs while in offline mode'
|
||||
});
|
||||
|
||||
try { // First we try and get a quote from the API...
|
||||
let data = await fetch('https://api.muetab.xyz/getUpdate');
|
||||
data = await data.json();
|
||||
this.setState({
|
||||
title: data.title,
|
||||
content: data.content
|
||||
});
|
||||
} catch (e) {
|
||||
this.setState({
|
||||
title: 'Error',
|
||||
content: 'Could not connect to the server!'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getUpdate();
|
||||
}
|
||||
|
||||
render() {
|
||||
return <div className="content">
|
||||
<span className="closeModal" onClick={this.props.modalClose}>×</span>
|
||||
<h1 dangerouslySetInnerHTML={{__html: this.state.title}}></h1>
|
||||
<p dangerouslySetInnerHTML={{__html: this.state.content}}></p>
|
||||
</div>;
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
<!--
|
||||
█████████████████████████████████████████████████████████████
|
||||
██ ██
|
||||
██ ███ ███ ██ ██ ███████ ██
|
||||
██ ████ ████ ██ ██ ██ ██
|
||||
██ ██ ████ ██ ██ ██ █████ ██
|
||||
██ ██ ██ ██ ██ ██ ██ ██
|
||||
██ ██ ██ ██████ ███████ ██
|
||||
██ ██
|
||||
██ ██
|
||||
██ Copyright 2018-2019 David Ralph (ohlookitsderpy) ██
|
||||
██ Licensed under MIT ██
|
||||
██ GitHub: https://github.com/ohlookitsderpy/Mue ██
|
||||
██ ██
|
||||
██ Special thanks to contributors! <3 ██
|
||||
█████████████████████████████████████████████████████████████
|
||||
-->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset='utf-8'>
|
||||
<meta name='viewport' content='width=device-width'>
|
||||
|
||||
<title>New Tab</title>
|
||||
|
||||
<link href='./assets/css/base.css' rel='stylesheet'>
|
||||
<link href='./assets/css/animate.css' rel='stylesheet'>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class='greeting animate'></div>
|
||||
|
||||
<time class='animate'></time>
|
||||
|
||||
<div class='quote animate'>
|
||||
|
||||
<blockquote></blockquote>
|
||||
|
||||
<cite></cite>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
<script src='./assets/js/base.js'></script>
|
||||
|
||||
</html>
|
||||
10
src/index.js
Normal file
@@ -0,0 +1,10 @@
|
||||
//* Imports
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './App';
|
||||
|
||||
//* Render
|
||||
ReactDOM.render(
|
||||
<App/>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Mue",
|
||||
"version": "0.1",
|
||||
"browser_action": {
|
||||
"default_icon": "./assets/img/icon.png"
|
||||
},
|
||||
"chrome_url_overrides": {
|
||||
"newtab": "index.html"
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Mue",
|
||||
"version": "0.1",
|
||||
"browser_action": {
|
||||
"default_icon": "./assets/img/icon.png"
|
||||
},
|
||||
"chrome_url_overrides": {
|
||||
"newtab": "index.html"
|
||||
},
|
||||
"chrome_settings_overrides": {
|
||||
"homepage": "index.html"
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"manifest_version": 2,
|
||||
"name": "Mue",
|
||||
"version": "0.1",
|
||||
"browser_action": {
|
||||
"default_icon": "./assets/img/icon.png"
|
||||
},
|
||||
"background": {
|
||||
"scripts": [
|
||||
"./assets/js/background-opera.js"
|
||||
]
|
||||
},
|
||||
"permissions": [
|
||||
"tabs"
|
||||
]
|
||||
}
|
||||
65
src/scss/index.scss
Normal file
@@ -0,0 +1,65 @@
|
||||
/* Imports */
|
||||
@import 'modules/clock';
|
||||
@import 'modules/greeting';
|
||||
@import 'modules/quote';
|
||||
@import 'modules/search';
|
||||
@import 'modules/credit';
|
||||
@import 'modules/navbar';
|
||||
@import 'modules/modal';
|
||||
@import 'modules/settings';
|
||||
@import 'modules/toast';
|
||||
|
||||
body {
|
||||
background: #2f3640;
|
||||
margin: 0;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
font-family: 'Lexend Deca', sans-serif;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#center {
|
||||
margin-left: 2vw;
|
||||
margin-right: 2vw;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
font-size: calc(10px + 2vmin);
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
text-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
color: #ffffff;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#root {
|
||||
min-height: 100vh;
|
||||
display: grid;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#backgroundImage {
|
||||
height: 100vh;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-attachment: fixed;
|
||||
z-index: 0;
|
||||
border: none;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: 'Lexend Deca';
|
||||
src: url('/./fonts/LexendDeca-Regular.woff2') format('woff2');
|
||||
}
|
||||
10
src/scss/modules/_clock.scss
Normal file
@@ -0,0 +1,10 @@
|
||||
.clock {
|
||||
font-size: 4em;
|
||||
//text-shadow: 5px 2px rgba(0, 0, 0, 0.8);
|
||||
margin: 0;
|
||||
// text-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.ampm {
|
||||
font-size: 0.5em;
|
||||
}
|
||||
70
src/scss/modules/_credit.scss
Normal file
@@ -0,0 +1,70 @@
|
||||
#location,
|
||||
#photographer {
|
||||
font-size: calc(10px + 1.2vmin);
|
||||
text-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#location {
|
||||
margin-bottom: -10px;
|
||||
}
|
||||
|
||||
#photographer {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
left: 50px;
|
||||
width: 1000px;
|
||||
}
|
||||
|
||||
.locationicon {
|
||||
font-size: calc(10px + 1.2vmin);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.MuiSvgIcon-root {
|
||||
position: absolute;
|
||||
bottom: 2px;
|
||||
left: 2px;
|
||||
width: 100em;
|
||||
height: 100em;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.credits {
|
||||
bottom: 2px;
|
||||
left: 0px;
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
border-bottom: 1px dotted black;
|
||||
bottom: 15px;
|
||||
left: 10px;
|
||||
-webkit-filter: drop-shadow(0px 3px 3px rgba(0, 0, 0, 0.4));
|
||||
filter: drop-shadow(0px 3px 3px rgba(0, 0, 0, 0.4));
|
||||
|
||||
.tooltiptext {
|
||||
visibility: hidden;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 20px;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
bottom: 40px;
|
||||
left: 60px;
|
||||
margin-left: -60px;
|
||||
opacity: 0;
|
||||
transition: opacity 1s;
|
||||
}
|
||||
}
|
||||
|
||||
.tooltip:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
4
src/scss/modules/_greeting.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
.greeting {
|
||||
margin: 0;
|
||||
font-size: 1.6em;
|
||||
}
|
||||
65
src/scss/modules/_modal.scss
Normal file
@@ -0,0 +1,65 @@
|
||||
.Modal {
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 200px rgba(0, 0, 0, 0.3);
|
||||
border: none;
|
||||
opacity: 1;
|
||||
z-index: -2;
|
||||
padding: 20px;
|
||||
cursor: hand;
|
||||
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.modalLink {
|
||||
color: #5352ed;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.closeModal {
|
||||
float: right;
|
||||
font-size: 2em;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: grey;
|
||||
}
|
||||
}
|
||||
|
||||
.dark {
|
||||
background-color: #2f3542 !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.ReactModal__Html--open,
|
||||
.ReactModal__Body--open {
|
||||
overflow: hidden; /* prevents background page from scrolling when the modal is open */
|
||||
}
|
||||
|
||||
.Overlay {
|
||||
position: fixed;
|
||||
z-index: 999999;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 100vw;
|
||||
height: 90vh;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.ReactModal__Content {
|
||||
width: 500px;
|
||||
max-width: 600px;
|
||||
max-height: calc(100vh - 10vh);
|
||||
box-shadow: 0 0 30px 0 rgba(0, 0, 0, 0.25);
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
}
|
||||
26
src/scss/modules/_navbar.scss
Normal file
@@ -0,0 +1,26 @@
|
||||
%navbar {
|
||||
position: absolute;
|
||||
text-align: right;
|
||||
min-width: 50px;
|
||||
cursor: pointer;
|
||||
-webkit-filter: drop-shadow(0px 3px 3px rgba(0, 0, 0, 0.4));
|
||||
filter: drop-shadow(0px 3px 3px rgba(0, 0, 0, 0.4));
|
||||
}
|
||||
|
||||
.navbar1 {
|
||||
@extend %navbar;
|
||||
top: 50px;
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
.navbar2 {
|
||||
@extend %navbar;
|
||||
top: 50px;
|
||||
right: 50px;
|
||||
}
|
||||
|
||||
.navbar3 {
|
||||
@extend %navbar;
|
||||
top: 50px;
|
||||
right: 100px;
|
||||
}
|
||||
52
src/scss/modules/_quote.scss
Normal file
@@ -0,0 +1,52 @@
|
||||
.quote {
|
||||
font-size: 0.8em;
|
||||
text-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
@media screen and (min-width: 600px) {
|
||||
.quote {
|
||||
margin-left: 30%;
|
||||
margin-right: 30%;
|
||||
}
|
||||
}
|
||||
|
||||
.quoteauthor {
|
||||
font-size: 0.9em;
|
||||
letter-spacing: 0.5px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.quoteAuthor, .copyButton {
|
||||
display: inline;
|
||||
font-size: 0.8em;
|
||||
position: relative !important;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.copyButton {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
float: middle;
|
||||
margin: 0 auto;
|
||||
text-align: right;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
i.material-icons,
|
||||
h1.quoteauthor {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
button.copyButton {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #fff;
|
||||
padding: 20px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
display: table-cell
|
||||
}
|
||||
30
src/scss/modules/_search.scss
Normal file
@@ -0,0 +1,30 @@
|
||||
.searchbar {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
display: block;
|
||||
color: #ffff;
|
||||
font-family: 'Lexend Deca', sans-serif;;
|
||||
|
||||
input[type=text] {
|
||||
font-size: calc(5px + 1.2vmin);
|
||||
background: transparent;
|
||||
border: 2px solid #ffff;
|
||||
padding: 10px;
|
||||
color: #ffff;
|
||||
position: absolute;
|
||||
box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.input.searchtext {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.searchbarform {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
|
||||
}
|
||||
229
src/scss/modules/_settings.scss
Normal file
@@ -0,0 +1,229 @@
|
||||
$gradient: linear-gradient(90deg, #ffb032 0%, #dd3b67 100%);
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
/* display: inline-block; */
|
||||
width: 60px;
|
||||
height: 34px;
|
||||
float: right;
|
||||
|
||||
input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
border-radius: 34px;
|
||||
|
||||
&:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
background-color: white;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
&.round:before {
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
&[type=text] {
|
||||
width: 200px;
|
||||
padding: 0.5rem 1rem;
|
||||
box-sizing: border-box;
|
||||
border-image-slice: 1;
|
||||
border-image-source: $gradient;
|
||||
outline: none;
|
||||
font-family: 'Lexend Deca', sans-serif;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
&:checked + .slider {
|
||||
background: $gradient;
|
||||
|
||||
&:before {
|
||||
-webkit-transform: translateX(26px);
|
||||
-ms-transform: translateX(26px);
|
||||
transform: translateX(26px);
|
||||
}
|
||||
}
|
||||
|
||||
&:focus + .slider {
|
||||
box-shadow: 0 0 1px #e67e22;
|
||||
}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
background: #555;
|
||||
}
|
||||
|
||||
h4, .switch, .expandIcons {
|
||||
display: inline;
|
||||
font-size: 1.4em;
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
h4, #engines {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
%settingsButton {
|
||||
height: 45px;
|
||||
width: 130px;
|
||||
text-align: center;
|
||||
border: none;
|
||||
transition: 0.25s;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
box-shadow: 20px #000;
|
||||
font-size: 1.3em;
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-0.10em);
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 0%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
transition: 0.3s linear;
|
||||
z-index: -1;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&:hover:before {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&:active {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.apply {
|
||||
@extend %settingsButton;
|
||||
background-color: #dd3b67;
|
||||
&:before {
|
||||
background: $gradient;
|
||||
}
|
||||
}
|
||||
|
||||
.reset {
|
||||
@extend %settingsButton;
|
||||
background-color: #ffb032;
|
||||
margin-left: 20px;
|
||||
&:before {
|
||||
background: linear-gradient(90deg, #dd3b67 0%, #ffb032 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.expandIcons {
|
||||
position: relative;
|
||||
font-size: 25px;
|
||||
vertical-align: middle;
|
||||
display: inline-flex;
|
||||
cursor: pointer;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
|
||||
.extraSettings {
|
||||
display: none;
|
||||
border-left: 10px solid;
|
||||
border-image-slice: 1;
|
||||
border-width: 5px;
|
||||
border-image-source: linear-gradient(to bottom, #ffb032 0%, #dd3b67 100%);
|
||||
|
||||
> p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-left: 5px;
|
||||
margin: 0;
|
||||
|
||||
> label {
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.range {
|
||||
-webkit-appearance: none;
|
||||
width: 200px;
|
||||
height: 15px;
|
||||
background: #ccc;
|
||||
border-radius: 12px;
|
||||
outline: none;
|
||||
background: #ecf0f1;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 0 100px rgba(0, 0, 0, 0.3);
|
||||
|
||||
&::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 12px;
|
||||
background: $gradient;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&::-moz-range-thumb {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 12px;
|
||||
background: $gradient;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
input[type=color] {
|
||||
border-radius: 100%;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
box-shadow: 0 0 1rem 0 rgba(0, 0, 0, .2);
|
||||
border: none;
|
||||
outline: none;
|
||||
-webkit-appearance: none;
|
||||
vertical-align: middle;
|
||||
|
||||
&::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&::-webkit-color-swatch {
|
||||
border: none;
|
||||
border-radius: 100%;
|
||||
}
|
||||
}
|
||||