Compare commits

...
26 Commits
Author SHA1 Message Date
jlehmann 534ff18a59 changed description document 2025-09-20 11:35:48 +02:00
jlehmann 89e6d009ef added pictures 2025-09-19 20:43:19 +02:00
jlehmann e6d8e6321a changed document 2025-09-19 20:09:51 +02:00
jlehmann 547da06a6f test with multicolumn images 2025-09-19 19:40:58 +02:00
jlehmann cc7d1eafee add missing image 2025-09-19 19:26:37 +02:00
jlehmann a3f961a7c4 change pictures 2025-09-19 19:23:37 +02:00
jlehmann 117ff4c6aa remove frontpage picture again 2025-09-19 18:21:35 +02:00
jlehmann 459e656f44 new frontpage picture 2025-09-19 16:35:40 +02:00
jlehmann 14e5536d5d new picture 2025-09-19 16:20:43 +02:00
jlehmann 4ea5374695 fix alignment with new Bulma Version 2025-08-09 20:09:47 +02:00
jlehmann 75507e26ea Update Bulma Version to 1.0.4 2025-08-09 19:13:44 +02:00
jlehmann 717fac9efd New Abo cost for calendar year, not month (in the perspective of the customer) 2025-08-09 17:12:37 +02:00
jlehmann a8f17eed19 cleanup, adjust offset because of new apexcharts version 2025-08-07 15:57:48 +02:00
jlehmann 92c1606f47 Update apexcharts version 2025-08-07 15:17:03 +02:00
jlehmann de40dc68ff small text update 2025-08-07 14:10:43 +02:00
jlehmann d2a12cc3bb address must be able to contain html 2025-08-07 14:00:55 +02:00
jlehmann e8fc18bc87 add vars to templates 2025-08-07 13:50:00 +02:00
jlehmann a87f5085e7 fix funtion 2025-08-07 13:43:57 +02:00
jlehmann b36ab9e572 fix funtion 2025-08-07 13:42:49 +02:00
jlehmann 2168404670 fix funtion 2025-08-07 13:37:58 +02:00
jlehmann 025441ef7d make some snippet content configurable - fix error 2025-08-07 13:33:41 +02:00
jlehmann 26957ff42b make some snippet content configurable 2025-08-07 13:31:43 +02:00
jlehmann 9d947c08ba make some snippet content configurable 2025-08-07 13:27:34 +02:00
jlehmann 49560c8cec change rental fee 2025-08-07 11:25:03 +02:00
jlehmann 5727e667fb New Text on main site, no selling but leasing 2025-08-07 11:16:15 +02:00
jlehmann 66fa08d48b change address 2025-05-13 19:40:36 +02:00
24 changed files with 40740 additions and 38295 deletions
+2
View File
@@ -1,2 +1,4 @@
mini-beieli-web
nohup.out
mini-beieli-sass/node_modules
mini-beieli-sass/package-lock.json
+7
View File
@@ -51,6 +51,13 @@ $ TOKEN="XXXXXX influxdb access token with rw access rights XXXXXX"
$ influx delete --token "${TOKEN}" --org minibeieliorg --bucket minibeielibucket --start 2021-06-01T10:53:00Z --stop 2021-06-01T10:53:00Z --predicate '_measurement="measurement" AND deveui="0000D3A659832805"'
```
### Create and Push Docker Image
```
Example:
$ podman login --username drpuur git.nbit.ch
$ podman build --tag git.nbit.ch/drpuur/mini-beieli-web:2025080701 -f ./Dockerfile
$ podman push git.nbit.ch/drpuur/wo-bisch-web:2025080701
```
Autor: Joerg Lehmann, nbit Informatik GmbH
+34
View File
@@ -9,6 +9,31 @@ import (
"time"
)
func getConfigFromEnv(item string) string {
value := os.Getenv("CONFIG_ENVVAR")
if value == "" {
value = "ADDRESS,INITIALCOST,YEARLYCOST"
}
configArr := strings.Split(value, ",")
// Check for expected length to prevent out-of-range panic
if len(configArr) < 3 {
logit("CONFIG_ENVVAR has less than 3 elements")
return "NOTFOUND"
}
switch strings.ToLower(item) {
case "address":
return configArr[0]
case "initialcost":
return configArr[1]
case "yearlycost":
return configArr[2]
default:
return "NOTFOUND"
}
}
func serveTemplate(w http.ResponseWriter, r *http.Request) {
logit("Called URL: " + r.URL.Path)
// wennn kein File angegeben ist: index.html
@@ -40,6 +65,9 @@ func serveTemplate(w http.ResponseWriter, r *http.Request) {
t := time.Now()
var datetimestring = t.Format("20060102150405")
var address = template.HTML(getConfigFromEnv("address"))
var initialcost = getConfigFromEnv("initialcost")
var yearlycost = getConfigFromEnv("yearlycost")
var scales = getMyDevs(userName)
var last_metrics []OneMetric
@@ -63,12 +91,18 @@ func serveTemplate(w http.ResponseWriter, r *http.Request) {
data := struct {
UserName string
DateTimeString string
Address template.HTML
InitialCost string
YearlyCost string
Scales []string
LastMetrics []OneMetric
QueryValues map[string][]string
}{
userName,
datetimestring,
address,
initialcost,
yearlycost,
scales,
last_metrics,
query_values,
File diff suppressed because it is too large Load Diff
+15 -8
View File
@@ -1,17 +1,24 @@
{
"name": "mini-beieli-sass",
"version": "1.0.1",
"version": "1.0.2",
"description": "SASS for mini-beieli-web",
"main": "enter sass/mini-beieli-web.scss",
"main": "css/mini-beieli-web.css",
"scripts": {
"css-build": "node-sass --omit-source-map-url sass/mini-beieli-web.scss css/mini-beieli-web.css",
"test": "echo \"Error: no test specified\" && exit 1"
"css-build": "sass --no-source-map --load-path=node_modules sass/mini-beieli-web.scss css/mini-beieli-web.css",
"css-build:min": "sass --no-source-map --load-path=node_modules --style=compressed sass/mini-beieli-web.scss css/mini-beieli-web.min.css",
"watch": "sass --watch sass/mini-beieli-web.scss css/mini-beieli-web.css",
"clean": "rm -rf css/*",
"test": "echo \"No tests yet\""
},
"author": "Joerg Lehmann",
"license": "ISC",
"devDependencies": {
"bulma": "^0.9.0",
"bulma-helpers": "^0.3.12",
"node-sass": "^4.14.1"
}
"bulma": "^1.0.4",
"sass": "^1.77.0"
},
"browserslist": [
"> 0.5%",
"last 2 versions",
"not dead"
]
}
+5 -6
View File
@@ -1,10 +1,9 @@
@charset "utf-8";
// Import a Google Font
@import url('https://fonts.googleapis.com/css?family=Rubik:400,700');
@use "bulma/sass/utilities/initial-variables" with (
$family-sans-serif: ("Rubik", sans-serif)
);
// Set nbit Style...
$family-sans-serif: "Rubik", sans-serif;
@use "bulma/bulma" as *;
@import "../node_modules/bulma/bulma.sass";
@import "../node_modules/bulma-helpers/bulma-helpers.sass";
@import url("https://fonts.googleapis.com/css?family=Rubik:400,700");
+1 -6
View File
@@ -1,9 +1,4 @@
{{define "body_content"}}
<p class="title is-4">Kontakt</p>
<p>nbit Informatik GmbH<br />
Kirchweg 2<br />
3510 Konolfingen<br />
<br />
+41 31 792 00 40<br />
<a href='&#109;ai&#108;&#116;o&#58;i&#37;6Ef&#111;&#64;%6Ebi&#116;&#46;%63h'>&#105;nfo&#64;nbit&#46;ch</a>
<p>{{ .Address }}
{{end}}
+1 -1
View File
@@ -51,7 +51,7 @@
<!-- Content ... -->
</section>
<script src="https://cdn.jsdelivr.net/npm/apexcharts@3.27.3"></script>
<script src="https://cdn.jsdelivr.net/npm/apexcharts@5.3.2"></script>
<script src="static/js/chart.js"></script>
+27 -9
View File
@@ -1,9 +1,34 @@
{{define "body_content"}}
<div class="columns is-multiline">
<div class="column is-half">
<div class="box">
<div class="image">
<img src="/static/images/mini-beieli-eine-waage.jpeg" alt="Detail eine Waage">
</div>
<div class="mt-2">Ansicht auf eine Waage</div>
</div>
</div>
<div class="column is-half">
<div class="box">
<div class="image">
<img src="/static/images/mini-beieli-eine-waage-nur-boexli.jpeg" alt="Waage (Boexli)">
</div>
<hr />
<div class="mt-2">Ansicht auf die Box mit der Elektronik/Uebertragungseinheit</div>
</div>
</div>
</div>
<div class="box">
<div class="image">
<img src="/static/images/mini-beieli-eine-waage.jpeg" alt="Detail eine Waage">
<img src="/static/images/mini-beieli-web-screenshot.jpeg" alt="Messwerte&uuml;bersicht einer Waage">
</div>
<div class="mt-2">Ansicht auf eine Waage</div>
<div class="mt-2">Messwerte&uuml;bersicht einer Waage</div>
</div>
<div class="box">
<div class="image">
<img src="/static/images/mini-beieli-gewichtsentwicklung-screenshot.jpeg" alt="Gewichtsentwicklung">
</div>
<div class="mt-2">Grafik der Gewichtsentwicklung (Zeitdauer kann gew&auml;hlt werden)</div>
</div>
<div class="box">
<div class="image">
@@ -17,11 +42,4 @@
</div>
<div class="mt-2">CAD Zeichnung Aluminium-Auflage (CNC gefr&auml;st, eloxiert)</div>
</div>
<div class="box">
<div class="image">
<img src="/static/images/mini-beieli-kabelkonfektionierung.jpeg" alt="Kabelkonfektionierung">
</div>
<hr />
<div class="mt-2">Kabelkonfektionierung in Werkstatt für Menschen mit Behinderung</div>
</div>
{{end}}
+3 -6
View File
@@ -5,15 +5,12 @@
<div>
<div class="message is-danger">
<div class="message-body">
Aktuell finden Feldversuche statt... Wer trotzdem schon eine m&ouml;chte, bitte melden!
Kann ab sofort gemietet werden. Abokosten pro Kalenderjahr: {{ .YearlyCost }}
<br /><br />
Hier gibt es einen <a href="static/files/mini-beieli-kurzbeschrieb.pdf" target="_blank">Kurzbeschrieb</a>
Hier gibt es einen <a href="static/files/mini-beieli-kurzbeschrieb.pdf" target="_blank">Kurzbeschrieb</a>, hier ein paar <a href="/images.html">Bilder</a>.
<br /><br />
Sonderpreis: CHF 500.-- (exkl. MwSt., so lange Vorrat, inkl. ein Jahr Abogeb&uuml;hr geschenkt, anschliessend CHF 5.-- pro Monat).
Einmalige Kosten pro Waage: {{ .InitialCost }} (so lange Vorrat, beinhaltet das Abo für das erste Kalenderjahr)
</div>
</div>
<div class="image">
<a href="/images.html"><img src="/static/images/mini-beieli-ready-to-sell.jpeg" alt="Waagen zum Verkauf"></a>
</div>
</div>
{{end}}
-8
View File
@@ -1,8 +0,0 @@
{{define "body_content"}}
<p class="title is-4">Bestellformular</p>
<div class="message is-danger">
<div class="message-body">
Aktuell noch in Entwicklung, kommen Sie sp&auml;ter noch einmal vorbei...
</div>
</div>
{{end}}
+20320 -19110
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 350 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.
-16
View File
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -17,7 +17,7 @@ function drawGraph(deveui, alias, property, start, stop, minmax, create_graph) {
minfunc = function(min) { if (min > 0) { return 0 } else { return min } }
maxfunc = function(max) { return max + 5 }
labels = {
offsetX: 35,
offsetX: 12,
offsetY: -5,
align: 'right'
};
@@ -28,7 +28,7 @@ function drawGraph(deveui, alias, property, start, stop, minmax, create_graph) {
minfunc = function(min) { return 0 }
maxfunc = function(max) { return 100 }
labels = {
offsetX: 30,
offsetX: 12,
offsetY: -5,
align: 'right'
};
@@ -49,7 +49,7 @@ function drawGraph(deveui, alias, property, start, stop, minmax, create_graph) {
]
};
labels = {
offsetX: 45,
offsetX: 12,
offsetY: -5,
align: 'right',
formatter: function(val, index) {
@@ -63,7 +63,7 @@ function drawGraph(deveui, alias, property, start, stop, minmax, create_graph) {
minfunc = function(min) { return 0 }
maxfunc = function(max) { return 100 }
labels = {
offsetX: 30,
offsetX: 12,
offsetY: -5,
align: 'right'
};
@@ -75,7 +75,7 @@ function drawGraph(deveui, alias, property, start, stop, minmax, create_graph) {
minfunc = function(min) { return 900 }
maxfunc = function(max) { return 1060 }
labels = {
offsetX: 35,
offsetX: 12,
offsetY: -5,
align: 'right'
};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long