Skip to content

Commit 08d9273

Browse files
committed
Configure branded logos for dark mode
(I have now enabled GHA to automatically compile the css if changed, this may make rebasing from upstream a weird affair)
1 parent c3f1a32 commit 08d9273

File tree

6 files changed

+14
-2
lines changed

6 files changed

+14
-2
lines changed

inst/pkgdown/templates/header.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
<div class="col-md-8">
2020
<div class="large-logo">
2121
<a href="https://www.sheffield.ac.uk">
22-
<img alt="University of Sheffield" src="{{#site}}{{root}}{{/site}}assets/images/UOSLogo_Primary_Violet_RGB.svg">
22+
<img alt="University of Sheffield" src="{{#site}}{{root}}{{/site}}assets/images/UOSLogo_Primary_Violet_RGB.svg" class="light-only">
23+
<img alt="University of Sheffield" src="{{#site}}{{root}}{{/site}}assets/images/UOSLogo_Primary_White_RGB-dark.svg" class="dark-only">
2324
</a>
2425
{{#yaml}}{{#life_cycle}}
2526
{{#pre_alpha}}

inst/pkgdown/assets/assets/images/UOSLogo_Primary_Violet_RGB.svg renamed to source/images/UOSLogo_Primary_Violet_RGB.svg

File renamed without changes.
Lines changed: 1 addition & 0 deletions
Loading

inst/pkgdown/assets/assets/images/UOSSheild_Primary_Violet_RGB.ico renamed to source/images/UOSSheild_Primary_Violet_RGB.ico

File renamed without changes.

inst/pkgdown/assets/assets/images/UOSSheild_Primary_Violet_RGB.svg renamed to source/images/UOSSheild_Primary_Violet_RGB.svg

File renamed without changes.

source/stylesheets/dark.scss

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ $color-mode-type: data;
8888
color: #fff;
8989
}
9090
}
91-
91+
9292
svg .icon {
9393
stroke: var(--bs-body-color);
9494
}
@@ -731,3 +731,13 @@ div.tab-content {
731731
}
732732

733733
}
734+
735+
// A few UoS specific dark/light theme rules
736+
// Hide the white university of sheffield logo during light mode
737+
[data-bs-theme=light] img.dark-only {
738+
display: none;
739+
}
740+
// Hide the purple university of sheffield logo during dark mode
741+
[data-bs-theme=dark] img.light-only {
742+
display: none;
743+
}

0 commit comments

Comments
 (0)