Use css to truncate the page title
This commit is contained in:
@@ -51,10 +51,10 @@ class Text extends \Core\Base
|
||||
*/
|
||||
public function truncate($value, $max_length = 85, $end = '[...]')
|
||||
{
|
||||
$length = strlen($value);
|
||||
$length = mb_strlen($value);
|
||||
|
||||
if ($length > $max_length) {
|
||||
return substr($value, 0, $max_length).' '.$end;
|
||||
return mb_substr($value, 0, $max_length).' '.$end;
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<?php else: ?>
|
||||
<header>
|
||||
<nav>
|
||||
<h1><?= $this->url->link('K<span>B</span>', 'app', 'index', array(), false, 'logo', t('Dashboard')).' '.$this->text->truncate($this->e($title)) ?>
|
||||
<h1><?= $this->url->link('K<span>B</span>', 'app', 'index', array(), false, 'logo', t('Dashboard')).' '.$this->e($title) ?>
|
||||
<?php if (! empty($description)): ?>
|
||||
<span class="column-tooltip" title='<?= $this->e($this->text->markdown($description)) ?>'>
|
||||
<i class="fa fa-info-circle"></i>
|
||||
|
||||
Reference in New Issue
Block a user