Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Commit

Permalink
Updates styling.
Browse files Browse the repository at this point in the history
  • Loading branch information
joegatt committed Mar 12, 2013
1 parent 40fd178 commit 80cf24e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/assets/stylesheets/themes/default.css.sass
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ h1
weight: normal
size: $font-size-headline

h2, h3, h6
h3, h6
display: none

///////////////////////////////
Expand Down Expand Up @@ -223,16 +223,17 @@ footer

ul.notes
+column(12)
li
li, li h2
font:
family: $font-family-body
size: $font-size-body
color: $font-color-body
margin-bottom: $line-height
display: block
+column-break-inside(avoid)
a:first-line
h2
color: $title-color
display: inline

.notes-show
figure
Expand Down Expand Up @@ -329,7 +330,6 @@ ul.notes
+column(12)
+columns(2)


///////////////////////////////
//
// Media-queries
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def dir_attr(language)
end

def snippet(text, characters, omission = '...')
text = ActionController::Base.helpers.strip_tags(text)
text = ActionController::Base.helpers.sanitize(text, :tags => ['h2'])
text = text.gsub(/\[.+\]/, '')
text = ActionController::Base.helpers.truncate(text, :length => characters, :separator => ' ', :omission => omission)
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class Note < ActiveRecord::Base
def blurb
# If the title is derived from the body, we do not include it in the blurb
if self.body.index(self.title.gsub(/\.\.\.$/, '')) == 0
self.body
'<h2>' + self.title + '</h2>: ' + self.body.gsub(/"#{ self.title }"/, '')
else
self.title + ': ' + self.body
'<h2>' + self.title + '</h2>: ' + self.body
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/application/_notes_list.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
- if image
= link_to "#{ image_tag(cut_image_path(image), :alt => strip_tags(image.description), :width => Settings.styling.images.thumbnail.width) } #{ snippet(note.blurb, Settings.notes.blurb_length) }".html_safe, note, :lang => lang_attr(note.lang), :dir => dir_attr(note.lang)
- else
= link_to snippet(note.blurb, Settings.notes.blurb_length), note,
= link_to snippet(note.blurb, Settings.notes.blurb_length).html_safe, note,
:lang => lang_attr(note.lang), :dir => dir_attr(note.lang)

0 comments on commit 80cf24e

Please sign in to comment.