Add Sass support and convert CSS to SCSS

This commit is contained in:
Dale Davies
2022-05-12 16:25:43 +01:00
parent 10ee3a5621
commit d210572983
13 changed files with 6132 additions and 2589 deletions

View File

@@ -0,0 +1,82 @@
.time-weather {
display: block;
position: absolute;
right: 15px;
bottom: 10px;
z-index: 100;
font-family: 'Quicksand', sans-serif;
font-weight: 400;
text-shadow: 1px 1px 2px #000000a0;
.time {
font-size: 2.4em;
vertical-align: middle;
span {
font-size: .5em;
padding-left: 5px;
}
}
.weather {
color: inherit;
text-decoration: none;
.weather-icon {
display: inline-block;
font-size: 1.9em;
vertical-align: middle;
height: 48px;
line-height: 48px !important;
&::before {
position: relative;
}
}
.weather-info {
display: inline-flex;
flex-direction: column;
text-align: right;
font-size: 14px;
margin-right: 10px;
font-weight: 600;
line-height: normal;
vertical-align: middle;
text-shadow: 1px 1px 1px #000000a0;
}
}
}
.widget {
display: inline-block;
padding:5px 10px;
height: 58px;
user-select: none;
z-index:1000;
.clickable {
border-radius: 6px;
cursor: pointer;
&:hover {
background-color: #ffffff15;
transition: background-color .1s;
}
}
}
.useclientlocation {
font-size: 14px;
text-shadow: 1px 1px 1px #000000a0;
display: none;
position: absolute;
bottom: 10px;
left: 15px;
line-height:58px;
padding: 0 10px 0 45px;
background-size: 37px;
background-position: top 50% left 5px;
background-repeat: no-repeat;
background-image: url(../images/map-pin.svg);
}

View File

@@ -0,0 +1,18 @@
.greeting {
font-family: 'Quicksand', sans-serif;
font-size: 2.3em;
font-weight: 400;
text-transform: capitalize;
text-shadow: 1px 1px 2px #000000a0;
margin-top: -50px;
margin-bottom: 15px;
.tagname {
text-transform: lowercase;
.greeting .tagname span {
opacity: 0.5;
margin-right:5px;
}
}
}

View File

@@ -0,0 +1,32 @@
.header-bar {
position: absolute;
top: 0;
right: 0;
left: 0;
padding: 15px 15px 0 15px;
overflow: hidden;
text-align: right;
z-index: 100;
.show-tags {
height: 55px;
width: 55px;
display: inline-block;
background-position: top 50% left 50%;
background-repeat: no-repeat;
background-image: url(../images/tags.svg);
background-size: 35px;
background-color: #ffffff15;
border-radius: 50%;
cursor: pointer;
border: 2px solid #ffffff20;
&:hover {
background-color: #fff;
box-shadow: 0 1px 5px rgba(0,0,0,.3);
background-image: url(../images/tags-dark.svg);
border: 2px solid #cecece;
transition: background-color, background-image .1s;
}
}
}

View File

@@ -0,0 +1,123 @@
.sites {
padding: 0;
margin: 0;
list-style-type: none;
font-size: 14px;
user-select: none;
li {
padding: 0;
margin: 0;
list-style-type: none;
font-size: 14px;
user-select: none;
display: inline-block;
a {
color: inherit;
text-decoration: none;
display: inline-block;
padding: 13px;
border-radius: 6px;
&:hover {
background-color: #ffffff15;
transition: background-color .1s;
}
}
}
.icon {
display: block;
background-color: #fff;
width: 80px;
height: 80px;
border-radius: 6px;
border: .2em solid #fff;
box-shadow: 0 1px 5px rgba(0,0,0,.3);
padding: 15px;
margin-bottom: 8px;
background-image: url(../images/loading.svg);
background-repeat: no-repeat;
background-position: 50%;
background-size: 20px;
img {
width: 100%;
background: #fff;
}
}
.name {
display: block;
width: 80px;
max-height: 3.3em;
overflow: hidden;
word-wrap: break-word;
text-shadow: 1px 1px 1px #000000a0;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.sites.alternate {
width: 100%;
margin-top: 20px;
li {
float: left;
width: 50%;
text-align: left;
padding: 0 5px;
margin-bottom: 10px;
a {
background-color: rgba(255,255,255,0.8);
box-shadow: 0 1px 5px rgba(0,0,0,.3);
padding: 8px;
width: 100%;
transition: background-color .1s, box-shadow .1s;
position: relative;
overflow: hidden;
&:hover {
background-color: #fff;
box-shadow: 0 1px 5px rgba(0,0,0,.6);
}
}
}
.icon {
width: 35px;
height: 35px;
display: inline-block;
padding: 0;
border: none;
border-radius: 6px;
overflow: hidden;
box-shadow: none;
vertical-align: middle;
margin: 0 8px 0 0;
}
.name {
width: auto;
display: inline-block;
vertical-align: middle;
text-shadow: none;
color: #202124;
position: absolute;
top: 50%;
height: 14px;
line-height: 14px;
margin-top: -7px;
}
}
@media (max-width: 500px) {
.sites.alternate {
li {
width: 100%;
}
}
}

View File

@@ -0,0 +1,80 @@
.tags {
display:none;
color: #202124;
position: fixed;
top: 15px;
right: 15px;
text-align: left;
background-color: #fff;
border-radius: 6px;
border: .2em solid #cecece;
box-shadow: 0 1px 5px rgba(0,0,0,.3);
padding: 15px 15px 15px 15px;
min-width: 250px;
font-family: 'Quicksand', sans-serif;
font-weight: 400;
z-index:100;
&:target {
display: block;
}
.header {
font-size: 20px;
height: 35px;
margin-bottom: 20px;
border-bottom: 1px solid #ddd;
line-height: 18px;
display: block;
.close {
position: absolute;
top: 0;
right: 0;
height: 48px;
width: 48px;
display: inline-block;
background-position: top 50% left 50%;
background-repeat: no-repeat;
background-image: url(../images/close-dark.svg);
background-size: 30px;
cursor: pointer;
border: 5px solid #fff;
border-radius: 50%;
&:hover {
background-color: #f3f3f3;
}
}
}
ul {
padding: 0;
margin: 0;
list-style-position: inside;
li {
text-transform: lowercase;
margin-bottom: 3px;
&::marker {
color: #bbb;
content: '#';
}
a {
display:inline-block;
color: inherit;
text-decoration: dotted;
padding: 3px 5px;
margin-left: 1px;
border-radius: 4px;
&:hover {
background-color: #f3f3f3;
transition: background-color .1s;
}
}
}
}
}

View File

@@ -0,0 +1,75 @@
/**
* Some CSS because Jump would look pretty ugly without it.
*
* @author Dale Davies <dale@daledavies.co.uk>
* @license MIT
*/
/* First get all our imports */
@use 'footer-bar';
@use 'greeting';
@use 'header-bar';
@use 'sites';
@use 'tags';
/* Some generic styles */
@font-face {
font-family: 'Quicksand';
font-style: normal;
font-weight: 400;
src: local(''),
url('../font/quicksand-v28-latin-regular.woff2') format('woff2'),
url('../font/quicksand-v28-latin-regular.woff') format('woff');
}
* {
box-sizing: border-box;
}
body {
font-family: sans-serif;
margin: 0;
padding: 0;
color: #fff;
text-align: center;
background: #000;
}
.fixed {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
.hidden {
opacity: 0;
}
.enable {
display: block !important;
}
.background {
filter: brightness(0.85) blur(10px);
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
transform: scale(1.07);
z-index: 1;
}
.content {
z-index: 100;
display: flex;
flex-direction: column;
justify-content:center;
width: 100%;
max-width: 650px;
margin:0 auto;
}

View File

@@ -1,384 +0,0 @@
/**
* Some CSS because Jump would look pretty ugly without it.
*
* @author Dale Davies <dale@daledavies.co.uk>
* @license MIT
*/
@font-face {
font-family: 'Quicksand';
font-style: normal;
font-weight: 400;
src: local(''),
url('../font/quicksand-v28-latin-regular.woff2') format('woff2'),
url('../font/quicksand-v28-latin-regular.woff') format('woff');
}
* {
box-sizing: border-box;
}
body {
font-family: sans-serif;
margin: 0;
padding: 0;
color: #fff;
text-align: center;
background: #000;
}
.fixed {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
}
.hidden {
opacity: 0;
}
.enable {
display: block !important;
}
.background {
filter: brightness(0.85) blur(10px);
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
transform: scale(1.07);
z-index: 1;
}
.header-bar {
position: absolute;
top: 0;
right: 0;
left: 0;
padding: 15px 15px 0 15px;
overflow: hidden;
text-align: right;
z-index: 100;
}
.show-tags {
height: 55px;
width: 55px;
display: inline-block;
background-position: top 50% left 50%;
background-repeat: no-repeat;
background-image: url(../images/tags.svg);
background-size: 35px;
background-color: #ffffff15;
border-radius: 50%;
cursor: pointer;
border: 2px solid #ffffff20;
}
.show-tags:hover {
background-color: #fff;
box-shadow: 0 1px 5px rgba(0,0,0,.3);
background-image: url(../images/tags-dark.svg);
border: 2px solid #cecece;
transition: background-color, background-image .1s;
}
.content {
z-index: 100;
display: flex;
flex-direction: column;
justify-content:center;
width: 100%;
max-width: 650px;
margin:0 auto;
}
.greeting {
font-family: 'Quicksand', sans-serif;
font-size: 2.3em;
font-weight: 400;
text-transform: capitalize;
text-shadow: 1px 1px 2px #000000a0;
margin-top: -50px;
margin-bottom: 15px;
}
.greeting .tagname {
text-transform: lowercase;
}
.greeting .tagname span {
opacity: 0.5;
margin-right:5px;
}
.widget {
display: inline-block;
padding:5px 10px;
height: 58px;
user-select: none;
z-index:1000;
}
.widget.clickable {
border-radius: 6px;
cursor: pointer;
}
.widget.clickable:hover {
background-color: #ffffff15;
transition: background-color .1s;
}
.time-weather {
display: block;
position: absolute;
right: 15px;
bottom: 10px;
z-index: 100;
font-family: 'Quicksand', sans-serif;
font-weight: 400;
text-shadow: 1px 1px 2px #000000a0;
}
.time {
font-size: 2.4em;
vertical-align: middle;
}
.time span {
font-size: .5em;
padding-left: 5px;
}
.weather {
color: inherit;
text-decoration: none;
}
.weather-icon {
display: inline-block;
font-size: 1.9em;
vertical-align: middle;
height: 48px;
line-height: 48px !important;
}
.weather-icon::before {
position: relative;
/* top: 4px; */
}
.weather-info {
display: inline-flex;
flex-direction: column;
text-align: right;
font-size: 14px;
margin-right: 10px;
font-weight: 600;
line-height: normal;
vertical-align: middle;
text-shadow: 1px 1px 1px #000000a0;
}
.useclientlocation {
font-size: 14px;
text-shadow: 1px 1px 1px #000000a0;
display: none;
position: absolute;
bottom: 10px;
left: 15px;
line-height:58px;
padding: 0 10px 0 45px;
background-size: 37px;
background-position: top 50% left 5px;
background-repeat: no-repeat;
background-image: url(../images/map-pin.svg);
}
.sites, .sites li {
padding: 0;
margin: 0;
list-style-type: none;
font-size: 14px;
user-select: none;
}
.sites li {
display: inline-block;
}
.sites li a {
color: inherit;
text-decoration: none;
display: inline-block;
padding: 13px;
border-radius: 6px
}
.sites li a:hover {
background-color: #ffffff15;
transition: background-color .1s;
}
.sites .icon {
display: block;
background-color: #fff;
width: 80px;
height: 80px;
border-radius: 6px;
border: .2em solid #fff;
box-shadow: 0 1px 5px rgba(0,0,0,.3);
padding: 15px;
margin-bottom: 8px;
background-image: url(../images/loading.svg);
background-repeat: no-repeat;
background-position: 50%;
background-size: 20px;
}
.sites .icon img {
width:100%;
background: #fff;
}
.sites .name {
display: block;
width: 80px;
max-height: 3.3em;
overflow: hidden;
word-wrap: break-word;
text-shadow: 1px 1px 1px #000000a0;
text-overflow: ellipsis;
white-space: nowrap;
}
.sites.alternate {
width:100%;
margin-top: 20px;
}
.sites.alternate li {
float: left;
width: 50%;
text-align: left;
padding: 0 5px;
margin-bottom: 10px;
}
.sites.alternate li a {
background-color: rgba(255,255,255,0.8);
box-shadow: 0 1px 5px rgba(0,0,0,.3);
padding: 8px;
width: 100%;
transition: background-color .1s, box-shadow .1s;
position:relative;
overflow:hidden;
}
.sites.alternate li a:hover {
background-color:#fff;
box-shadow: 0 1px 5px rgba(0,0,0,.6);
}
.sites.alternate .icon {
width: 35px;
height:35px;
display:inline-block;
padding: 0;
border: none;
border-radius: 6px;
overflow: hidden;
box-shadow: none;
vertical-align: middle;
margin: 0 8px 0 0;
}
.sites.alternate .name {
width:auto;
display:inline-block;
vertical-align: middle;
text-shadow: none;
color: #202124;
position: absolute;
top: 50%;
height: 14px;
line-height: 14px;
margin-top: -7px;
}
@media (max-width: 500px) {
.sites.alternate li {
width: 100%;
}
}
.tags {
display:none;
color: #202124;
position: fixed;
top: 15px;
right: 15px;
text-align: left;
background-color: #fff;
border-radius: 6px;
border: .2em solid #cecece;
box-shadow: 0 1px 5px rgba(0,0,0,.3);
padding: 15px 15px 15px 15px;
min-width: 250px;
font-family: 'Quicksand', sans-serif;
font-weight: 400;
z-index:100;
}
.tags:target {
display: block;
}
.tags .header {
font-size: 20px;
height: 35px;
margin-bottom: 20px;
border-bottom: 1px solid #ddd;
line-height: 18px;
display: block;
}
.tags .header .close {
position: absolute;
top: 0;
right: 0;
height: 48px;
width: 48px;
display: inline-block;
background-position: top 50% left 50%;
background-repeat: no-repeat;
background-image: url(../images/close-dark.svg);
background-size: 30px;
cursor: pointer;
border: 5px solid #fff;
border-radius: 50%;
}
.tags .header .close:hover {
background-color: #f3f3f3;
}
.tags ul {
padding: 0;
margin: 0;
list-style-position: inside;
}
.tags ul li {
text-transform: lowercase;
margin-bottom: 3px;
}
.tags ul li::marker {
color: #bbb;
content: '#';
}
.tags ul li a {
display:inline-block;
color: inherit;
text-decoration: dotted;
padding: 3px 5px;
margin-left: 1px;
border-radius: 4px;
}
.tags ul li a:hover {
background-color: #f3f3f3;
transition: background-color .1s;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{# noindex}}<meta name="robots" content="noindex">{{/ noindex}}
<link rel="stylesheet" href="/assets/css/styles.16bdbba8f5c4dda86818.min.css">
<link rel="stylesheet" href="/assets/css/styles.d5cd9fa42e523236402f.min.css">
<link rel="stylesheet" href="/background-css.php">
<link rel="stylesheet" href="/assets/css/weather-icons.min.css">
<link rel="icon" type="image/png" href="/favicon.png">

7912
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -12,6 +12,8 @@
"css-minimizer-webpack-plugin": "^3.4.1",
"html-webpack-plugin": "^5.5.0",
"mini-css-extract-plugin": "^2.6.0",
"sass": "^1.51.0",
"sass-loader": "^12.6.0",
"terser-webpack-plugin": "^5.3.1",
"webpack": "^5.68.0",
"webpack-cli": "^4.9.2",

View File

@@ -10,7 +10,7 @@ module.exports = {
mode: 'production',
entry: {
index: './jumpapp/assets/js/src/index.js',
styles: './jumpapp/assets/css/src/styles.css',
styles: './jumpapp/assets/css/src/index.scss',
},
output: {
filename: '[name].[contenthash].min.js',
@@ -19,17 +19,18 @@ module.exports = {
module: {
rules: [
{
test: /\.css$/,
test: /\.(s(a|c)ss)$/,
use: [
{
loader: MiniCssExtractPlugin.loader
},
{
loader: "css-loader",
loader: 'css-loader',
options: {
url: false // Stop webpack emitting image/font from URLs found in CSS.
}
}
},
'sass-loader',
],
}
]