Skip to content

Commit

Permalink
Adding no-background setting, enabling header background color, fixin…
Browse files Browse the repository at this point in the history
…g user card background
  • Loading branch information
awesomerobot committed Aug 14, 2018
1 parent 768b2fe commit 2330b82
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 24 deletions.
41 changes: 22 additions & 19 deletions common/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@

body {
background-color: $primary-very-low;
@if $background-image != "default" {
background-image: url($background-image);
} @else {
background-image: url($default-background);
}
// Default background pattern from Toptal Subtle Patterns
// ♡ https://www.toptal.com/designers/subtlepatterns/japanese-sayagata/
background-attachment: fixed;
@if $tile-background == "true" {
background-size: auto;
} @else {
background-size: cover;
@if $no-background-image == "false" {
@if $background-image != "default" { // Thanks @tmoko!
background-image: url($background-image);
} @else {
background-image: url($default-background);
}
// Default background pattern from Toptal Subtle Patterns
// ♡ https://www.toptal.com/designers/subtlepatterns/japanese-sayagata/
background-attachment: fixed;
@if $tile-background == "true" {
background-size: auto;
} @else {
background-size: cover;
background-repeat: no-repeat;
}
}
}

Expand Down Expand Up @@ -50,7 +53,7 @@ tbody {
color: $primary-high;
background: transparent;
border-radius: 4px;

&:hover {
background: $tertiary-low;
color: $tertiary;
Expand Down Expand Up @@ -242,16 +245,16 @@ header.d-header {
background: $tertiary-low;
&:before {
background: linear-gradient(
to right,
$tertiary-low 0%,
rgba(234, 236, 238, 0) 100%
to right,
$tertiary-low 0%,
rgba(234, 236, 238, 0) 100%
);
}
&:after {
background: linear-gradient(
to right,
rgba(234, 236, 238, 0) 0%,
$tertiary-low 100%
to right,
rgba(234, 236, 238, 0) 0%,
$tertiary-low 100%
);
}
}
Expand Down
5 changes: 1 addition & 4 deletions desktop/desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ img.avatar {

.d-header {
height: 70px;
background: rgba($secondary, 0.92);
background: rgba($header_background, 0.92);
box-shadow: 0 3px 3px rgba(100, 100, 100, 0.13);
.panel {
padding: 6px 0 0 0;
Expand Down Expand Up @@ -137,9 +137,6 @@ nav.post-controls {
#user-card {
background: rgba($secondary, 0.95);
border-radius: 4px;
.card-content {
background: none;
}
}

.user-main .about .details .primary {
Expand Down
6 changes: 5 additions & 1 deletion settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ background_image:
default: default
description: Enter image url or variable from "Uploads" section above

tile_background: true
tile_background: true

no_background_image:
default: false
description: Enabling this disables the background image and tiling settings above.

0 comments on commit 2330b82

Please sign in to comment.