Clean up and convert black.css to SASS.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
fad4a2382a
commit
dd1e7a2d18
7 changed files with 52 additions and 307 deletions
|
@ -14,18 +14,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
.uhr.black {
|
||||
background-color: #111;
|
||||
|
||||
.dot:not(.active) {
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.letter:not(.active) {
|
||||
color: rgba(255, 255, 255, 0.1);
|
||||
text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.black .onoffswitch-inner:before {
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
.uhr.black .dot:not(.active) {
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.uhr.black .letter:not(.active) {
|
||||
color: rgba(255, 255, 255, 0.1);
|
||||
text-shadow: 0 0 0.1em rgba(255, 255, 255, 0.1);
|
||||
}
|
249
css/uhr.css
249
css/uhr.css
|
@ -1,249 +0,0 @@
|
|||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'Uhrenfont';
|
||||
src: url('../resources/assets/fonts/uhr.woff') format('woff');
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Uhrenfont', sans-serif;
|
||||
}
|
||||
|
||||
.uhr {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
transition: background-color 0.5s;
|
||||
}
|
||||
|
||||
.uhr .reflection {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: radial-gradient(225em 45em at 160% 0, rgba(255, 255, 255, 0.4) 0, rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0) 40%) no-repeat scroll;
|
||||
display: block;
|
||||
margin: 0.15em;
|
||||
}
|
||||
|
||||
#themeswitcher {
|
||||
}
|
||||
|
||||
.uhr .letterarea {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 12%;
|
||||
bottom: 12%;
|
||||
left: 12%;
|
||||
right: 12%;
|
||||
overflow: hidden;
|
||||
font-size: 200%;
|
||||
}
|
||||
|
||||
.item {
|
||||
transition: box-shadow 0.5s, text-shadow 0.5s, border-color 0.5s, color 0.5s;
|
||||
}
|
||||
|
||||
.dot {
|
||||
position: absolute;
|
||||
display: block;
|
||||
height: 0;
|
||||
width: 0;
|
||||
border: 0.2em solid;
|
||||
border-radius: 1em;
|
||||
}
|
||||
|
||||
.dot.active {
|
||||
border-color: #eee;
|
||||
box-shadow: 0 0 0.2em #eee;
|
||||
}
|
||||
|
||||
.dot1 {
|
||||
top: 3.75%;
|
||||
left: 3.75%;
|
||||
}
|
||||
|
||||
.dot2 {
|
||||
top: 3.75%;
|
||||
right: 3.75%;
|
||||
}
|
||||
|
||||
.dot3 {
|
||||
bottom: 3.75%;
|
||||
right: 3.75%;
|
||||
}
|
||||
|
||||
.dot4 {
|
||||
bottom: 3.75%;
|
||||
left: 3.75%;
|
||||
}
|
||||
|
||||
.letter {
|
||||
height: 10%;
|
||||
width: 9.0909%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 160%;
|
||||
}
|
||||
|
||||
.letter.active {
|
||||
color: #eee;
|
||||
text-shadow: 0 0 0.2em #eee;
|
||||
}
|
||||
|
||||
.onoffswitch {
|
||||
position: relative;
|
||||
width: 86px;
|
||||
margin: 1em;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
|
||||
.onoffswitch-checkbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.onoffswitch-label {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
border: 2px solid #999;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.onoffswitch-inner, .modeswitch-inner {
|
||||
width: 200%;
|
||||
margin-left: -100%;
|
||||
-moz-transition: margin 0.3s ease-in 0s;
|
||||
-webkit-transition: margin 0.3s ease-in 0s;
|
||||
-o-transition: margin 0.3s ease-in 0s;
|
||||
transition: margin 0.3s ease-in 0s;
|
||||
}
|
||||
|
||||
.onoffswitch-inner:before, .onoffswitch-inner:after, .modeswitch-inner:before, .modeswitch-inner:after {
|
||||
float: left;
|
||||
width: 50%;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
line-height: 24px;
|
||||
font-size: 18px;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.onoffswitch-inner:before {
|
||||
content: "EIN";
|
||||
padding-left: 12px;
|
||||
color: #eee;
|
||||
transition: background-color 0.5s;
|
||||
}
|
||||
|
||||
.onoffswitch-inner:after {
|
||||
content: "AUS";
|
||||
padding-right: 12px;
|
||||
background-color: #eee;
|
||||
color: #999;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.onoffswitch-switch {
|
||||
width: 30px;
|
||||
margin: -3px;
|
||||
background: #fff;
|
||||
border: 2px solid #999;
|
||||
border-radius: 50px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 58px;
|
||||
-moz-transition: all 0.3s ease-in 0s;
|
||||
-webkit-transition: all 0.3s ease-in 0s;
|
||||
-o-transition: all 0.3s ease-in 0s;
|
||||
transition: all 0.3s ease-in 0s;
|
||||
}
|
||||
|
||||
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner,
|
||||
.onoffswitch-checkbox:checked + .onoffswitch-label .modeswitch-inner {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.modeswitch-inner:before {
|
||||
content: "MIN";
|
||||
padding-left: 12px;
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.modeswitch-inner:after {
|
||||
content: "SEC";
|
||||
padding-right: 12px;
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
a.uhr-configlink {
|
||||
cursor: pointer;
|
||||
background: url("../resources/assets/images/settings.png") no-repeat;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: inline-block;
|
||||
margin: 2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.uhr-controlpanel {
|
||||
border-radius: 0.5em;
|
||||
box-shadow: 0 0 1em black;
|
||||
background-color: #fff;
|
||||
display: inline-block;
|
||||
padding: 0.5em;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.uhr-controlpanel .content {
|
||||
position: relative;
|
||||
}
|
||||
a.uhr-closecontrolpanel {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -1em;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: url("../resources/assets/images/close.png") no-repeat;
|
||||
}
|
||||
|
||||
#disclaimer {
|
||||
font-size: 0.5em;
|
||||
}
|
||||
|
||||
#disclaimer a {
|
||||
color: #444;
|
||||
text-decoration: underline;
|
||||
}
|
30
css/uhr.scss
30
css/uhr.scss
|
@ -1,7 +1,3 @@
|
|||
/*!
|
||||
* Copyright (C) Schweizerische Bundesbahnen SBB, 2019.
|
||||
*/
|
||||
|
||||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -40,12 +36,8 @@ body {
|
|||
display: block;
|
||||
margin: 0.15em;
|
||||
}
|
||||
}
|
||||
|
||||
#themeswitcher {
|
||||
}
|
||||
|
||||
.uhr .letterarea {
|
||||
.letterarea {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 12%;
|
||||
|
@ -54,6 +46,10 @@ body {
|
|||
right: 12%;
|
||||
overflow: hidden;
|
||||
font-size: 200%;
|
||||
}
|
||||
}
|
||||
|
||||
#themeswitcher {
|
||||
}
|
||||
|
||||
.item {
|
||||
|
@ -67,11 +63,11 @@ body {
|
|||
width: 0;
|
||||
border: 0.2em solid;
|
||||
border-radius: 1em;
|
||||
}
|
||||
|
||||
.dot.active {
|
||||
&.active {
|
||||
border-color: #eee;
|
||||
box-shadow: 0 0 0.2em #eee;
|
||||
}
|
||||
}
|
||||
|
||||
.dot1 {
|
||||
|
@ -102,11 +98,11 @@ body {
|
|||
display: inline-block;
|
||||
text-align: center;
|
||||
line-height: 160%;
|
||||
}
|
||||
|
||||
.letter.active {
|
||||
&.active {
|
||||
color: #eee;
|
||||
text-shadow: 0 0 0.2em #eee;
|
||||
}
|
||||
}
|
||||
|
||||
.onoffswitch {
|
||||
|
@ -227,10 +223,10 @@ a.uhr-configlink {
|
|||
position: sticky;
|
||||
bottom: 0;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.uhr-controlpanel .content {
|
||||
.content {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
|
||||
a.uhr-closecontrolpanel {
|
||||
|
@ -246,9 +242,9 @@ a.uhr-closecontrolpanel {
|
|||
|
||||
#disclaimer {
|
||||
font-size: 0.5em;
|
||||
}
|
||||
|
||||
#disclaimer a {
|
||||
a {
|
||||
color: #444;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
|
2
dist/assets/uhr-black.css
vendored
2
dist/assets/uhr-black.css
vendored
|
@ -1 +1 @@
|
|||
.uhr.black{background-color:#111}.black .onoffswitch-inner:before{background-color:#111}.uhr.black .dot:not(.active){border-color:rgba(255,255,255,0.1);box-shadow:0 0 0.1em rgba(255,255,255,0.1)}.uhr.black .letter:not(.active){color:rgba(255,255,255,0.1);text-shadow:0 0 0.1em rgba(255,255,255,0.1)}
|
||||
.uhr.black{background-color:#111}.uhr.black .dot:not(.active){border-color:rgba(255,255,255,0.1);box-shadow:0 0 0.1em rgba(255,255,255,0.1)}.uhr.black .letter:not(.active){color:rgba(255,255,255,0.1);text-shadow:0 0 0.1em rgba(255,255,255,0.1)}.black .onoffswitch-inner:before{background-color:#111}
|
||||
|
|
10
index.html
10
index.html
|
@ -47,16 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
|
||||
<script type="text/javascript" src="dist/lib/uhr.bundle.js"></script>
|
||||
<!--<script type="text/javascript" src="dist/lib/layout_de_ch.js"></script>-->
|
||||
<!--<script type="text/javascript" src="dist/lib/layout_de_ch_genau.js"></script>-->
|
||||
<!--<script type="text/javascript" src="dist/lib/layout_de.js"></script>-->
|
||||
<!--<script type="text/javascript" src="dist/lib/layout_dk.js"></script>-->
|
||||
<!--<script type="text/javascript" src="dist/lib/layout_en.js"></script>-->
|
||||
<!--<script type="text/javascript" src="dist/lib/layout_es.js"></script>-->
|
||||
<!--<script type="text/javascript" src="dist/lib/layout_fr.js"></script>-->
|
||||
<!--<script type="text/javascript" src="dist/lib/layout_it.js"></script>-->
|
||||
<!--<script type="text/javascript" src="dist/lib/layout_nl.js"></script>-->
|
||||
<!--<script type="text/javascript" src="dist/lib/layout_pt.js"></script>-->
|
||||
<script type="text/javascript">
|
||||
function go(url) {
|
||||
window.location = url;
|
||||
|
|
|
@ -18,18 +18,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
<meta charset="UTF-8">
|
||||
<title>Test bärneruhr.ch</title>
|
||||
<link rel="stylesheet" type="text/css" href="css/mocha.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../css/uhr.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../css/uhr-black.css" data-class="black"/>
|
||||
<link rel="stylesheet" type="text/css" href="../css/uhr-red.css" data-class="red"/>
|
||||
<link rel="stylesheet" type="text/css" href="../css/uhr-pink.css" data-class="pink"/>
|
||||
<link rel="stylesheet" type="text/css" href="../dist/assets/uhr.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="../dist/assets/uhr-black.css" data-class="black"/>
|
||||
<link rel="stylesheet" type="text/css" href="../dist/assets/uhr-red.css" data-class="red"/>
|
||||
<link rel="stylesheet" type="text/css" href="../dist/assets/uhr-pink.css" data-class="pink"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="u"></div>
|
||||
<div id="mocha"></div>
|
||||
<script type="text/javascript" src="lib/mocha.js"></script>
|
||||
<script type="text/javascript" src="lib/chai.js"></script>
|
||||
<script type="text/javascript" src="../dist/libs.js"></script>
|
||||
<script type="text/javascript" src="../dist/jquery.uhr.complete.js"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.4.1.js"
|
||||
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
|
||||
crossorigin="anonymous"></script>
|
||||
<script
|
||||
src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"
|
||||
integrity="sha256-T0Vest3yCU7pafRw9r+settMBX6JkKN06dqBnpQ8d30="
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
|
||||
<script type="text/javascript" src="../dist/lib/uhr.bundle.js"></script>
|
||||
<script type="text/javascript">
|
||||
mocha.setup('tdd');
|
||||
</script>
|
||||
|
|
|
@ -16,7 +16,7 @@ module.exports = (env, argv) => ({
|
|||
layout_nl: require.resolve('./src/layout/layout-nl.ts'),
|
||||
layout_pt: require.resolve('./src/layout/layout-pt.ts'),
|
||||
style_main: require.resolve('./resources/styles/uhr.scss'),
|
||||
style_black: require.resolve('./css/uhr-black.css'),
|
||||
style_black: require.resolve('./css/uhr-black.scss'),
|
||||
style_blue: require.resolve('./css/uhr-blue.css'),
|
||||
style_green: require.resolve('./css/uhr-green.css'),
|
||||
style_pink: require.resolve('./css/uhr-pink.css'),
|
||||
|
|
Loading…
Reference in a new issue