6
0
Fork 0

remove ald assets, add cost-calc

master
Dirk Heilig 2024-09-26 13:29:30 +02:00
parent ab51a0fdd8
commit b8ce5b5d8c
22 changed files with 27 additions and 29 deletions

View File

@ -1,6 +1,6 @@
baseURL = "http://10.2.3.8" baseURL = "http://10.2.3.8"
languageCode = "de-de" languageCode = "de-de"
title = "c3RE" title = "c3RE 3D-Drucken"
theme = "hugo-theme-flat" theme = "hugo-theme-flat"
defaultContentLanguage = "de" defaultContentLanguage = "de"
relativeURLs = true relativeURLs = true

View File

@ -12,15 +12,20 @@ Eine Ausfürliche Beschreibung findet sich im [3D-POC WIKI](https://wiki.c3re.de
## Relevante Links ## Relevante Links
* [Kostenrechner](http://3dcalc.shnbk.de/) * [Kostenrechner](/calc/)
* [Druckerinfos](https://pads.c3re.de/3D-Drucker) * [Druckerinfos](https://pads.c3re.de/3D-Drucker)
* [Prusa Link](http://10.2.3.20) * [Prusa Link](http://10.2.3.20)
* [Webcam](http://10.2.3.21/) * [Webcam](http://10.2.3.21/)
* [Prusahilfeseite](https://help.prusa3d.com/) * [Prusahilfeseite](https://help.prusa3d.com/)
## Zugangsdaten Prusa XL ## Zugangsdaten
* Username für's webinterface: ``maker`` ### Prusa-Link
* Passwort für's webinterface und die API: ``XGj5wdp6hRq5dYT`` * Username: ``maker``
* Webcam: ``root`` / ``root`` * Passwort: ``XGj5wdp6hRq5dYT``
* Das Passwort ist auch der API-Key wenn prusalink im slicer eingerichtet wird.
### Webcam
* Username: ``root``
* Passwort: ``root``

1
content/calc/bulma.min.css vendored 100644

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,14 @@
<html class=theme-light><meta charset=UTF-8><title>3D-Druck Kostenrechner</title>
<script>const pricePerPrintingHourInEuro=.3,pricePerMaterialGrammInEuro=.025,roundUpStep=.5,identifierAddition=.03</script><link rel=stylesheet href=./bulma.min.css><meta name=viewport content="width=device-width,initial-scale=1"><div class=block id=filamentcalc><style>body{padding:2em;background-color:#f5f5f5}.box{border:.125em solid #dbdbdb}#logo{float:right;position:absolute;top:0;right:0}.selected{filter:brightness(90%);text-decoration:underline}.box{margin:2em auto 0;max-width:50em}.b button{float:right;margin-right:1em}input{margin-left:1em;width:5em}h2{margin-bottom:.5em;font-weight:700}li{list-style:none}</style><section class=hero><div class=hero-body><h1 class=title>3D-Druck Filamentkostenrechner</h1><p id=logo class="image is-128x128"><img src=logo.png></div></section><div class="columns box"><div class="column is-full b">Wo kommt dein Filament her?
<button class=button id=pool_filament>Pool Filament</button>
<button class=button id=own_filament>
Eigenes/Spenden- Filament</button></div></div><div class="columns box step2"><div class=column><label for=printtime_h>Druckzeit</label></div><div class=column><input id=printtime_h class=half type=number min=0 max=1000 step=1 placeholder=0>
<label for=printtime_h>h</label>
<input id=printtime_m class=half type=number min=0 max=5000 step=1 placeholder=0>
<label for=printtime_m>m</label></div></div><div class="columns box step2 material"><div class=column><label for=material>Materialmenge</label></div><div class=column><input id=material type=number min=0 max=1000 step=1 placeholder=0>
<label for=material>g</label></div></div><div class="columns box step2"><div class=column><label for=cost_euro>Kosten in €</label></div><div class=column><input id=cost_euro aria-disabled=true disabled></div></div><div class="columns box step2"><div class="column is-two"><h2>Wie entsteht der Preis?</h2><ul><li>Pro Druckstunde fallen <span id=pricePerHour>...</span> € Kosten
für Strom und Verschleiß an.<li>Pool-Filament wird mit <span id=pricePerMaterial>...</span>
pro kg berechnet.<li>Beide Kosten werden addiert und auf die nächsten
<span id=roundUpLimit>...</span> € aufgerundet.<span id=idtext>
(Zusätzlich wird <span id=idval></span> € addiert damit wir
auf der Abrechnung den Verwendungszweck erkennen können.)</span></ul></div></div></div><script>const pool_filament=document.getElementById("pool_filament"),own_filament=document.getElementById("own_filament"),step1=document.getElementsByClassName("step1"),step2=document.getElementsByClassName("step2"),printtime_h=document.getElementById("printtime_h"),printtime_m=document.getElementById("printtime_m"),material=document.getElementById("material"),cost_euro=document.getElementById("cost_euro");let ownFilament;pool_filament.addEventListener("click",function(){for(let e=0;e<step2.length;e++)step2[e].style.display="flex";ownFilament=!1,updateCost()}),own_filament.addEventListener("click",function(){for(let e=0;e<step2.length;e++){const t=step2[e];t.classList.contains("material")?t.style.display="none":t.style.display="flex"}ownFilament=!0,updateCost()}),printtime_h.addEventListener("input",updateCost),printtime_m.addEventListener("input",updateCost),material.addEventListener("input",updateCost);function updateCost(){pricePerHour.innerHTML=pricePerPrintingHourInEuro.toFixed(2),pricePerMaterial.innerHTML=(pricePerMaterialGrammInEuro*1e3).toFixed(2),roundUpLimit.innerHTML=roundUpStep.toFixed(2),idval.innerHTML=identifierAddition.toFixed(2),identifierAddition===0?idtext.style.display="none":idtext.style.display="inherit";const t=parseInt("0"+printtime_h.value)*60+parseInt("0"+printtime_m.value),n=parseInt("0"+material.value)*pricePerMaterialGrammInEuro;let e=t*pricePerPrintingHourInEuro/60;ownFilament||(e+=n),e=Math.ceil(e/roundUpStep)*roundUpStep,e>0&&(e+=identifierAddition),console.log(e),cost_euro.value=e.toFixed(2)+" €",ownFilament?(own_filament.classList.add("selected"),pool_filament.classList.remove("selected")):(pool_filament.classList.add("selected"),own_filament.classList.remove("selected"))}updateCost()</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256" width="100px" height="100px" fill-rule="nonzero"><g fill="#ffffff" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><g transform="scale(8.53333,8.53333)"><path d="M15,3c-6.627,0 -12,5.373 -12,12c0,5.623 3.872,10.328 9.092,11.63c-0.056,-0.162 -0.092,-0.35 -0.092,-0.583v-2.051c-0.487,0 -1.303,0 -1.508,0c-0.821,0 -1.551,-0.353 -1.905,-1.009c-0.393,-0.729 -0.461,-1.844 -1.435,-2.526c-0.289,-0.227 -0.069,-0.486 0.264,-0.451c0.615,0.174 1.125,0.596 1.605,1.222c0.478,0.627 0.703,0.769 1.596,0.769c0.433,0 1.081,-0.025 1.691,-0.121c0.328,-0.833 0.895,-1.6 1.588,-1.962c-3.996,-0.411 -5.903,-2.399 -5.903,-5.098c0,-1.162 0.495,-2.286 1.336,-3.233c-0.276,-0.94 -0.623,-2.857 0.106,-3.587c1.798,0 2.885,1.166 3.146,1.481c0.896,-0.307 1.88,-0.481 2.914,-0.481c1.036,0 2.024,0.174 2.922,0.483c0.258,-0.313 1.346,-1.483 3.148,-1.483c0.732,0.731 0.381,2.656 0.102,3.594c0.836,0.945 1.328,2.066 1.328,3.226c0,2.697 -1.904,4.684 -5.894,5.097c1.098,0.573 1.899,2.183 1.899,3.396v2.734c0,0.104 -0.023,0.179 -0.035,0.268c4.676,-1.639 8.035,-6.079 8.035,-11.315c0,-6.627 -5.373,-12 -12,-12z"></path></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256" width="100px" height="100px" fill-rule="nonzero"><g fill="#ffffff" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><g transform="scale(8,8)"><path d="M15.9375,4.03125c-3.0205,0.01225 -6.01958,0.39573 -7.58008,1.11523c0,0 -3.35742,1.52837 -3.35742,6.73437c0,6.197 -0.0045,13.97938 5.5625,15.48438c2.132,0.573 3.96545,0.69633 5.43945,0.61133c2.675,-0.151 3.99805,-0.9707 3.99805,-0.9707l-0.08984,-1.97656c0,0 -1.73386,0.61102 -3.88086,0.54102c-2.127,-0.075 -4.3678,-0.23462 -4.7168,-2.89062c-0.032,-0.247 -0.04787,-0.49709 -0.04687,-0.74609c4.507,1.119 8.3502,0.48738 9.4082,0.35938c2.954,-0.359 5.52552,-2.2113 5.85352,-3.9043c0.514,-2.668 0.4707,-6.50781 0.4707,-6.50781c0,-5.206 -3.35156,-6.73437 -3.35156,-6.73437c-1.6455,-0.7685 -4.68848,-1.12748 -7.70898,-1.11523zM12.70508,8.00195c1.03487,0.02775 2.0575,0.49075 2.6875,1.46875l0.60938,1.03516l0.60742,-1.03516c1.265,-1.967 4.10022,-1.84427 5.44922,-0.32227c1.244,1.448 0.9668,2.38256 0.9668,8.85156v0.00195h-2.44727v-5.62891c0,-2.635 -3.35937,-2.73677 -3.35937,0.36523v3.26172h-2.43164v-3.26172c0,-3.102 -3.35742,-3.00219 -3.35742,-0.36719v5.62891h-2.45313c0,-6.474 -0.2722,-7.41456 0.9668,-8.85156c0.6795,-0.766 1.72684,-1.17423 2.76172,-1.14648z"></path></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256" width="100px" height="100px" fill-rule="nonzero"><g fill="#ffffff" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><g transform="scale(5.12,5.12)"><path d="M5,5c-0.55226,0.00006 -0.99994,0.44774 -1,1v38c0.00006,0.55226 0.44774,0.99994 1,1h3c0.36064,0.0051 0.69608,-0.18438 0.87789,-0.49587c0.18181,-0.3115 0.18181,-0.69676 0,-1.00825c-0.18181,-0.3115 -0.51725,-0.50097 -0.87789,-0.49587h-2v-36h2c0.36064,0.0051 0.69608,-0.18438 0.87789,-0.49587c0.18181,-0.3115 0.18181,-0.69676 0,-1.00825c-0.18181,-0.3115 -0.51725,-0.50097 -0.87789,-0.49587zM42,5c-0.36064,-0.0051 -0.69608,0.18438 -0.87789,0.49587c-0.18181,0.3115 -0.18181,0.69676 0,1.00825c0.18181,0.3115 0.51725,0.50097 0.87789,0.49587h2v36h-2c-0.36064,-0.0051 -0.69608,0.18438 -0.87789,0.49587c-0.18181,0.3115 -0.18181,0.69676 0,1.00825c0.18181,0.3115 0.51725,0.50097 0.87789,0.49587h3c0.55226,-0.00006 0.99994,-0.44774 1,-1v-38c-0.00006,-0.55226 -0.44774,-0.99994 -1,-1zM31.07422,17.50977c-1.09848,-0.02226 -2.20583,0.25053 -3.0957,0.86328c-0.571,0.394 -1.06291,0.89977 -1.62891,1.38477c-0.861,-1.718 -2.42027,-2.17703 -4.19727,-2.20703c-1.801,-0.031 -3.23142,0.79102 -4.48242,2.29102v-1.8418h-3.66992v14h3.66406c0,0 -0.00609,-5.23398 0.00391,-7.83398c0.002,-0.462 0.02123,-0.93377 0.11523,-1.38477c0.29,-1.389 1.75483,-2.24681 3.17383,-2.13281c1.352,0.109 2.14298,0.84722 2.20898,2.44922c0.011,0.279 0,8.90234 0,8.90234h3.66602v-7.77148c0.006,-0.599 0.06984,-1.21102 0.21484,-1.79102c0.326,-1.3 1.54366,-1.93925 2.97266,-1.78125c1.26,0.139 2.2195,0.81836 2.3125,2.19336v9.15039h3.66797v-10c0,-1 -0.25364,-1.50914 -0.55664,-2.11914c-0.7325,-1.47563 -2.53835,-2.33399 -4.36914,-2.37109z"></path></g></g></svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -4,9 +4,7 @@
<meta name="gitdate" content="{{ .Page.GitInfo.CommitDate }}"> <meta name="gitdate" content="{{ .Page.GitInfo.CommitDate }}">
<meta name="gitmsg" content="{{ .Page.GitInfo.Subject }}"> <meta name="gitmsg" content="{{ .Page.GitInfo.Subject }}">
<meta name="buildtime" content="{{ time.Now }}"> <meta name="buildtime" content="{{ time.Now }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ "img/apple-touch-icon.png" | relURL }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ "img/favicon-32x32.png" | relURL }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "img/favicon-16x16.png" | relURL }}">
{{ $title := .Site.Title -}} {{ $title := .Site.Title -}}
{{ if .Params.Title -}} {{ if .Params.Title -}}
{{ $title = printf "%s | %s" .Params.Title $title -}} {{ $title = printf "%s | %s" .Params.Title $title -}}
@ -86,20 +84,3 @@
} }
</style> </style>
<link rel="preload" as="style" href="{{ "lib/icofont/icofont.min.css" | relURL }}" />
<link rel="preload" as="style" href="{{ "css/syntax.css" | relURL }}" />
<link rel="preload" as="style" href="{{ "css/style.css" | relURL }}" />
<link rel="preload" as="image" href="{{ "img/banner_unknown.jpg" | relURL }}" />
<link rel="preload" as="image" href="{{ "img/banner_open.jpg" | relURL }}" />
<link rel="preload" as="image" href="{{ "img/banner_closed.jpg" | relURL }}" />
<link rel="preload" as="image" href="{{ "doorstatus/open.png" | relURL }}" />
<link rel="preload" as="image" href="{{ "doorstatus/closed" | relURL }}" />
<link rel="preload" as="script" href="/js/jquery-3.7.1.min.js" />
<link rel="preload" as="script" href="/js/href_handling.js" />
<link rel="preload" as="script" href="/js/door-status.js" />
<link rel="preload" as="script" href="/js/calendar.js" />
<link rel="preload" fetchpriority="high" as="image" href="/img/banner.png" type="image/png">