Skip to content

Commit

Permalink
yo
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidkahl committed Mar 11, 2012
1 parent e97acab commit 40da4b3
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 27 deletions.
2 changes: 1 addition & 1 deletion auth.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
config = require './config.coffee'

everyauth = module.exports = require 'everyauth'
everyauth.debug = true
everyauth.debug = false
everyauth.everymodule.moduleErrback (err) ->
console.log "Auth ERROR - "+err

Expand Down
1 change: 0 additions & 1 deletion main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ app.get '/:id', (req, res) ->
app.get '/:id/edit', (req, res) ->
scene.findById req.params.id, (err, doc) ->
if doc
console.log doc.value
res.render 'edit', {
locals:{
title:"Spark."
Expand Down
11 changes: 11 additions & 0 deletions public/js/jquery.wookmark.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions public/less/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -3704,3 +3704,22 @@ h1 {
vertical-align: middle;
margin-top: -2px;
}
.editScene {
margin-bottom: 3px;
}
#scenes {
position: relative;
list-style: none;
}
#scenes li {
display: none;
width: 260px;
}
#scenes li img {
display: block;
margin-bottom: 0px;
}
#scenes li div.well {
margin-bottom: 0;
padding: 5px;
}
24 changes: 24 additions & 0 deletions public/less/utilities.less
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,28 @@ h1 {
border-radius: 5px;
vertical-align:middle;
margin-top:-2px;
}

.editScene {
margin-bottom: 3px;
}

#scenes {
position:relative;
list-style:none;
}

#scenes li {
display:none;
width:260px;
}

#scenes li img {
display:block;
margin-bottom:0px;
}

#scenes li div.well {
margin-bottom:0;
padding:5px;
}
1 change: 1 addition & 0 deletions views/bootstrap.jade
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
script(src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js')
script(src='/js/jquery.lightbox-0.5.pack.js')
script(src='/js/jquery.wookmark.min.js')
link(rel='stylesheet', href='/less/bootstrap.css')
link(rel='stylesheet', href='/css/jquery.lightbox-0.5.css')
21 changes: 12 additions & 9 deletions views/new.jade
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,29 @@ div.row
div.well
form.form-horizontal(method="post")
.control-group
h1 Oh, a new Image!
h1 Oh, a new Scene!

.control-group
input.input-large(type="text", id="title", name="title", placeholder="Title of the image")
input.input-large(type="text", id="title", name="title", placeholder="Title of the Scene")
.control-group
input.input-large(type="text", id="url", name="url", placeholder="URL to image")
input.input-large(type="text", id="url", name="url", placeholder="URL to Scene")
.control-group
input.input-large(type="text", id="found", name="found", placeholder="Please link the Thread/Site where this image came from")
input.input-large(type="text", id="found", name="found", placeholder="Please link the Thread/Site where this Scene came from")
.control-group
input.input-large(type="text", id="creator", name="creator", placeholder="Who created this image? Who is the © owner?")
input.input-large(type="text", id="creator", name="creator", placeholder="Who created this Scene? Who is the © owner?")
.control-group
textarea.input-large(name="body", id="body", rows="2", placeholder="Please enter a short description here.")
textarea.input-large(name="body", id="body", rows="2", placeholder="Please enter a short description here. Ask a question about the implications of the Scene. ")
.control-group
input.btn.btn-primary(type="submit", value="Add Image to Spark.")
input.btn.btn-primary(type="submit", value="Add Scene to Spark.")
|
input.btn(type="reset", value="Reset")
script
$('#url').change(function(){
$('#preview').attr("src", $("#url").attr("value"))});
.span8
.well
img
img#preview
- else
div.span12
div.well
p You are not logged in. Adding Images is only allowed for logged-in Users.
p You are not logged in. Adding Scenes is only allowed for logged-in Users.
30 changes: 20 additions & 10 deletions views/scenes.jade
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
div.row
div.span12
- each article in articles
.article.well
h1= article.title
div.created #{(new Date(article.created_at)).toGMTString()}
a(href='/'+article._id)
div.row#sceneRow
div.span12
ul#scenes
- each article in articles
li
.well
a(href='/'+article._id)
div.image
img(id=article._id,src=article.url, alt=article.body)
div
a.btn.btn-primary(href= article._id ) Show me the Stories »
img(id=article._id,src=article.url, alt=article.body)
div
h6= article.title
small.pull-right= "by "+article.createUserName
a.btn(href= article._id ) Show me the Stories »

script
$('#scenes li').wookmark({container:$('#scenes'),offset:5,itemWidth:260,autoResize:true});


// h1= article.title + "("+i+")"
// div.created #{(new Date(article.created_at)).toGMTString()}
11 changes: 5 additions & 6 deletions views/single.jade
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ div.row
p
i.icon-cog
|
strong Feedback
span.pull-right Report Problem
strong Description
p= doc.body

- if (typeof(notice) != 'undefined')
p=notice
Expand All @@ -48,11 +48,10 @@ div.row
$(function(){$('#scene').lightBox({overlayOpacity:0.9});});
- if (everyauth.userId == doc.createUserId)
- var editLink = "/"+doc._id+'/edit'
a.editScene.btn.btn-mini.btn-warning(href=("/"+doc._id+'/edit')) Edit Scene
form(method="post", action="/"+doc._id+'/delete')
div.btn-group
button.btn.btn-mini.btn-warning(href= editLink) Edit Image
|
button.btn.btn-mini.btn-danger(href=("/"+doc._id+'/delete')) Delete Image
button.btn.btn-mini.btn-danger(href=("/"+doc._id+'/delete')) Delete Scene

div.span6
- each story in doc.stories
div.well
Expand Down

0 comments on commit 40da4b3

Please sign in to comment.