namecard 0.1.0 → 0.1.3

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: 6bd612c8c5ea02ebe4f7c21a59e8a966b74927e0cbdc73e2bddec54c1319d886
4
- data.tar.gz: 44f01a0d107d453e48ed5e2f1418dd750187775ab50c3c1633e846106bf71929
3
+ metadata.gz: 7954c28fe07eb178e5875ea8d9b8ff743bc3112a51d0d4f970200cc1fc7b11c7
4
+ data.tar.gz: c574b3a429f8daacdfc3adca98210079d83097d63b1394258788b0a9d96f5f1e
5
5
  SHA512:
6
- metadata.gz: 9b3e9ff1ac9761ef3947cf0ee73086bd5cc6f3a474a3ae24ca0e43ba6762f896afe8c42bc60d51ab93678829a349cd5de2101d867fcbd714f263371e7bf18e29
7
- data.tar.gz: 732854e9f5b75ddf283f668a30dcde13b2b2bc499d7e5b926a4ad1f81a3509343a37aaac9cb3a8155f0980aadbcd5d09e5d4fbfa52bd5e467e204ac41a3711f2
6
+ metadata.gz: 1028214b6331ee5a0d3fed88f1ecc93df8385a00f27e9642100a4daf1afd17f194d3ec2f144abefe8838a469606b7d5fe928d99efd47d8b9383eafbf38c6cf7b
7
+ data.tar.gz: d7d42fd0206e1593ed1d80e295d94dea752f98d782ee6227860e12b64513b83d005beaddb7bf31072f7a43752f4201ca0a356d6334cbca463564477433c43257
data/README.md CHANGED
@@ -1,12 +1,11 @@
1
1
  # namecard
2
+ ### *namecard* is a markdown-driven, single page CV
2
3
 
3
4
  ![namecard](/assets/namecard.png)
4
5
 
5
- ### *namecard* is a markdown-driven, single page CV
6
-
7
- **markdown-driven**: all of the content and most of the styling on the site can be edited with markdown - this grants flexibility without compromising ease of use
6
+ **markdown-driven**: all of the content and most of the styling on the site can be edited with markdown, which is flexible and easy to use
8
7
 
9
- **single page**: a single page is concise and doesn't overwhelm visitors - see the [*KISS*](https://en.wikipedia.org/wiki/KISS_principle) principle. (This also means that at this time, there's no support for posts)
8
+ **single page**: a single page is concise and doesn't overwhelm visitors - see the [*KISS*](https://en.wikipedia.org/wiki/KISS_principle) principle
10
9
 
11
10
  ## Usage
12
11
 
@@ -2,15 +2,26 @@
2
2
  const darkModeQuery = '(prefers-color-scheme: dark)';
3
3
  const darkModeClass = 'dark-mode'
4
4
 
5
- if (window.matchMedia && window.matchMedia(darkModeQuery).matches) {
6
- document.body.classList.add(darkModeClass);
7
- }
5
+ {% assign dark_mode = site.dark_mode | default: "system" %}
6
+
7
+ {% if dark_mode == "system" %}
8
+ // set initial theme based on system preferences
9
+ if (window.matchMedia && window.matchMedia(darkModeQuery).matches) {
10
+ document.body.classList.add(darkModeClass);
11
+ }
8
12
 
9
- window.matchMedia(darkModeQuery).addEventListener('change', e => {
10
- toggleDarkMode();
11
- });
13
+ // watch for changes in system preferences
14
+ window.matchMedia(darkModeQuery).addEventListener('change', e => {
15
+ document.body.classList.toggle(darkModeClass);
16
+ });
17
+ {% endif %}
18
+
19
+ {% if dark_mode == "always" %}
20
+ // set dark mode
21
+ document.body.classList.add(darkModeClass);
22
+ {% endif %}
12
23
 
13
- function toggleDarkMode() {
14
- document.body.classList.toggle(darkModeClass);
15
- }
24
+ {% if dark_mode == "never" %}
25
+ // do nothing, since dark mode is off by default
26
+ {% endif %}
16
27
  </script>
data/_layouts/main.html CHANGED
@@ -68,23 +68,3 @@
68
68
  <!-- dark mode -->
69
69
  {%- include dark_mode.html -%}
70
70
  </html>
71
-
72
- <!-- // <button onclick="toggleDarkMode()"> </button>
73
- // // auto-id generation
74
- // // see: https://kramdown.gettalong.org/converter/html.html
75
- // function getSectionId(name) {
76
- // // remove all characters except letters, numbers, spaces and dashes
77
- // var res = name.replace(/[^a-zA-Z0-9 -]/g,'');
78
- // // remove all characters from the start of the line until the first letter
79
- // res = /[a-zA-Z](.+)/.exec(res)[0];
80
- // // convert everything except letters and numbers to dashes
81
- // res = res.replace(/[^a-zA-Z0-9]/g, "-");
82
- // // lowercase
83
- // res = res.toLowerCase();
84
- // // if nothing is left, use "section"
85
- // if (res.length === 0) {
86
- // res = "section";
87
- // }
88
- // // name-collision omitted, all section headers assumed to be unique
89
- // return res;
90
- // } -->
data/assets/namecard.png CHANGED
Binary file
data/assets/style.scss CHANGED
@@ -209,9 +209,3 @@ footer {
209
209
  }
210
210
  }
211
211
  }
212
-
213
- @media (hover:none), (hover:on-demand) {
214
- a:hover {
215
- color: inherit; // to avoid sticky hover
216
- }
217
- }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: namecard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - afterdusk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-23 00:00:00.000000000 Z
11
+ date: 2021-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.8.5
19
+ version: '3.8'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.8.6
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: 3.8.5
29
+ version: '3.8'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.8.6
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: jekyll-seo-tag
29
35
  requirement: !ruby/object:Gem::Requirement