paedml Druckliste.html 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {#each R.lodash.chunk(schueler, 10) as slice}
  2. <div class="page" orientation="portrait" size="A4">
  3. <div class="grid">
  4. <b style="padding: 5px 0 0 5px">{slice[0].Klasse}</b>
  5. {#each slice as s}
  6. <div>
  7. <table style="width: 100%; margin-bottom: 15px; margin-left: 30px">
  8. <tr>
  9. <td style="width: 50%"><b>{s.Name}, {s.Vorname}</b></td>
  10. <td>Ihr Benutzername: b{s.ID}</td>
  11. </tr>
  12. <tr>
  13. <td></td>
  14. <td>Ihr Passwort: {h(s.ID)}</td>
  15. </tr>
  16. </table>
  17. </div>
  18. <hr>
  19. {/each}
  20. </div>
  21. </div>
  22. {/each}
  23. <style>
  24. @import 'daten/main.css';
  25. .page {padding: 0;}
  26. .grid {
  27. display: grid;
  28. grid-template-columns: repeat(1, 1fr);
  29. grid-gap: 20px;
  30. }
  31. </style>
  32. <script>
  33. import Hashids from 'hashids'
  34. const hashids = new Hashids('schild.report hashing salt', 8, 'abcdefghkmnpqrstuvwxyz23456789')
  35. function h (id) { return hashids.encode(id) }
  36. export default {
  37. helpers: { h, R },
  38. }
  39. </script>