Skip to content

Instantly share code, notes, and snippets.

@larzconwell
Created November 8, 2012 20:53
Show Gist options
  • Save larzconwell/4041516 to your computer and use it in GitHub Desktop.
Save larzconwell/4041516 to your computer and use it in GitHub Desktop.
!!!
html
head
link(rel='stylesheet', href='/stylesheets/styles.css')
block head
//- Here you can put some default html if the head block is not defined
//- in a extending template
//- title= adspace
body(bgcolor='#fafaff')
#main
#header
br
-if(session.user)
#headerleft
p Inside the if condition  
a(href='/user/account')  Account
 
a(href='/user/ads') Ads
 
a(href='/ads/newad') PostAd
 
a(href='/search') Search
#headerright='Welcome, ' + session.user.fname + '.'
 
a(href='/sessions/destroy') Logout
 
-else
#headerleft
a(href='/search')  Search
#headerright
a(href='/sessions/login') Login
 
a(href='/sessions/register') Register 
br
br
-if(flash.warn)
p#warn=flash.warn
block body
//- You can put default body html here if no body block is defined in a
//- extending template
extends ../layout
//- Here we are creating a new head block with a title in it
//- Since we extended the layout file, this head block overrides the one
//- in the layout.
//- If you don't want to replace everything, you can use "append" instead of
//- "block" and the content here will be appended to the head block in layout
block head
title some title
//- Here we create a new body block, this overrides the one create in the layout file
block body
img(src = '/static/logo.jpg').centered
br
form(action='/search/results', method='POST').centered
p.location Location:
select(id="location",name="location")
option(value='hyderabad') Hyderabad
option(value='bangalore') Bangalore
option(value='mumbai') Mumbai
option(value='Kolkata') Kolkata
option(value='Delhi') Delhi
option(value='chennai') Chennai
br
input(type='search',id='query',name='query',size='46',style='font-size:20px')
br
br
input(type='submit',value='Search')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment