-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathstream.haml
More file actions
96 lines (92 loc) · 3.22 KB
/
stream.haml
File metadata and controls
96 lines (92 loc) · 3.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
.span-9
%img{:height => "64", :src => "/images/logo.png", :style => "float:left"}/
%p.body{:style => "padding-top:20px;padding-left:80px"} Hackety Hack
.span-4.prepend-5.last
- if logged_in?
%ul
%li{:style => "display:inline"}
%a{:href => "/hackers/#{current_user.username.to_slug}"} My Page
|
%li{:style => "display:inline"}
%a{:href => "/logout"} Log out
- else
%a{:href => "/login"} Log in
.span-18
%ul#input_list
%li{:style => "display:inline"}
%a#question_button.button{:href => "#"} Ask a question
%li{:style => "display:inline"}
%a#link_button.button{:href => "#"} Share a link
%li{:style => "display:inline"}
%a#post_button.button{:href => "#"} Tell everyone something
%form#link_form{:action => "/content", :style => "display:none", :method => "POST"}
%label{:for => "link"} Share a link
%a.cancel{:href => "#"} x
%br/
%input#link{ :name => "content[body]", :size => "76", :type => "textbox"}/
%input{ :name => "content[type]", :type => "hidden", :value => "link"}/
%br/
%input.button{:type => "submit"}
%form#post_form{:action => "/content", :style => "display:none", :method => "POST"}
%label{:for => "post"} Tell everyone something
%a.cancel{:href => "#"} x
%br/
%textarea#post{ :name => "content[body]" }
%input{ :name => "content[type]", :type => "hidden", :value => "post"}/
%br/
%input.button{:type => "submit"}
%form#question_form{:action => "/content", :style => "display:none", :method => "POST"}
%label{:for => "question"} Ask a question
%a.cancel{:href => "#"} x
%br/
%textarea#question{:name => "content[body]"}
%input{ :name => "content[type]", :type => "hidden", :value => "question"}/
%br/
%input.button{:type => "submit"}
.span-18
%h2 Here's what everyone else is up to!
%ul{:style => "list-style:none"}
- @content_list.each do |content|
%li{:style => "height:70px"}
%img{:height => "64", :src => content.image, :style => "float:left"}/
%p{:class => "vertical-center-text"}
%a{:href => "/hackers/#{content.author}"}= content.author
shared a
%a{:href => "/content/#{content.id}"}= content.type
- content_for :head do
:javascript
$(function() {
$( ".button").button();
$("#question_button").click(function() {
$('form').each(function(idx, elem) {
if($(elem).is(':visible')) {
$(elem).hide("blind");
}
});
$("#question_form").show("blind");
});
$("#post_button").click(function() {
$('form').each(function(idx, elem) {
if($(elem).is(':visible')) {
$(elem).hide("blind");
}
});
$("#post_form").show("blind");
});
$("#link_button").click(function() {
$('form').each(function(idx, elem) {
if($(elem).is(':visible')) {
$(elem).hide("blind");
}
});
$("#link_form").show("blind");
});
$("a.cancel").click(function() {
//$("#input_list").show("blind");
$('form').each(function(idx, elem) {
if($(elem).is(':visible')) {
$(elem).hide("blind");
}
});
});
});