refactored statements
This commit is contained in:
@@ -14,3 +14,4 @@
|
|||||||
/log/*
|
/log/*
|
||||||
!/log/.keep
|
!/log/.keep
|
||||||
/tmp
|
/tmp
|
||||||
|
.Rproj.user
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('.statement p').each(function(){
|
$('.statement article').each(function(){
|
||||||
var trimLength = 300;
|
var trimLength = 300;
|
||||||
var trimMargin = 1.2; // don't trim just a couple of words
|
var trimMargin = 1.2; // don't trim just a couple of words
|
||||||
if($(this).text().length > (trimLength * trimMargin)) {
|
if($(this).text().length > (trimLength * trimMargin)) {
|
||||||
@@ -12,8 +12,8 @@ $(document).ready(function(){
|
|||||||
});
|
});
|
||||||
$('.toggle a').click(function(e){
|
$('.toggle a').click(function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var para = $(this).closest('p');
|
var para = $(this).closest('article');
|
||||||
var initialHeight = $(this).closest('p').innerHeight();
|
var initialHeight = $(this).closest('article').innerHeight();
|
||||||
para.find('.read-more').show();
|
para.find('.read-more').show();
|
||||||
para.find('.toggle').hide();
|
para.find('.toggle').hide();
|
||||||
var newHeight = para.innerHeight();
|
var newHeight = para.innerHeight();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
- supporters = Supporter.where('publicity.state' => :approved).desc('publicity.created_at')
|
- supporters = Supporter.where('publicity.state' => :approved).desc('publicity.created_at')
|
||||||
|
== Redcarpet::Markdown.new(Redcarpet::Render::HTML).render "**test**"
|
||||||
h1 = title t('.title')
|
h1 = title t('.title')
|
||||||
- supporters.each do |supporter|
|
- supporters.each do |supporter|
|
||||||
.statement
|
.statement
|
||||||
@@ -8,7 +8,7 @@ h1 = title t('.title')
|
|||||||
- unless supporter.publicity.organisation.blank?
|
- unless supporter.publicity.organisation.blank?
|
||||||
em= ", #{supporter.publicity.organisation}"
|
em= ", #{supporter.publicity.organisation}"
|
||||||
br
|
br
|
||||||
p = supporter.publicity.statement
|
article== Redcarpet::Markdown.new(Redcarpet::Render::HTML).render supporter.publicity.statement
|
||||||
hr.clearfix
|
hr.clearfix
|
||||||
|
|
||||||
.text-center = link_to t(".submit_your_own_statement"), new_publicity_path
|
.text-center = link_to t(".submit_your_own_statement"), new_publicity_path
|
||||||
Reference in New Issue
Block a user