--- /dev/null
+/*
+ * jQuery tinydot 0.1
+ *
+ * Copyright (c) Alexander Danilov
+ * www.modos189.ru
+ *
+ * Plugin repository:
+ * https://gitlab.com/modos189/tinydot
+ *
+ * Licensed under the MIT license.
+ * http://en.wikipedia.org/wiki/MIT_License
+ */
+
+(function( $, undef )
+{
+ if ( $.fn.tinydot )
+ {
+ return;
+ }
+
+ $.fn.tinydot = function( o ) {
+ var p=$(this).children('a');
+ var divh=$(this).height();
+ while ($(p).outerHeight()>divh) {
+ $(p).text(function (index, text) {
+ return text.replace(/\W*\s(\S)*$/, '...');
+ });
+ }
+ }
+})( jQuery );
+
+jQuery(document).ready(function($) {
+ //We only invoke jQuery.tinydot on elements that have dot-ellipsis class
+ $(".dot-ellipsis").each(function(){
+ var x = new Object();
+ $(this).tinydot(x);
+ });
+
+});
--- /dev/null
+!function(t,n){t.fn.tinydot||(t.fn.tinydot=function(n){for(var e=t(this).children("a"),i=t(this).height();t(e).outerHeight()>i;)t(e).text(function(t,n){return n.replace(/\W*\s(\S)*$/,"...")})})}(jQuery),jQuery(document).ready(function(t){t(".dot-ellipsis").each(function(){var n=new Object;t(this).tinydot(n)})});
<i class="card-title grey-text text-darken-4 activator mdi-navigation-more-horiz right"></i>
{% endif %}
- <span class="card-title"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|striptags|slice(0, 42)|raw }}</a></span>
+ <span class="card-title dot-ellipsis"><a href="{{ path('view', { 'id': entry.id }) }}" title="{{ entry.title|raw }}">{{ entry.title|striptags|raw }}</a></span>
<div class="estimatedTime grey-text">
<span class="tool reading-time">