make it lighter

This commit is contained in:
David Ralph
2019-11-29 13:26:36 +00:00
parent b78f4ccf26
commit 5da8731017
11 changed files with 22 additions and 44 deletions

View File

@@ -109,11 +109,9 @@ Once I find a method to do it automatically, I will update this section accordin
### Maintainers
[ohlookitsderpy](https://github.com/ohlookitsderpy)
[TurboMarshmello](https://github.com/TurboMarshmello)
[TurboMarshmello](https://github.com/TurboMarshmello) (name idea, code contributions)
### Other
[TurboMarshmello](https://github.com/TurboMarshmello) - Portions of original code, name idea
[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

View File

@@ -1,29 +1,26 @@
{
"name": "mue",
"author": "ohlookitsderpy",
"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.",
"license": "MIT",
"version": "2.0.1",
"dependencies": {
"@material-ui/core": "^4.6.0",
"@material-ui/icons": "^4.6.0",
"react": "^16.11.0",
"react-dom": "^16.11.0",
"react-scripts": "3.2.0",
"unfetch": "^4.1.0"
"@material-ui/core": "^4.7.0",
"@material-ui/icons": "^4.5.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.2.0"
},
"devDependencies": {
"eslint": "^6.6.0",
"npm-run-all": "^4.1.5",
"sass": "^1.23.3"
"eslint": "^6.6.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"sass": "sass --watch src/scss:src/css --style compressed",
"start-all": "npm-run-all -p start sass"
"build": "react-scripts build"
},
"eslintConfig": {
"extends": "react-app"

View File

@@ -6,8 +6,8 @@ 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 './css/index.css'; // Import the compiled Sass
//import Navbar from './components/Navbar';
import './scss/index.scss';
//* App
export default class App extends React.Component {

View File

@@ -1,11 +1,10 @@
//* Imports
import React from 'react';
import Fetch from 'unfetch';
export default class Background extends React.Component {
async setBackground() {
try { // First we try and get an image from the API...
let data = await Fetch('https://api.muetab.xyz/getImage?category=Outdoors');
let data = await fetch('https://api.muetab.xyz/getImage?category=Outdoors');
data = await data.json();
document.getElementById('root').style.backgroundImage = `url(${data.file})`;

View File

@@ -15,7 +15,7 @@ export default class Clock extends React.Component {
let h = t.getHours(); // Get hours
// const s = today.getSeconds();
if (h > 12) h = h - 12; // Forgot what this does, might remove later if it doesn't do anything
if (h > 12) h = h - 12; // 12 hour support
this.setState({
date: `${('0' + h).slice(-2)}:${('0' + t.getMinutes()).slice(-2)}`, ampm: h >= 12 ? 'AM' : 'PM'
@@ -28,10 +28,6 @@ export default class Clock extends React.Component {
this.startTime();
}
componentWillUnmount() { // Do we need this?
clearTimeout(this.timeout);
}
render() {
return <h1 className='clock'>
{this.state.date}

View File

@@ -6,14 +6,14 @@ import React from 'react';
export default class Search extends React.Component {
render() {
return (
<div className="navbar-container">
<div className='navbar-container'>
<div className='navbar1'>
<RefreshIcon className='locationicon' />
<RefreshIcon className='locationicon'/>
</div>
<div className='navbar2'>
<LocalPizzaIcon className='pizzaicon'/>
</div>
</div>
</div>
);
}
}

View File

@@ -1,6 +1,5 @@
//* Imports
import React from 'react';
import Fetch from 'unfetch';
import quotes from '../quotes.json';
export default class Quote extends React.Component {
@@ -14,7 +13,7 @@ export default class Quote extends React.Component {
async getQuote() {
try { // First we try and get a quote from the API...
let data = await Fetch('https://api.muetab.xyz/getQuote');
let data = await fetch('https://api.muetab.xyz/getQuote');
data = await data.json();
this.setState({ quote: data.quote, author: data.author });
} catch (e) { // ..and if that fails we load one locally

View File

@@ -1 +0,0 @@
.clock{font-size:4em;margin:0;text-shadow:0 0 25px rgba(0,0,0,.3)}.ampm{font-size:.5em}.greeting{margin:0;font-size:1.6em;text-shadow:0 0 25px rgba(0,0,0,.3)}.quote{font-size:.8em;text-shadow:0 0 25px rgba(0,0,0,.3)}@media screen and (min-width: 600px){.quote{margin-left:30%;margin-right:30%}}.quoteauthor{font-size:.9em;letter-spacing:.5px;margin:0;text-shadow:0 0 25px rgba(0,0,0,.3)}i.material-icons,h1.quoteauthor{display:inline}.searchbar{position:absolute;left:20px;top:20px;display:flex;flex-direction:row;display:block;color:#fff;font-family:"Lexend Deca"}.searchbar button{cursor:pointer;outline:none;display:inline}.searchbar button i.material-icons{text-shadow:0 0 25px rgba(0,0,0,.3)}.searchbar input[type=text]{font-size:calc(5px + 1.2vmin);background:none;border:2px solid #fff;padding:10px;color:#fff;position:absolute;box-shadow:0 0 25px rgba(0,0,0,.3);z-index:1}.input.searchtext{border:none}.searchbarform{display:flex;flex-direction:row;box-shadow:0 25px 50px -12px rgba(0,0,0,.25)}#location,#photographer{font-size:calc(10px + 1.2vmin);text-shadow:0 0 25px rgba(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;text-shadow:0 2px 25px rgba(0,0,0,.3)}.credits{bottom:2px;left:0px;position:absolute;text-align:left;min-width:50px}.tooltip{position:relative;display:inline-block;border-bottom:1px dotted #000;bottom:15px;left:10px}.tooltip .tooltiptext{visibility:hidden;background-color:#000;color:#fff;text-align:center;border-radius:6px;padding:20px;position:absolute;z-index:1;position:absolute;bottom:40px;left:60px;margin-left:-60px;opacity:0;transition:opacity 1s}.tooltip:hover .tooltiptext{visibility:visible;opacity:1}.navbar1{top:50px;right:0px;position:absolute;text-align:right;min-width:50px}.navbar2{top:50px;right:50px;position:absolute;text-align:right;min-width:50px}.PizzaIcon{margin-right:20px}.pizza{right:2000px}body{background:#2f3640;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:"Lexend Deca";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}::placeholder{color:#fff;opacity:1}#root{background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;min-height:100vh;display:grid;color:#fff}@font-face{font-family:"Lexend Deca";src:url("/./fonts/LexendDeca-Regular.woff2") format("woff2")}/*# sourceMappingURL=index.css.map */

View File

@@ -1 +0,0 @@
{"version":3,"sourceRoot":"","sources":["../scss/modules/_clock.scss","../scss/modules/_greeting.scss","../scss/modules/_quote.scss","../scss/modules/_search.scss","../scss/modules/_credit.scss","../scss/modules/_navbar.scss","../scss/modules/_miscellaneous.scss"],"names":[],"mappings":"AAAA,OACE,cACA,SACA,oCAGF,MACE,eCPF,UACI,SACA,gBACA,oCCHJ,OACE,eACA,oCAGF,qCACE,OACE,gBACA,kBAIJ,aACE,eACA,oBACA,SACA,oCAGF,gCAEE,eCrBF,WACI,kBACA,UACA,SACA,aACA,mBACA,cACA,WACA,0BAEA,kBACI,eACA,aAMA,eAJA,mCACI,oCAMR,4BACI,8BACA,gBACA,sBACA,aACA,WACA,kBACA,mCACA,UAIR,kBACI,YAGJ,eACI,aACA,mBACA,6CCxCJ,wBAEE,+BACA,oCACA,uBAGF,UACE,oBAGF,cACE,kBACA,YACA,UACA,aAGF,cACE,+BACA,eAGF,iBACE,kBACA,WACA,SACA,YACA,aACA,eACA,sCAGF,SACE,WACA,SACA,kBACA,gBACA,eAGF,SACE,kBACA,qBACA,8BACA,YACA,UAEA,sBACE,kBACA,sBACA,WACA,kBACA,kBACA,aACA,kBACA,UACA,kBACA,YACA,UACA,kBAEA,UACA,sBAIJ,4BACE,mBACA,UCrEF,SACI,SACA,UACA,kBACA,iBACA,eAGJ,SACI,SACA,WACA,kBACA,iBACA,eAGJ,WACI,kBAGJ,OACI,aCrBJ,KACE,mBACA,SACA,mCACA,kCACA,0BACA,gBAGF,QACE,gBACA,iBACA,aACA,sBACA,uBACA,6BACA,kBAGF,cACE,WACA,UAGF,MACE,sBACA,4BACA,2BACA,4BACA,iBACA,aACA,WAGF,WACE,0BACA","file":"index.css"}

View File

@@ -14,14 +14,6 @@
min-width: 50px;
}
.navbar2 {
top: 50px;
right: 100px;
position: absolute;
text-align: right;
min-width: 50px;
}
.PizzaIcon {
margin-right: 20px;
}

View File

@@ -11,12 +11,11 @@
button {
cursor: pointer;
outline: none;
display: inline;
i.material-icons {
text-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
}
display: inline;
}
input[type=text] {