Skip to content

Commit 92b6809

Browse files
Create Dies theme (#840)
* create dies theme scss * made logo path and width variables * fixed linting * theming done
1 parent 1a5c899 commit 92b6809

File tree

4 files changed

+134
-0
lines changed

4 files changed

+134
-0
lines changed

app/adapters/application.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default class ApplicationAdapter extends JSONAPIAdapter {
1515
let headers = {};
1616
if (this.session.isAuthenticated) {
1717
headers.Authorization = `Bearer ${this.session.data.authenticated.access_token}`;
18+
document.documentElement.classList.add('authenticated');
1819
}
1920

2021
return headers;

app/styles/app.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,6 @@
7474
// Import package style
7575
@import 'ember-power-select/themes/bootstrap';
7676
@import 'ember-power-select';
77+
78+
// Dies theme, comment out when not in the Dies-week
79+
@import 'dies-theme';

app/styles/dies-theme.scss

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
// stylelint-disable selector-no-qualifying-type
2+
html.authenticated {
3+
$primary-color: #840400;
4+
$link-color: #840400;
5+
$button-fg-color: #efead6;
6+
$button-bg-color: #840400;
7+
$app-bg-color: #efead6;
8+
$sidebar-fg-color: #efead6;
9+
$sidebar-bg-color: #840400;
10+
$navbar-fg-color: #efead6;
11+
$navbar-bg-color: #0f1c3f;
12+
$navbar-button-fg-color: #efead6;
13+
$navbar-button-bg-color: #840400;
14+
$dies-logo-url: '/images/dies_logo.png';
15+
$dies-logo-width: 5rem;
16+
17+
.app {
18+
background-color: $app-bg-color;
19+
}
20+
21+
.header-nav {
22+
background-color: $navbar-bg-color;
23+
color: $navbar-fg-color;
24+
25+
.breadcrumb-item::before {
26+
color: $navbar-fg-color;
27+
}
28+
29+
.header-logo {
30+
background-image: url($dies-logo-url);
31+
background-repeat: no-repeat;
32+
background-position: center;
33+
background-size: contain;
34+
width: $dies-logo-width;
35+
}
36+
37+
.btn-primary {
38+
@include button-variant(
39+
$navbar-button-bg-color,
40+
$navbar-button-bg-color,
41+
);
42+
43+
color: $navbar-button-fg-color;
44+
}
45+
}
46+
47+
.menu-sidebar {
48+
background-color: $sidebar-bg-color;
49+
50+
.menu-sidebar-item {
51+
color: $sidebar-fg-color;
52+
53+
&.sidebar-item-minor {
54+
color: shade-color($sidebar-fg-color, 40%); /* stylelint-disable-line function-no-unknown */
55+
}
56+
}
57+
}
58+
59+
.btn-primary {
60+
@include button-variant(
61+
$button-bg-color,
62+
$button-bg-color,
63+
);
64+
65+
color: $button-fg-color;
66+
}
67+
68+
p a {
69+
color: $link-color;
70+
}
71+
72+
a:hover,
73+
a .list-group-item:hover,
74+
.link-highlight:hover {
75+
color: shade-color($link-color, 30%); /* stylelint-disable-line function-no-unknown */
76+
}
77+
78+
.form-check-input {
79+
&:checked {
80+
border-color: $button-bg-color;
81+
background-color: $button-bg-color;
82+
}
83+
84+
&:focus {
85+
border-color: tint-color($button-bg-color, 50%); /* stylelint-disable-line function-no-unknown */
86+
box-shadow: 0 0 0 0.25rem rgba($button-bg-color, 0.25);
87+
}
88+
}
89+
90+
.text-primary {
91+
color: $primary-color !important;
92+
}
93+
94+
.bg-primary {
95+
background-color: $primary-color !important;
96+
}
97+
98+
.form-control:focus {
99+
box-shadow: 0 0 0 0.25rem rgba($primary-color, 0.25);
100+
}
101+
102+
.page-actions-buttons {
103+
// stylelint-disable selector-max-compound-selectors
104+
.input-group-text,
105+
.filter-bar-filter,
106+
.input-group button {
107+
background-color: tint-color($navbar-bg-color, 10%); /* stylelint-disable-line function-no-unknown */
108+
color: $navbar-fg-color;
109+
}
110+
111+
.filter-bar-filter::placeholder {
112+
opacity: 1; /* Firefox */
113+
color: shade-color($navbar-fg-color, 30%); /* stylelint-disable-line function-no-unknown */
114+
}
115+
116+
.form-control:focus {
117+
box-shadow: 0 0 0 0.25rem tint-color($navbar-bg-color, 15%); /* stylelint-disable-line function-no-unknown */
118+
}
119+
}
120+
121+
.new-forum-posts {
122+
background-color: $primary-color;
123+
}
124+
125+
.advertisement-tool {
126+
background: $white;
127+
}
128+
129+
}
130+
// stylelint-enable selector-no-qualifying-type

public/images/dies_logo.png

1.77 MB
Loading

0 commit comments

Comments
 (0)