diff --git a/.venv b/.venv new file mode 100644 index 0000000..5202934 --- /dev/null +++ b/.venv @@ -0,0 +1 @@ +124-webapp-sckb diff --git a/__pycache__/cost_calculator.cpython-312.pyc b/__pycache__/cost_calculator.cpython-312.pyc new file mode 100644 index 0000000..7f518a4 Binary files /dev/null and b/__pycache__/cost_calculator.cpython-312.pyc differ diff --git a/__pycache__/mailer.cpython-312.pyc b/__pycache__/mailer.cpython-312.pyc new file mode 100644 index 0000000..fc9bfec Binary files /dev/null and b/__pycache__/mailer.cpython-312.pyc differ diff --git a/__pycache__/main.cpython-312.pyc b/__pycache__/main.cpython-312.pyc index 4c1c65a..1aec676 100644 Binary files a/__pycache__/main.cpython-312.pyc and b/__pycache__/main.cpython-312.pyc differ diff --git a/archive/result.html b/archive/result.html deleted file mode 100644 index 0a9118b..0000000 --- a/archive/result.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - Print Cost Result - - - - - -
-

Print Cost for {{ result.filename }}

- - - - - - - - - - - - - - - {% for page in result.pages %} - - - - - - - - - - {% endfor %} - - - - - - - - - - - - - - - - - - - -
PageWidth (m)Height (m)Area (m²)Ink %TypeCost (€)
{{ page.page }}{{ "%.3f"|format(page.width_m) }}{{ "%.3f"|format(page.height_m) }}{{ "%.4f"|format(page.area_m2) }}{{ "%.1f"|format(page.ink_pct) if page.ink_pct is not none else '-' }}{{ 'Color' if page.is_color else 'B&W' }}{{ "%.2f"|format(page.cost) }}
Total Black Pages{{ "%.4f"|format(result.total_area_black) }}{{ "%.2f"|format(result.total_cost_black) }}
Total Color Pages{{ "%.4f"|format(result.total_area_color) }}{{ "%.2f"|format(result.total_cost_color) }}
Grand Total{{ "%.2f"|format(result.grand_total) }}
- -

- Upload another PDF -

-
- - - \ No newline at end of file diff --git a/data/uploads/huk612021p.pdf b/data/uploads/huk612021p.pdf new file mode 100644 index 0000000..2199e65 Binary files /dev/null and b/data/uploads/huk612021p.pdf differ diff --git a/static/css/style.css b/static/css/style.css index b951e0a..2c413a8 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -2,170 +2,324 @@ @font-face { font-family: "SISTEMAS"; src: url("/static/fonts/SISTEMAS FONT BT.ttf") format("truetype"); - font-weight: normal; - font-style: normal; } @font-face { font-family: "BauPro"; src: url("/static/fonts/BauPro.ttf") format("truetype"); - font-weight: normal; - font-style: normal; } -/* === Typography === */ -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: "SISTEMAS", sans-serif; - color: #001F4D; - /* navy blue */ -} - -body, -p, -input, -button, -label, -a { - font-family: "BauPro", sans-serif; -} - -/* === Layout === */ +/* === Base Typography & Layout === */ body { - background-color: #F9F9F9; - color: #333333; + font-family: 'BauPro', sans-serif; + background-color: #F5F5F7; /* soft Apple-like neutral */ + color: #1C1C1E; /* dark grey text instead of pure black */ margin: 0; - padding: 0; -} - -header { display: flex; - align-items: center; - gap: 1em; - padding: 1em; - background-color: #001f3f; - /* navy */ - color: #fff; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); + flex-direction: column; + min-height: 100vh; + width: 100%; } -.logo { - height: 60px; +h1, h2, h3, h4, h5, h6 { + font-family: 'SISTEMAS', sans-serif; + color: #2C3E50; /* muted marine blue for headers */ + margin: 0.5em 0; + text-align: center; +} + +/* === Header === */ +header { + width: 100%; + background-color: #E9EEF5; /* light muted blue */ + color: #1C1C1E; /* dark grey instead of white */ + padding: 1.5em 0; + display: flex; + flex-direction: column; + align-items: center; + box-shadow: 0 2px 6px rgba(0,0,0,0.1); +} + +header h1 { + font-size: 2em; + color: #2C3E50; /* dark marine blue */ +} + +header p { + font-size: 1em; + color: #8E2E75; /* muted magenta accent */ + margin: 0.2em 0 0; +} + +.logo-link img { + height: 70px; + margin-bottom: 0.5em; cursor: pointer; } +nav { + margin-top: 0.5em; +} + nav a { - color: #fff; + color: #2C3E50; /* muted dark blue links */ text-decoration: none; - margin-right: 1em; + margin: 0 0.5em; + font-weight: 600; } nav a:hover { - text-decoration: underline; + color: #FFCC00; /* soft yellow hover */ } -/* === Links & Buttons === */ -a.link-card { - display: block; - padding: 1.2em 1em; - background-color: #E6007E; - /* magenta */ - color: #FFD600; - /* yellow text */ - text-decoration: none; - border-radius: 10px; - text-align: center; - transition: all 0.2s ease-in-out; -} - -a.link-card:hover { - background-color: #FFD600; - /* yellow hover */ - color: #001F4D; - /* navy text on hover */ - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); -} - -button { - padding: 0.7em; - background-color: #E6007E; - /* magenta */ - color: #FFD600; - /* yellow text */ - border: none; - border-radius: 6px; - font-size: 1em; - cursor: pointer; -} - -button:hover { - background-color: #FFD600; - /* yellow hover */ - color: #001F4D; - /* navy text */ -} - -/* === Result Page Table Styles === */ -table { - border-collapse: collapse; +/* === Main Container === */ +main { + flex: 1; width: 100%; - margin-top: 1em; -} - -th, -td { - border: 1px solid #ccc; - padding: 0.5em; - text-align: center; -} - -th { - background-color: #f2f2f2; -} - -.color { - background-color: #ffdede; -} - -.black { - background-color: #e0e0ff; -} - -.totals { - font-weight: bold; } .container { max-width: 900px; - margin: auto; + width: 90%; + margin: 3em auto; + display: flex; + flex-direction: column; + gap: 1.5em; + background: #FFFFFF; + padding: 2em; + border-radius: 12px; + box-shadow: 0 6px 16px rgba(0,0,0,0.08); } -h1, -h2 { +/* === Link Cards & Buttons === */ +a.link-card, button { + display: block; + padding: 1.2em 1em; + font-size: 1.2em; text-align: center; + border-radius: 12px; + cursor: pointer; + transition: all 0.3s ease; + font-weight: 600; + box-shadow: 0 2px 6px rgba(0,0,0,0.08); } +a.link-card { + background-color: #F9F9F9; /* soft neutral card */ + color: #1C1C1E; + border-left: 6px solid #8E2E75; /* muted magenta accent */ + text-decoration: none; +} + +a.link-card:hover { + background-color: #8E2E75; + color: #FFFFFF; + box-shadow: 0 4px 12px rgba(0,0,0,0.15); + transform: translateY(-2px); +} + +button { + background-color: #8E2E75; /* muted magenta */ + color: #FFFFFF; + border: none; + border-radius: 8px; +} + +button:hover { + background-color: #FFCC00; /* soft yellow */ + color: #1C1C1E; +} + +/* === Forms === */ +form { + display: flex; + flex-direction: column; + gap: 1em; + margin-top: 1em; +} + +form label { + font-weight: 600; + color: #2C3E50; +} + +form input[type="text"], +form textarea, +form input[type="file"] { + width: 100%; + padding: 0.6em; + border: 1px solid #D1D1D6; /* light grey border like Apple forms */ + border-radius: 8px; + font-size: 1em; + box-sizing: border-box; + resize: vertical; + background-color: #FAFAFA; + color: #1C1C1E; +} + +form textarea { + min-height: 90px; +} + +/* === Rate Info & Errors === */ +.rate-info { + text-align: center; + color: #2C3E50; + margin-top: 1em; +} + +.error { + color: #D93025; /* subtle red */ + font-weight: bold; + text-align: center; + margin-top: 1em; +} + +/* === Tables === */ +table { + width: 100%; + border-collapse: collapse; + margin-top: 2em; + border-radius: 8px; + overflow: hidden; + box-shadow: 0 2px 6px rgba(0,0,0,0.06); +} + +th, td { + border: 1px solid #E1E1E6; + padding: 0.5em; + text-align: center; + color: #1C1C1E; +} + +th { + background-color: #F2F2F7; + font-weight: 600; +} + +.color { + background-color: #FDE9F2; /* soft pink */ +} + +.black { + background-color: #E5E5FF; /* soft blue */ +} + +.totals { + font-weight: 600; +} + +/* === Alerts === */ .alert { padding: 1em; - border-radius: 6px; + border-radius: 8px; margin-bottom: 1em; text-align: center; - font-weight: bold; + font-weight: 600; } .alert.success { - background-color: #4CAF50; - /* green */ - color: white; + background-color: #2C3E50; /* muted marine blue */ + color: #FFFFFF; } .alert.error { - background-color: #E6007E; - /* magenta */ - color: #FFD600; - /* yellow text */ -} \ No newline at end of file + background-color: #8E2E75; /* muted magenta */ + color: #FFFFFF; +} + +/* === Footer === */ +footer { + text-align: center; + padding: 1.5em 1em; + background-color: #F2F2F7; /* soft neutral */ + color: #1C1C1E; + width: 100%; +} + +footer img.footer-logo { + height: 50px; + margin-bottom: 0.5em; +} + +/* === Links under forms === */ +.link a { + color: #2C3E50; + text-decoration: underline; + font-weight: 600; + text-align: center; +} + +/* === Responsive / Mobile Friendly === */ +@media (max-width: 1024px) { + .container { + width: 95%; + margin: 2em auto; + padding: 1.5em; + } + + header h1 { + font-size: 1.7em; + } + + header p { + font-size: 0.95em; + } + + .logo-link img { + height: 60px; + } + + nav { + flex-direction: column; + align-items: center; + gap: 0.4em; + } + + nav a { + margin: 0; + font-size: 0.95em; + } + + a.link-card, button { + font-size: 1em; + padding: 1em 0.8em; + } + + form textarea { + min-height: 80px; + } + + table { + display: block; + overflow-x: auto; + } + + th, td { + padding: 0.45em; + font-size: 0.9em; + } +} + +@media (max-width: 768px) { + header h1 { + font-size: 1.5em; + } + + header p { + font-size: 0.9em; + } + + .logo-link img { + height: 55px; + } + + a.link-card, button { + font-size: 0.95em; + padding: 0.9em 0.7em; + } + + form textarea { + min-height: 70px; + } +} diff --git a/static/images/gvb-logo.png b/static/images/gvb-logo.png new file mode 100644 index 0000000..5f8c619 Binary files /dev/null and b/static/images/gvb-logo.png differ diff --git a/templates/about.html b/templates/about.html index 4438baa..649c40b 100644 --- a/templates/about.html +++ b/templates/about.html @@ -1,103 +1,56 @@ - - - - - Über uns – Studio EinsZwoVier - - - - -
-

Studio EinsZwoVier Makerspace

-

Am Gabriele-von-Bülow-Gymnasium

-
+{% extends "base.html" %} -
+{% block title %}Über uns – Studio EinsZwoVier{% endblock %} + +{% block content %} +
-

Über den Maker Space

-

Seit Dezember 2024 trägt unser Maker Space den Namen studio einszwovier. Er ist ein innovativer, digitaler Lernraum, der Kreativität, Technik und Bildungsgerechtigkeit verbindet. Hier wird „Making“ erlebbar: Lernende gestalten ihren Lernprozess aktiv, entdecken individuelle Stärken und erleben durch Selbstwirksamkeit besondere Motivation.

+

Über den Maker Space

+

Seit Dezember 2024 trägt unser Maker Space den Namen studio einszwovier. Er ist ein innovativer, digitaler Lernraum, der Kreativität, Technik und Bildungsgerechtigkeit verbindet. Hier wird „Making“ erlebbar: Lernende gestalten ihren Lernprozess aktiv, entdecken individuelle Stärken und erleben durch Selbstwirksamkeit besondere Motivation.

-

Ausstattung

-
    -
  • 3D-Drucker: Für Modelle und Prototypen.
  • -
  • Lasercutter: Präzises Schneiden und Gravieren von Materialien.
  • -
  • Microcontroller: Elektronik und Programmierung.
  • -
  • Holzbearbeitung: Handwerkliche Projekte.
  • -
  • Textildruckgeräte: Kreative Designs auf Stoffen.
  • -
+

Ausstattung

+
    +
  • 3D-Drucker: Für Modelle und Prototypen.
  • +
  • Lasercutter: Präzises Schneiden und Gravieren von Materialien.
  • +
  • Microcontroller: Elektronik und Programmierung.
  • +
  • Holzbearbeitung: Handwerkliche Projekte.
  • +
  • Textildruckgeräte: Kreative Designs auf Stoffen.
  • +
-

Betreuungsteam

-

Betreut wird der Maker Space von Aron Petau und Friedrich Weber. Sie sind montags bis mittwochs von 11:00 bis 15:00 Uhr vor Ort. Einfach vorbeischauen, Ideen vorstellen und loslegen!

+

Betreuungsteam

+

Betreut wird der Maker Space von Aron Petau und Friedrich Weber. Sie sind montags bis mittwochs von 11:00 bis 15:00 Uhr vor Ort. Einfach vorbeischauen, Ideen vorstellen und loslegen!

-

Öffnungszeiten

-

Dienstag bis Donnerstag: 11:00 – 16:00 Uhr
- Raum 124, Gabriele-von-Bülow-Gymnasium

+

Öffnungszeiten

+

Dienstag bis Donnerstag: 11:00 – 16:00 Uhr
+ Raum 124, Gabriele-von-Bülow-Gymnasium

-

Kontakt

-

E-Mail: einszwovier@gvb-gymnasium.de

+

Kontakt

+

E-Mail: einszwovier@gvb-gymnasium.de

-

Aktuelle Kurse

-
    -
  • Löten und Leuchten: Herstellung von Nachttischleuchten mit 3D-Design und Löttechnik.
  • -
  • Die Vogelvilla: Bau von Vogelhäusern mit Lasercutter und Holzbearbeitung.
  • -
+

Aktuelle Kurse

+
    +
  • Löten und Leuchten: Herstellung von Nachttischleuchten mit 3D-Design und Löttechnik.
  • +
  • Die Vogelvilla: Bau von Vogelhäusern mit Lasercutter und Holzbearbeitung.
  • +
-

Standort

-

Gabriele-von-Bülow-Gymnasium
- Tile-Brügge-Weg 63, 13509 Berlin (Tegel)
- Telefon: 030 21 00 52 460
- E-Mail: info@gvb-gymnasium.de

+

Standort

+

Gabriele-von-Bülow-Gymnasium
+ Tile-Brügge-Weg 63, 13509 Berlin (Tegel)
+ Telefon: 030 21 00 52 460
+ E-Mail: info@gvb-gymnasium.de

-
- - - - +
+{% endblock %} diff --git a/templates/base.html b/templates/base.html index 3e88006..cb89f24 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,5 +1,5 @@ - + {% block title %}Studio Einszwovier{% endblock %} @@ -11,14 +11,20 @@
{% block content %}{% endblock %}
+ + diff --git a/templates/cost-calculator.html b/templates/cost-calculator.html index 0e61662..ef1d44f 100644 --- a/templates/cost-calculator.html +++ b/templates/cost-calculator.html @@ -1,170 +1,74 @@ - - +{% extends "base.html" %} - - - Print Cost Calculator - - - - - -
-

Print Cost Calculator

+{% block content %} +
+

Kostenrechner für Drucke

{% if error %}

{{ error }}

{% endif %}
- - + +

- Rates are fixed via environment variables:
- B&W: {{ rate_black if rate_black else 'RATE_PER_M2_BLACK' }} € / m², - Color: {{ rate_color if rate_color else 'RATE_PER_M2_COLOR' }} € / m² + Preise werden über Umgebungsvariablen festgelegt:
+ S/W: {{ rate_black if rate_black else 'RATE_PER_M2_BLACK' }} € / m², + Farbe: {{ rate_color if rate_color else 'RATE_PER_M2_COLOR' }} € / m²

{% if result %} -

Results for {{ result.filename }}

+

Ergebnisse für {{ result.filename }}

- - - - - - - - - - - - - {% for page in result.pages %} - - - - - - - - - - {% endfor %} - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + {% for page in result.pages %} + + + + + + + + + + {% endfor %} + + + + + + + + + + + + + + + + + + +
PageWidth (m)Height (m)Area (m²)Ink %TypeCost (€)
{{ page.page }}{{ "%.3f"|format(page.width_m) }}{{ "%.3f"|format(page.height_m) }}{{ "%.4f"|format(page.area_m2) }}{{ "%.1f"|format(page.ink_pct) if page.ink_pct is not none else '-' }}{{ 'Color' if page.is_color else 'B&W' }}{{ "%.2f"|format(page.cost) }}
Total Black Pages{{ "%.4f"|format(result.total_area_black) }}{{ "%.2f"|format(result.total_cost_black) }}
Total Color Pages{{ "%.4f"|format(result.total_area_color) }}{{ "%.2f"|format(result.total_cost_color) }}
Grand Total{{ "%.2f"|format(result.grand_total) }}
SeiteBreite (m)Höhe (m)Fläche (m²)Tinten %TypKosten (€)
{{ page.page }}{{ "%.3f"|format(page.width_m) }}{{ "%.3f"|format(page.height_m) }}{{ "%.4f"|format(page.area_m2) }}{{ "%.1f"|format(page.ink_pct) if page.ink_pct is not none else '-' }}{{ 'Farbe' if page.is_color else 'S/W' }}{{ "%.2f"|format(page.cost) }}
Summe S/W{{ "%.4f"|format(result.total_area_black) }}{{ "%.2f"|format(result.total_cost_black) }}
Summe Farbe{{ "%.4f"|format(result.total_area_color) }}{{ "%.2f"|format(result.total_cost_color) }}
Gesamtsumme{{ "%.2f"|format(result.grand_total) }}
{% endif %} -
- - - \ No newline at end of file +
+{% endblock %} diff --git a/templates/landing.html b/templates/landing.html index 16c889e..a9543ce 100644 --- a/templates/landing.html +++ b/templates/landing.html @@ -1,122 +1,15 @@ - - +{% extends "base.html" %} - - - Studio Einszwovier - - - - - -
- - Studio Einszwovier Logo - -

Studio Einszwovier

-

Welcome to the school makerspace portal at the GvB

-
- -
- About us - Print Cost Calculator - Contact: einszwovier@gvb-gymnasium.de - Log in to iServ - School website -
- - - - - \ No newline at end of file +{% block content %} +
+ Über uns + Kostenrechner + Kontakt: einszwovier@gvb-gymnasium.de + iServ Login + Schulseite + Wissenssammlung +
+{% endblock %} diff --git a/templates/result.html b/templates/result.html index c46e511..2e8e629 100644 --- a/templates/result.html +++ b/templates/result.html @@ -1,17 +1,13 @@ - - + +{% extends "base.html" %} - - - Print Cost Result - - +{% block title %}Druckkosten Ergebnis – Studio EinsZwoVier{% endblock %} - -
-

Print Cost for {{ result.filename }}

+{% block content %} +
+

Druckkosten für {{ result.filename }}

- + {% if success %}
{{ success }}
{% endif %} @@ -19,64 +15,67 @@
{{ error }}
{% endif %} + - - - - - - - - - - - - - {% for page in result.pages %} - - - - - - - - - - {% endfor %} - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + {% for page in result.pages %} + + + + + + + + + + {% endfor %} + + + + + + + + + + + + + + + + + + +
PageWidth (m)Height (m)Area (m²)Ink %TypeCost (€)
{{ page.page }}{{ "%.3f"|format(page.width_m) }}{{ "%.3f"|format(page.height_m) }}{{ "%.4f"|format(page.area_m2) }}{{ "%.1f"|format(page.ink_pct) if page.ink_pct is not none else '-' }}{{ 'Color' if page.is_color else 'B&W' }}{{ "%.2f"|format(page.cost) }}
Total Black Pages{{ "%.4f"|format(result.total_area_black) }}{{ "%.2f"|format(result.total_cost_black) }}
Total Color Pages{{ "%.4f"|format(result.total_area_color) }}{{ "%.2f"|format(result.total_cost_color) }}
Grand Total{{ "%.2f"|format(result.grand_total) }}
SeiteBreite (m)Höhe (m)Fläche (m²)Tinten %TypKosten (€)
{{ page.page }}{{ "%.3f"|format(page.width_m) }}{{ "%.3f"|format(page.height_m) }}{{ "%.4f"|format(page.area_m2) }}{{ "%.1f"|format(page.ink_pct) if page.ink_pct is not none else '-' }}{{ 'Farbe' if page.is_color else 'S/W' }}{{ "%.2f"|format(page.cost) }}
Summe S/W{{ "%.4f"|format(result.total_area_black) }}{{ "%.2f"|format(result.total_cost_black) }}
Summe Farbe{{ "%.4f"|format(result.total_area_color) }}{{ "%.2f"|format(result.total_cost_color) }}
Gesamtsumme{{ "%.2f"|format(result.grand_total) }}
- +
- - - - + + + + + + + + +
- - - - \ No newline at end of file +
+{% endblock %}