solarized-emacs

a fork of Bozhidar Batsov's solarized-emacs
git clone https://git.trogloxene.org/solarized-emacs.git
Log | Files | Refs | README

go-template.webmode (1308B)


      1 <!-- -*- engine:go -*- -->
      2 {{if .User.HasPermission "feature-a"}}
      3   <div class="feature">
      4     <h3>Feature A</h3>
      5     <p>Some other stuff here...</p>
      6   </div>
      7 {{else}}
      8   <div class="feature disabled">
      9     <h3>Feature A</h3>
     10     <p>To enable Feature A please upgrade your plan</p>
     11   </div>
     12 {{end}}
     13 
     14 {{if .User.HasPermission "feature-b"}}
     15   <div class="feature">
     16     <h3>Feature B</h3>
     17     <p>Some other stuff here...</p>
     18   </div>
     19 {{else}}
     20   <div class="feature disabled">
     21     <h3>Feature B</h3>
     22     <p>To enable Feature B please upgrade your plan</p>
     23   </div>
     24 {{end}}
     25 
     26 <pre>
     27 {{with .Account -}}
     28 Dear {{.FirstName}} {{.LastName}},
     29 {{- end}}
     30 
     31 Below are your account statement details for period from {{.FromDate | formatAsDate}} to {{.ToDate | formatAsDate}}.
     32 
     33 {{if .Purchases -}}
     34     Your purchases:
     35     {{- range .Purchases }}
     36         {{ .Date | formatAsDate}} {{ printf "%-20s" .Description }} {{.AmountInCents | formatAsDollars -}}
     37     {{- end}}
     38 {{- else}}
     39 You didn't make any purchases during the period.
     40 {{- end}}
     41 
     42 {{$note := urgentNote .Account -}}
     43 {{if $note -}}
     44 Note: {{$note}}
     45 {{- end}}
     46 
     47 Best Wishes,
     48 Customer Service
     49 </pre>
     50 
     51 <style>
     52   .feature {
     53     border: 1px solid #eee;
     54     padding: 10px;
     55     margin: 5px;
     56     width: 45%;
     57     display: inline-block;
     58   }
     59   .disabled {
     60     color: #ccc;
     61   }
     62 </style>