-
-
Save tubbo/1534921 to your computer and use it in GitHub Desktop.
issues with including javascript and css
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>IApp</title> | |
<%= stylesheet_link_tag "application" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> | |
<%= yield %> | |
</body> | |
</html> |
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
<!-- Todo App Interface --> | |
<div id="todoapp"> | |
<div class="title"> | |
<h1>Ingredients</h1> | |
</div> | |
<div class="content"> | |
<div id="create-todo"> | |
<input id="new-todo" placeholder="What do you need to buy at the store?" type="text" /> | |
<span class="ui-tooltip-top" style="display:none;">Press Enter to save this ingredient</span> | |
</div> | |
<div id="todos"> | |
<ul id="todo-list"></ul> | |
</div> | |
<div id="todo-stats"></div> | |
</div> | |
</div> | |
<div id="credits"> | |
Copied mostly from | |
<br /> | |
<a href="http://jgn.me/">Jérôme Gravel-Niquet</a> | |
(Specifically <a href="http://documentcloud.github.com/backbone/examples/todos/index.html">http://documentcloud.github.com/backbone/examples/todos/index.html</a>) | |
but I did have to do a lot of configuring to get it to work right | |
</div> | |
<!-- Templates --> | |
<script type="text/template" id="item-template"> | |
<div class="todo <%= done ? 'done' : '' %>"> | |
<div class="display"> | |
<input class="check" type="checkbox" <%= done ? 'checked="checked"' : '' %> /> | |
<div class="todo-text"></div> | |
<span class="todo-destroy"></span> | |
</div> | |
<div class="edit"> | |
<input class="todo-input" type="text" value="" /> | |
</div> | |
</div> | |
</script> | |
<script type="text/template" id="stats-template"> | |
<% if (total) { %> | |
<span class="todo-count"> | |
<span class="number"><%= remaining %></span> | |
<span class="word"><%= remaining == 1 ? 'item' : 'items' %></span> left. | |
</span> | |
<% } %> | |
<% if (done) { %> | |
<span class="todo-clear"> | |
<a href="#"> | |
Clear <span class="number-done"><%= done %></span> | |
completed <span class="word-done"><%= done == 1 ? 'item' : 'items' %></span> | |
</a> | |
</span> | |
<% } %> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment