Update js and css

This commit is contained in:
fvanroie 2022-10-17 18:37:53 +02:00
parent 1e93d22833
commit 7e1e04ec71
4 changed files with 278 additions and 2 deletions

View File

@ -17,7 +17,7 @@ function ihtm(id, html) {
}
function about() {
ihtm("lic",'<h3>openHASP</h3>Copyright&copy; 2019-2022 Francis Van Roie</br>MIT License</p><p>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:</p><p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p><p>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.</p>');
ihtm("pkg","<hr><p>Based on the previous work of the following open source developers:</p><h3>HASwitchPlate</h3><p>Copyright&copy; 2019 Allen Derusha allen @derusha.org</b></br>MIT License</p><h3>LVGL</h3><p>Copyright&copy; 2021 LVGL Kft</br>MIT License</p><h3>LovyanGFX</h3><p>Copyright&copy; 2020 lovyan03 (https://github.com/lovyan03) All rights reserved.</br>FreeBSD License</p><h3>TFT_eSPI</h3><p>Copyright&copy; 2020 Bodmer (https://github.com/Bodmer) All rights reserved.</br>FreeBSD License</p><h3>Adafruit_GFX</h3><p>Copyright&copy; 2012 Adafruit Industries. All rights reserved</br>BSD License</p><h3>ArduinoJson</h3><p>Copyright&copy; 2014-2021 Benoit BLANCHON</br>MIT License</p><h3>PubSubClient</h3><p>Copyright&copy; 2008-2015 Nicholas O&apos;Leary</br>MIT License</p><h3>ArduinoLog</h3><p>Copyright&copy; 2017,2018 Thijs Elenbaas, MrRobot62, rahuldeo2047, NOX73, dhylands, Josha blemasle, mfalkvidd</br>MIT License</p><h3>QR Code generator</h3><p>Copyright&copy; Project Nayuki</br>MIT License</p><h3>SimpleFTPServer</h3><p>Copyright&copy; 2017 Renzo Mischianti www.mischianti.org All right reserved.</br>MIT License</p><h3>AceButton</h3><p>Copyright&copy; 2018 Brian T. Park</br>MIT License</p>");
ihtm("pkg","<hr><p>Based on the previous work of the following open source developers:</p><h3>HASwitchPlate</h3><p>Copyright&copy; 2019 Allen Derusha allen @derusha.org</b></br>MIT License</p><h3>LVGL</h3><p>Copyright&copy; 2021 LVGL Kft</br>MIT License</p><h3>LovyanGFX</h3><p>Copyright&copy; 2020 lovyan03 (https://github.com/lovyan03) All rights reserved.</br>FreeBSD License</p><h3>TFT_eSPI</h3><p>Copyright&copy; 2020 Bodmer (https://github.com/Bodmer) All rights reserved.</br>FreeBSD License</p><h3>Adafruit_GFX</h3><p>Copyright&copy; 2012 Adafruit Industries. All rights reserved</br>BSD License</p><h3>ArduinoJson</h3><p>Copyright&copy; 2014-2021 Benoit BLANCHON</br>MIT License</p><h3>ArduinoLog</h3><p>Copyright&copy; 2017,2018 Thijs Elenbaas, MrRobot62, rahuldeo2047, NOX73, dhylands, Josha blemasle, mfalkvidd</br>MIT License</p><h3>QR Code generator</h3><p>Copyright&copy; Project Nayuki</br>MIT License</p><h3>SimpleFTPServer</h3><p>Copyright&copy; 2017 Renzo Mischianti www.mischianti.org All right reserved.</br>MIT License</p><h3>AceButton</h3><p>Copyright&copy; 2018 Brian T. Park</br>MIT License</p>");
}
function handleSubmit(e) {
e.preventDefault();

Binary file not shown.

View File

@ -1 +1,277 @@
:root{--star: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 -6 16 16"><line y1="-3" y2="3" stroke="red" transform="rotate(15)"></line><line y1="-3" y2="3" stroke="red" transform="rotate(75)"></line><line y1="-3" y2="3" stroke="red" transform="rotate(-45)"></line></svg>');--trash: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-trash-can-outline" width="24" height="24" viewBox="0 0 24 24"><path d="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" /></svg>')}a.foot:link,a.foot:visited{color: var(--footfg)}input:not([type=file]){background-color: var(--fldbg);color: var(--fldfg)}input[type=checkbox],input[type=radio]{width: 1em}input[type=color]{width: 30%;padding: 5px}select{background-color: var(--fldbg);color: var(--fldfg)}input:invalid{border: 1px solid var(--fldred)}body{font-family: verdana;margin: auto;background: var(--bg);color: var(--txt)}.c,body{text-align: center}.clear{clear: both}.foot{background-color: transparent!important;all: revert;float: right;margin: 0;font-size: .6em}#doc>a.red,button.red{background-color: var(--btnred)}#doc>a.red:focus,#doc>a.red:hover,button.red:focus,button.red:hover{background-color: var(--btnredhi)}#doc{text-align: left;margin: 0 auto;display: inline-block;color: var(--txt);width: 80%;min-width: 300px;max-width: 600px;display: table}td{font-size: .87rem;padding-bottom: 0;padding-top: 0}th{padding-top: .5em}*{box-sizing: border-box}input,select,textarea{width: 100%;padding: 12px;border: 1px solid #ccc;border-radius: .6rem;resize: vertical}label{padding: 12px 18px 12px 0;display: inline-block}.required{background-image: var(--star);background-size: 1.5em 1.5em;background-position: right;background-repeat: no-repeat}.edit:before{content: "\0000a0"}.edit{background-image: var(--edit);background-size: 1.5em 1.5em;background-position: left;background-repeat: no-repeat;width: 1.5em;display: inline-block;text-decoration: none}.trash:before{content: "\0000a0"}.trash{background-image: var(--trash);background-size: 1.5em 1.5em;background-position: left;background-repeat: no-repeat;width: 1.5em;display: inline-block;text-decoration: none}#doc>a,.dist>a,button,input[type=submit]{padding: 12px;border: 1px solid var(--btnbrd);border-radius: .6rem;background-color: var(--btnbg);color: var(--btnfg);font-size: 1rem;width: 100%;margin: 12px 0;display: flex;align-items: center;justify-content: center;text-align: center;text-decoration: none}#doc>a:hover,.dist>a:hover,button:hover,input[type=submit]:hover{background-color: var(--btnbghi)}.container{background-color: var(--grpbg);color: var(--grpfg);border-radius: .6rem;padding: 10px;margin: 20px 0}.dist{display: flex;justify-content: space-between;width: 100%}.dist>a{flex-grow: 1;margin: 0 6px}.dist>a:first-child{margin-left: 0}.dist>a:last-child{margin-right: 0}.col-25{float: left;width: 25%;text-align: right;margin: 0}.col-75{margin: 0;float: left;width: 75%}.row:after{content: "";display: table;clear: both}.row{font-size: .833rem;margin: 5px}.gap,.row:last-of-type{margin: 5px 5px 20px}.error,.info,.success,.validation,.warning{border: 1px solid;margin: 10px auto;padding: 15px 10px 15px 50px;background-repeat: no-repeat;background-position: 10px center;max-width: 500px}.info{color: #00529B;background-color: #BDE5F8}.success{color: #4F8A10;background-color: #DFF2BF}.warning{color: #9F6000;background-color: #FEEFB3}.error{color: #D8000C;background-color: #FFD2D2}@media screen and (max-width:800px){.col-25,.col-75,input[type=submit]{width: 100%;margin-top: 0}.col-25{text-align: left}label{padding: 5px 18px 5px 0}}
:root {
--star: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 -6 16 16"><line y1="-3" y2="3" stroke="red" transform="rotate(15)"></line><line y1="-3" y2="3" stroke="red" transform="rotate(75)"></line><line y1="-3" y2="3" stroke="red" transform="rotate(-45)"></line></svg>');
--trash: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-trash-can-outline" width="24" height="24" viewBox="0 0 24 24"><path d="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" /></svg>')
}
a.foot:link,
a.foot:visited {
color: var(--footfg)
}
input:not([type=file]) {
background-color: var(--fldbg);
color: var(--fldfg)
}
input[type=checkbox],
input[type=radio] {
width: 1em
}
input[type=color] {
width: 30%;
padding: 5px
}
select {
background-color: var(--fldbg);
color: var(--fldfg)
}
input:invalid {
border: 1px solid var(--fldred)
}
body {
font-family: verdana;
margin: auto;
background: var(--bg);
color: var(--txt)
}
.c,
body {
text-align: center
}
.clear {
clear: both
}
.foot {
background-color: transparent !important;
all: revert;
float: right;
margin: 0;
font-size: .6em
}
#doc>a.red,
button.red {
background-color: var(--btnred)
}
#doc>a.red:focus,
#doc>a.red:hover,
button.red:focus,
button.red:hover {
background-color: var(--btnredhi)
}
#doc {
text-align: left;
margin: 0 auto;
display: inline-block;
color: var(--txt);
width: 80%;
min-width: 300px;
max-width: 600px;
display: table
}
td {
font-size: .87rem;
padding-bottom: 0;
padding-top: 0
}
th {
padding-top: .5em
}
* {
box-sizing: border-box
}
input,
select,
textarea {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: .6rem;
resize: vertical
}
label {
padding: 12px 18px 12px 0;
display: inline-block
}
.required {
background-image: var(--star);
background-size: 1.5em 1.5em;
background-position: right;
background-repeat: no-repeat
}
.edit:before {
content: "\0000a0"
}
.edit {
background-image: var(--edit);
background-size: 1.5em 1.5em;
background-position: left;
background-repeat: no-repeat;
width: 1.5em;
display: inline-block;
text-decoration: none
}
.trash:before {
content: "\0000a0"
}
.trash {
background-image: var(--trash);
background-size: 1.5em 1.5em;
background-position: left;
background-repeat: no-repeat;
width: 1.5em;
display: inline-block;
text-decoration: none
}
#doc>a,
.dist>a,
button,
input[type=submit] {
padding: 12px;
border: 1px solid var(--btnbrd);
border-radius: .6rem;
background-color: var(--btnbg);
color: var(--btnfg);
font-size: 1rem;
width: 100%;
margin: 12px 0;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
text-decoration: none
}
#doc>a:hover,
.dist>a:hover,
button:hover,
input[type=submit]:hover {
background-color: var(--btnbghi)
}
.container {
background-color: var(--grpbg);
color: var(--grpfg);
border-radius: .6rem;
padding: 10px;
margin: 20px 0
}
.dist {
display: flex;
justify-content: space-between;
width: 100%
}
.dist>a {
flex-grow: 1;
margin: 0 6px
}
.dist>a:first-child {
margin-left: 0
}
.dist>a:last-child {
margin-right: 0
}
.col-25 {
float: left;
width: 25%;
text-align: right;
margin: 0
}
.col-75 {
margin: 0;
float: left;
width: 75%
}
.row:after {
content: "";
display: table;
clear: both
}
.row {
font-size: .833rem;
margin: 5px
}
.gap,
.row:last-of-type {
margin: 5px 5px 20px
}
.error,
.info,
.success,
.validation,
.warning {
border: 1px solid;
margin: 10px auto;
padding: 15px 10px 15px 50px;
background-repeat: no-repeat;
background-position: 10px center;
max-width: 500px
}
.info {
color: #00529B;
background-color: #BDE5F8
}
.success {
color: #4F8A10;
background-color: #DFF2BF
}
.warning {
color: #9F6000;
background-color: #FEEFB3
}
.error {
color: #D8000C;
background-color: #FFD2D2
}
@media screen and (max-width:800px) {
.col-25,
.col-75,
input[type=submit] {
width: 100%;
margin-top: 0
}
.col-25 {
text-align: left
}
label {
padding: 5px 18px 5px 0
}
}

Binary file not shown.