Added comments to css

This commit is contained in:
Miguel R. Ávila 2020-12-29 12:01:14 -06:00
parent 1a3f596281
commit e2cf133e3f
5 changed files with 417 additions and 411 deletions

View File

@ -1,6 +1,6 @@
<div align="center">
<h1>Bento</h1>
<b>🍱 A Clean and Simple Startpage</b>
<h1>Bento</h1>
<b>🍱 A Clean and Simple Startpage</b>
</div>
<p align="center">

View File

@ -1,307 +1,308 @@
/* Import font*/
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;700&display=swap');
:root {
/* Fonts */
--fsg: 150px;
--fsm: 85px;
--fss: 30px;
--fses: 18px;
/* Fonts */
--fsg: 135px; /* Time and Greeting */
--fsm: 75px; /* Date */
--fss: 25px; /* Greetings and Weather widger */
--fses: 16px; /* Links List */
/* Light theme */
--accent: #186efdaa;
--bg: #f5f5f5;
--sbg: #e4e6e6;
--fg: #3a3a3a;
/* Light theme */
--accent: #186efdaa; /* Hover color */
--bg: #f5f5f5; /* Background color */
--sbg: #e4e6e6; /* Cards color */
--fg: #3a3a3a; /* Foreground color */
/* Image background */
/* Image background */
/* Uncoment this section to get the
/* Uncoment this section to get the
image wallpaper. You can also
change the --imgcol value
to make the filter to your own */
/* --imgbg: url(/img/wal.jpg); */
--imgcol: linear-gradient(
rgba(255, 255, 255, 0.7),
rgba(255, 255, 255, 0.7)
);
/* --imgbg: url(/img/wal.jpg); */
--imgcol: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)); /* Filter color */
}
@media only screen and (max-width: 68.75em) {
:root {
--fsg: 100px;
--fsm: 65px;
--fss: 20px;
}
:root {
--fsg: 100px;
--fsm: 65px;
--fss: 20px;
}
}
/* Dark theme */
.darktheme {
--accent: #186efd60;
--bg: #1e1f21;
--sbg: #2c2d31;
--fg: #d8dee9;
--imgcol: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
--accent: #186efd60; /* Hover color */
--bg: #1e1f21; /* Background color */
--sbg: #2c2d31; /* Cards color */
--fg: #d8dee9; /* Foreground color */
--imgcol: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)); /* Filter color */
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Open Sans', sans-serif;
font-size: 13.5px;
transition: 0.2s ease-in-out;
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Open Sans', sans-serif;
font-size: 13.5px;
transition: 0.2s ease-in-out;
}
body {
width: 100vw;
height: 100vh;
background-color: var(--bg);
background-image: var(--imgcol), var(--imgbg);
display: flex;
align-items: center;
justify-content: center;
width: 100vw;
height: 100vh;
background-color: var(--bg);
background-image: var(--imgcol), var(--imgbg);
display: flex;
align-items: center;
justify-content: center;
}
#themeButton {
position: absolute;
margin: 2em 2em 0 0;
right: 0;
top: 0;
color: var(--fg);
border: none;
border-radius: 5px;
padding: 10px;
cursor: pointer;
background-color: #00000000;
-webkit-appearance: none;
-moz-appearance: none;
position: absolute;
margin: 2em 2em 0 0;
right: 0;
top: 0;
color: var(--fg);
border: none;
border-radius: 5px;
padding: 10px;
cursor: pointer;
background-color: #00000000;
-webkit-appearance: none;
-moz-appearance: none;
}
.bicon {
width: 26px;
height: 26px;
width: 26px;
height: 26px;
}
.container {
width: 150vh;
height: 85vh;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(4, 1fr);
grid-gap: 30px;
padding: 20px;
width: 150vh;
height: 85vh;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(4, 1fr);
grid-gap: 30px;
padding: 20px;
}
@media only screen and (max-width: 68.75em) {
.container {
grid-gap: 20px;
padding: 40px;
}
.container {
grid-gap: 20px;
padding: 40px;
}
}
.container > * {
width: 100%;
width: 100%;
}
.card {
box-shadow: 0 5px 7px rgba(0, 0, 0, 0.35);
border-radius: 5px;
background-color: var(--sbg);
box-shadow: 0 5px 7px rgba(0, 0, 0, 0.35);
border-radius: 5px;
background-color: var(--sbg);
}
.card:hover {
transform: translateY(-0.2rem);
box-shadow: 0 10px 10px rgba(0, 0, 0, 0.35);
transform: translateY(-0.2rem);
box-shadow: 0 10px 10px rgba(0, 0, 0, 0.35);
}
.fblock {
grid-row: 1 / span 2;
grid-column: 1 / span 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
grid-row: 1 / span 2;
grid-column: 1 / span 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
@media only screen and (max-width: 68.75em) {
.fblock {
grid-row: 1 / span 2;
grid-column: 1 / span 4;
}
.fblock {
grid-row: 1 / span 2;
grid-column: 1 / span 4;
}
}
.sblock {
grid-column: 3 / span 2;
grid-row: 1 / span 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
grid-column: 3 / span 2;
grid-row: 1 / span 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.sblock__date {
display: flex;
align-items: center;
justify-content: center;
margin-top: 30px;
display: flex;
align-items: center;
justify-content: center;
margin-top: 30px;
}
.sblock__weather {
display: flex;
align-items: center;
justify-content: center;
display: flex;
align-items: center;
justify-content: center;
}
@media only screen and (max-width: 68.75em) {
.sblock {
display: none;
}
.sblock {
display: none;
}
}
.clock {
display: flex;
align-items: center;
justify-content: center;
display: flex;
align-items: center;
justify-content: center;
}
#hour,
#separator,
#minutes {
font-size: var(--fsg);
font-weight: bolder;
color: var(--fg);
font-size: var(--fsg);
font-weight: bolder;
color: var(--fg);
}
#month,
#day {
font-size: var(--fsm);
font-weight: bold;
color: var(--fg);
font-size: var(--fsm);
font-weight: bold;
color: var(--fg);
}
#day {
margin-left: 20px;
margin-left: 20px;
}
#greetings {
font-size: var(--fss);
color: var(--fg);
font-size: var(--fss);
color: var(--fg);
}
@media only screen and (max-width: 68.75em) {
#greetings {
font-size: var(--fss);
}
#greetings {
font-size: var(--fss);
}
}
.weather-icon img {
width: 80px;
height: 80px;
width: 70px;
height: 70px;
}
.temperature-value p {
font-size: var(--fss);
font-weight: bolder;
margin-left: 15px;
color: var(--fg);
font-size: var(--fss);
font-weight: bolder;
margin-left: 15px;
color: var(--fg);
}
.temperature-description p {
font-size: var(--fss);
margin-left: 15px;
color: var(--fg);
font-size: var(--fss);
margin-left: 15px;
color: var(--fg);
}
.qlink {
grid-row: 3 / span 2;
grid-column: 1 / span 2;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(2, 1fr);
grid-gap: 30px;
padding: 30px;
grid-row: 3 / span 2;
grid-column: 1 / span 2;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(2, 1fr);
grid-gap: 30px;
padding: 20px;
}
@media only screen and (max-width: 68.75em) {
.qlink {
grid-row: 3 / span 2;
grid-column: 1 / span 4;
grid-gap: 40px;
padding: 20px;
}
.qlink {
grid-row: 3 / span 2;
grid-column: 1 / span 4;
grid-gap: 20px;
padding-left: 100px;
padding-right: 100px;
}
}
.qlink__icon {
width: 26px;
height: 26px;
color: var(--fg);
width: 23px;
height: 23px;
color: var(--fg);
}
.qlink__link {
display: flex;
justify-content: center;
align-items: center;
background-color: var(--sbg);
width: 100%;
box-shadow: 0 5px 7px rgba(0, 0, 0, 0.35);
border-radius: 5px;
display: flex;
justify-content: center;
align-items: center;
background-color: var(--sbg);
width: 100%;
box-shadow: 0 5px 7px rgba(0, 0, 0, 0.35);
border-radius: 5px;
}
.qlink__link-1 {
grid-row: 1;
grid-column: 1;
grid-row: 1;
grid-column: 1;
}
.qlink__link-2 {
grid-row: 1;
grid-column: 2;
grid-row: 1;
grid-column: 2;
}
.qlink__link-3 {
grid-row: 2;
grid-column: 1;
grid-row: 2;
grid-column: 1;
}
.qlink__link-4 {
grid-row: 2;
grid-column: 2;
grid-row: 2;
grid-column: 2;
}
.qlink__link-5 {
grid-row: 1;
grid-column: 3;
grid-row: 1;
grid-column: 3;
}
.qlink__link-6 {
grid-row: 2;
grid-column: 3;
grid-row: 2;
grid-column: 3;
}
.qlink__link:hover {
background-color: var(--accent);
transform: translateY(-0.2rem);
box-shadow: 0 10px 10px rgba(0, 0, 0, 0.35);
background-color: var(--accent);
transform: translateY(-0.2rem);
box-shadow: 0 10px 10px rgba(0, 0, 0, 0.35);
}
.qlink__link:hover svg {
stroke: var(--fg);
stroke: var(--fg);
}
.qlist {
display: flex;
align-items: center;
flex-direction: column;
display: flex;
align-items: center;
flex-direction: column;
}
@media only screen and (max-width: 68.75em) {
.qlist {
display: none;
}
.qlist {
display: none;
}
}
.qlist__1 {
grid-column: 3;
grid-row: 3 / span 2;
grid-column: 3;
grid-row: 3 / span 2;
}
.qlist__2 {
grid-column: 4;
grid-row: 3 / span 2;
grid-column: 4;
grid-row: 3 / span 2;
}
.qlist__head {
margin-top: 30px;
margin-bottom: 20px;
width: 30px;
color: var(--fg);
height: 30px;
margin-top: 30px;
margin-bottom: 20px;
width: 30px;
color: var(--fg);
height: 30px;
}
.qlist__link {
text-decoration: none;
font-size: var(--fses);
color: var(--fg);
margin-top: 1px;
padding: 6px 12px;
border-radius: 5px;
font-weight: bold;
text-decoration: none;
font-size: var(--fses);
color: var(--fg);
margin-top: 1px;
padding: 6px 12px;
border-radius: 5px;
font-weight: bold;
}
.qlist__link:hover {
background-color: var(--accent);
color: var(--fg);
background-color: var(--accent);
color: var(--fg);
}

View File

@ -4,7 +4,9 @@
<meta charset="UTF-8" />
<title>Bento</title>
<link rel=" shortcut icon" type="image/png" href="icons/favicon.png" />
<link rel="stylesheet" href="css/style.css" />
<script src="https://unpkg.com/feather-icons"></script>
</head>
<body class="">

View File

@ -13,7 +13,7 @@ var tempUnit = 'C';
const KELVIN = 273.15;
// Use your own key for the Weather, Get it here: https://openweathermap.org/
const key = 'aa5b0a76dfbf87541928fb3cc32d3d69';
const key = 'aa5b0a76dfbf87441928fb3cc32d3d25';
// Set Position function
setPosition();

View File

@ -1,3 +1,10 @@
// ___ _
// | _ ) ___ _ _| |_ ___
// | _ \/ -_) ' \ _/ _ \
// |___/\___|_||_\__\___/
//
// - Miguel R. Ávila
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;700&display=swap');
// Responsive
$bp-largest: 75em;
@ -7,319 +14,315 @@ $bp-small: 37.5em;
$bp-smallest: 31.25em;
:root {
// Fonts
--fsg: 150px;
--fsm: 85px;
--fss: 30px;
--fses: 18px;
// Fonts
--fsg: 150px;
--fsm: 85px;
--fss: 30px;
--fses: 18px;
// C O L O R S
--accent: #186efdaa;
--accent: #186efdaa;
--bg: #f5f5f5;
--sbg: #e4e6e6;
--fg: #3a3a3a;
--bg: #f5f5f5;
--sbg: #e4e6e6;
--fg: #3a3a3a;
--imgbg: url(/img/wal.jpg);
--imgbg: url(/img/wal.jpg);
--imgcol: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7));
--imgcol: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7));
@media only screen and (max-width: $bp-large) {
--fsg: 100px;
--fsm: 65px;
--fss: 20px;
}
@media only screen and (max-width: $bp-large) {
--fsg: 100px;
--fsm: 65px;
--fss: 20px;
}
}
.darktheme {
--accent: #186efd60;
--accent: #186efd60;
--bg: #1e1f21;
--sbg: #2c2d31;
--fg: #d8dee9;
--bg: #1e1f21;
--sbg: #2c2d31;
--fg: #d8dee9;
--imgcol: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
--imgcol: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Open Sans', sans-serif;
font-size: 13.5px;
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Open Sans', sans-serif;
font-size: 13.5px;
transition: 0.2s ease-in-out;
transition: 0.2s ease-in-out;
}
body {
width: 100vw;
height: 100vh;
background-color: var(--bg);
width: 100vw;
height: 100vh;
background-color: var(--bg);
background-image: var(--imgcol), var(--imgbg);
background-image: var(--imgcol), var(--imgbg);
display: flex;
align-items: center;
justify-content: center;
display: flex;
align-items: center;
justify-content: center;
}
#themeButton {
position: absolute;
margin: 2em 2em 0 0;
right: 0;
top: 0;
position: absolute;
margin: 2em 2em 0 0;
right: 0;
top: 0;
color: var(--fg);
color: var(--fg);
border: none;
border-radius: 5px;
border: none;
border-radius: 5px;
padding: 10px;
cursor: pointer;
padding: 10px;
cursor: pointer;
background-color: #00000000;
background-color: #00000000;
-webkit-appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}
.bicon {
width: 26px;
height: 26px;
width: 26px;
height: 26px;
}
.container {
width: 150vh;
height: 85vh;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(4, 1fr);
width: 150vh;
height: 85vh;
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(4, 1fr);
grid-gap: 30px;
padding: 20px;
grid-gap: 30px;
padding: 20px;
@media only screen and (max-width: $bp-large) {
grid-gap: 20px;
padding: 40px;
}
@media only screen and (max-width: $bp-large) {
grid-gap: 20px;
padding: 40px;
}
& > * {
width: 100%;
}
& > * {
width: 100%;
}
}
.card {
box-shadow: 0 5px 7px rgba(#000000, 0.35);
border-radius: 5px;
background-color: var(--sbg);
box-shadow: 0 5px 7px rgba(#000000, 0.35);
border-radius: 5px;
background-color: var(--sbg);
&:hover {
transform: translateY(-0.2rem);
box-shadow: 0 10px 10px rgba(#000000, 0.35);
}
&:hover {
transform: translateY(-0.2rem);
box-shadow: 0 10px 10px rgba(#000000, 0.35);
}
}
.fblock {
grid-row: 1 / span 2;
grid-column: 1 / span 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
@media only screen and (max-width: $bp-large) {
grid-row: 1 / span 2;
grid-column: 1 / span 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
@media only screen and (max-width: $bp-large) {
grid-row: 1 / span 2;
grid-column: 1 / span 4;
}
grid-column: 1 / span 4;
}
}
.sblock {
grid-column: 3 / span 2;
grid-row: 1 / span 2;
grid-column: 3 / span 2;
grid-row: 1 / span 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
&__date {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 30px;
}
&__weather {
display: flex;
align-items: center;
justify-content: center;
}
&__date {
display: flex;
align-items: center;
justify-content: center;
margin-top: 30px;
}
&__weather {
display: flex;
align-items: center;
justify-content: center;
}
@media only screen and (max-width: $bp-large) {
display: none;
}
@media only screen and (max-width: $bp-large) {
display: none;
}
}
.clock {
display: flex;
align-items: center;
justify-content: center;
display: flex;
align-items: center;
justify-content: center;
}
#hour,
#separator,
#minutes {
font-size: var(--fsg);
font-weight: bolder;
color: var(--fg);
font-size: var(--fsg);
font-weight: bolder;
color: var(--fg);
}
#month,
#day {
font-size: var(--fsm);
font-weight: bold;
color: var(--fg);
font-size: var(--fsm);
font-weight: bold;
color: var(--fg);
}
#day {
margin-left: 20px;
margin-left: 20px;
}
#greetings {
font-size: var(--fses);
color: var(--fg);
font-size: var(--fses);
color: var(--fg);
@media only screen and (max-width: $bp-large) {
font-size: var(--fss);
}
@media only screen and (max-width: $bp-large) {
font-size: var(--fss);
}
}
.weather-icon img {
width: 80px;
height: 80px;
width: 80px;
height: 80px;
}
.temperature {
&-value p {
font-size: var(--fss);
font-weight: bolder;
margin-left: 15px;
color: var(--fg);
}
&-description p {
font-size: var(--fss);
margin-left: 15px;
color: var(--fg);
}
&-value p {
font-size: var(--fss);
font-weight: bolder;
margin-left: 15px;
color: var(--fg);
}
&-description p {
font-size: var(--fss);
margin-left: 15px;
color: var(--fg);
}
}
.qlink {
grid-row: 3 / span 2;
grid-column: 1 / span 2;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(2, 1fr);
grid-gap: 30px;
padding: 30px;
@media only screen and (max-width: $bp-large) {
grid-row: 3 / span 2;
grid-column: 1 / span 2;
grid-column: 1 / span 4;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(2, 1fr);
grid-gap: 40px;
padding: 20px;
}
grid-gap: 30px;
padding: 30px;
&__icon {
width: 26px;
height: 26px;
color: var(--fg);
}
@media only screen and (max-width: $bp-large) {
grid-row: 3 / span 2;
grid-column: 1 / span 4;
grid-gap: 40px;
padding: 20px;
&__link {
display: flex;
justify-content: center;
align-items: center;
background-color: var(--sbg);
width: 100%;
box-shadow: 0 5px 7px rgba(#000000, 0.35);
border-radius: 5px;
&-1 {
grid-row: 1;
grid-column: 1;
}
&-2 {
grid-row: 1;
grid-column: 2;
}
&-3 {
grid-row: 2;
grid-column: 1;
}
&-4 {
grid-row: 2;
grid-column: 2;
}
&-5 {
grid-row: 1;
grid-column: 3;
}
&-6 {
grid-row: 2;
grid-column: 3;
}
&__icon {
width: 26px;
height: 26px;
color: var(--fg);
}
&__link {
display: flex;
justify-content: center;
align-items: center;
background-color: var(--sbg);
width: 100%;
box-shadow: 0 5px 7px rgba(#000000, 0.35);
border-radius: 5px;
&-1 {
grid-row: 1;
grid-column: 1;
}
&-2 {
grid-row: 1;
grid-column: 2;
}
&-3 {
grid-row: 2;
grid-column: 1;
}
&-4 {
grid-row: 2;
grid-column: 2;
}
&-5 {
grid-row: 1;
grid-column: 3;
}
&-6 {
grid-row: 2;
grid-column: 3;
}
&:hover {
background-color: var(--accent);
transform: translateY(-0.2rem);
box-shadow: 0 10px 10px rgba(#000000, 0.35);
& svg {
stroke: var(--fg);
}
}
&:hover {
background-color: var(--accent);
transform: translateY(-0.2rem);
box-shadow: 0 10px 10px rgba(#000000, 0.35);
& svg {
stroke: var(--fg);
}
}
}
}
.qlist {
display: flex;
align-items: center;
flex-direction: column;
display: flex;
align-items: center;
flex-direction: column;
@media only screen and (max-width: $bp-large) {
display: none;
}
@media only screen and (max-width: $bp-large) {
display: none;
}
&__1 {
grid-column: 3;
grid-row: 3 / span 2;
}
&__2 {
grid-column: 4;
grid-row: 3 / span 2;
}
&__head {
margin-top: 30px;
margin-bottom: 20px;
width: 30px;
color: var(--fg);
height: 30px;
}
&__link {
text-decoration: none;
font-size: var(--fses);
color: var(--fg);
margin-top: 1px;
padding: 6px 12px;
border-radius: 5px;
font-weight: bold;
&__1 {
grid-column: 3;
grid-row: 3 / span 2;
}
&__2 {
grid-column: 4;
grid-row: 3 / span 2;
}
&__head {
margin-top: 30px;
margin-bottom: 20px;
width: 30px;
color: var(--fg);
height: 30px;
}
&__link {
text-decoration: none;
font-size: var(--fses);
color: var(--fg);
margin-top: 1px;
padding: 6px 12px;
border-radius: 5px;
font-weight: bold;
&:hover {
background-color: var(--accent);
color: var(--fg);
}
&:hover {
background-color: var(--accent);
color: var(--fg);
}
}
}