Last active
August 29, 2015 14:24
-
-
Save ASnow/429891cd0e24c4314df8 to your computer and use it in GitHub Desktop.
Slim templating in Volt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SEE https://github.com/ASnow/guard-volt-slim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tpl-title | |
| | Test | |
| tpl-body | |
| .index | |
| .form | |
| .form_lable Lable | |
| input.form_var value="#{ _var }" | |
| - if condition? | |
| input.form_btn type="submit" value="Go" e-click="send_code" | |
| .last-submit-result | |
| | {{_state}} | |
| .debug | |
| | User {{Volt.current_user }} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tpl-title | |
| = view main_path, "title", {controller_group: 'main'} | |
| tpl-body | |
| .container | |
| .header | |
| ul.nav.nav-pills.pull-right | |
| use-nav href="/" Home | |
| use-nav href="/about" About | |
| use-user_templates:menu | |
| h3.text-muted . | |
| use-volt:notices | |
| = view main_path, 'body', {controller_group: 'main'} | |
| .footer | |
| p © Company #{ Time.now.year } | |
| tpl-nav | |
| li class="#{attrs.href}" | |
| a href="#{attrs.href}"= yield |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"tpl-" is section
"use-" is yield binding