Last active
January 29, 2017 17:38
-
-
Save Blumed/f26a817317f1eb9fa05949c928f79ab3 to your computer and use it in GitHub Desktop.
Dash: Snippets
This file contains 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
//------------------------------- | |
// Meeting formatting for Harvest | |
//------------------------------- | |
bld` | |
@cursor__JRIA TICKET/STORY NAME__ [bld]: __Development task as apart of your sprint__ | |
int` | |
@cursor__JRIA TICKET/STORY NAME__ [int]: __Development task required to support the backend team__ | |
mtg` | |
[mtg]: @cursor__All project related meetings (scrum update, task breakdown, sprint retrospective, etc)__ | |
pre` | |
[pre]: @cursor__All non-development tasks (Creating Stories in JIRA, reviewing wireframes, etc)__ | |
qa` | |
@cursor __JIRA TASK/STORY NAME__ [qa]: __Development task initiated by the QA team__ | |
//------------------------------- | |
// Nunjucks code snippets | |
//------------------------------- | |
nj-block` | |
{% block @cursor__placeholder__ %}{{__placeholder__}}{% endblock %} | |
nj-for` | |
<!-- This sets up a little data to play with --> | |
var items = [{ __title__: "foo", id: 1 }, { __title__: "bar", id: 2}]; | |
<!-- This is an example of a for loop printing out some list items --> | |
<ul> | |
{% for item in items %} | |
<li>{{ item.@cursor__title__ }}</li> | |
{% else %} | |
<li>This would display if the 'item' collection were empty</li> | |
{% endfor %} | |
</ul> | |
nj-if` | |
{% if @cursor__placeholder__ %} | |
If statement is true | |
{% endif %} | |
nj-include` | |
{% include "@cursor.html" %} | |
nj-super` | |
{% block @cursor__placeholder__ %} | |
{{ super() }} | |
You can render the contents of the parent block inside a child block by calling super. | |
{% endblock %} | |
//------------------------------- | |
// Terminal | |
//------------------------------- | |
caffeine` | |
caffeinate -t @cursor__3600__ & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment