jekyll-theme-teddy 0.3.0 → 0.4.1
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.
- checksums.yaml +4 -4
- data/README.md +19 -0
- data/_layouts/default.html +23 -7
- data/_layouts/home.html +25 -0
- data/_layouts/post.html +22 -0
- data/_sass/code-highlighting.scss +1 -0
- data/_sass/fonts.scss +14 -14
- data/_sass/home-page.scss +66 -0
- data/_sass/jekyll-theme-teddy.scss +81 -5
- data/_sass/mixins.scss +4 -0
- data/_sass/variables.scss +18 -3
- data/assets/css/home.scss +4 -0
- data/assets/images/github-icon.png +0 -0
- data/assets/js/galaxy-animation.js +128 -0
- metadata +37 -17
- data/_sass/Inter.scss +0 -0
- /data/assets/css/{style.scss → default.scss} +0 -0
- /data/assets/{Fonts → fonts}/Inter/cyrillic-ext.woff2 +0 -0
- /data/assets/{Fonts → fonts}/Inter/cyrillic.woff2 +0 -0
- /data/assets/{Fonts → fonts}/Inter/greek-ext.woff2 +0 -0
- /data/assets/{Fonts → fonts}/Inter/greek.woff2 +0 -0
- /data/assets/{Fonts → fonts}/Inter/latin-ext.woff2 +0 -0
- /data/assets/{Fonts → fonts}/Inter/latin.woff2 +0 -0
- /data/assets/{Fonts → fonts}/Inter/vietnamese.woff2 +0 -0
- /data/assets/{Fonts → fonts}/JetbrainsMono/cyrillic-ext.woff2 +0 -0
- /data/assets/{Fonts → fonts}/JetbrainsMono/cyrillic.woff2 +0 -0
- /data/assets/{Fonts → fonts}/JetbrainsMono/greek.woff2 +0 -0
- /data/assets/{Fonts → fonts}/JetbrainsMono/latin-ext.woff2 +0 -0
- /data/assets/{Fonts → fonts}/JetbrainsMono/latin.woff2 +0 -0
- /data/assets/{Fonts → fonts}/JetbrainsMono/vietnamese.woff2 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91c9bfb2e1aa0f74172976fd5732bc3cba660923d46d3e21ba2005739a319bc8
|
4
|
+
data.tar.gz: f9afa1c60c2cd2fd15541102eedcec1207f11ed334ba4bf6598d2ba5786ffd75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0843f573707f56d2b198ffd80ba5fbe06f269e793aa86f86aa31f53e5df3ad4216783c5b084fd5cde647bcdb731382dc9a9be745ffc58030c4f76430bf42b247'
|
7
|
+
data.tar.gz: 5e42d99da7051eaad28b5e8e56ecae5a4858c5b10f4aa114691367791e84495fc712c61bd16fcbc24bc17d89eb38cdf3872bbe078b307d355f5aca4a53dcff81
|
data/README.md
CHANGED
@@ -28,6 +28,25 @@ Or install it yourself as:
|
|
28
28
|
|
29
29
|
$ gem install jekyll-theme-teddy
|
30
30
|
|
31
|
+
## Configuration
|
32
|
+
There are some variables you can use to customize this theme.
|
33
|
+
|
34
|
+
### _config.yml
|
35
|
+
* **source_repository_url**\
|
36
|
+
This will be used to link to your repository and individual files in your repository.
|
37
|
+
* **source_repository_url_path_prefix**\
|
38
|
+
This is the url part that is between your source_repository_url and the page path.
|
39
|
+
On github this is `blob/main`
|
40
|
+
* **last_post**\
|
41
|
+
This is used to add a link to your latest post.
|
42
|
+
|
43
|
+
### front matter
|
44
|
+
* **title**\
|
45
|
+
Adds a h1 title.
|
46
|
+
* **toc (true|false)**\
|
47
|
+
Auto generate table of contents
|
48
|
+
|
49
|
+
|
31
50
|
## Development
|
32
51
|
|
33
52
|
To set up your environment to develop this theme, run `bundle install`.
|
data/_layouts/default.html
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
---
|
2
|
+
css_files:
|
3
|
+
- default
|
4
|
+
---
|
5
|
+
|
1
6
|
<!DOCTYPE html>
|
2
7
|
<html lang="{{ site.lang | default: "en-US" }}">
|
3
8
|
<head>
|
@@ -5,19 +10,30 @@
|
|
5
10
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
6
11
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
7
12
|
|
8
|
-
{% seo %}
|
9
|
-
|
13
|
+
{% seo %}
|
14
|
+
{% if layout.css_files %}
|
15
|
+
{% for css_file in layout.css_files %}
|
16
|
+
<link rel="stylesheet" href="{{ site.baseurl }}/assets/css/{{ css_file }}.css">
|
17
|
+
{% endfor %}
|
18
|
+
{% endif %}
|
10
19
|
</head>
|
11
20
|
<body>
|
12
21
|
|
13
22
|
<main id="content" class="main-content" role="main">
|
14
|
-
{% unless page.url == "/" %}
|
15
|
-
<a href="{{ site.baseurl }}/">Back To Home Page</a>
|
16
|
-
{% endunless %}
|
17
23
|
{{ content }}
|
18
24
|
</main>
|
19
|
-
<footer
|
20
|
-
<span
|
25
|
+
<footer>
|
26
|
+
<span>Hosted on<a href="https://pages.github.com">GitHub Pages</a> powered by <a href="https://jekyllrb.com">Jekyll</a>.</span>
|
27
|
+
{% if site.source_repository_url %}
|
28
|
+
<a id="github-icon" href="{{ site.source_repository_url }}">
|
29
|
+
<img alt="github-icon" src="{{ site.baseurl }}/assets/images/github-icon.png">
|
30
|
+
</a>
|
31
|
+
{% endif %}
|
21
32
|
</footer>
|
33
|
+
{% if layout.js_files %}
|
34
|
+
{% for js_file in layout.js_files %}
|
35
|
+
<script src="{{ site.baseurl }}/assets/js/{{ js_file }}.js"></script>
|
36
|
+
{% endfor %}
|
37
|
+
{% endif %}
|
22
38
|
</body>
|
23
39
|
</html>
|
data/_layouts/home.html
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
css_files:
|
4
|
+
- default
|
5
|
+
- home
|
6
|
+
js_files:
|
7
|
+
- galaxy-animation
|
8
|
+
---
|
9
|
+
|
10
|
+
|
11
|
+
<canvas id="canvas"></canvas>
|
12
|
+
<div id="home-banner">
|
13
|
+
<h1>{{ page.title }}</h1>
|
14
|
+
<h2>{{ page.subtitle }}</h2>
|
15
|
+
<div class="home-banner-links">
|
16
|
+
{% if site.source_repository_url %}
|
17
|
+
<a href="{{ site.source_repository_url }}">Source Repository</a>
|
18
|
+
{% endif %}
|
19
|
+
{% if site.latest_post %}
|
20
|
+
<a href="{{ site.baseurl }}/{{ site.latest_post }}">Read The Latest Post</a>
|
21
|
+
{% endif %}
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
{{ content }}
|
data/_layouts/post.html
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
<div id="top-nav">
|
6
|
+
{% unless page.url == "/" %}
|
7
|
+
<a id="home-link" href="{{ site.baseurl }}/"><- Back To Home Page</a>
|
8
|
+
{% endunless %}
|
9
|
+
|
10
|
+
{% if site.source_repository_url and site.source_repository_url_path_prefix %}
|
11
|
+
<a id="source-link" href="{{ site.source_repository_url }}/{{ site.source_repository_url_path_prefix }}/{{ page.path }}">To Source File</a>
|
12
|
+
{% endif %}
|
13
|
+
</div>
|
14
|
+
|
15
|
+
|
16
|
+
<h1>{{ page.title }}</h1>
|
17
|
+
|
18
|
+
{{ content | toc_only }}
|
19
|
+
|
20
|
+
<hr>
|
21
|
+
|
22
|
+
{{ content | inject_anchors }}
|
data/_sass/fonts.scss
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
/// Inter ///
|
2
2
|
|
3
3
|
/* cyrillic-ext */
|
4
4
|
@font-face {
|
5
5
|
font-family: 'Inter';
|
6
6
|
font-style: normal;
|
7
7
|
font-weight: 400;
|
8
|
-
src: url(../
|
8
|
+
src: url(../fonts/Inter/cyrillic-ext.woff2) format('woff2');
|
9
9
|
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
10
10
|
}
|
11
11
|
/* cyrillic */
|
@@ -13,7 +13,7 @@
|
|
13
13
|
font-family: 'Inter';
|
14
14
|
font-style: normal;
|
15
15
|
font-weight: 400;
|
16
|
-
src: url(../
|
16
|
+
src: url(../fonts/Inter/cyrillic.woff2) format('woff2');
|
17
17
|
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
18
18
|
}
|
19
19
|
/* greek-ext */
|
@@ -21,7 +21,7 @@
|
|
21
21
|
font-family: 'Inter';
|
22
22
|
font-style: normal;
|
23
23
|
font-weight: 400;
|
24
|
-
src: url(../
|
24
|
+
src: url(../fonts/Inter/greek-ext.woff2) format('woff2');
|
25
25
|
unicode-range: U+1F00-1FFF;
|
26
26
|
}
|
27
27
|
/* greek */
|
@@ -29,7 +29,7 @@
|
|
29
29
|
font-family: 'Inter';
|
30
30
|
font-style: normal;
|
31
31
|
font-weight: 400;
|
32
|
-
src: url(../
|
32
|
+
src: url(../fonts/Inter/greek.woff2) format('woff2');
|
33
33
|
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
34
34
|
}
|
35
35
|
/* vietnamese */
|
@@ -37,7 +37,7 @@
|
|
37
37
|
font-family: 'Inter';
|
38
38
|
font-style: normal;
|
39
39
|
font-weight: 400;
|
40
|
-
src: url(../
|
40
|
+
src: url(../fonts/Inter/vietnamese.woff2) format('woff2');
|
41
41
|
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
42
42
|
}
|
43
43
|
/* latin-ext */
|
@@ -45,7 +45,7 @@
|
|
45
45
|
font-family: 'Inter';
|
46
46
|
font-style: normal;
|
47
47
|
font-weight: 400;
|
48
|
-
src: url(../
|
48
|
+
src: url(../fonts/Inter/latin-ext.woff2) format('woff2');
|
49
49
|
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
50
50
|
}
|
51
51
|
/* latin */
|
@@ -53,7 +53,7 @@
|
|
53
53
|
font-family: 'Inter';
|
54
54
|
font-style: normal;
|
55
55
|
font-weight: 400;
|
56
|
-
src: url(../
|
56
|
+
src: url(../fonts/Inter/latin.woff2) format('woff2');
|
57
57
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
58
58
|
}
|
59
59
|
|
@@ -64,7 +64,7 @@
|
|
64
64
|
font-family: 'JetBrains Mono';
|
65
65
|
font-style: normal;
|
66
66
|
font-weight: 400;
|
67
|
-
src: url(../
|
67
|
+
src: url(../fonts/JetbrainsMono/cyrillic-ext.woff2) format('woff2');
|
68
68
|
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
69
69
|
}
|
70
70
|
/* cyrillic */
|
@@ -72,7 +72,7 @@
|
|
72
72
|
font-family: 'JetBrains Mono';
|
73
73
|
font-style: normal;
|
74
74
|
font-weight: 400;
|
75
|
-
src: url(../
|
75
|
+
src: url(../fonts/JetbrainsMono/cyrillic.woff2) format('woff2');
|
76
76
|
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
77
77
|
}
|
78
78
|
/* greek */
|
@@ -80,7 +80,7 @@
|
|
80
80
|
font-family: 'JetBrains Mono';
|
81
81
|
font-style: normal;
|
82
82
|
font-weight: 400;
|
83
|
-
src: url(../
|
83
|
+
src: url(../fonts/JetbrainsMono/greek.woff2) format('woff2');
|
84
84
|
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
85
85
|
}
|
86
86
|
/* vietnamese */
|
@@ -88,7 +88,7 @@
|
|
88
88
|
font-family: 'JetBrains Mono';
|
89
89
|
font-style: normal;
|
90
90
|
font-weight: 400;
|
91
|
-
src: url(../
|
91
|
+
src: url(../fonts/JetbrainsMono/vietnamese.woff2) format('woff2');
|
92
92
|
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
93
93
|
}
|
94
94
|
/* latin-ext */
|
@@ -96,7 +96,7 @@
|
|
96
96
|
font-family: 'JetBrains Mono';
|
97
97
|
font-style: normal;
|
98
98
|
font-weight: 400;
|
99
|
-
src: url(../
|
99
|
+
src: url(../fonts/JetbrainsMono/latin-ext.woff2) format('woff2');
|
100
100
|
unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
101
101
|
}
|
102
102
|
/* latin */
|
@@ -104,6 +104,6 @@
|
|
104
104
|
font-family: 'JetBrains Mono';
|
105
105
|
font-style: normal;
|
106
106
|
font-weight: 400;
|
107
|
-
src: url(../
|
107
|
+
src: url(../fonts/JetbrainsMono/latin.woff2) format('woff2');
|
108
108
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
109
109
|
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
@import "variables";
|
2
|
+
@import "mixins";
|
3
|
+
|
4
|
+
html {
|
5
|
+
background: linear-gradient(180deg, black 25%, $main-bg 50%);
|
6
|
+
}
|
7
|
+
|
8
|
+
#home-banner {
|
9
|
+
margin: 4% 0 6% 0;
|
10
|
+
padding-bottom: 4%;
|
11
|
+
display: flex;
|
12
|
+
justify-content: center;
|
13
|
+
flex-direction: column;
|
14
|
+
|
15
|
+
h1, h2 {
|
16
|
+
align-self: center;
|
17
|
+
}
|
18
|
+
|
19
|
+
h1 {
|
20
|
+
font-size: $main-title;
|
21
|
+
}
|
22
|
+
|
23
|
+
h2 {
|
24
|
+
font-size: $sub-title;
|
25
|
+
margin: 0 0 50px 0;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
hr {
|
30
|
+
margin: 30px 0 30px 0;
|
31
|
+
}
|
32
|
+
|
33
|
+
ul, li {
|
34
|
+
margin: 8px;
|
35
|
+
}
|
36
|
+
|
37
|
+
#canvas {
|
38
|
+
position: absolute;
|
39
|
+
top: 0;
|
40
|
+
left: 0;
|
41
|
+
z-index: -1;
|
42
|
+
}
|
43
|
+
|
44
|
+
.home-banner-links {
|
45
|
+
display: flex;
|
46
|
+
justify-content: center;
|
47
|
+
flex-direction: row;
|
48
|
+
|
49
|
+
a {
|
50
|
+
@include blankLink();
|
51
|
+
font-weight: bold;
|
52
|
+
|
53
|
+
border-style: solid;
|
54
|
+
border-width: 1px;
|
55
|
+
border-color: $primary-color-faded;
|
56
|
+
border-radius: 20px;
|
57
|
+
|
58
|
+
box-shadow: 0 0 8px 4px $primary-color-faded inset, 0 0 8px 4px $primary-color-faded;
|
59
|
+
|
60
|
+
padding: 15px;
|
61
|
+
margin: 0 5% 0 5%;
|
62
|
+
|
63
|
+
text-align: center;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
@@ -12,8 +12,28 @@ body {
|
|
12
12
|
margin: 0;
|
13
13
|
}
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
@media (min-width: $large-screen) {
|
16
|
+
main {
|
17
|
+
margin: 2% 20% 5% 20%;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
@media (min-width: $medium-screen) and (max-width: $large-screen - 1px) {
|
22
|
+
main {
|
23
|
+
margin: 2% 15% 5% 15%;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
@media (min-width: $small-screen) and (max-width: $medium-screen - 1px) {
|
28
|
+
main {
|
29
|
+
margin: 2% 10% 5% 10%;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
@media (max-width: $small-screen - 1px) {
|
34
|
+
main {
|
35
|
+
margin: 2% 5% 5% 5%;
|
36
|
+
}
|
17
37
|
}
|
18
38
|
|
19
39
|
img {
|
@@ -51,10 +71,14 @@ h6 {
|
|
51
71
|
}
|
52
72
|
|
53
73
|
p, li, br, a, span {
|
54
|
-
font-size:
|
74
|
+
font-size: $regular-text-size;
|
55
75
|
line-height: 1.5;
|
56
76
|
}
|
57
77
|
|
78
|
+
ul, li {
|
79
|
+
margin: 4px 0 4px 0;
|
80
|
+
}
|
81
|
+
|
58
82
|
a:link {
|
59
83
|
color: $link-normal;
|
60
84
|
}
|
@@ -78,12 +102,15 @@ th, td {
|
|
78
102
|
border-style: solid;
|
79
103
|
border-width: 1px;
|
80
104
|
padding: 3px;
|
81
|
-
border-color: $
|
105
|
+
border-color: $primary-color;
|
82
106
|
}
|
83
107
|
|
84
108
|
table {
|
85
109
|
border-spacing: 0;
|
86
110
|
border-collapse: collapse;
|
111
|
+
display: block;
|
112
|
+
overflow: auto;
|
113
|
+
white-space: nowrap;
|
87
114
|
}
|
88
115
|
|
89
116
|
footer {
|
@@ -95,5 +122,54 @@ footer {
|
|
95
122
|
}
|
96
123
|
|
97
124
|
footer span {
|
98
|
-
margin:
|
125
|
+
margin: 10px 10px 10px 40px;
|
126
|
+
grid-column: 1;
|
127
|
+
grid-row: 1;
|
128
|
+
}
|
129
|
+
|
130
|
+
footer {
|
131
|
+
display: grid;
|
132
|
+
grid-template-columns: 1fr 1fr 1fr;
|
133
|
+
grid-template-rows: 1fr;
|
134
|
+
align-items: center;
|
135
|
+
}
|
136
|
+
|
137
|
+
#github-icon {
|
138
|
+
height: 50px;
|
139
|
+
width: 50px;
|
140
|
+
|
141
|
+
margin: 10px 50px 10px 10px;
|
142
|
+
|
143
|
+
grid-column: 3;
|
144
|
+
grid-row: 1;
|
145
|
+
justify-self: end;
|
146
|
+
}
|
147
|
+
|
148
|
+
#top-nav {
|
149
|
+
display: grid;
|
150
|
+
grid-template-columns: 1fr 1fr 1fr;
|
151
|
+
grid-template-rows: 1fr;
|
152
|
+
|
153
|
+
a {
|
154
|
+
text-decoration: inherit;
|
155
|
+
font-weight: bold;
|
156
|
+
}
|
157
|
+
}
|
158
|
+
|
159
|
+
#home-link {
|
160
|
+
grid-column: 1;
|
161
|
+
grid-row: 1;
|
162
|
+
|
163
|
+
justify-self: start;
|
164
|
+
}
|
165
|
+
|
166
|
+
#source-link {
|
167
|
+
grid-column: 3;
|
168
|
+
grid-row: 1;
|
169
|
+
|
170
|
+
justify-self: end;
|
171
|
+
}
|
172
|
+
|
173
|
+
#toc {
|
174
|
+
margin: 0 0 30px 0;
|
99
175
|
}
|
data/_sass/mixins.scss
ADDED
data/_sass/variables.scss
CHANGED
@@ -1,13 +1,23 @@
|
|
1
|
-
//
|
1
|
+
// Home Header
|
2
|
+
$main-title: 50pt !default;
|
3
|
+
$sub-title: 26pt !default;
|
4
|
+
|
5
|
+
// Header/Text Size
|
2
6
|
$h1-font-size: 30pt !default;
|
3
7
|
$h2-font-size: 24pt !default;
|
4
8
|
$h3-font-size: 22pt !default;
|
5
9
|
$h4-font-size: 20pt !default;
|
6
10
|
$h5-font-size: 18pt !default;
|
7
11
|
$h6-font-size: 16pt !default;
|
12
|
+
$regular-text-size: 12pt !default;
|
13
|
+
|
14
|
+
// General Colors
|
15
|
+
$primary-color: #C9C9D1 !default;
|
16
|
+
$primary-color-slightly-faded: rgba(201, 201, 209, 0.6) !default;
|
17
|
+
$primary-color-faded: rgba(201, 201, 209, 0.4) !default;
|
8
18
|
|
9
19
|
// Text
|
10
|
-
$text-color:
|
20
|
+
$text-color: $primary-color !default;
|
11
21
|
|
12
22
|
// Background
|
13
23
|
$main-bg: #1D1D26 !default;
|
@@ -21,4 +31,9 @@ $code-text-color: $text-color !default;
|
|
21
31
|
|
22
32
|
// Links
|
23
33
|
$link-normal: #0071e0 !default;
|
24
|
-
$link-visited: #7540b2 !default;
|
34
|
+
$link-visited: #7540b2 !default;
|
35
|
+
|
36
|
+
// Responsive Sizes
|
37
|
+
$large-screen: 2000px !default;
|
38
|
+
$medium-screen: 1000px !default;
|
39
|
+
$small-screen: 700px !default;
|
Binary file
|
@@ -0,0 +1,128 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(Element.prototype, 'outerHeight', {
|
4
|
+
'get': function(){
|
5
|
+
var height = this.clientHeight;
|
6
|
+
var computedStyle = window.getComputedStyle(this);
|
7
|
+
height += parseInt(computedStyle.marginTop, 10);
|
8
|
+
height += parseInt(computedStyle.borderTopWidth, 10);
|
9
|
+
height += parseInt(computedStyle.borderBottomWidth, 10);
|
10
|
+
return height;
|
11
|
+
}
|
12
|
+
});
|
13
|
+
|
14
|
+
let canvas = document.getElementById('canvas');
|
15
|
+
let banner = document.getElementById('home-banner')
|
16
|
+
|
17
|
+
let ctx = canvas.getContext('2d');
|
18
|
+
let w;
|
19
|
+
let h;
|
20
|
+
|
21
|
+
let stars = [];
|
22
|
+
let count = 0;
|
23
|
+
|
24
|
+
const hue = 260;
|
25
|
+
const maxStars = 200;
|
26
|
+
const background = "black";
|
27
|
+
|
28
|
+
// Cache gradient
|
29
|
+
let canvas2 = document.createElement('canvas');
|
30
|
+
let ctx2 = canvas2.getContext('2d');
|
31
|
+
|
32
|
+
canvas2.width = 100;
|
33
|
+
canvas2.height = 100;
|
34
|
+
|
35
|
+
let half = canvas2.width/2;
|
36
|
+
let gradient2 = ctx2.createRadialGradient(half, half, 0, half, half, half);
|
37
|
+
|
38
|
+
gradient2.addColorStop(0.025, '#fff');
|
39
|
+
gradient2.addColorStop(0.1, 'hsl(' + hue + ', 61%, 100%)');
|
40
|
+
gradient2.addColorStop(0.25, 'hsl(' + hue + ', 64%, 0%)');
|
41
|
+
gradient2.addColorStop(1, 'transparent');
|
42
|
+
|
43
|
+
ctx2.fillStyle = gradient2;
|
44
|
+
ctx2.beginPath();
|
45
|
+
ctx2.arc(half, half, half, 0, Math.PI * 2);
|
46
|
+
ctx2.fill();
|
47
|
+
|
48
|
+
// End cache
|
49
|
+
|
50
|
+
function setSize() {
|
51
|
+
w = canvas.width = document.getElementsByTagName("html")[0].clientWidth;
|
52
|
+
h = canvas.height = banner.outerHeight;
|
53
|
+
}
|
54
|
+
|
55
|
+
setSize();
|
56
|
+
|
57
|
+
function random(min, max) {
|
58
|
+
if (arguments.length < 2) {
|
59
|
+
max = min;
|
60
|
+
min = 0;
|
61
|
+
}
|
62
|
+
|
63
|
+
if (min > max) {
|
64
|
+
let hold = max;
|
65
|
+
max = min;
|
66
|
+
min = hold;
|
67
|
+
}
|
68
|
+
|
69
|
+
return Math.floor(Math.random() * (max - min + 1)) + min;
|
70
|
+
}
|
71
|
+
|
72
|
+
function maxOrbit(x,y) {
|
73
|
+
let max = Math.max(x,y),
|
74
|
+
diameter = Math.round(Math.sqrt(max*max + max*max));
|
75
|
+
return diameter/2;
|
76
|
+
}
|
77
|
+
|
78
|
+
let Star = function() {
|
79
|
+
|
80
|
+
this.orbitRadius = random(maxOrbit(w/1.75,h/1.75));
|
81
|
+
this.radius = random(60, this.orbitRadius) / 12;
|
82
|
+
this.orbitX = w / 2;
|
83
|
+
this.orbitY = h / 2;
|
84
|
+
this.timePassed = random(0, maxStars);
|
85
|
+
this.speed = random(this.orbitRadius) / 1000000;
|
86
|
+
this.alpha = random(2, 10) / 10;
|
87
|
+
|
88
|
+
count++;
|
89
|
+
stars[count] = this;
|
90
|
+
}
|
91
|
+
|
92
|
+
Star.prototype.draw = function() {
|
93
|
+
let x = Math.sin(this.timePassed) * this.orbitRadius + this.orbitX,
|
94
|
+
y = Math.cos(this.timePassed) * this.orbitRadius + this.orbitY
|
95
|
+
|
96
|
+
ctx.globalAlpha = this.alpha;
|
97
|
+
ctx.drawImage(canvas2, x - this.radius / 2, y - this.radius / 2, this.radius, this.radius);
|
98
|
+
this.timePassed += this.speed;
|
99
|
+
}
|
100
|
+
|
101
|
+
for (let i = 0; i < maxStars; i++) {
|
102
|
+
new Star();
|
103
|
+
}
|
104
|
+
|
105
|
+
function animation() {
|
106
|
+
ctx.globalCompositeOperation = 'source-over';
|
107
|
+
ctx.globalAlpha = 0.8;
|
108
|
+
ctx.fillStyle = background;
|
109
|
+
ctx.fillRect(0, 0, w, h)
|
110
|
+
|
111
|
+
ctx.globalCompositeOperation = 'lighter';
|
112
|
+
for (let i = 1, l = stars.length; i < l; i++) {
|
113
|
+
stars[i].draw();
|
114
|
+
};
|
115
|
+
|
116
|
+
window.requestAnimationFrame(animation);
|
117
|
+
}
|
118
|
+
|
119
|
+
animation();
|
120
|
+
|
121
|
+
window.addEventListener('resize', () => {
|
122
|
+
setSize();
|
123
|
+
stars = [];
|
124
|
+
count = 0;
|
125
|
+
for (let i = 0; i < maxStars; i++) {
|
126
|
+
new Star();
|
127
|
+
}
|
128
|
+
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-teddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Teddy55Codes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '2.0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: jekyll-toc
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.19.0
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.19.0
|
47
61
|
description:
|
48
62
|
email:
|
49
63
|
- teddy@teddy.email
|
@@ -54,26 +68,32 @@ files:
|
|
54
68
|
- LICENSE.txt
|
55
69
|
- README.md
|
56
70
|
- _layouts/default.html
|
57
|
-
-
|
71
|
+
- _layouts/home.html
|
72
|
+
- _layouts/post.html
|
58
73
|
- _sass/code-highlighting.scss
|
59
74
|
- _sass/fonts.scss
|
75
|
+
- _sass/home-page.scss
|
60
76
|
- _sass/jekyll-theme-teddy.scss
|
77
|
+
- _sass/mixins.scss
|
61
78
|
- _sass/teddy.scss
|
62
79
|
- _sass/variables.scss
|
63
|
-
- assets/
|
64
|
-
- assets/
|
65
|
-
- assets/
|
66
|
-
- assets/
|
67
|
-
- assets/
|
68
|
-
- assets/
|
69
|
-
- assets/
|
70
|
-
- assets/
|
71
|
-
- assets/
|
72
|
-
- assets/
|
73
|
-
- assets/
|
74
|
-
- assets/
|
75
|
-
- assets/
|
76
|
-
- assets/
|
80
|
+
- assets/css/default.scss
|
81
|
+
- assets/css/home.scss
|
82
|
+
- assets/fonts/Inter/cyrillic-ext.woff2
|
83
|
+
- assets/fonts/Inter/cyrillic.woff2
|
84
|
+
- assets/fonts/Inter/greek-ext.woff2
|
85
|
+
- assets/fonts/Inter/greek.woff2
|
86
|
+
- assets/fonts/Inter/latin-ext.woff2
|
87
|
+
- assets/fonts/Inter/latin.woff2
|
88
|
+
- assets/fonts/Inter/vietnamese.woff2
|
89
|
+
- assets/fonts/JetbrainsMono/cyrillic-ext.woff2
|
90
|
+
- assets/fonts/JetbrainsMono/cyrillic.woff2
|
91
|
+
- assets/fonts/JetbrainsMono/greek.woff2
|
92
|
+
- assets/fonts/JetbrainsMono/latin-ext.woff2
|
93
|
+
- assets/fonts/JetbrainsMono/latin.woff2
|
94
|
+
- assets/fonts/JetbrainsMono/vietnamese.woff2
|
95
|
+
- assets/images/github-icon.png
|
96
|
+
- assets/js/galaxy-animation.js
|
77
97
|
homepage: https://github.com/Teddy55Codes/jekyll-theme-teddy
|
78
98
|
licenses:
|
79
99
|
- MIT
|
data/_sass/Inter.scss
DELETED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|