Browse Source

Ditch scss

master
Dylan Baker 8 months ago
parent
commit
3ed08aeb76

+ 0
- 1
Gemfile View File

@@ -10,7 +10,6 @@ gem 'pg', '~> 1.2'
10 10
 gem 'rack', '~> 2.2'
11 11
 gem 'rake', '~> 13.0'
12 12
 gem 'rspec', '~> 3.9'
13
-gem 'sassc', '~> 2.2'
14 13
 gem 'sequel', '~> 5.30'
15 14
 gem 'sinatra', '~> 2.0'
16 15
 gem "truncato", "~> 0.7.11"

+ 2
- 4
Rakefile View File

@@ -35,17 +35,15 @@ task 'scrape' do
35 35
 end
36 36
 
37 37
 task 'build' do
38
-  require 'sassc'
39
-
40 38
   unless Dir.exist?('./web/public')
41 39
     puts 'Creating web/public/'
42 40
     Dir.mkdir('./web/public')
43 41
   end
44 42
 
45
-  scss = File.read('./web/assets/style.scss')
46
-  css = SassC::Engine.new(scss, style: :compressed).render
43
+  css = File.read('./web/assets/style.css')
47 44
   puts 'Writing web/public/style.css'
48 45
   File.write('./web/public/style.css', css)
46
+
49 47
   js = File.read('./web/assets/script.js')
50 48
   puts 'Writing web/public/script.js'
51 49
   File.write('./web/public/script.js', js)

+ 202
- 0
web/assets/style.css View File

@@ -0,0 +1,202 @@
1
+* {
2
+  box-sizing: border-box;
3
+}
4
+
5
+html, body {
6
+  margin: 0;
7
+  padding: 0;
8
+}
9
+
10
+body {
11
+  font-family: verdana, sans-serif;
12
+}
13
+
14
+img {
15
+  max-width: 100%;
16
+}
17
+
18
+blockquote {
19
+  font-style: italic;
20
+  margin: 0;
21
+}
22
+
23
+.error {
24
+  color: #DD2222;
25
+}
26
+
27
+.container {
28
+  display: flex;
29
+  flex-direction: column;
30
+  margin: auto;
31
+  max-width: 800px;
32
+  min-height: 100vh;
33
+  padding: 15px;
34
+}
35
+
36
+.header__link {
37
+  color: black;
38
+  text-decoration: none;
39
+}
40
+
41
+.btn {
42
+  background-color: rgb(40, 96, 144);
43
+  border: 1px solid #222;
44
+  border-radius: 5px;
45
+  color: #ffffff;
46
+  cursor: pointer;
47
+  font-size: 20px;
48
+  padding: 0.5em 0.5em;
49
+  text-decoration: none;
50
+}
51
+
52
+.btn:hover {
53
+  background-color: rgb(30, 85, 135);
54
+}
55
+
56
+.btn--small {
57
+  font-size: 14px;
58
+}
59
+
60
+.btn--prev {
61
+  margin-right: 1em;
62
+}
63
+
64
+.center {
65
+  text-align: center;
66
+}
67
+
68
+.auth {
69
+  align-items: center;
70
+  display: flex;
71
+  font-size: 14px;
72
+  justify-content: space-between;
73
+}
74
+
75
+.auth__copy {
76
+  margin: 0;
77
+}
78
+
79
+.auth__username {
80
+  font-weight: bold;
81
+}
82
+
83
+.footer {
84
+  border-top: 1px solid black;
85
+  font-size: 12px;
86
+  margin: 20px 0;
87
+}
88
+
89
+.form {
90
+  display: flex;
91
+  flex: 1;
92
+  flex-direction: column;
93
+  margin: 2em auto;
94
+  width: 100%;
95
+}
96
+
97
+.form__search {
98
+  border: 1px solid #999;
99
+  border-radius: 5px;
100
+  font-size: 20px;
101
+  padding: 0.5em;
102
+}
103
+
104
+.form .filters {
105
+  margin: 1em 0;
106
+}
107
+
108
+.filters__section {
109
+  display: flex;
110
+  padding: .5em 0;
111
+}
112
+
113
+.filters__subsection--sort {
114
+  visibility: hidden;
115
+}
116
+
117
+.filters__subsection--sort.open {
118
+  visibility: visible;
119
+}
120
+
121
+.filters__subsection {
122
+  flex: 1;
123
+}
124
+
125
+.filters__subsection--static {
126
+  flex: 1;
127
+}
128
+
129
+.filters__subsection:nth-child(2) {
130
+  padding: 0 1em;
131
+}
132
+
133
+.form__field {
134
+  margin: 10px 0;
135
+}
136
+
137
+.form__text-field {
138
+  border: 1px solid #000000;
139
+  border-radius: 4px;
140
+  font-size: 16px;
141
+  padding: 5px;
142
+  width: 100%;
143
+}
144
+
145
+.form__submit {
146
+  font-size: 16px;
147
+}
148
+
149
+.form--login {
150
+  margin-top: 0;
151
+}
152
+
153
+.form--login .form__label {
154
+  display: block;
155
+  margin: 10px 0;
156
+}
157
+
158
+.results-container {
159
+  padding-bottom: 1em;
160
+}
161
+
162
+.results__subheader {
163
+  border-bottom: 1px solid black;
164
+  margin: 1.5em 0;
165
+  padding: 5px 0;
166
+}
167
+
168
+.results__result {
169
+  background: #efefef;
170
+  border: 1px solid black;
171
+  border-radius: 5px;
172
+  margin: 1em 0;
173
+  padding: 0.5em;
174
+}
175
+
176
+.results__result.threads .result__info {
177
+  margin-bottom: 0;
178
+}
179
+
180
+.result__info {
181
+  display: flex;
182
+  font-size: 12px;
183
+  justify-content: space-between;
184
+}
185
+
186
+@media (max-width: 500px) {
187
+  .result__info {
188
+    flex-direction: column;
189
+  }
190
+
191
+  .result__info span {
192
+    display: inline-block;
193
+    margin: 5px 0;
194
+  }
195
+
196
+  .filters__section {
197
+    flex-direction: column;
198
+  }
199
+
200
+  .filters__subsection:nth-child(2) {
201
+    padding: 0;
202
+  }

+ 0
- 5
web/assets/style.scss View File

@@ -1,5 +0,0 @@
1
-@import './web/assets/styles/auth.scss';
2
-@import './web/assets/styles/form.scss';
3
-@import './web/assets/styles/global.scss';
4
-@import './web/assets/styles/results.scss';
5
-@import './web/assets/styles/footer.scss';

+ 0
- 14
web/assets/styles/auth.scss View File

@@ -1,14 +0,0 @@
1
-.auth {
2
-  align-items: center;
3
-  display: flex;
4
-  font-size: 14px;
5
-  justify-content: space-between;
6
-}
7
-
8
-.auth__copy {
9
-  margin: 0;
10
-}
11
-
12
-.auth__username {
13
-  font-weight: bold;
14
-}

+ 0
- 5
web/assets/styles/footer.scss View File

@@ -1,5 +0,0 @@
1
-.footer {
2
-  border-top: 1px solid black;
3
-  font-size: 12px;
4
-  margin: 20px 0;
5
-}

+ 0
- 76
web/assets/styles/form.scss View File

@@ -1,76 +0,0 @@
1
-.form {
2
-  display: flex;
3
-  flex: 1;
4
-  flex-direction: column;
5
-  margin: 2em auto;
6
-  width: 100%;
7
-}
8
-
9
-.form__search {
10
-  border: 1px solid #999;
11
-  border-radius: 5px;
12
-  font-size: 20px;
13
-  padding: 0.5em;
14
-}
15
-
16
-.form .filters {
17
-  margin: 1em 0;
18
-}
19
-
20
-.filters__section {
21
-  display: flex;
22
-  padding: .5em 0;
23
-
24
-  @media(max-width: 768px) {
25
-    flex-direction: column;
26
-  }
27
-}
28
-
29
-.filters__subsection--sort {
30
-  visibility: hidden;
31
-}
32
-
33
-.filters__subsection--sort.open {
34
-  visibility: visible;
35
-}
36
-
37
-.filters__subsection {
38
-  flex: 1;
39
-
40
-  &.filters__subsection--static {
41
-    flex: 1;
42
-  }
43
-
44
-  &:nth-child(2) {
45
-    padding: 0 1em;
46
-
47
-    @media(max-width: 768px) {
48
-      padding: 0;
49
-    }
50
-  }
51
-}
52
-
53
-.form__field {
54
-  margin: 10px 0;
55
-}
56
-
57
-.form__text-field {
58
-  border: 1px solid #000000;
59
-  border-radius: 4px;
60
-  font-size: 16px;
61
-  padding: 5px;
62
-  width: 100%;
63
-}
64
-
65
-.form__submit {
66
-  font-size: 16px;
67
-}
68
-
69
-.form--login {
70
-  margin-top: 0;
71
-}
72
-
73
-.form--login .form__label {
74
-  display: block;
75
-  margin: 10px 0;
76
-}

+ 0
- 62
web/assets/styles/global.scss View File

@@ -1,62 +0,0 @@
1
-* {
2
-  box-sizing: border-box;
3
-}
4
-
5
-html, body {
6
-  margin: 0;
7
-  padding: 0;
8
-}
9
-
10
-body {
11
-  font-family: verdana, sans-serif;
12
-}
13
-
14
-img {
15
-  max-width: 100%;
16
-}
17
-
18
-blockquote {
19
-  font-style: italic;
20
-  margin: 0;
21
-}
22
-
23
-.error {
24
-  color: #DD2222;
25
-}
26
-
27
-.container {
28
-  display: flex;
29
-  flex-direction: column;
30
-  margin: auto;
31
-  max-width: 800px;
32
-  min-height: 100vh;
33
-  padding: 15px;
34
-}
35
-
36
-.header__link {
37
-  color: black;
38
-  text-decoration: none;
39
-}
40
-
41
-.btn {
42
-  background-color: rgb(40, 96, 144);
43
-  border: 1px solid #222;
44
-  border-radius: 5px;
45
-  color: #ffffff;
46
-  cursor: pointer;
47
-  font-size: 20px;
48
-  padding: 0.5em 0.5em;
49
-  text-decoration: none;
50
-}
51
-
52
-.btn:hover {
53
-  background-color: rgb(30, 85, 135);
54
-}
55
-
56
-.btn--small {
57
-  font-size: 14px;
58
-}
59
-
60
-.center {
61
-  text-align: center;
62
-}

+ 0
- 40
web/assets/styles/results.scss View File

@@ -1,40 +0,0 @@
1
-.results-container {
2
-  padding-bottom: 1em;
3
-}
4
-
5
-.results__subheader {
6
-  border-bottom: 1px solid black;
7
-  margin: 1.5em 0;
8
-  padding: 5px 0;
9
-}
10
-
11
-.results__result {
12
-  background: #efefef;
13
-  border: 1px solid black;
14
-  border-radius: 5px;
15
-  margin: 1em 0;
16
-  padding: 0.5em;
17
-}
18
-
19
-.results__result.threads .result__info {
20
-  margin-bottom: 0;
21
-}
22
-
23
-.result__info {
24
-  display: flex;
25
-  font-size: 12px;
26
-  justify-content: space-between;
27
-
28
-  @media (max-width: 500px) {
29
-    flex-direction: column;
30
-
31
-    span {
32
-      display: inline-block;
33
-      margin: 5px 0;
34
-    }
35
-  }
36
-}
37
-
38
-.btn--prev {
39
-  margin-right: 1em;
40
-}

Loading…
Cancel
Save