Skip to content

Commit

Permalink
Style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanhogan committed Feb 16, 2020
1 parent ada5880 commit fb52547
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/components/settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ class Settings extends Component {
<p className='settings-hint'>
Reduce eye strain for low-light reading.
</p>

<Toggle
label={settings.sansSerif ? 'Sans-serif fonts' : 'Serif fonts'}
name='sansSerif'
checked={settings.sansSerif}
onChange={this.props.updateSetting}
/>
</Modal>
</Fragment>
)
Expand Down
3 changes: 2 additions & 1 deletion src/store/settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const initialState = {
darkMode: localStorage.getItem('darkMode')
? getBooleanValue('darkMode')
: window.matchMedia('(prefers-color-scheme: dark)').matches,
lowContrast: getBooleanValue('lowContrast')
lowContrast: getBooleanValue('lowContrast'),
sansSerif: getBooleanValue('sansSerif')
}

export default (state = initialState, action) => {
Expand Down
2 changes: 1 addition & 1 deletion src/styles/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
}
}

@media (min-width: 52rem) {
@media (min-width: 48rem) {
#mp-upper {
tr {
display: flex;
Expand Down
4 changes: 4 additions & 0 deletions src/styles/_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ table.navbox {
display: block;
max-width: 100%;
width: 100%;

td[style*=background] {
opacity: 0.75;
}
}

table.mbox-small {
Expand Down
8 changes: 8 additions & 0 deletions src/styles/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@
}
}
}

.sansSerif {
font-family: $sans-stack;

h1, h2, h3, h4, h5, h6 {
font-family: $sans-stack;
}
}
1 change: 1 addition & 0 deletions src/styles/_thumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
img {
display: block;
min-width: 50%;
max-width: 20rem;
margin: 1rem auto;
}

Expand Down
13 changes: 11 additions & 2 deletions src/styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ table {
.home-page #mp-topbanner ul li a {
padding: 0.25rem; }

@media (min-width: 52rem) {
@media (min-width: 48rem) {
.home-page #mp-upper tr {
display: flex; }
.home-page #mp-upper tr td {
Expand Down Expand Up @@ -541,6 +541,7 @@ table {
.thumb img {
display: block;
min-width: 50%;
max-width: 20rem;
margin: 1rem auto; }
@media (max-width: 36rem) {
.infobox :only-child > .image,
Expand Down Expand Up @@ -616,7 +617,7 @@ table {
font-family: "PT Serif", "Lora", Georgia, serif; }

.sans-stack {
font-family: "Roboto", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; }
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; }

h1,
h2,
Expand Down Expand Up @@ -712,6 +713,9 @@ table.navbox {
display: block;
max-width: 100%;
width: 100%; }
table.wikitable td[style*=background],
table.navbox td[style*=background] {
opacity: 0.75; }

table.mbox-small {
background: transparent;
Expand Down Expand Up @@ -912,3 +916,8 @@ pre {
.darkMode a:focus, .darkMode a:hover, .darkMode a:active {
color: #916308;
outline: 0; }

.sansSerif {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; }
.sansSerif h1, .sansSerif h2, .sansSerif h3, .sansSerif h4, .sansSerif h5, .sansSerif h6 {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; }
3 changes: 1 addition & 2 deletions src/styles/styles.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
$serif-stack: "PT Serif", "Lora", Georgia, serif;
$sans-stack: "Roboto", "HelveticaNeue-Light", "Helvetica Neue Light",
"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
$sans-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
$title-stack: "Playfair Display", $serif-stack;
$header-height: 3.25rem;

Expand Down

0 comments on commit fb52547

Please sign in to comment.