refactor(templates): Switched to golang templates
This commit is contained in:
		@@ -30,25 +30,25 @@
 | 
			
		||||
<body class="A4 landscape">
 | 
			
		||||
  <div class="sheet">
 | 
			
		||||
    <div class="columns is-multiline">
 | 
			
		||||
      {{#each cards}}
 | 
			
		||||
      {{ range .cards }}
 | 
			
		||||
      <div class="column is-half runnercard">
 | 
			
		||||
        <p class="title is-5" style="text-align: center; padding-bottom: 0; margin-top: -0.75rem;">{{../eventname}}</p>
 | 
			
		||||
        <p style="text-align: center; margin-top: -1.5rem; font-size: small;">{{../card_subtitle}}</p>
 | 
			
		||||
        <p class="title is-5" style="text-align: center; padding-bottom: 0; margin-top: -0.75rem;">{{ $.EventName }}</p>
 | 
			
		||||
        <p style="text-align: center; margin-top: -1.5rem; font-size: small;">{{ $.CardSubtitle }}</p>
 | 
			
		||||
        <p style="font-size: small;">Mit Unterstützung von:</p>
 | 
			
		||||
        <div class="columns" style="height: 6rem; overflow: hidden;">
 | 
			
		||||
          <div class="column is-half">
 | 
			
		||||
            <!--SPONSOR LOGO HERE-->
 | 
			
		||||
            <img style="vertical-align: revert; margin-top: auto; object-fit: cover; max-height: 2cm;"
 | 
			
		||||
              src="{{--sponsor this.id}}" />
 | 
			
		||||
              src="data:image/png;base64,{{ sponsorLogo .ID }}" />
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="column is-half">
 | 
			
		||||
            <!--BARCODE HERE-->
 | 
			
		||||
            <img style="vertical-align: revert; margin-top: auto; object-fit: cover; max-height: 2cm;"
 | 
			
		||||
              src="{{--bc this.code ../codeformat}}" />
 | 
			
		||||
              src="data:image/png;base64,{{ barcode .Code $.BarcodeFormat $.BarcodePrefix }}" />
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <p>{{this.runner.lastname}}, {{this.runner.firstname}} {{this.runner.middlename}}</p>
 | 
			
		||||
        <p>{{this.runner.group.fullName}}</p>
 | 
			
		||||
        <p>{{ .Runner.LastName }}, {{ .Runner.FirstName }} {{ .Runner.MiddleName }}</p>
 | 
			
		||||
        <p>{{ .Runner.Group.Name }}</p>
 | 
			
		||||
      </div>
 | 
			
		||||
      {{/each}}
 | 
			
		||||
    </div>
 | 
			
		||||
@@ -59,9 +59,9 @@
 | 
			
		||||
      <div class="column is-half runnercard" style="justify-content: center; align-items: center; text-align: center;">
 | 
			
		||||
        <!--SPONSOR LOGO FIRST-->
 | 
			
		||||
        <div style="height: 2cm; padding: 0 0 2.25cm 0">
 | 
			
		||||
          <img style="object-fit: cover; max-height: 2cm;" src="{{--sponsor this.id}}" />
 | 
			
		||||
          <img style="object-fit: cover; max-height: 2cm;" src="data:image/png;base64,{{ sponsorLogo .ID }}" />
 | 
			
		||||
        </div>
 | 
			
		||||
        <img style="object-fit: cover; max-height: 2.5cm; position: relative;" src="{{--bc this.code ../codeformat}}" />
 | 
			
		||||
        <img style="object-fit: cover; max-height: 2.5cm; position: relative;" src="data:image/png;base64,{{ barcode .Code $.BarcodeFormat $.BarcodePrefix }}" />
 | 
			
		||||
      </div>
 | 
			
		||||
      {{/each}}
 | 
			
		||||
    </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -32,23 +32,23 @@
 | 
			
		||||
    <div class="columns is-multiline">
 | 
			
		||||
      {{#each cards}}
 | 
			
		||||
      <div class="column is-half runnercard">
 | 
			
		||||
        <p class="title is-5" style="text-align: center; padding-bottom: 0; margin-top: -0.75rem;">{{../eventname}}</p>
 | 
			
		||||
        <p style="text-align: center; margin-top: -1.5rem; font-size: small;">{{../card_subtitle}}</p>
 | 
			
		||||
        <p class="title is-5" style="text-align: center; padding-bottom: 0; margin-top: -0.75rem;">{{ $.EventName }}</p>
 | 
			
		||||
        <p style="text-align: center; margin-top: -1.5rem; font-size: small;">{{ $.CardSubtitle }}</p>
 | 
			
		||||
        <p style="font-size: small;">Supported by:</p>
 | 
			
		||||
        <div class="columns" style="height: 6rem; overflow: hidden;">
 | 
			
		||||
          <div class="column is-half">
 | 
			
		||||
            <!--SPONSOR LOGO HERE-->
 | 
			
		||||
            <img style="vertical-align: revert; margin-top: auto; object-fit: cover; max-height: 2cm;"
 | 
			
		||||
              src="{{--sponsor this.id}}" />
 | 
			
		||||
              src="data:image/png;base64,{{ sponsorLogo .ID }}" />
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="column is-half">
 | 
			
		||||
            <!--BARCODE HERE-->
 | 
			
		||||
            <img style="vertical-align: revert; margin-top: auto; object-fit: cover; max-height: 2cm;"
 | 
			
		||||
              src="{{--bc this.code ../codeformat}}" />
 | 
			
		||||
              src="data:image/png;base64,{{ barcode .Code $.BarcodeFormat $.BarcodePrefix }}" />
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <p>{{this.runner.lastname}}, {{this.runner.firstname}} {{this.runner.middlename}}</p>
 | 
			
		||||
        <p>{{this.runner.group.fullName}}</p>
 | 
			
		||||
        <p>{{ .Runner.LastName }}, {{ .Runner.FirstName }} {{ .Runner.MiddleName }}</p>
 | 
			
		||||
        <p>{{ .Runner.Group.Name }}</p>
 | 
			
		||||
      </div>
 | 
			
		||||
      {{/each}}
 | 
			
		||||
    </div>
 | 
			
		||||
@@ -59,9 +59,9 @@
 | 
			
		||||
      <div class="column is-half runnercard" style="justify-content: center; align-items: center; text-align: center;">
 | 
			
		||||
        <!--SPONSOR LOGO FIRST-->
 | 
			
		||||
        <div style="height: 2cm; padding: 0 0 2.25cm 0">
 | 
			
		||||
          <img style="object-fit: cover; max-height: 2cm;" src="{{--sponsor this.id}}" />
 | 
			
		||||
          <img style="object-fit: cover; max-height: 2cm;" src="data:image/png;base64,{{ sponsorLogo .ID }}" />
 | 
			
		||||
        </div>
 | 
			
		||||
        <img style="object-fit: cover; max-height: 2.5cm; position: relative;" src="{{--bc this.code ../codeformat}}" />
 | 
			
		||||
        <img style="object-fit: cover; max-height: 2.5cm; position: relative;" src="data:image/png;base64,{{ barcode .Code $.BarcodeFormat $.BarcodePrefix }}" />
 | 
			
		||||
      </div>
 | 
			
		||||
      {{/each}}
 | 
			
		||||
    </div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user