Skip to content

Commit

Permalink
Added Mustache templates as a separate type (modelled on Latte) (#4915)
Browse files Browse the repository at this point in the history
* Update languages.yml

* Create csvrow.mustache

* Rename samples/csvrow.mustache to samples/Mustache/csvrow.mustache

* Added sample file

* Create pupilinfoblock.mustache

* Create showallusers.mustache

* Updated Vendor README with Mustache

Co-authored-by: Colin Seymour <colin@github.com>
  • Loading branch information
yourpropertyexpert and lildude authored Sep 1, 2020
1 parent 1fa9432 commit da27b51
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,6 @@ HTML+Django:
extensions:
- ".jinja"
- ".jinja2"
- ".mustache"
- ".njk"
aliases:
- django
Expand Down Expand Up @@ -3386,6 +3385,16 @@ Muse:
aliases:
- amusewiki
- emacs muse
Mustache:
type: markup
group: HTML
extensions:
- ".mustache"
tm_scope: text.html.smarty
ace_mode: smarty
codemirror_mode: smarty
codemirror_mime_type: text/x-smarty
language_id: 638334590
Myghty:
type: programming
extensions:
Expand Down
1 change: 1 addition & 0 deletions samples/Mustache/csvrow.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{knownas}} {{familyname}},{{groupdisplay}},{{homelocationdisplay}},{{currentlocationdisplay}},{{statuschangetime}},{{setbydisplay}},{{confirmedtime}},{{confirmedby}},{{pupilid}}
20 changes: 20 additions & 0 deletions samples/Mustache/deleteuser.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div class='container pt-2'><h2>Delete user: {{usernamedisplay}}</h2>
{{#error}}<div class='alert alert-danger'>{{.}}</div>{{/error}}
{{#info}}<div class='alert alert-info'>{{.}}</div>{{/info}}
<h3>Permanently delete {{usernamedisplay}}</h3>
<form method="post" action="deleteuser.php">
<input type="hidden" name="deleteuser" value="{{deleteuser}}">
<input type="hidden" name="usertype" value="{{usertype}}">
<input type="hidden" name="makechanges" value="change">
{{#eplocation}}<input type='hidden' name='eplocation' value='{{.}}'>{{/eplocation}}
{{#eppupilgroup}}<input type='hidden' name='eppupilgroup' value='{{.}}'>{{/eppupilgroup}}
<div class="form-check mb-2">
<label class="form-check-label">
<input type="checkbox" class="form-check-input required check" name="understood" value="yes">
* I understand that this will permanently delete the user and any user history.
</label>
</div>
<button type="submit" disabled class="btn btn-danger">Submit</button>
<a href="{{returntourl}}" class="btn btn-light">Cancel</a>
</form>
</div>
8 changes: 8 additions & 0 deletions samples/Mustache/pupilinfoblock.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class='container-fluid text-center border-top mt-2'>
<p><i>Logged in as </i>{{familyname}}, {{knownas}}</p>

<p>{{YourCurrentLocation}}: {{PrettyCurrentLocation}}</p>
<p>{{YourHomeLocation}}: {{PrettyHomeLocation}}</p>
<p><a href='setpassword.php'>Change password</a></p>
<p><a href='logout.php'>Log out</a></p>
</div>
8 changes: 8 additions & 0 deletions samples/Mustache/showallusers.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class='container-fluid text-center border-top mt-2'>
<p><i>Logged in as </i>{{familyname}}, {{knownas}}</p>

<p>{{YourCurrentLocation}}: {{PrettyCurrentLocation}}</p>
<p>{{YourHomeLocation}}: {{PrettyHomeLocation}}</p>
<p><a href='setpassword.php'>Change password</a></p>
<p><a href='logout.php'>Log out</a></p>
</div>
1 change: 1 addition & 0 deletions vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **MoonScript:** [leafo/moonscript-tmbundle](https://github.com/leafo/moonscript-tmbundle)
- **Motorola 68K Assembly:** [zerkman/language-m68k](https://github.com/zerkman/language-m68k)
- **Muse:** [Alhadis/language-emacs-lisp](https://github.com/Alhadis/language-emacs-lisp)
- **Mustache:** [textmate/php-smarty.tmbundle](https://github.com/textmate/php-smarty.tmbundle)
- **NASL:** [tenable/sublimetext-nasl](https://github.com/tenable/sublimetext-nasl)
- **NCL:** [rpavlick/language-ncl](https://github.com/rpavlick/language-ncl)
- **NEON:** [Alhadis/language-etc](https://github.com/Alhadis/language-etc)
Expand Down

0 comments on commit da27b51

Please sign in to comment.