Skip to content

Commit

Permalink
feat(wordmark): ✨ implement wordmark in drawer
Browse files Browse the repository at this point in the history
Also simplify existing styles for wordmark
  • Loading branch information
alistair3149 committed Jun 24, 2024
1 parent e0507d4 commit c47531a
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 29 deletions.
4 changes: 0 additions & 4 deletions resources/skins.citizen.styles/common/typography.less
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ em {
}
}

.mw-logo-wordmark {
font-weight: var( --font-weight-semibold );
}

.citizen-body {
font-size: var( --font-size-medium );
line-height: var( --line-height );
Expand Down
15 changes: 1 addition & 14 deletions resources/skins.citizen.styles/components/Drawer.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@
&__siteinfo {
display: flex;
flex-direction: column;
gap: var( --space-xxs );

.mw-logo-wordmark {
font-size: 1.5rem;
color: var( --color-base--emphasized );
}
gap: var( --space-xs );
}

&__menu {
Expand All @@ -57,14 +52,6 @@
// Bigger logo
height: 5rem;
}

&__siteinfo {
.mw-logo-wordmark {
font-size: 2rem;
// Sometimes long wiki name will wrap when the menu is too small
white-space: nowrap;
}
}
}
}

Expand Down
10 changes: 0 additions & 10 deletions resources/skins.citizen.styles/components/Footer.less
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,6 @@
}

#footer {
&-sitetitle {
font-size: 1.25rem;
color: var( --color-base--emphasized );

img.mw-logo-wordmark {
max-height: 54px;
filter: var( --filter-invert );
}
}

&-places {
ul {
flex-direction: column;
Expand Down
20 changes: 20 additions & 0 deletions resources/skins.citizen.styles/components/Wordmark.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.mw-logo-wordmark {
font-size: 1.25rem;
font-weight: var( --font-weight-semibold );
line-height: 1;
color: var( --color-base--emphasized );

@media ( min-width: @min-width-breakpoint-tablet ) {
font-size: 2rem;
white-space: nowrap;
}

img& {
width: 100%;
height: 1.5rem;
margin: 0.25rem 0;
object-fit: contain;
object-position: left center;
filter: var( --filter-invert );
}
}
1 change: 1 addition & 0 deletions resources/skins.citizen.styles/skin.less
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
@import 'components/Sections.less';
@import 'components/OverflowElements.less';
@import 'components/UserInfo.less';
@import 'components/Wordmark.less';

// Mediawiki.skinning
// This get loaded regardless so we don't have to use skinStyles to target them
Expand Down
2 changes: 1 addition & 1 deletion templates/Drawer.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{>Drawer__logo}}
<div class="citizen-drawer__siteinfo">
{{#data-site-stats}}{{>SiteStats}}{{/data-site-stats}}
<div class="mw-logo-wordmark">{{msg-sitetitle}}</div>
{{>Wordmark}}
</div>
</header>
{{#data-main-menu}}
Expand Down

0 comments on commit c47531a

Please sign in to comment.