Skip to content

Commit

Permalink
References #20 - Implemented better clipping via a CSS property, so t…
Browse files Browse the repository at this point in the history
…ext doesn't vertically overflow any longer. However, if the content is less than 100 characters, I still won't give you the option to go to the overlay.
  • Loading branch information
jefflunt committed Jun 4, 2012
1 parent d3a812f commit d051f93
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 8 deletions.
15 changes: 15 additions & 0 deletions app/assets/stylesheets/main.sass
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,26 @@ a
margin-top: 5px
margin-right: 5px
.thought
overflow: hidden
border: none
margin-top: -10px
font-size: $size-medium
word-wrap: break-word
padding: 5px 5px 23px 5px
height: 83px
.thought-bottom-section-standard
background-color: #000
border-bottom-left-radius: 5px
border-bottom-right-radius: 5px
height: 24px
bottom: 0px
.thought-bottom-section-overlay
@extend .thought-bottom-section-standard
border-radius: 0px
position: absolute
width: 100%
height: 37px
bottom: 0px
.thought-controls
position: absolute
bottom: 3px
Expand Down
5 changes: 3 additions & 2 deletions app/views/thoughts/_bottom_section_overlay.haml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
=render :partial => "thoughts/votes_overlay", :locals => {thought: thought}
=render :partial => "thoughts/controls_overlay", :locals => {thought: thought}
.thought-bottom-section-overlay
=render :partial => "thoughts/votes_overlay", :locals => {thought: thought}
=render :partial => "thoughts/controls_overlay", :locals => {thought: thought}
5 changes: 3 additions & 2 deletions app/views/thoughts/_bottom_section_standard.haml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
=render :partial => "thoughts/votes_standard", :locals => {thought: thought}
=render :partial => "thoughts/controls_standard", :locals => {thought: thought}
.thought-bottom-section-standard
=render :partial => "thoughts/votes_standard", :locals => {thought: thought}
=render :partial => "thoughts/controls_standard", :locals => {thought: thought}
2 changes: 1 addition & 1 deletion app/views/thoughts/_thought_box.haml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-is_new_thought ||= nil
.thought-box{class: custom_styles(thought, is_new_thought), id: "thought-box-#{thought.id}"}
.thought
=simple_format(auto_link(truncate(thought.text, length: 99, :omission => ' ...')))
=simple_format(auto_link(thought.text))
=render :partial => "thoughts/bottom_section_standard", :locals => {thought: thought}
Binary file modified public/assets/application-42efb240b4740cbe772faeab8c9561cc.js.gz
Binary file not shown.

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

Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion public/assets/application.css

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

Binary file modified public/assets/application.css.gz
Binary file not shown.
Binary file modified public/assets/application.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion public/assets/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ brain-light.jpg: brain-light-561b24be085e75f3378e031c64251277.jpg
spinner.gif: spinner-6aa1008d858cbed1cd320422f59a4789.gif
application.js: application-42efb240b4740cbe772faeab8c9561cc.js
PTM55FT.ttf: PTM55FT-7515d9db13e596569dc717ef3606ce98.ttf
application.css: application-f908da3a7d7f6c2d927014e543b364c1.css
application.css: application-eb8a37afd06b7a5142e455637662ccc4.css

0 comments on commit d051f93

Please sign in to comment.