diff --git a/TimelessTemplate.php b/TimelessTemplate.php index c4cd1bd..a2c19af 100644 --- a/TimelessTemplate.php +++ b/TimelessTemplate.php @@ -247,9 +247,15 @@ class TimelessTemplate extends BaseTemplate { getMsg( 'timeless-sitetitle' )->escaped(); + // width is 11em; 13 characters will probably fit? + if ( mb_strlen( $siteTitle ) > 13 ) { + $titleClass = 'long'; + } ?> - - getMsg( 'sitetitle' )->escaped() ?> + + isLoggedIn() ) { $userName = $user->getName(); // Make sure it fit firsts - if ( strlen( $userName ) < 12 ) { + if ( mb_strlen( $userName ) < 12 ) { echo htmlspecialchars( $userName, ENT_QUOTES ); } else { echo wfMessage( 'timeless-loggedin' )->escaped(); diff --git a/i18n/en.json b/i18n/en.json index 98eb20e..a05e9c2 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -15,6 +15,7 @@ "timeless-userpagetools": "User tools", "timeless-pagemisc": "More", "timeless-namespaces": "Namespaces", - "timeless-pagetools": "Page actions" + "timeless-pagetools": "Page actions", + "timeless-sitetitle": "{{MediaWiki:Sitetitle}}" } diff --git a/i18n/qqq.json b/i18n/qqq.json index c2ac837..bc4a9ee 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -17,6 +17,7 @@ "timeless-pageactions": "Label for some page actions", "timeless-userpagetools": "Label for actions associated with a userpage", "timeless-pagemisc": "Label for more tools\n{{Identical|More}}", - "timeless-namespaces": "Label for page namespaces and watch tool\n{{Identical|Namespace}}", - "timeless-pagetools": "Label for some other page tools" + "timeless-namespaces": "Label for page namespaces and watch tools\n{{Identical|Namespace}}", + "timeless-pagetools": "Label for other page tools", + "timeless-sitetitle": "{{ignore}}\nSite title for site banner" } diff --git a/resources/screen-desktop.less b/resources/screen-desktop.less index 6a8d3da..a0ac638 100644 --- a/resources/screen-desktop.less +++ b/resources/screen-desktop.less @@ -52,7 +52,7 @@ .color-middle { height: @color-height; background: @blue; - margin-top: .25em; + margin-top: .3em; margin-bottom: -@color-height; position: relative; } @@ -104,6 +104,13 @@ font-variant: small-caps; font-size: 1.75em; display: block; + + /* 13+ character names */ + &.long { + font-size: 1.45em; + padding: 0; + line-height: .8; + } } }