dev-portfolio-blog 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/_sass/main.scss CHANGED
@@ -1,322 +1,272 @@
1
- @mixin mediaQuery($point) {
2
- @if $point==phone-width {
3
- @media (max-width: 480px) {
4
- @content;
5
- }
6
- }
7
-
8
- @else if $point==tablet-width {
9
- @media (max-width: 768px) {
10
- @content;
11
- }
12
- }
13
- }
14
-
15
- html {
16
- --primary-background-color: white;
17
- --primary-text-color: #222;
18
- --primary-highlight-color: #eeeeee;
19
- padding: 0;
20
- margin: 0;
21
- }
22
-
23
- body {
24
- background-color: var(--primary-background-color);
25
- color: var(--primary-text-color);
26
- transition: background 0.1s ease-in, color 0.1s ease-in;
27
- // font-size: 120%;
28
- }
29
-
30
- .mid-section-home {
31
- text-align: center;
32
- display: flex;
33
- flex-direction: column;
34
- justify-content: center;
35
- align-content: center;
36
- width: 100%;
37
- max-width: 400px;
38
- height: 100vh;
39
- margin: auto;
40
- font-size: 1.5rem;
41
-
42
- @include mediaQuery(phone-width) {
43
- font-size: 1 rem;
44
-
45
- span {
46
- display: none;
47
- }
48
- }
49
-
50
- h1 {
51
- font-size: 3.5rem;
52
- font-weight: 600;
53
- }
54
- }
55
-
56
- .sub-heading {
57
- width: 80%;
58
- margin: 0 auto;
59
- display: flex;
60
-
61
- @include mediaQuery(phone-width) {
62
- width: 60%;
63
- min-width: 270px;
64
- }
65
- }
66
-
67
- .summary-about-me {
68
- width: 50%;
69
- text-align: right;
70
- padding-right: 20px;
71
- }
72
-
73
- .nav-link {
74
- ul {
75
- padding-inline-start: 0;
76
- }
77
-
78
- li {
79
- display: block;
80
- text-align: left;
81
-
82
- a {
83
- text-decoration: none;
84
- color: var(--primary-text-color);
85
-
86
- &:hover {
87
- border-bottom: 2px solid var(--primary-text-color);
88
- color: var(--primary-text-color);
89
- }
90
- }
91
- }
92
-
93
- border-left: 2px solid var(--primary-text-color);
94
- width: 50%;
95
- padding-left: 20px;
96
-
97
- // .toNav {
98
- // }
99
- @include mediaQuery(phone-width) {
100
- li {
101
- display: block;
102
- margin-left: 10px;
103
- }
104
- }
105
- }
106
-
107
- .mid-section-cover {
108
- width: 60%;
109
- margin: 0 auto;
110
- margin-top: 50px;
111
-
112
- @include mediaQuery(tablet-width) {
113
- width: 70%;
114
- }
115
-
116
- @include mediaQuery(phone-width) {
117
- width: 95%;
118
- }
119
-
120
- nav {
121
- display: flex;
122
- flex-direction: row;
123
- justify-content: space-between;
124
- flex-wrap: wrap;
125
- border-bottom: 2px solid var(--primary-text-color);
126
-
127
- h1 {
128
- // align-self: flex-start;
129
- font-size: 40px;
130
- flex-grow: 2;
131
- text-align: left;
132
- margin: 10px;
133
- }
134
-
135
- ul {
136
- display: flex;
137
- flex-direction: row;
138
- flex-wrap: wrap;
139
- justify-content: flex-end;
140
- align-items: center;
141
- flex-grow: 5;
142
- padding-inline-start: 0;
143
-
144
- li {
145
- padding: 0 20px;
146
- list-style-type: none;
147
-
148
- a {
149
- text-decoration: none;
150
- color: var(--primary-text-color);
151
-
152
- &:hover {
153
- border-bottom: 2px solid var(--primary-text-color);
154
- color: var(--primary-text-color);
155
- }
156
- }
157
-
158
- @include mediaQuery(phone-width) {
159
- text-align: center;
160
- padding: 0 10px;
161
- }
162
- }
163
- }
164
-
165
- @include mediaQuery(tablet-width) {
166
- flex-direction: column;
167
- justify-content: center;
168
- align-items: center;
169
-
170
- ul {
171
- justify-content: center;
172
- }
173
-
174
- h1 {
175
- text-align: center;
176
- }
177
- }
178
- }
179
-
180
- .sub-mid-section-cover {
181
- width: 100%;
182
- margin: 0 auto;
183
- overflow: hidden;
184
-
185
- img {
186
- max-width: 100%;
187
- }
188
-
189
- a {
190
- color: var(--primary-text-color);
191
-
192
- nav {
193
- display: flex;
194
- flex-direction: row;
195
- justify-content: space-between;
196
- flex-wrap: wrap;
197
- border-bottom: 2px solid var(--primary-text-color);
198
-
199
- h1 {
200
- // align-self: flex-start;
201
- font-size: 40px;
202
- flex-grow: 2;
203
- text-align: left;
204
- margin: 10px;
205
- }
206
-
207
- ul {
208
- display: flex;
209
- flex-direction: row;
210
- flex-wrap: wrap;
211
- justify-content: flex-end;
212
- align-items: center;
213
- flex-grow: 5;
214
- padding-inline-start: 0;
215
-
216
- li {
217
- padding: 0 20px;
218
- list-style-type: none;
219
-
220
- a {
221
- text-decoration: none;
222
- color: var(--primary-text-color);
223
-
224
- &:hover {
225
- border-bottom: 2px solid var(--primary-text-color);
226
- color: var(--primary-text-color);
227
- }
228
- }
229
-
230
- @include mediaQuery(phone-width) {
231
- text-align: center;
232
- padding: 0 10px;
233
- }
234
- }
235
- }
236
-
237
- @include mediaQuery(tablet-width) {
238
- flex-direction: column;
239
- justify-content: center;
240
- align-items: center;
241
-
242
- ul {
243
- justify-content: center;
244
- }
245
-
246
- h1 {
247
- text-align: center;
248
- }
249
- }
250
- }
251
- }
252
- }
253
- }
254
-
255
- #themeSelector {
256
- position: fixed;
257
- top: 5px;
258
- right: 5px;
259
- background: var(--primary-background-color);
260
- color: var(--primary-text-color);
261
- border-radius: 5px;
262
- border: 0;
263
- }
264
-
265
- .post-footer {
266
- margin-top: 50px;
267
- display: flex;
268
- flex-direction: row-reverse;
269
- justify-content: space-between;
270
- align-items: center;
271
- }
272
-
273
- .blog-list {
274
- list-style: none;
275
- padding-left: 0;
276
-
277
- li {
278
- margin-bottom: 50px;
279
-
280
- .excerpt {
281
- font-size: 15px;
282
- }
283
-
284
- .blog-heading {
285
- font-size: 25px;
286
- font-weight: 800;
287
- }
288
-
289
- .date {
290
- font-size: 15px;
291
- opacity: 0.8;
292
- margin-left: 20px;
293
- }
294
- }
295
- }
296
-
297
- .blogPage-categoryList {
298
- ul {
299
- list-style-type: none;
300
- display: flex;
301
- flex-wrap: wrap;
302
- padding-left: 0;
303
-
304
- li {
305
- margin: 10px 10px;
306
- }
307
-
308
- li:first-child {
309
- margin-left: 0;
310
- }
311
- }
312
- }
313
-
314
-
315
- //custom md tags styles
316
- div.highlight {
317
- background: var(--primary-highlight-color);
318
- padding: 5px;
319
- border-radius: 5px;
320
- margin: 10px 0px;
321
- overflow: auto;
1
+ @mixin mediaQuery($point) {
2
+ @if $point == phone-width {
3
+ @media (max-width: 480px) {
4
+ @content;
5
+ }
6
+ } @else if $point == tablet-width {
7
+ @media (max-width: 768px) {
8
+ @content;
9
+ }
10
+ }
11
+ }
12
+ html {
13
+ --primary-background-color: white;
14
+ --primary-text-color: #222;
15
+ --primary-highlight-color: #eeeeee;
16
+ padding: 0;
17
+ margin: 0;
18
+ }
19
+
20
+ body {
21
+ background-color: var(--primary-background-color);
22
+ color: var(--primary-text-color);
23
+ transition: background 0.1s ease-in, color 0.1s ease-in;
24
+ // font-size: 120%;
25
+ }
26
+ .mid-section-home {
27
+ text-align: center;
28
+ display: flex;
29
+ flex-direction: column;
30
+ justify-content: center;
31
+ align-content: center;
32
+ width: 100%;
33
+ max-width: 400px;
34
+ height: 100vh;
35
+ margin: auto;
36
+ font-size: 1.5rem;
37
+ @include mediaQuery(phone-width) {
38
+ font-size: 1 rem;
39
+ span {
40
+ display: none;
41
+ }
42
+ }
43
+ h1 {
44
+ font-size: 3.5rem;
45
+ font-weight: 600;
46
+ }
47
+ }
48
+ .sub-heading {
49
+ width: 80%;
50
+ margin: 0 auto;
51
+ display: flex;
52
+
53
+ @include mediaQuery(phone-width) {
54
+ width: 60%;
55
+ min-width: 270px;
56
+ }
57
+ }
58
+ .summary-about-me {
59
+ width: 50%;
60
+ text-align: right;
61
+ padding-right: 20px;
62
+ }
63
+ .nav-link {
64
+ ul {
65
+ padding-inline-start: 0;
66
+ }
67
+ li {
68
+ display: block;
69
+ text-align: left;
70
+ a {
71
+ text-decoration: none;
72
+ color: var(--primary-text-color);
73
+ &:hover {
74
+ border-bottom: 2px solid var(--primary-text-color);
75
+ color: var(--primary-text-color);
76
+ }
77
+ }
78
+ }
79
+ border-left: 2px solid var(--primary-text-color);
80
+ width: 50%;
81
+ padding-left: 20px;
82
+ // .toNav {
83
+ // }
84
+ @include mediaQuery(phone-width) {
85
+ li {
86
+ display: block;
87
+ margin-left: 10px;
88
+ }
89
+ }
90
+ }
91
+ .mid-section-cover {
92
+ width: 60%;
93
+ margin: 0 auto;
94
+ margin-top: 50px;
95
+ @include mediaQuery(tablet-width) {
96
+ width: 70%;
97
+ }
98
+ @include mediaQuery(phone-width) {
99
+ width: 95%;
100
+ }
101
+ nav {
102
+ display: flex;
103
+ flex-direction: row;
104
+ justify-content: space-between;
105
+ flex-wrap: wrap;
106
+ border-bottom: 2px solid var(--primary-text-color);
107
+ h1 {
108
+ // align-self: flex-start;
109
+ font-size: 40px;
110
+ flex-grow: 2;
111
+ text-align: left;
112
+ margin: 10px;
113
+ }
114
+ ul {
115
+ display: flex;
116
+ flex-direction: row;
117
+ flex-wrap: wrap;
118
+ justify-content: flex-end;
119
+ align-items: center;
120
+ flex-grow: 5;
121
+ padding-inline-start: 0;
122
+ li {
123
+ padding: 0 20px;
124
+ list-style-type: none;
125
+ a {
126
+ text-decoration: none;
127
+ color: var(--primary-text-color);
128
+ &:hover {
129
+ border-bottom: 2px solid var(--primary-text-color);
130
+ color: var(--primary-text-color);
131
+ }
132
+ }
133
+ @include mediaQuery(phone-width) {
134
+ text-align: center;
135
+ padding: 0 10px;
136
+ }
137
+ }
138
+ }
139
+ @include mediaQuery(tablet-width) {
140
+ flex-direction: column;
141
+ justify-content: center;
142
+ align-items: center;
143
+ ul {
144
+ justify-content: center;
145
+ }
146
+ h1 {
147
+ text-align: center;
148
+ }
149
+ }
150
+ }
151
+ .sub-mid-section-cover {
152
+ width: 100%;
153
+ margin: 0 auto;
154
+ overflow: hidden;
155
+ img {
156
+ max-width: 100%;
157
+ }
158
+ a {
159
+ color: var(--primary-text-color);
160
+ nav {
161
+ display: flex;
162
+ flex-direction: row;
163
+ justify-content: space-between;
164
+ flex-wrap: wrap;
165
+ border-bottom: 2px solid var(--primary-text-color);
166
+ h1 {
167
+ // align-self: flex-start;
168
+ font-size: 40px;
169
+ flex-grow: 2;
170
+ text-align: left;
171
+ margin: 10px;
172
+ }
173
+ ul {
174
+ display: flex;
175
+ flex-direction: row;
176
+ flex-wrap: wrap;
177
+ justify-content: flex-end;
178
+ align-items: center;
179
+ flex-grow: 5;
180
+ padding-inline-start: 0;
181
+ li {
182
+ padding: 0 20px;
183
+ list-style-type: none;
184
+ a {
185
+ text-decoration : none;
186
+ color: var(--primary-text-color);
187
+ &:hover {
188
+ border-bottom: 2px solid var(--primary-text-color);
189
+ color: var(--primary-text-color);
190
+ }
191
+ }
192
+ @include mediaQuery(phone-width) {
193
+ text-align: center;
194
+ padding: 0 10px;
195
+ }
196
+ }
197
+ }
198
+ @include mediaQuery(tablet-width) {
199
+ flex-direction: column;
200
+ justify-content: center;
201
+ align-items: center;
202
+ ul {
203
+ justify-content: center;
204
+ }
205
+ h1 {
206
+ text-align: center;
207
+ }
208
+ }
209
+ }
210
+ }
211
+ }
212
+
213
+ #themeSelector {
214
+ position: fixed;
215
+ top: 5px;
216
+ right: 5px;
217
+ background: var(--primary-background-color);
218
+ color: var(--primary-text-color);
219
+ border-radius: 5px;
220
+ border: 0;
221
+ }
222
+ .post-footer {
223
+ margin-top: 50px;
224
+ display: flex;
225
+ flex-direction: row-reverse;
226
+ justify-content: space-between;
227
+ align-items: center;
228
+ }
229
+ .blog-list {
230
+ list-style: none;
231
+ padding-left: 0;
232
+ li {
233
+ margin-bottom: 50px;
234
+ .excerpt {
235
+ font-size: 15px;
236
+ }
237
+ .blog-heading {
238
+ font-size: 25px;
239
+ font-weight: 800;
240
+ }
241
+ .date {
242
+ font-size: 15px;
243
+ opacity: 0.8;
244
+ margin-left: 20px;
245
+ }
246
+ }
247
+ }
248
+ .blogPage-categoryList {
249
+ ul {
250
+ list-style-type: none;
251
+ display: flex;
252
+ flex-wrap: wrap;
253
+ padding-left: 0;
254
+ li {
255
+ margin: 10px 10px;
256
+ }
257
+ li:first-child {
258
+ margin-left: 0;
259
+ }
260
+ }
261
+ }
262
+
263
+
264
+ //custom md tags styles
265
+ div.highlight {
266
+ background: var(--primary-highlight-color);
267
+ padding: 5px;
268
+ border-radius: 5px;
269
+ margin: 10px 0px;
270
+ overflow: auto;
271
+ }
322
272
  }
@@ -1,3 +1,3 @@
1
- ---
2
- ---
3
- @import "main";
1
+ ---
2
+ ---
3
+ @use "main";
data/assets/js/script.js CHANGED
@@ -1,30 +1,31 @@
1
- function onLoad() {
2
- var themeSelector = document.getElementById('themeSelector');
3
- for (var themeName in themeMap) {
4
- var opt = document.createElement('option');
5
- opt.value = themeName;
6
- opt.innerHTML = capitalizeFirstLetter(themeName);
7
- themeSelector.appendChild(opt);
8
- }
9
- if (localStorage.getItem('theme') != null) {
10
- themeSelector.value = localStorage.getItem('theme');
11
- toggleTheme();
12
- }
13
- }
14
-
15
- function toggleTheme() {
16
- var themeName = themeSelector.value;
17
- localStorage.setItem('theme', themeName);
18
- var element = document.getElementsByTagName('html')[0];
19
- changeTheme(element, themeMap[themeName]);
20
- }
21
-
22
- function changeTheme(element, theme) {
23
- element.style.setProperty("--primary-background-color", theme['background-color']);
24
- element.style.setProperty("--primary-text-color", theme['text-color']);
25
- element.style.setProperty("--primary-highlight-color", theme['highlight-color']);
26
- }
27
-
28
- function capitalizeFirstLetter(string) {
29
- return string.charAt(0).toUpperCase() + string.slice(1);
1
+ function onLoad() {
2
+ var themeSelector = document.getElementById('themeSelector');
3
+ for (var themeName in themeMap) {
4
+ var opt = document.createElement('option');
5
+ opt.value = themeName;
6
+ opt.innerHTML = capitalizeFirstLetter(themeName);
7
+ themeSelector.appendChild(opt);
8
+ }
9
+ const theme = localStorage.getItem('theme');
10
+ if (theme != null) {
11
+ themeSelector.value = theme;
12
+ toggleTheme();
13
+ }
14
+ }
15
+
16
+ function toggleTheme() {
17
+ var themeName = themeSelector.value;
18
+ localStorage.setItem('theme', themeName);
19
+ var element = document.documentElement;
20
+ changeTheme(element, themeMap[themeName]);
21
+ }
22
+
23
+ function changeTheme(element, theme) {
24
+ element.style.setProperty("--primary-background-color", theme['background-color']);
25
+ element.style.setProperty("--primary-text-color", theme['text-color']);
26
+ element.style.setProperty("--primary-highlight-color", theme['highlight-color']);
27
+ }
28
+
29
+ function capitalizeFirstLetter(string) {
30
+ return string.charAt(0).toUpperCase() + string.slice(1);
30
31
  }