hmt %!s(int64=6) %!d(string=hai) anos
pai
achega
261903ce51

+ 2 - 2
Jahreszeugnis.html

@@ -1,8 +1,8 @@
 {#each schueler as s (s.ID)}
   {#each s.abschnitte.filter(aktHalbjahr) as hj (hj.ID)}
     <div class="page grid" orientation="portrait" size="A4">
-      <!-- <Seitenlogo/> -->
-      <Pageheader logo=""/>
+      <Seitenlogo logo="{privat.traegerLogo}"/>
+      <Pageheader art="daten/zeugnis.svg" logo="{privat.logo}" untertitel="{privat.untertitel}"/>
       <div class="main">
         <div style="font-size: 15pt; line-height: 1.5em">
         </div>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
daten/agz.svg


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 74 - 0
daten/asz.svg


+ 12 - 0
daten/fachklassen.json

@@ -0,0 +1,12 @@
+{
+	"default": {
+		"Schulform": "Schulform fehlt",
+		"Bereich": "Bereich fehlt",
+		"Zeugniskopf": "ohne Angabe",
+		"Berufsbezeichnung_m": "männliche Berufsbezeichnung",
+		"Berufsbezeichnung_w": "weibliche Berufsbezeichnung",
+		"Fremdsprache": {
+			"114": "(B2/C1)"
+		}
+	}
+}

+ 0 - 84
daten/logo-rechts.svg

@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   clip-path="url(#a)"
-   height="90.267"
-   preserveAspectRatio="xMidYMid"
-   version="1.2"
-   viewBox="0 0 16003.395 2547.525"
-   width="567.049"
-   fill-rule="evenodd"
-   stroke-width="28.222"
-   stroke-linejoin="round"
-   id="svg4828"
-   sodipodi:docname="logo-rechts.svg"
-   inkscape:version="0.92.2 2405546, 2018-03-11">
-  <metadata
-     id="metadata4832">
-    <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></dc:title>
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <sodipodi:namedview
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1"
-     objecttolerance="10"
-     gridtolerance="10"
-     guidetolerance="10"
-     inkscape:pageopacity="0"
-     inkscape:pageshadow="2"
-     inkscape:window-width="1920"
-     inkscape:window-height="1136"
-     id="namedview4830"
-     showgrid="false"
-     inkscape:zoom="1.1850827"
-     inkscape:cx="300.65274"
-     inkscape:cy="39.848395"
-     inkscape:window-x="0"
-     inkscape:window-y="27"
-     inkscape:window-maximized="1"
-     inkscape:current-layer="g4826" />
-  <defs
-     class="ClipPathGroup"
-     id="defs4800">
-    <clipPath
-       id="a">
-      <path
-         d="M0 0h21000v29700H0z"
-         id="path4797" />
-    </clipPath>
-  </defs>
-  <g
-     class="SlideGroup"
-     id="g4826">
-    <text
-       xml:space="preserve"
-       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:517.48406982px;line-height:125%;font-family:Sans;-inkscape-font-specification:'Sans, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000080;fill-opacity:1;stroke:none;stroke-width:45.99858093px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;"
-       x="8839.0332"
-       y="763.78784"
-       id="text4836"><tspan
-         sodipodi:role="line"
-         id="tspan4834"
-         x="8839.0332"
-         y="763.78784"
-         style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:981.30303955px;font-family:Sans;-inkscape-font-specification:'Sans, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:45.99858093px;fill:#000080;">Berufskolleg</tspan><tspan
-         sodipodi:role="line"
-         x="8839.0332"
-         y="1531.1272"
-         style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:981.30303955px;font-family:Sans;-inkscape-font-specification:'Sans, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:45.99858093px;fill:#000080;"
-         id="tspan4840">Entenhausen</tspan></text>
-  </g>
-</svg>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
daten/logo_seite_dummy.svg


+ 1 - 0
daten/zeugnis.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" clip-path="url(#a)" height="19.43" preserveAspectRatio="xMidYMid" version="1.2" viewBox="0 0 2835.68 548.34" width="100.48" fill-rule="evenodd" stroke-width="28.22" stroke-linejoin="round"><defs class="ClipPathGroup"><clipPath id="a"><path d="M0 0h21000v29700H0z"/></clipPath></defs><g class="SlideGroup"><g class="Slide" clip-path="url(#a)" transform="translate(-2182.7 -14344.06) scale(.9688)"><g class="Page"><g class="Graphic"><path d="M2253 15362h354v-47h-295l286-453v-46h-338v46h280l-287 453zm446 0h279v-47h-224v-211h204v-46h-204v-196h214v-46h-269zm790-546h-54v355c0 45-12 82-36 110-25 29-61 43-110 43-47 0-83-14-108-43-25-28-37-65-37-110v-355h-54v355c0 39 6 72 20 99 13 27 30 47 50 61 20 15 42 25 65 31s44 10 64 10c21 0 44-4 67-10 22-6 44-16 65-31 20-14 36-34 49-61 12-27 19-60 19-99zm510 490c-14 7-32 11-54 13-24 4-44 5-63 5-73 0-128-22-166-66-38-43-58-99-58-170 0-69 20-125 59-168 38-44 93-65 165-67 25 0 49 2 73 5 24 4 47 12 67 24l7-50c-19-9-42-16-70-21-29-3-54-5-77-5-86 1-154 27-203 78-50 52-75 120-75 204 0 87 25 154 74 206 49 50 117 76 204 78 59 0 117-11 170-34v-272h-181v47h128zm185 56h55v-472h1l276 472h73v-546h-54v481h-1l-281-481h-69zm528 0h55v-546h-55zm168-69l-5 55c29 14 71 22 124 24 46 0 87-13 124-37s56-63 57-118c0-20-3-38-10-54s-17-29-29-41c-25-24-54-43-87-59-16-9-31-17-46-26-15-8-29-16-41-25s-21-18-28-29c-8-10-12-22-12-36 0-18 4-33 12-46 7-12 16-21 27-28 12-8 25-13 39-16 14-2 28-4 42-4 40 0 73 7 100 20l9-49c-19-7-38-12-58-15-19-2-36-3-51-3-49 1-90 13-123 38s-50 60-51 105c1 34 14 62 39 85 13 12 26 22 42 32 14 10 30 19 45 27 16 8 32 17 47 25 15 9 29 18 40 27 26 19 39 41 40 67-1 38-13 67-36 85s-53 27-88 27c-50 0-91-11-122-31z" fill="#003258"/><path d="M2233 15372h654z" fill="#0ff"/></g></g></g></g></svg>

+ 27 - 1
helfer.js

@@ -1,7 +1,19 @@
+import fkl from './daten/fachklassen.json'
+const noten = [null, 'sehr gut', 'gut', 'befriedigend', 'ausreichend', 'mangelhaft', 'ungenügend']
+const enoten = {'E1': 'mit besonderem Erfolg teilgenommen', 'E2': 'mit Erfolg teilgenommen', 'E3': 'teilgenommen'}
+const punkte = {
+  15: '1+', 14: '1', 13: '1-',
+  12: '2+', 11: '2', 10: '2-',
+   9: '3+',  8: '3',  7: '3-',
+   6: '4+',  5: '4',  4: '4-',
+   3: '5+',  2: '5',  1: '5-',
+             0: '6'}
+  const zahlwort = {1: "eins",2: "zwei",3: "drei",4: "vier",5: "fünf",6: "sechs",7: "sieben",8: "acht",9: "neun",0: "null"}
+
 export const datum = (t) => {
   // gibt ein Datum im deutschen Format zurück
   try {
-    return Date.parse(t).toLocaleDateString('de', {day: '2-digit', month: '2-digit', year: 'numeric'})
+    return new Date(t).toLocaleDateString('de', {day: '2-digit', month: '2-digit', year: 'numeric'})
   } catch (e) {console.log(e); return}
 }
 export const versetzungsvermerk = (s, hj, agz=null) => {
@@ -34,4 +46,18 @@ export const schulform = (s) => {
   switch (s.ASDSchulform[0]) {
     case 'B': return 'Berufsfachschule'
   }
+}
+export const bg = (s,k) => {
+  if (s.fachklasse && s.fachklasse.Kennung && fkl[s.fachklasse.Kennung]) {
+    return fkl[s.fachklasse.Kennung][k]
+  } else
+  return ''
+}
+export const note = (note) => noten[parseInt(note)] || enoten[note]
+export const punkte2note = (p) => punkte[parseInt(p)]
+export const noteInWorten = (n) => n.split('').map(n => n === ',' ? '/' : zahlwort[parseInt(n)]).join(' ')
+export const fremdsprache = (fach, fachklasse) => {
+  try {
+    return fach.Lernentw || fkl[fachklasse]['Fremdsprache'][fach.Fach_ID]
+  } catch (e) { return 'undefined - Sprachniveau fehlt'}
 }

+ 34 - 5
partials/Pageheader.html

@@ -1,15 +1,44 @@
+<!-- Folgende Attribute werden unterstützt:
+art:  z.B. Zeugnis, Abgangszeugnis etc. Sollte auf eine vorhandene Datei zeigen
+      wird unten links platziert im Header
+logo: z.B Schullogo. Wird oben recht splatziert
+untertitel: Wird unterhalb des Logos platziert. -->
 <div class="header">
-  {#if logo}
-    <img src="{logo}" style="width: -webkit-fill-available" alt="zeugnis_logo"/>
-  {:else}
-    <h1><center>Zeugnis</center></h1>
-  {/if}
+    {#if art}
+      <img class="art" src="{art}" alt="logo_art"/>
+    {/if}
+    {#if logo}
+      <img class="logo" src="{logo}" alt="logo"/>
+    {/if}
+    {#if untertitel}
+      <img class="untertitel" src="{untertitel}" alt="logo_untertitel"/>
+    {/if}
   <hr class="hr-rot"/>
 </div>
 
 <style>
+  .header {
+    position: relative;
+    height: 115px;
+  }
+  .art {
+    position: absolute;
+    bottom: 12px;
+  }
+  .logo {
+    position: absolute;
+    right: 0px;
+  }
+  .untertitel {
+    position: absolute;
+    right: 0px;
+    bottom: 12px;
+  }
   .hr-rot {
     border-color: #ff2700;
     margin: 8px 0;
+    position: absolute;
+    bottom: 0px;
+    width: -webkit-fill-available;
   }
 </style>

+ 1 - 3
partials/Seitenlogo.html

@@ -1,8 +1,6 @@
 <div class="seitenlogo">
   {#if logo}
-    <img src="{logo}" height="160px" alt="traeger_logo"/>
-  {:else}
-    <center>Logo</center>
+    <img src="{logo}" height="160" alt="traeger_logo"/>
   {/if}
 </div>
 

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio