Commit dea0ee9f authored by Jehan Tremback's avatar Jehan Tremback

rudimentary truncation and click for more

parent 322492ae
...@@ -377,8 +377,18 @@ class Hypothesis extends Annotator ...@@ -377,8 +377,18 @@ class Hypothesis extends Annotator
.classed('hyp-excerpt', true) .classed('hyp-excerpt', true)
.append('blockquote') .append('blockquote')
excerpts.exit().remove() excerpts.exit().remove()
excerpts.select('blockquote').text (d) => excerpts
d.message.annotation.quote.replace(/\u00a0/g, ' ') # replace   .select('blockquote').html (d) =>
d.message.annotation.quote
.replace(/\u00a0/g, ' ') # replace  
.substring(0, 180).split(" ").slice(0, -1).join(" ") + "...<a id='clickForMore'>more</a>" # truncate
$('#clickForMore').click =>
excerpts
.select('blockquote').html (d) =>
d.message.annotation.quote
.replace(/\u00a0/g, ' ') # replace &nbsp;
highlights = [] highlights = []
excerpts.each (d) => excerpts.each (d) =>
......
...@@ -26,7 +26,7 @@ p { ...@@ -26,7 +26,7 @@ p {
em { font-style: italic; } em { font-style: italic; }
html { html {
font-size: $baseFontSize / 16 * 1em; font-size: $baseFontSize / 18 * 1em;
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
...@@ -261,9 +261,10 @@ label { ...@@ -261,9 +261,10 @@ label {
margin: 1em 0; margin: 1em 0;
blockquote { blockquote {
@include pie-clearfix;
color: $gray; color: $gray;
font-family: "Merriweather"; font-family: "Merriweather";
font-size: 1.1em; font-size: 1em;
margin: 0; margin: 0;
padding: 0 1em; padding: 0 1em;
} }
...@@ -287,6 +288,15 @@ label { ...@@ -287,6 +288,15 @@ label {
right: -.15em; right: -.15em;
bottom: -.1em; bottom: -.1em;
} }
#clickForMore {
font-size: .9em;
font-family: $sansFontFamily;
float: right;
display: block;
text-decoration: underline;
}
} }
//DROPDOWNS //DROPDOWNS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment