Skip to content

Commit

Permalink
Add a bit of styling for editing the note.
Browse files Browse the repository at this point in the history
  • Loading branch information
aimee daniells committed Jan 3, 2012
1 parent d6eaea3 commit 03278f5
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
Binary file added app/assets/images/icons/edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions app/assets/stylesheets/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
@mixin clearfix {
&:before, &:after { content: ""; display: table; }
&:after { clear: both; }
zoom: 1;
}

@mixin border_radius($tl, $tr, $br, $bl) {
-moz-border-radius: $tl $tr $br $bl;
-webkit-border-radius: $tl $tr $br $bl;
Expand Down
26 changes: 26 additions & 0 deletions app/assets/stylesheets/notes.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '_mixins';

.freetext {
label {
display: none;
Expand All @@ -14,3 +16,27 @@
height: 20em;
}
}

.note {
@include clearfix;
border-top: 1px solid #ccc;

ul.note-actions {
float: right;
padding: 5px;
border: 1px solid #eee;

li {
text-align: right;
margin: 3px;

a {
padding: 2px 2px 2px 20px;
}

&.edit-note a {
background: url(icons/edit.png) no-repeat left center;
}
}
}
}
3 changes: 2 additions & 1 deletion app/views/notes/_note.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.note
%h3= note.date.year
= link_to 'Edit note', edit_note_path(note)
%ul.note-actions.unstyled
%li.edit-note= link_to 'Edit note', edit_note_path(note)
= simple_format note.content

0 comments on commit 03278f5

Please sign in to comment.