diff --git a/app/User.php b/app/User.php index e1b7c143b..a16eab972 100644 --- a/app/User.php +++ b/app/User.php @@ -162,4 +162,19 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon { return '/settings/users/' . $this->id; } + + /** + * Get a shortened version of the user's name. + * @param int $chars + * @return string + */ + public function getShortName($chars = 8) + { + if (strlen($this->name) <= $chars) return $this->name; + + $splitName = explode(' ', $this->name); + if (strlen($splitName[0]) <= $chars) return $splitName[0]; + + return ''; + } } diff --git a/resources/assets/sass/_header.scss b/resources/assets/sass/_header.scss index 95d353498..aa7c2f471 100644 --- a/resources/assets/sass/_header.scss +++ b/resources/assets/sass/_header.scss @@ -56,18 +56,14 @@ header { padding-top: $-xxs; } > i { - padding-top: $-xs*1.2; + padding-top: 4px; + font-size: 18px; } @include smaller-than($screen-md) { padding-left: $-xs; .name { display: none; } - i { - font-size: 2em; - padding-left: 0; - padding-top: 0; - } } } @include smaller-than($screen-md) { diff --git a/resources/views/base.blade.php b/resources/views/base.blade.php index 4c5ccf834..96bc20936 100644 --- a/resources/views/base.blade.php +++ b/resources/views/base.blade.php @@ -56,7 +56,7 @@