Skip to content

Commit 0185ed8

Browse files
author
Jarno Keskikangas
committed
Implement first views
1 parent 7bc1f33 commit 0185ed8

4 files changed

Lines changed: 44 additions & 5 deletions

File tree

examples/blog/public/stylesheets/style.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ body {
55
a {
66
color: #00b7ff;
77
}
8+
input,
9+
textarea {
10+
display: block;
11+
width: 500px;
12+
margin-top: 10px;
13+
}
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
body
2-
padding: 50px
3-
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif
2+
padding 50px
3+
font 14px "Lucida Grande", Helvetica, Arial, sans-serif
4+
45
a
5-
color: #00B7FF
6+
color #00B7FF
7+
8+
input, textarea
9+
display block
10+
width 500px
11+
margin-top 10px

examples/blog/views/index.jade

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
1-
h1= title
2-
p Welcome to #{title}
1+
h1 Blog with Transparency, jQuery, Jade and Express
2+
3+
p Create
4+
a a new article
5+
6+
p List of available articles
7+
ul.articles
8+
li
9+
a.name
10+
11+
div.new_article_form
12+
p New Article
13+
form
14+
input(name="title", type="text", value="Title")
15+
textarea(id="body", name="body") Body
16+
17+
:coffeescript
18+
$ ->
19+
articles = [
20+
name: 'First Article'
21+
'name@href': "#articles/1"
22+
,
23+
name: 'Second Article'
24+
'name@href': "#articles/2"
25+
]
26+
27+
$('.articles').render articles

examples/blog/views/layout.jade

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ html
33
head
44
title= title
55
link(rel='stylesheet', href='/stylesheets/style.css')
6+
script(src='/javascripts/jquery-1.6.2.min.js')
7+
script(src='/javascripts/jquery.transparency.min.js')
68
body!= body

0 commit comments

Comments
 (0)