Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mixin bem-input()
- - var name = attributes.name;
- - var label = attributes.label;
- - var value = attributes.value;
- - var placeholder = attributes.value;
- - var hint = attributes.hint;
- - var errors = attributes.errors;
- +bem-input()(name="input-name" label="Input label:" errors=["error 1", "error 2"])
- extends ./layout.jade
- include ./mixins.jade
- block title
- title Jade Practice
- block content
- - var user = {name: 'Joe'}
- - var authorized = true
- if !authorized
- p Please log in
- else
- h1(id = 'header', randomPhrase = 'catbuttz')
- Hello #{userName}
- div
- |Your email is: #{email}
- p
- |Secret Message
- a(href='#')
- |Test lnk
- button#xhrButton
- div#requestTest
- ul
- +pet()
- script(type="text/javascript", src='./client.js')
- mixin pet()
- -var pets = ['cat', 'dog', 'squirrel'];
- each pet in "#{userNames}"
- li(id=pet)=pet
- var express = require('express');
- var app = express();
- var jade = require('jade');
- // Set template engine to Jade
- app.set('view engine', 'jade');
- //Tell Express where our template files live
- app.set('views', './views');
- app.use(express.static('./public'));
- app.get('/', function(req, res) {
- res.render('index', { userNames : ['Joe', 'Jon', 'Ray'], email : 'joejoebink3@aol.com' });
- })
- app.get('/message', function(req, res) {
- res.json({'username':'JoeJoe', password:'1234'});
- })
- var server = app.listen(3000, function() {
- console.log('server started');
- })
Add Comment
Please, Sign In to add comment