jekyll-theme-iamlynnmckay 0.0.9 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ad49a72b350a9e0e38290d51c9c5d1a517767b0d71ce3d8fc3f12aaf722dea3
4
- data.tar.gz: 86d59cf9d4dbe9ab7c8939873631c9e5668cf7536e31432710dbefa9af46c935
3
+ metadata.gz: 509bc36b22e1de6ac5a0823447a3c41cc81944be144649a51391385be3cb79fc
4
+ data.tar.gz: 4b8a5ef4d930d59b013722f8c17c633028644e15b0c75da2f15d322098a2533b
5
5
  SHA512:
6
- metadata.gz: 120826aabeea708c3b741d111b34166f179be7f7df8f75060f738338c38e05e176ed9f8cdb0c7c62868c6afae0369defbcc9b3d85721236e22e1eb079dcb0a08
7
- data.tar.gz: 9925b4c1115227b5694e37a8945d920589133d004d2d7b1bc920842297404e18e737527a1454f6bfff5c5eda2fa1f92278489a45d27ba6bbcebd9eed9cd4b5a4
6
+ metadata.gz: a170cf96aa40b0347928c3d91cc1417a6efe548635c42145047174f833e87c1da8be49ee4b159b221a1e76a07401cc1b4b1ebfc2385f9123067c4c9544bb0bad
7
+ data.tar.gz: 615bf71dfeff01079b2b45d012f7002d4683fca85de785c00f8d1280e3dc756a70653516ccb42afebb8980d708d421cf96dcc9531d0247118ff3030ec6833749
data/_config.yml CHANGED
@@ -9,14 +9,17 @@ show_footer: true
9
9
  show_categories: true
10
10
  show_homepage_links: true
11
11
  homepage_links:
12
- - 'about'
13
- - 'contact'
14
- - 'blog'
12
+ - 'posts'
13
+ - 'pages'
14
+ - 'debug'
15
15
  show_links_in_header: false
16
16
  show_posts: true
17
17
 
18
18
  theme: jekyll-theme-iamlynnmckay
19
19
 
20
+ # posts permalink
21
+ permalink: /:categories/:title
22
+
20
23
  # minima
21
24
  email: iamlynnmckay@gmail.com
22
25
  baseurl: ""
@@ -27,29 +30,19 @@ github_username: iamlynnmckay
27
30
  author: "Lynn McKay"
28
31
  url: "https://iamlynnmckay.com"
29
32
  title: "@iamlynnmckay"
30
- description: "Lynn's things and stuff."
33
+ description: "lynn's things and stuff."
31
34
  twitter:
32
35
  username: "iamlynnmckay"
33
36
  card: "site.twitter.card"
34
37
  logo: "assets/images/logo.svg"
35
38
 
36
- # jekyll-scholar
37
- scholar:
38
- style: apa
39
-
40
39
  # plugins
41
40
  plugins:
42
41
  - jekyll-feed
43
42
  - jekyll-seo-tag
44
43
  - jekyll-sitemap
45
- # - jekyll-scholar
46
44
  # - jekyll-postcss
47
45
 
48
- include:
49
- - '_pages'
50
- - 'assets/pages'
51
- - 'assets/posts'
52
-
53
46
  # exclude
54
47
  exclude:
55
48
  - .gitignore
@@ -59,8 +52,6 @@ exclude:
59
52
  - Gemfile.lock
60
53
  - Makefile
61
54
  - README.md
62
- - _test/
63
- - assets/posts
64
55
  - gemfiles/
65
56
  - netlify.toml
66
57
  - node_modules/
@@ -1,17 +1,89 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="{{ page.lang | default: site.lang | default: "en" }}">
3
- {%- include head.html -%}
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ {%- seo -%}
8
+ {%- feed_meta -%}
9
+ <link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
10
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
11
+ {%- if page.redirect -%}
12
+ <link rel="canonical" href="{{ page.redirect }}"/>
13
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
14
+ <meta http-equiv="refresh" content="0;url={{ page.redirect }}" />
15
+ {%- endif -%}
16
+ </head>
17
+
4
18
  <body>
5
- {% if site.show_header -%}
6
- {%- include header.html -%}
19
+ <header class="site-header" role="banner">
20
+
21
+ <div class="wrapper">
22
+ {%- assign default_paths = site.pages | map: "path" -%}
23
+ {%- assign page_paths = site.header_pages | default: default_paths -%}
24
+ {%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}
25
+ <a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
26
+
27
+ {%- if site.homepage_links.size > 0 -%}
28
+ <nav class="site-nav">
29
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
30
+ <label for="nav-trigger">
31
+ <span class="menu-icon">
32
+ <i class="fas fa-bars"></i>
33
+ </span>
34
+ </label>
35
+
36
+ <div class="trigger">
37
+ {%- for link in site.homepage_links -%}
38
+ <a class="page-link" href="{{ link | relative_url }}">{{ link | escape }}</a>
39
+ {%- endfor -%}
40
+ </div>
41
+ </nav>
7
42
  {%- endif -%}
43
+ </div>
44
+
45
+ </header>
8
46
  <main aria-label="Content">
9
47
  <div>
10
48
  {{ content }}
11
49
  </div>
12
50
  </main>
13
- {% if site.show_footer -%}
14
- {%- include footer.html -%}
15
- {%- endif -%}
51
+ <footer class="site-footer h-card">
52
+ <data class="u-url" href="{{ " /" | relative_url }}"></data>
53
+ <div>
54
+ <h2 class="footer-heading">{{ site.title | escape }}</h2>
55
+ <div class="footer-col-wrapper">
56
+ <div class="footer-col footer-col-1">
57
+ <ul class="x-contact-list">
58
+ <li class="rss-subscribe">
59
+ <i class="fas fa-rss"></i>
60
+ Subscribe <a href="{{ " /feed.xml" | relative_url }}">via RSS</a>
61
+ </li>
62
+ <li>
63
+ <i class="fab fa-twitter"></i>
64
+ Find me on
65
+ <a href="https://twitter.com/{{ site.twitter.username }}">Twitter</a>
66
+ </li>
67
+ </ul>
68
+ </div>
69
+ <div class="footer-col footer-col-2">
70
+ <br/>
71
+ </div>
72
+ <div class="footer-col footer-col-3">
73
+ <ul>
74
+ <li>
75
+ <i class="fab fa-github"></i>
76
+ Find me on
77
+ <a href="https://github.com/{{ site.twitter.username }}">Github</a>
78
+ </li>
79
+ <li>
80
+ <i class="fa-solid fa-file"></i>
81
+ <a href="/sitemap.xml">sitemap.xml</a>
82
+ </li>
83
+ </ul>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ </footer>
16
88
  </body>
17
89
  </html>
@@ -2,20 +2,7 @@
2
2
  <h1>{{ page.title }}</h1>
3
3
  {%- endif -%}
4
4
  <div class="x-home-template-image">
5
- <div class="x-home-template-description">{{site.description}}</div>
6
5
  </div>
7
- {%- if site.show_coming_soon -%}
8
- {%- else -%}
9
- <div class="x-home-template-pages">
10
- {%- if site.show_homepage_links -%}
11
- {%- include list-of-homepage-links.html -%}
12
- {%- endif -%}
13
- </div>
14
- <hr>
15
- <div class="x-home-template-posts">
16
- {%- include posts-by-date-top-three.html -%}
17
- <a href="/blog">more...</a>
18
- </div>
19
- {%- endif -%}
6
+ <br/>
20
7
 
21
8
  {{ content }}
@@ -1,6 +1,9 @@
1
1
  <article>
2
2
  <header>
3
3
  <h1>{{ page.title | escape }}</h1>
4
+ <span class="post-meta">
5
+ <!-- a href="{{ page.path | relative_url }}">/{{ page.path }}</a-->
6
+ </span>
4
7
  </header>
5
8
  <div>
6
9
  {{ content }}
@@ -0,0 +1,12 @@
1
+ {%- if site.posts.size > 0 -%}
2
+ {% assign ul_class = include.ul_class | default: "x-post-list" %}
3
+ <ul class="{{ ul_class }}">
4
+ {%- for page in site.pages -%}
5
+ <li>
6
+ <a class="x-post-link" href="{{ page.url | relative_url }}">
7
+ <span>{{ page.title | escape }}</span>
8
+ </a>
9
+ </li>
10
+ {%- endfor -%}
11
+ </ul>
12
+ {%- endif -%}
@@ -1,6 +1,6 @@
1
1
  <li>
2
- <a class="x-post-link" href="{{ include.url | relative_url }}">
3
- <span>{{ include.title | escape }}</span>
2
+ <a class="x-post-link" href="{{ include.post.url | relative_url }}">
3
+ <span>{{ include.post.title | escape }}</span>
4
4
  </a>
5
- {% include post-meta.html date=include.date categories=include.categories tags=include.tags excerpt=include.excerpt %}
5
+ {% include.post.post-meta.html date=include.date categories=include.categories tags=include.tags excerpt=include.excerpt %}
6
6
  </li>
@@ -1,9 +1,22 @@
1
1
  <div class="x-post-meta">
2
- {% include post-date.html date=include.date %}
2
+ {%- if include.date != '' -%}
3
+ <span>
4
+ <time class="dt-published" datetime="{{ include.date | date_to_xmlschema }}" itemprop="datePublished">
5
+ {{ include.date | date: "%b %-d, %Y" }}
6
+ </time>
7
+ </span>
8
+ {%- endif -%}
3
9
  <br />
4
- {% include post-categories.html categories=include.categories %}
10
+ <span class="post-meta">
11
+ {% capture _categories %}{% for category in include.categories %}{{ category }}/{% endfor %}{% endcapture %}
12
+ <a href="/{{ _categories }}">/{{ _categories }}</a>
13
+ </span>
5
14
  <br />
6
- {% include post-tags.html tags=include.tags %}
15
+ <span>
16
+ {% for tag in include.tags %}
17
+ #{{ tag }}
18
+ {% endfor %}
19
+ </span>
7
20
  {%- if include.excerpt != '' -%}
8
21
  <p>
9
22
  {{ include.excerpt }}
@@ -6,11 +6,5 @@
6
6
  <section class="post-content e-content" itemprop="articleBody">
7
7
  {{ content }}
8
8
  </div>
9
- {%- if site.disqus.shortname -%}
10
- {%- include disqus-comments.html -%}
11
- {%- endif -%}
12
9
  <a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
13
- <!--ul>
14
- {--% bibliography --file references --cited %--}
15
- </ul-->
16
10
  </article>
@@ -2,7 +2,12 @@
2
2
  {% assign ul_class = include.ul_class | default: "x-post-list" %}
3
3
  <ul class="{{ ul_class }}">
4
4
  {%- for post in include.posts -%}
5
- {% include post-item-proxy.html size=include.size post=post %}
5
+ <li>
6
+ <a class="x-post-link" href="{{ post.url | relative_url }}">
7
+ <span>{{ post.title | escape }}</span>
8
+ </a>
9
+ {% include post-meta.html date=post.date categories=post.categories tags=post.tags excerpt=post.excerpt %}
10
+ </li>
6
11
  {%- endfor -%}
7
12
  </ul>
8
13
  {%- endif -%}
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% include pages-template.html %}
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% include posts-template.html %}
@@ -315,11 +315,11 @@ table {
315
315
  color: lighten($text-color, 18%);
316
316
  border-collapse: collapse;
317
317
  border: 1px solid $grey-color-light;
318
- tr {
318
+ /*tr {
319
319
  &:nth-child(even) {
320
320
  background-color: lighten($grey-color-light, 6%);
321
321
  }
322
- }
322
+ }*/
323
323
  th, td {
324
324
  padding: ($spacing-unit / 3) ($spacing-unit / 2);
325
325
  }
@@ -131,7 +131,7 @@ ul.list-style-none {
131
131
 
132
132
 
133
133
  .x-home-template-image {
134
- background-image: url("/assets/pages/home/header-image.jpg"); /* The image used - important! */
134
+ background-image: url("/index.jpg"); /* The image used - important! */
135
135
  background-size: cover;
136
136
  position: relative; /* Needed to position the cutout text in the middle of the image */
137
137
  height: 300px; /* Some height */
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-iamlynnmckay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lynn McKay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-16 00:00:00.000000000 Z
11
+ date: 2022-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-pages
@@ -105,46 +105,27 @@ files:
105
105
  - README.md
106
106
  - _config.yml
107
107
  - _includes/404-template.html
108
- - _includes/about-template.html
109
- - _includes/bib-template.html
110
- - _includes/blog-template.html
111
- - _includes/contact-template.html
112
- - _includes/css.html
113
108
  - _includes/default-template.html
114
- - _includes/disqus-comments.html
115
- - _includes/footer.html
116
109
  - _includes/google-analytics.html
117
- - _includes/head.html
118
- - _includes/header.html
119
110
  - _includes/home-template.html
120
- - _includes/js.html
121
- - _includes/list-of-homepage-links.html
122
111
  - _includes/page-template.html
123
- - _includes/post-categories.html
124
- - _includes/post-date.html
112
+ - _includes/pages-template.html
125
113
  - _includes/post-item-proxy.html
126
114
  - _includes/post-item.html
127
115
  - _includes/post-meta.html
128
- - _includes/post-tags.html
129
116
  - _includes/post-template.html
130
- - _includes/posts-by-category.html
131
- - _includes/posts-by-date-top-three.html
132
- - _includes/posts-by-date.html
133
- - _includes/posts-by-tag.html
134
- - _includes/posts-list-nested.html
135
117
  - _includes/posts-list.html
118
+ - _includes/posts-template.html
136
119
  - _layouts/404.html
137
- - _layouts/bib.html
138
120
  - _layouts/default.html
139
121
  - _layouts/home.html
140
122
  - _layouts/page.html
123
+ - _layouts/pages.html
141
124
  - _layouts/post.html
125
+ - _layouts/posts.html
142
126
  - _sass/_minima-custom.scss
143
127
  - _sass/iamlynnmckay.scss
144
128
  - assets/css/main.scss
145
- - assets/js/bouncing-ball-in-canvas-element.js
146
- - assets/js/main.js
147
- - assets/js/random-color-for-font-awesome-icons.js
148
129
  homepage: https://github.com/iamlynnmckay/jekyll-theme-iamlynnmckay
149
130
  licenses:
150
131
  - MIT
@@ -1 +0,0 @@
1
- {{ site.data.user.about }}
@@ -1 +0,0 @@
1
- <li>{{ reference }}</li>
@@ -1,11 +0,0 @@
1
- <h3>posts by date</h3>
2
-
3
- {% include posts-by-date.html %}
4
-
5
- <h3>posts by category</h3>
6
-
7
- {% include posts-by-category.html %}
8
-
9
- <h3>posts by tag</h3>
10
-
11
- {% include posts-by-tag.html %}
@@ -1,3 +0,0 @@
1
- <div class="contact-template">
2
- <!--iframe src="https://docs.google.com/forms/d/e/1FAIpQLScFRq89o_AfXLRbFQyrm_2sMEu5CWKXkMIkp3pMB5uWWzp85g/viewform?embedded=true" width="640" height="542" frameborder="0" marginheight="0" marginwidth="0">Loading…</iframe-->
3
- </div>
data/_includes/css.html DELETED
@@ -1,2 +0,0 @@
1
- <link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
2
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css">
@@ -1,17 +0,0 @@
1
- {%- if page.comments != false and jekyll.environment == "production" -%}
2
- <div id="disqus_thread"></div>
3
- <script>
4
- var disqus_config = function () {
5
- this.page.url = '{{ page.url | absolute_url }}';
6
- this.page.identifier = '{{ page.url | absolute_url }}';
7
- };
8
- (function () {
9
- var d = document, s = d.createElement('script');
10
- s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
11
- s.setAttribute('data-timestamp', +new Date());
12
- (d.head || d.body).appendChild(s);
13
- })();
14
- </script>
15
- <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments
16
- powered by Disqus.</a></noscript>
17
- {%- endif -%}
@@ -1,37 +0,0 @@
1
- <footer class="site-footer h-card">
2
- <data class="u-url" href="{{ " /" | relative_url }}"></data>
3
- <div>
4
- <h2 class="footer-heading">{{ site.title | escape }}</h2>
5
- <div class="footer-col-wrapper">
6
- <div class="footer-col footer-col-1">
7
- <ul class="x-contact-list">
8
- <li class="rss-subscribe">
9
- <i class="fas fa-rss"></i>
10
- Subscribe <a href="{{ " /feed.xml" | relative_url }}">via RSS</a>
11
- </li>
12
- <li>
13
- <i class="fab fa-twitter"></i>
14
- Find me on
15
- <a href="https://twitter.com/{{ site.twitter.username }}">Twitter</a>
16
- </li>
17
- </ul>
18
- </div>
19
- <div class="footer-col footer-col-2">
20
- <br/>
21
- </div>
22
- <div class="footer-col footer-col-3">
23
- <ul>
24
- <li>
25
- <i class="fab fa-github"></i>
26
- Find me on
27
- <a href="https://github.com/{{ site.twitter.username }}">Github</a>
28
- </li>
29
- <li>
30
- <i class="fa-solid fa-file"></i>
31
- <a href="/sitemap.xml">sitemap.xml</a>
32
- </li>
33
- </ul>
34
- </div>
35
- </div>
36
- </div>
37
- </footer>
data/_includes/head.html DELETED
@@ -1,17 +0,0 @@
1
- <head>
2
- <meta charset="utf-8">
3
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
- <meta name="viewport" content="width=device-width, initial-scale=1">
5
- {%- seo -%}
6
- {%- include css.html -%}
7
- {%- include js.html -%}
8
- {%- feed_meta -%}
9
- {%- if jekyll.environment == 'production' and site.google_analytics -%}
10
- {%- include google-analytics.html -%}
11
- {%- endif -%}
12
- {%- if page.redirect -%}
13
- <link rel="canonical" href="{{ page.redirect }}"/>
14
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
15
- <meta http-equiv="refresh" content="0;url={{ page.redirect }}" />
16
- {%- endif -%}
17
- </head>
@@ -1,27 +0,0 @@
1
- <header class="site-header" role="banner">
2
-
3
- <div class="wrapper">
4
- {%- assign default_paths = site.pages | map: "path" -%}
5
- {%- assign page_paths = site.header_pages | default: default_paths -%}
6
- {%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}
7
- <a class="site-title" rel="author" href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>
8
-
9
- {%- if site.homepage_links.size > 0 -%}
10
- <nav class="site-nav">
11
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
12
- <label for="nav-trigger">
13
- <span class="menu-icon">
14
- <i class="fas fa-bars"></i>
15
- </span>
16
- </label>
17
-
18
- <div class="trigger">
19
- {%- for link in site.homepage_links -%}
20
- <a class="page-link" href="{{ link | relative_url }}">{{ link | escape }}</a>
21
- {%- endfor -%}
22
- </div>
23
- </nav>
24
- {%- endif -%}
25
- </div>
26
-
27
- </header>
data/_includes/js.html DELETED
@@ -1 +0,0 @@
1
- <script src="/assets/js/main.js"></script>
@@ -1,8 +0,0 @@
1
- {%- if site.homepage_links.size > 0 -%}
2
- {% assign ul_class = include.ul_class | default: "x-page-list" %}
3
- <ul class="{{ ul_class }}">
4
- {%- for link in site.homepage_links -%}
5
- <li><a href="/{{ link }}">/{{ link }}</a></li>
6
- {%- endfor -%}
7
- </ul>
8
- {%- endif -%}
@@ -1,5 +0,0 @@
1
- <span class="post-meta">
2
- {% capture _categories %}{% for category in include.categories %}{{ category }}{% endfor %}{% endcapture %}
3
- {% capture _link %}./blog#category-{{ _categories }}{% endcapture %}
4
- <a href="{{ _link | relative_url }}">/{{ _categories }}</a>
5
- </span>
@@ -1,5 +0,0 @@
1
- <span>
2
- <time class="dt-published" datetime="{{ include.date | date_to_xmlschema }}" itemprop="datePublished">
3
- {{ include.date | date: "%b %-d, %Y" }}
4
- </time>
5
- </span>
@@ -1,6 +0,0 @@
1
- <span>
2
- {% for tag in include.tags %}
3
- {% capture _link %}./blog#tag-{{ tag }}{% endcapture %}
4
- <a href="{{ _link | relative_url }}">#{{ tag }}</a>
5
- {% endfor %}
6
- </span>
@@ -1 +0,0 @@
1
- {% include posts-list-nested.html nested_posts=site.categories ul_class="list-style-none" size="large" id_prefix="category" text_prefix="/" %}
@@ -1,2 +0,0 @@
1
- {% assign _posts = site.posts | slice: 0, 3 %}
2
- {% include posts-list.html posts=_posts ul_class="x-post-list margin-left-0" size="large" %}
@@ -1 +0,0 @@
1
- {% include posts-list-nested.html nested_posts=site.tags id_prefix="tag" text_prefix="#" %}
@@ -1,14 +0,0 @@
1
- {%- if site.posts.size > 0 -%}
2
- <ul class="x-post-list">
3
- {% for _key_value_pair in include.nested_posts %}
4
- <li>
5
- {% capture _key %}{{ _key_value_pair | first }}{% endcapture %}
6
- <div id="{{ include.id_prefix }}-{{ _key }}" class="x-post-link x-post-meta">
7
- <span>{{ include.text_prefix }}{{ _key }}</span>
8
- </div>
9
- {% assign posts=include.nested_posts[_key] %}
10
- {% include posts-list.html posts=posts ul_class="list-style-none" size=include.size %}
11
- </li>
12
- {% endfor %}
13
- </ul>
14
- {%- endif -%}
data/_layouts/bib.html DELETED
@@ -1,4 +0,0 @@
1
- ---
2
- ---
3
-
4
- {% include bib-template.html %}
@@ -1,41 +0,0 @@
1
- (() => {
2
- var canvas = document.getElementById('canvas');
3
- var ctx = canvas.getContext('2d');
4
- var raf;
5
-
6
- var ball = {
7
- x: 1,
8
- y: 0,
9
- vx: 3,
10
- vy: 2,
11
- radius: 5,
12
- color: 'white',
13
- draw: function () {
14
- ctx.beginPath();
15
- ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2, true);
16
- ctx.closePath();
17
- ctx.fillStyle = this.color;
18
- ctx.fill();
19
- }
20
- };
21
-
22
-
23
- function draw() {
24
- ctx.clearRect(0, 0, canvas.width, canvas.height);
25
- ball.draw();
26
- ball.x += ball.vx;
27
- ball.y += ball.vy;
28
- if (ball.y + ball.vy > canvas.height || ball.y + ball.vy < 0) {
29
- ball.color = randomColor();
30
- ball.vy = -ball.vy;
31
- }
32
- if (ball.x + ball.vx > canvas.width || ball.x + ball.vx < 0) {
33
- ball.color = randomColor();
34
- ball.vx = -ball.vx;
35
- }
36
- raf = window.requestAnimationFrame(draw);
37
- }
38
-
39
- raf = window.requestAnimationFrame(draw);
40
-
41
- })();
data/assets/js/main.js DELETED
@@ -1,13 +0,0 @@
1
- function randomColor() {
2
- return '#' + Math.floor(Math.random() * 16777215).toString(16);
3
- }
4
-
5
- function sleep(time) {
6
- return new Promise((resolve) => setTimeout(resolve, time));
7
- }
8
-
9
- window.onload = () => {
10
- (() => {
11
- console.log("@iamlynnmckay");
12
- })();
13
- }
@@ -1,5 +0,0 @@
1
- (() => {
2
- document.querySelectorAll("i.fa, i.fas, i.fab").forEach((elem) => {
3
- elem.style.color = randomColor();
4
- });
5
- })();