Skip to content

Commit 421e2a4

Browse files
committed
made navbar black, added hover show/hide of edit fucntions
1 parent 2fbbacf commit 421e2a4

File tree

4 files changed

+24
-32
lines changed

4 files changed

+24
-32
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# Place all the behaviors and hooks related to the matching controller here.
22
# All this logic will automatically be available in application.js.
33
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4+
5+
$ ->
6+
$('.status').hover (event) ->
7+
$(this).toggleClass("hover")
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
// Place all the styles related to the statuses controller here.
22
// They will automatically be included in application.css.
33
// You can use Sass (SCSS) here: http://sass-lang.com/
4+
5+
.status {
6+
border-bottom: solid 1px #ccc;
7+
padding: 5px 0;
8+
}
9+
10+
.status p {
11+
margin: 4px 0;
12+
}
13+
14+
.status .admin {
15+
display: none;
16+
}
17+
18+
.status.hover .admin {
19+
display: inline;
20+
}

app/views/layouts/application.html.erb

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</head>
1818
<body>
1919

20-
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
20+
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse" role="navigation">
2121
<!-- Brand and toggle get grouped for better mobile display -->
2222
<div class="navbar-header">
2323
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
@@ -33,35 +33,6 @@
3333
<div class="collapse navbar-collapse navbar-ex1-collapse">
3434
<ul class="nav navbar-nav">
3535
<li><%= link_to "All statuses", statuses_path %></li>
36-
<li><a href="#">Link</a></li>
37-
<li class="dropdown">
38-
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
39-
<ul class="dropdown-menu">
40-
<li><a href="#">Action</a></li>
41-
<li><a href="#">Another action</a></li>
42-
<li><a href="#">Something else here</a></li>
43-
<li><a href="#">Separated link</a></li>
44-
<li><a href="#">One more separated link</a></li>
45-
</ul>
46-
</li>
47-
</ul>
48-
<form class="navbar-form navbar-left" role="search">
49-
<div class="form-group">
50-
<input type="text" class="form-control" placeholder="Search">
51-
</div>
52-
<button type="submit" class="btn btn-default">Submit</button>
53-
</form>
54-
<ul class="nav navbar-nav navbar-right">
55-
<li><a href="#">Link</a></li>
56-
<li class="dropdown">
57-
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
58-
<ul class="dropdown-menu">
59-
<li><a href="#">Action</a></li>
60-
<li><a href="#">Another action</a></li>
61-
<li><a href="#">Something else here</a></li>
62-
<li><a href="#">Separated link</a></li>
63-
</ul>
64-
</li>
6536
</ul>
6637
</div><!-- /.navbar-collapse -->
6738
</nav>

app/views/statuses/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<strong><%= status.name %></strong>
88
<p><%= status.content %></p>
99
<div class="meta">
10-
<%= link_to "Show", status %>
10+
<%= link_to "created #{time_ago_in_words(status.created_at)} ago", status %>
1111
<span class="admin">
12-
<%= link_to "Edit", edit_status_path(status) %> |
12+
| <%= link_to "Edit", edit_status_path(status) %> |
1313
<%= link_to "Delete", status, method: :delete,
1414
data: { confirm: "Are you sure you want to delete this status?" } %>
1515
</span>

0 commit comments

Comments
 (0)