HTML-Seiten modularer aufgebaut und table.html hinzugefügt
This commit is contained in:
		@@ -1,69 +1,54 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="de">
 | 
			
		||||
{{ define "participant" }}
 | 
			
		||||
<div id="participant-{{ . }}">
 | 
			
		||||
  <label for="participant-first-input-{{ . }}">Vorname</label>
 | 
			
		||||
  <input type="text" name="participant-first-{{ . }}" id="participant-first-input-{{ . }}" />
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
  <meta charset="UTF-8">
 | 
			
		||||
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
			
		||||
  <link rel="stylesheet" href="/static/css/style.css">
 | 
			
		||||
  <title>Sicherheitsunterweisung</title>
 | 
			
		||||
</head>
 | 
			
		||||
  <label for="participant-last-input-{{ . }}">Nachname</label>
 | 
			
		||||
  <input type="text" name="participant-last-{{ . }}" id="participant-last-input-{{ . }}" />
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  <h1>Sicherheitsunterweisung</h1>
 | 
			
		||||
  <label for="participant-company-input-{{ . }}">Firma</label>
 | 
			
		||||
  <input type="text" name="participant-company-{{ . }}" id="participant-company-input-{{ . }}" />
 | 
			
		||||
</div>
 | 
			
		||||
{{ end }}
 | 
			
		||||
 | 
			
		||||
  <form>
 | 
			
		||||
    <div id="instructor">
 | 
			
		||||
      <label for="instructor-first-input">Unterweiser Vorname</label>
 | 
			
		||||
      <input type="text" name="instructor-first" id="instructor-first-input" />
 | 
			
		||||
{{ define "content" }}
 | 
			
		||||
<form>
 | 
			
		||||
  <div id="instructor">
 | 
			
		||||
    <label for="instructor-first-input">Unterweiser Vorname</label>
 | 
			
		||||
    <input type="text" name="instructor-first" id="instructor-first-input" />
 | 
			
		||||
 | 
			
		||||
      <label for="instructor-last-input">Unterweiser Nachname</label>
 | 
			
		||||
      <input type="text" name="instructor-last" id="instructor-last-input" />
 | 
			
		||||
    </div>
 | 
			
		||||
    <label for="instructor-last-input">Unterweiser Nachname</label>
 | 
			
		||||
    <input type="text" name="instructor-last" id="instructor-last-input" />
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
    <div id="date">
 | 
			
		||||
      <label for="date-input">Datum</label>
 | 
			
		||||
      <input type="date" name="date" id="date-input" />
 | 
			
		||||
    </div>
 | 
			
		||||
  <div id="date">
 | 
			
		||||
    <label for="date-input">Datum</label>
 | 
			
		||||
    <input type="date" name="date" id="date-input" />
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
    <div id="time">
 | 
			
		||||
      <label for="time-input">Uhrzeit</label>
 | 
			
		||||
      <input type="time" name="time" id="time-input" />
 | 
			
		||||
    </div>
 | 
			
		||||
  <div id="time">
 | 
			
		||||
    <label for="time-input">Uhrzeit</label>
 | 
			
		||||
    <input type="time" name="time" id="time-input" />
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
    <div id="state">
 | 
			
		||||
      <label for="state-input">Stand vom</label>
 | 
			
		||||
      <input type="date" name="state" id="state-input" />
 | 
			
		||||
    </div>
 | 
			
		||||
  <div id="state">
 | 
			
		||||
    <label for="state-input">Stand vom</label>
 | 
			
		||||
    <input type="date" name="state" id="state-input" />
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
    <div id="location">
 | 
			
		||||
      <label for="location-input">Ort</label>
 | 
			
		||||
      <input type="text" name="location" id="location-input" />
 | 
			
		||||
    </div>
 | 
			
		||||
  <div id="location">
 | 
			
		||||
    <label for="location-input">Ort</label>
 | 
			
		||||
    <input type="text" name="location" id="location-input" />
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
    <div id="participants">
 | 
			
		||||
      <button type="button" hx-post="/add-participant/" hx-target="#participants" hx-swap="beforeend"
 | 
			
		||||
        hx-trigger="click">
 | 
			
		||||
        +
 | 
			
		||||
      </button>
 | 
			
		||||
 | 
			
		||||
      <div id="participant-{{ . }}">
 | 
			
		||||
        <label for="participant-first-input-{{ . }}">Vorname</label>
 | 
			
		||||
        <input type="text" name="participant-first-{{ . }}" id="participant-first-input-{{ . }}" />
 | 
			
		||||
 | 
			
		||||
        <label for="participant-last-input-{{ . }}">Nachname</label>
 | 
			
		||||
        <input type="text" name="participant-last-{{ . }}" id="participant-last-input-{{ . }}" />
 | 
			
		||||
 | 
			
		||||
        <label for="participant-company-input-{{ . }}">Firma</label>
 | 
			
		||||
        <input type="text" name="participant-company-{{ . }}" id="participant-company-input-{{ . }}" />
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <button type="submit" hx-post="/submit/">
 | 
			
		||||
      Senden
 | 
			
		||||
  <div id="participants">
 | 
			
		||||
    <button type="button" hx-post="/add-participant/" hx-target="#participants" hx-swap="beforeend" hx-trigger="click">
 | 
			
		||||
      +
 | 
			
		||||
    </button>
 | 
			
		||||
  </form>
 | 
			
		||||
 | 
			
		||||
  <script src="/static/js/htmx.min.js" type="text/javascript"></script>
 | 
			
		||||
</body>
 | 
			
		||||
    {{ template "participant" . }}
 | 
			
		||||
  </div>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
  <button type="submit" hx-post="/submit/">Senden</button>
 | 
			
		||||
</form>
 | 
			
		||||
{{ end }}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user