new icons and further improvements

This commit is contained in:
Dorian Zedler 2019-07-18 12:44:28 +02:00
parent d63eaf97d6
commit e5df611f29
12 changed files with 1268 additions and 219 deletions

View file

@ -169,7 +169,7 @@
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script> crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.9.0/feather.min.js"></script> <script src="js/feather.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js"></script>
<script src="js/blueweather.js"></script> <script src="js/blueweather.js"></script>
<script src="js/dashboard.js"></script> <script src="js/dashboard.js"></script>

View file

@ -112,34 +112,4 @@
c0.223,0,0.402-0.181,0.402-0.402S5.828,12.834,5.605,12.834z"/> c0.223,0,0.402-0.181,0.402-0.402S5.828,12.834,5.605,12.834z"/>
</g> </g>
</g> </g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -29,34 +29,4 @@
C167.808,414.432,171.904,416,176,416s8.192-1.568,11.296-4.672l160-160C353.536,245.088,353.536,234.944,347.296,228.704z"/> C167.808,414.432,171.904,416,176,416s8.192-1.568,11.296-4.672l160-160C353.536,245.088,353.536,234.944,347.296,228.704z"/>
</g> </g>
</g> </g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -5,56 +5,8 @@
width="454.355px" height="454.355px" viewBox="0 0 454.355 454.355" style="enable-background:new 0 0 454.355 454.355;" width="454.355px" height="454.355px" viewBox="0 0 454.355 454.355" style="enable-background:new 0 0 454.355 454.355;"
xml:space="preserve"> xml:space="preserve">
<g> <g>
<g> <path d="M227.178,48.175C101.911,48.175,0,144.153,0,262.126c0,50.51,19.048,99.542,53.634,138.066 c3.416,3.806,8.308,5.987,13.421,5.987h320.246c5.113,0,10.006-2.182,13.422-5.987c34.586-38.523,53.633-87.557,53.633-138.066 C454.355,144.152,352.445,48.175,227.178,48.175z M357.752,303.859c-1.84-0.916-3.805-1.382-5.838-1.382 c-5.021,0-9.529,2.789-11.766,7.277c-1.562,3.139-1.811,6.696-0.697,10.021c1.113,3.325,3.455,6.018,6.594,7.58l46.828,23.319 c-3.645,5.925-7.65,11.662-12.016,17.159l-1.805,2.271H75.304l-1.806-2.271c-4.811-6.057-8.331-11.162-12.021-17.168 l46.835-23.311c3.138-1.562,5.48-4.255,6.593-7.58c1.114-3.324,0.866-6.883-0.697-10.021c-2.236-4.489-6.745-7.279-11.765-7.279 c-2.034,0-3.997,0.466-5.836,1.382l-47.146,23.482c-8.755-20.708-13.388-42.918-13.388-65.214c0-8.202,0.613-16.273,1.773-24.183 l45.531,6.926c0.659,0.102,1.33,0.152,1.998,0.152c6.417,0,11.985-4.795,12.953-11.154c1.088-7.154-3.848-13.861-11.003-14.951 l-43.606-6.633c9.33-29.7,26.774-56.203,49.94-77.287l31.538,32.432c2.493,2.565,5.835,3.977,9.412,3.977 c3.437,0,6.685-1.32,9.148-3.716c2.515-2.445,3.926-5.722,3.975-9.228c0.049-3.506-1.27-6.821-3.714-9.335l-29.647-30.487 c28.327-19.346,62.563-31.608,99.68-33.964v44.528c0,7.238,5.889,13.127,13.126,13.127s13.125-5.889,13.125-13.127V84.674 c37.117,2.356,71.355,14.618,99.682,33.964l-29.648,30.488c-2.443,2.514-3.764,5.829-3.713,9.335 c0.049,3.505,1.459,6.782,3.973,9.226c2.465,2.397,5.715,3.717,9.15,3.717c3.576,0,6.918-1.412,9.412-3.976l31.537-32.432 c23.166,21.083,40.611,47.586,49.939,77.286l-43.605,6.634c-7.154,1.089-12.092,7.796-11.002,14.95 c0.967,6.358,6.535,11.154,12.953,11.154c0.668,0,1.338-0.051,1.992-0.15l45.537-6.928c1.16,7.91,1.773,15.98,1.773,24.184 c0,22.301-4.635,44.517-13.395,65.229L357.752,303.859z"/><path d="M234.657,256.373l-41.191-91.438c-0.897-1.996-3.115-3.138-5.321-2.606c-2.493,0.601-4.028,3.109-3.427,5.602 l23.488,97.497c-5.781,6.966-7.905,16.686-4.759,25.877c4.805,14.035,20.078,21.518,34.113,16.714 c14.037-4.806,21.519-20.079,16.714-34.114C251.129,264.713,243.494,258.333,234.657,256.373z"/>
<path d="M227.178,48.175C101.911,48.175,0,144.153,0,262.126c0,50.51,19.048,99.542,53.634,138.066
c3.416,3.806,8.308,5.987,13.421,5.987h320.246c5.113,0,10.006-2.182,13.422-5.987c34.586-38.523,53.633-87.557,53.633-138.066 <path d="M234.657,256.373l-41.191-91.438c-0.897-1.996-3.115-3.138-5.321-2.606c-2.493,0.601-4.028,3.109-3.427,5.602 l23.488,97.497c-5.781,6.966-7.905,16.686-4.759,25.877c4.805,14.035,20.078,21.518,34.113,16.714 c14.037-4.806,21.519-20.079,16.714-34.114C251.129,264.713,243.494,258.333,234.657,256.373z"/>
C454.355,144.152,352.445,48.175,227.178,48.175z M357.752,303.859c-1.84-0.916-3.805-1.382-5.838-1.382
c-5.021,0-9.529,2.789-11.766,7.277c-1.562,3.139-1.811,6.696-0.697,10.021c1.113,3.325,3.455,6.018,6.594,7.58l46.828,23.319
c-3.645,5.925-7.65,11.662-12.016,17.159l-1.805,2.271H75.304l-1.806-2.271c-4.811-6.057-8.331-11.162-12.021-17.168
l46.835-23.311c3.138-1.562,5.48-4.255,6.593-7.58c1.114-3.324,0.866-6.883-0.697-10.021c-2.236-4.489-6.745-7.279-11.765-7.279
c-2.034,0-3.997,0.466-5.836,1.382l-47.146,23.482c-8.755-20.708-13.388-42.918-13.388-65.214c0-8.202,0.613-16.273,1.773-24.183
l45.531,6.926c0.659,0.102,1.33,0.152,1.998,0.152c6.417,0,11.985-4.795,12.953-11.154c1.088-7.154-3.848-13.861-11.003-14.951
l-43.606-6.633c9.33-29.7,26.774-56.203,49.94-77.287l31.538,32.432c2.493,2.565,5.835,3.977,9.412,3.977
c3.437,0,6.685-1.32,9.148-3.716c2.515-2.445,3.926-5.722,3.975-9.228c0.049-3.506-1.27-6.821-3.714-9.335l-29.647-30.487
c28.327-19.346,62.563-31.608,99.68-33.964v44.528c0,7.238,5.889,13.127,13.126,13.127s13.125-5.889,13.125-13.127V84.674
c37.117,2.356,71.355,14.618,99.682,33.964l-29.648,30.488c-2.443,2.514-3.764,5.829-3.713,9.335
c0.049,3.505,1.459,6.782,3.973,9.226c2.465,2.397,5.715,3.717,9.15,3.717c3.576,0,6.918-1.412,9.412-3.976l31.537-32.432
c23.166,21.083,40.611,47.586,49.939,77.286l-43.605,6.634c-7.154,1.089-12.092,7.796-11.002,14.95
c0.967,6.358,6.535,11.154,12.953,11.154c0.668,0,1.338-0.051,1.992-0.15l45.537-6.928c1.16,7.91,1.773,15.98,1.773,24.184
c0,22.301-4.635,44.517-13.395,65.229L357.752,303.859z"/>
<path d="M234.657,256.373l-41.191-91.438c-0.897-1.996-3.115-3.138-5.321-2.606c-2.493,0.601-4.028,3.109-3.427,5.602
l23.488,97.497c-5.781,6.966-7.905,16.686-4.759,25.877c4.805,14.035,20.078,21.518,34.113,16.714
c14.037-4.806,21.519-20.079,16.714-34.114C251.129,264.713,243.494,258.333,234.657,256.373z"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g> </g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

17
img/icons/pressureNew.svg Normal file
View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg width="90.709" height="90.709" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<metadata>
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:title/>
</cc:Work>
</rdf:RDF>
</metadata>
<g transform="translate(0,-273)" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round">
<path d="m3.5773 291.32a9.3994 9.5811 0 0 1 2.9068-11.322 9.3994 9.5811 0 0 1 11.482-9e-3 9.3994 9.5811 0 0 1 2.9239 11.318" stroke-width="2.2022"/>
<path d="m11.866 288.27 1.5624 0.28012 0.20822-1.4828-7.8845-9.5549z" stroke-width="1.1113"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 929 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- Generator: Gravit.io --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 24 24" width="24pt" height="24pt"><defs><clipPath id="_clipPath_G6tOBFN7PuNGnVHLyugt38T77Ukt4pbz"><rect width="24" height="24"/></clipPath></defs><g clip-path="url(#_clipPath_G6tOBFN7PuNGnVHLyugt38T77Ukt4pbz)"><circle vector-effect="non-scaling-stroke" cx="11.5" cy="12.5" r="8.5" fill="rgb(235,235,235)"/></g></svg>

After

Width:  |  Height:  |  Size: 521 B

View file

@ -10,34 +10,4 @@
<path d="M38.489,64.981c-1.657,0-3-1.343-3-3s1.343-3,3-3c5.616,0,10.186-4.567,10.186-10.183c0-1.657,1.343-3,3-3 <path d="M38.489,64.981c-1.657,0-3-1.343-3-3s1.343-3,3-3c5.616,0,10.186-4.567,10.186-10.183c0-1.657,1.343-3,3-3
c1.656,0,3,1.343,3,3C54.674,57.721,47.413,64.981,38.489,64.981z"/> c1.656,0,3,1.343,3,3C54.674,57.721,47.413,64.981,38.489,64.981z"/>
</g> </g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 978 B

View file

@ -93,34 +93,4 @@
c2.01,3.457,6.443,4.63,9.9,2.62l35.36-20.44C75.957,279.209,77.13,274.777,75.12,271.32z"/> c2.01,3.457,6.443,4.63,9.9,2.62l35.36-20.44C75.957,279.209,77.13,274.777,75.12,271.32z"/>
</g> </g>
</g> </g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

@ -15,34 +15,4 @@
c23,13.4,38.201,38.201,38.201,66.9C363.35,520.199,328.949,554.699,286.85,554.699z"/> c23,13.4,38.201,38.201,38.201,66.9C363.35,520.199,328.949,554.699,286.85,554.699z"/>
</g> </g>
</g> </g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

20
img/icons/test.html Normal file
View file

@ -0,0 +1,20 @@
<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-temperature">
<g transform="translate(0,-273)">
<g transform="matrix(.052866 0 0 .056274 -.1177 270.57)">
<path d="m226.99 76.385c-125.16 0-226.99 91.476-226.99 203.92 0 48.141 19.032 94.873 53.589 131.59 3.4131 3.6275 8.3011 5.7062 13.41 5.7062h319.98c5.1087 0 9.9976-2.0796 13.411-5.7062 34.557-36.716 53.588-83.45 53.588-131.59-1e-3 -112.44-101.83-203.92-226.99-203.92zm130.46 243.69c-1.8385-0.87304-3.8018-1.3172-5.8331-1.3172-5.0168 0-9.521 2.6582-11.756 6.9357-1.5607 2.9918-1.8095 6.3819-0.69642 9.551 1.1121 3.169 3.4521 5.7357 6.5885 7.2245l46.789 22.225c-3.642 5.6471-7.6436 11.115-12.006 16.354l-1.8035 2.1645h-303.49l-1.8045-2.1645c-4.807-5.7729-8.324-10.638-12.011-16.363l46.796-22.218c3.1354-1.4887 5.4754-4.0554 6.5875-7.2245 1.1131-3.1681 0.86528-6.5602-0.69641-9.551-2.2341-4.2784-6.7394-6.9376-11.755-6.9376-2.0323 0-3.9937 0.44414-5.8311 1.3172l-47.107 22.381c-8.7477-19.737-13.377-40.905-13.377-62.155 0-7.8173 0.61249-15.51 1.7715-23.049l45.493 6.6012c0.65845 0.0972 1.3289 0.14487 1.9963 0.14487 6.4116 0 11.975-4.5701 12.942-10.631 1.0871-6.8184-3.8448-13.211-10.994-14.25l-43.57-6.3219c9.3222-28.307 26.752-53.567 49.898-73.662l31.512 30.911c2.4909 2.4447 5.8301 3.7905 9.4041 3.7905 3.4341 0 6.6794-1.2581 9.1404-3.5417 2.5129-2.3303 3.9227-5.4536 3.9717-8.7952 0.049-3.3416-1.2689-6.5011-3.7109-8.8972l-29.622-29.057c28.303-18.439 62.511-30.125 99.597-32.371v42.439c0 6.8985 5.8841 12.511 13.115 12.511s13.114-5.6128 13.114-12.511v-42.438c37.086 2.2455 71.295 13.932 99.599 32.371l-29.623 29.058c-2.441 2.3961-3.7608 5.5556-3.7099 8.8972 0.049 3.3406 1.4578 6.4639 3.9697 8.7933 2.4629 2.2846 5.7102 3.5427 9.1424 3.5427 3.573 0 6.9122-1.3458 9.4041-3.7895l31.511-30.911c23.147 20.094 40.577 45.354 49.897 73.661l-43.569 6.3228c-7.148 1.0379-12.082 7.4303-10.993 14.249 0.96619 6.0598 6.5295 10.631 12.942 10.631 0.66744 0 1.3369-0.0486 1.9903-0.14297l45.499-6.603c1.159 7.539 1.7715 15.23 1.7715 23.05 0 21.255-4.6311 42.429-13.384 62.17z" fill="none" stroke="#000" stroke-width="4.8509"/>
<path d="m234.46 284.58-41.157-91.438c-0.89625-1.996-3.1124-3.138-5.3166-2.606-2.4909 0.601-4.0246 3.109-3.4241 5.602l23.468 97.497c-5.7762 6.966-7.8984 16.686-4.755 25.877 4.801 14.035 20.061 21.518 34.084 16.714 14.025-4.806 21.501-20.079 16.7-34.114-3.1424-9.192-10.771-15.572-19.601-17.532z" stroke-width=".99958"/>
<path d="m234.46 284.58-41.157-91.438c-0.89625-1.996-3.1124-3.138-5.3166-2.606-2.4909 0.601-4.0246 3.109-3.4241 5.602l23.468 97.497c-5.7762 6.966-7.8984 16.686-4.755 25.877 4.801 14.035 20.061 21.518 34.084 16.714 14.025-4.806 21.501-20.079 16.7-34.114-3.1424-9.192-10.771-15.572-19.601-17.532z" stroke-width=".99958"/>
</g>
</g></svg>
<svg width="24" height="24" viewBox="0 0 24 24">
<g transform="translate(0,-273)">
<g transform="matrix(.052866 0 0 .056274 -.1177 270.57)">
<path d="m226.99 76.385c-125.16 0-226.99 91.476-226.99 203.92 0 48.141 19.032 94.873 53.589 131.59 3.4131 3.6275 8.3011 5.7062 13.41 5.7062h319.98c5.1087 0 9.9976-2.0796 13.411-5.7062 34.557-36.716 53.588-83.45 53.588-131.59-1e-3 -112.44-101.83-203.92-226.99-203.92zm130.46 243.69c-1.8385-0.87304-3.8018-1.3172-5.8331-1.3172-5.0168 0-9.521 2.6582-11.756 6.9357-1.5607 2.9918-1.8095 6.3819-0.69642 9.551 1.1121 3.169 3.4521 5.7357 6.5885 7.2245l46.789 22.225c-3.642 5.6471-7.6436 11.115-12.006 16.354l-1.8035 2.1645h-303.49l-1.8045-2.1645c-4.807-5.7729-8.324-10.638-12.011-16.363l46.796-22.218c3.1354-1.4887 5.4754-4.0554 6.5875-7.2245 1.1131-3.1681 0.86528-6.5602-0.69641-9.551-2.2341-4.2784-6.7394-6.9376-11.755-6.9376-2.0323 0-3.9937 0.44414-5.8311 1.3172l-47.107 22.381c-8.7477-19.737-13.377-40.905-13.377-62.155 0-7.8173 0.61249-15.51 1.7715-23.049l45.493 6.6012c0.65845 0.0972 1.3289 0.14487 1.9963 0.14487 6.4116 0 11.975-4.5701 12.942-10.631 1.0871-6.8184-3.8448-13.211-10.994-14.25l-43.57-6.3219c9.3222-28.307 26.752-53.567 49.898-73.662l31.512 30.911c2.4909 2.4447 5.8301 3.7905 9.4041 3.7905 3.4341 0 6.6794-1.2581 9.1404-3.5417 2.5129-2.3303 3.9227-5.4536 3.9717-8.7952 0.049-3.3416-1.2689-6.5011-3.7109-8.8972l-29.622-29.057c28.303-18.439 62.511-30.125 99.597-32.371v42.439c0 6.8985 5.8841 12.511 13.115 12.511s13.114-5.6128 13.114-12.511v-42.438c37.086 2.2455 71.295 13.932 99.599 32.371l-29.623 29.058c-2.441 2.3961-3.7608 5.5556-3.7099 8.8972 0.049 3.3406 1.4578 6.4639 3.9697 8.7933 2.4629 2.2846 5.7102 3.5427 9.1424 3.5427 3.573 0 6.9122-1.3458 9.4041-3.7895l31.511-30.911c23.147 20.094 40.577 45.354 49.897 73.661l-43.569 6.3228c-7.148 1.0379-12.082 7.4303-10.993 14.249 0.96619 6.0598 6.5295 10.631 12.942 10.631 0.66744 0 1.3369-0.0486 1.9903-0.14297l45.499-6.603c1.159 7.539 1.7715 15.23 1.7715 23.05 0 21.255-4.6311 42.429-13.384 62.17z" fill="none" stroke="#000" stroke-width="4.8509"/>
<path d="m234.46 284.58-41.157-91.438c-0.89625-1.996-3.1124-3.138-5.3166-2.606-2.4909 0.601-4.0246 3.109-3.4241 5.602l23.468 97.497c-5.7762 6.966-7.8984 16.686-4.755 25.877 4.801 14.035 20.061 21.518 34.084 16.714 14.025-4.806 21.501-20.079 16.7-34.114-3.1424-9.192-10.771-15.572-19.601-17.532z" stroke-width=".99958"/>
<path d="m234.46 284.58-41.157-91.438c-0.89625-1.996-3.1124-3.138-5.3166-2.606-2.4909 0.601-4.0246 3.109-3.4241 5.602l23.468 97.497c-5.7762 6.966-7.8984 16.686-4.755 25.877 4.801 14.035 20.061 21.518 34.084 16.714 14.025-4.806 21.501-20.079 16.7-34.114-3.1424-9.192-10.771-15.572-19.601-17.532z" stroke-width=".99958"/>
</g>
</g>
</svg>
<svg width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-temperature">
<circle vector-effect="non-scaling-stroke" cx="11.5" cy="12.5" r="8.5" fill="rgb(235,235,235)"/> </svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

View file

@ -47,7 +47,7 @@ class BlueWeatherDashboard {
this.blueweather.getLocationData(this.params.loc, { from: this.params.range.from, to: this.params.range.to }, this.params.maxVals, true, function (locationData) { this.blueweather.getLocationData(this.params.loc, { from: this.params.range.from, to: this.params.range.to }, this.params.maxVals, true, function (locationData) {
// refresh sensors list // refresh sensors list
dashboard.loadSensors(locationData.sensors) dashboard.loadSensors(locationData)
// set acive page in navbar // set acive page in navbar
document.getElementById("navbarPage" + page + "Link").classList.add("active") document.getElementById("navbarPage" + page + "Link").classList.add("active")
@ -273,15 +273,27 @@ class BlueWeatherDashboard {
} }
loadSensors(sensors) { loadSensors(locationData) {
var sensorsList = document.getElementById("sensorsList") var sensorsList = document.getElementById("sensorsList")
sensorsList.innerHTML = "" sensorsList.innerHTML = ""
for (var i = 0; i < sensors.length; i++) { for (var i = 0; i < locationData.sensors.length; i++) {
var sensor = locationData.sensors[i]
console.log("parsing sensor ")
var valueType;
for (var v = 0; v < locationData['valuetypes'].length; v++) {
var thisValType = locationData['valuetypes'][v]
if (parseInt(thisValType.id) === parseInt(sensor.valuetypeid)) {
valueType = thisValType;
break;
}
}
var currentHTML = sensorsList.innerHTML var currentHTML = sensorsList.innerHTML
sensorsList.innerHTML = currentHTML + sensorsList.innerHTML = currentHTML +
"<li class=\"nav-item\"><a class=\"nav-link\" id=\"navbarPage" + sensors[i]["id"] + "Link\" href=\"#\" onclick=\"dashboard.updateParams({page: " + sensors[i]["id"] + "})\"><span data-feather=\"file\"></span>" + sensors[i]["sensorname"] + "</a></li>" "<li class=\"nav-item\"><a class=\"nav-link\" id=\"navbarPage" + sensor["id"] + "Link\" href=\"#\" onclick=\"dashboard.updateParams({page: " + sensor["id"] + "})\"><span data-feather=\""+ valueType['valuetype'] +"\"></span>" + sensor["sensorname"] + "</a></li>"
} }
feather.replace() feather.replace()
@ -583,12 +595,11 @@ class BlueWeatherDashboard {
} }
} }
} }
flexFont = function () { flexFont = function () {
console.log("flexing fonts")
var divs = document.getElementsByClassName("flexFont"); var divs = document.getElementsByClassName("flexFont");
for (var i = 0; i < divs.length; i++) { for (var i = 0; i < divs.length; i++) {
var relFontsize = divs[i].offsetWidth * 0.2; var relFontsize = divs[i].offsetWidth * 0.2;
console.log(relFontsize)
divs[i].style.fontSize = relFontsize + 'px'; divs[i].style.fontSize = relFontsize + 'px';
} }
}; };

1198
js/feather.js Normal file

File diff suppressed because it is too large Load diff