Skip to content

Commit e111b50

Browse files
authored
Merge pull request #19581 from ksuderman/anvil-theme
Support setting masthead height in a theme
2 parents da98c8b + 2cf27ac commit e111b50

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

client/src/components/Masthead/Masthead.vue

+6-5
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ onMounted(() => {
178178
padding: 0;
179179
margin-bottom: 0;
180180
background: var(--masthead-color);
181-
height: $masthead-height;
181+
height: var(--masthead-height);
182182
&:deep(.navbar-nav) {
183-
height: $masthead-height;
183+
height: var(--masthead-height);
184184
& > li {
185185
// This allows the background color to fill the full height of the
186186
// masthead, while still keeping the contents centered (using flex)
@@ -226,20 +226,21 @@ onMounted(() => {
226226
}
227227
.navbar-brand {
228228
cursor: pointer;
229-
line-height: $masthead-height;
229+
line-height: var(--masthead-height);
230230
img {
231231
filter: $text-shadow;
232232
display: inline;
233233
border: none;
234-
height: 2rem;
234+
height: var(--masthead-logo-height);
235+
padding: inherit;
235236
}
236237
}
237238
.navbar-text {
238239
filter: $text-shadow;
239240
font-weight: bold;
240241
font-family: Verdana, sans-serif;
241242
font-size: 1rem;
242-
line-height: $masthead-height;
243+
line-height: var(--masthead-height);
243244
color: var(--masthead-text-color);
244245
}
245246
}

client/src/style/scss/custom_theme_variables.scss

+3
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ html,
8282
--font-size-large: 1rem;
8383

8484
// masthead specific
85+
--masthead-height: #{$masthead-height};
86+
--masthead-logo-height: calc(var(--masthead-height) * 0.6);
87+
8588
--masthead-color: #{$masthead-color};
8689
--masthead-text-color: #{$masthead-text-color};
8790
--masthead-text-hover: #{$masthead-text-hover};

client/src/style/scss/theme/blue.scss

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ $body-bg: $white;
114114

115115
// Masthead
116116
$masthead-height: 2.5rem;
117+
$masthead-logo-height: $masthead-height * 0.6;
117118

118119
// Side panels
119120
$panel-bg-color: $brand-light;

lib/galaxy/config/sample/themes_conf.yml.sample

+17
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,20 @@ smoky:
7474
active: "#FF206E"
7575
logo:
7676
img: "/static/favicon.svg"
77+
78+
anvil:
79+
masthead:
80+
color: "#012840"
81+
height: "3rem"
82+
text:
83+
color: "#f6f7f4"
84+
hover: "#e0dd10"
85+
active: "#ffff"
86+
link:
87+
color: transparent
88+
hover: transparent
89+
active: "#00090e"
90+
logo:
91+
height: "1.8rem"
92+
img: "/static/images/galaxy_project_logo_white_square.png"
93+
img-secondary: "/static/images/anvilwhite.png"

0 commit comments

Comments
 (0)