namecard 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6bd612c8c5ea02ebe4f7c21a59e8a966b74927e0cbdc73e2bddec54c1319d886
4
+ data.tar.gz: 44f01a0d107d453e48ed5e2f1418dd750187775ab50c3c1633e846106bf71929
5
+ SHA512:
6
+ metadata.gz: 9b3e9ff1ac9761ef3947cf0ee73086bd5cc6f3a474a3ae24ca0e43ba6762f896afe8c42bc60d51ab93678829a349cd5de2101d867fcbd714f263371e7bf18e29
7
+ data.tar.gz: 732854e9f5b75ddf283f668a30dcde13b2b2bc499d7e5b926a4ad1f81a3509343a37aaac9cb3a8155f0980aadbcd5d09e5d4fbfa52bd5e467e204ac41a3711f2
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 afterdusk
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,72 @@
1
+ # namecard
2
+
3
+ ![namecard](/assets/namecard.png)
4
+
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
8
+
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)
10
+
11
+ ## Usage
12
+
13
+ Usage instructions and theme options are available at https://github.com/afterdusk/use-namecard, an example site using *namecard*. I highly recommend cloning the repository and editing the content from the template instead of performing an install on an existing repo.
14
+
15
+ ## Installation
16
+ There are two ways of installing Jekyll themes:
17
+
18
+ ### 1. Gem Installation
19
+ ---
20
+ Note that this approach will not work with GitHub Pages build and deploy. If you are using this approach and want to deploy with GitHub Pages, you will have to build your site locally and only push the output `_site` folder.
21
+
22
+ ---
23
+
24
+ Add this line to your Jekyll site's `Gemfile`:
25
+
26
+ ```ruby
27
+ gem "namecard"
28
+ ```
29
+
30
+ And add this line to your Jekyll site's `_config.yml`:
31
+
32
+ ```yaml
33
+ theme: namecard
34
+ ```
35
+
36
+ And then execute:
37
+
38
+ $ bundle
39
+
40
+ Or install it yourself with:
41
+
42
+ $ gem install namecard
43
+
44
+ ### 2. GitHub Pages Remote Theme
45
+ If you plan to deploy with GitHub Pages, this is the far simpler approach of adding the theme to your site. Add the following line to your site's `_config.yml`:
46
+
47
+ ```yaml
48
+ remote_theme: afterdusk/namecard
49
+ ```
50
+
51
+ In your `Gemfile`, ensure the following lines are commented out:
52
+ ```ruby
53
+ # gem "namecard"
54
+ # gem "jekyll", "~> 3.8.5"
55
+ ```
56
+
57
+ And uncomment the line:
58
+ ```ruby
59
+ gem "github-pages", "~> 204", group: :jekyll_plugins
60
+ ```
61
+
62
+ Note: Make sure a version number is included in the above line
63
+
64
+ You can then [test the site locally](https://help.github.com/en/github/working-with-github-pages/testing-your-github-pages-site-locally-with-jekyll) before [deploying to GitHub pages](https://help.github.com/en/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll).
65
+
66
+ ## Contributing
67
+
68
+ Bug reports, suggestions and pull requests are welcome on GitHub at https://github.com/afterdusk/namecard. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
69
+
70
+ ## License
71
+
72
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,9 @@
1
+ <!-- Global site tag (gtag.js) - Google Analytics -->
2
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
3
+ <script>
4
+ window.dataLayer = window.dataLayer || [];
5
+ function gtag(){dataLayer.push(arguments);}
6
+ gtag('js', new Date());
7
+
8
+ gtag('config', '{{ site.google_analytics }}');
9
+ </script>
@@ -0,0 +1,16 @@
1
+ <script>
2
+ const darkModeQuery = '(prefers-color-scheme: dark)';
3
+ const darkModeClass = 'dark-mode'
4
+
5
+ if (window.matchMedia && window.matchMedia(darkModeQuery).matches) {
6
+ document.body.classList.add(darkModeClass);
7
+ }
8
+
9
+ window.matchMedia(darkModeQuery).addEventListener('change', e => {
10
+ toggleDarkMode();
11
+ });
12
+
13
+ function toggleDarkMode() {
14
+ document.body.classList.toggle(darkModeClass);
15
+ }
16
+ </script>
@@ -0,0 +1,3 @@
1
+ <footer class="footer" aria-label="Footer">
2
+ &copy; namecard
3
+ </footer>
@@ -0,0 +1,12 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1">
4
+ {%- seo -%}
5
+ <link rel="stylesheet" href="{{ '/assets/style.css' | relative_url }}">
6
+
7
+ <!-- google analytics -->
8
+ {%- if jekyll.environment == 'production' and site.google_analytics -%}
9
+ {%- include analytics.html -%}
10
+ {%- endif -%}
11
+
12
+ </head>
@@ -0,0 +1,26 @@
1
+ ---
2
+ ---
3
+ <!DOCTYPE html>
4
+ <html lang="{{ page.lang | default: site.lang | default: 'en' }}">
5
+
6
+ {%- include head.html -%}
7
+
8
+ <body>
9
+
10
+ <main class="container-fluid">
11
+ <div class="row">
12
+ <div class="intro col-sm-8">
13
+ {{ page.content | markdownify }}
14
+ </div>
15
+ </div>
16
+ </main>
17
+
18
+ <!-- footer -->
19
+ {%- include footer.html -%}
20
+
21
+ </body>
22
+
23
+ <!-- dark mode -->
24
+ {%- include dark_mode.html -%}
25
+
26
+ </html>
@@ -0,0 +1,90 @@
1
+ ---
2
+ ---
3
+ <!DOCTYPE html>
4
+ <html lang="{{ page.lang | default: site.lang | default: 'en' }}">
5
+
6
+ {%- include head.html -%}
7
+
8
+ <body>
9
+
10
+ <!-- necessary as specifying collection order in _config.yml is not possible in Jekyll 3 -->
11
+ {% assign sorted_sections = site.sections | sort: 'order' %}
12
+
13
+ <!-- navbar -->
14
+ <nav class="nav-bar" aria-label="Navigation Bar">
15
+ {% for section in sorted_sections %}
16
+ {% if section.anchor %}
17
+ <a class="nav-item" href="{{ section.anchor | prepend: '#' | relative_url }}">
18
+ {{ section.title | markdownify | strip_html }}
19
+ </a>
20
+ {% endif %}
21
+ {% endfor %}
22
+ </nav>
23
+
24
+ <main class="container-fluid">
25
+ <!-- intro -->
26
+ <div class="row">
27
+ <div class="intro col-sm-8" aria-label="Intro">
28
+ <div class="intro-title">{{ site.intro_title | markdownify }}</div>
29
+ <div class="intro-content">{{ site.intro_content | markdownify }}</div>
30
+ {%- if site.github_url -%}
31
+ <a href="{{ site.github_url }}" class="fa fa-github" title="GitHub profile"></a>
32
+ {%- endif -%}
33
+ {%- if site.stack_overflow_url -%}
34
+ <a href="{{ site.stack_overflow_url }}" class="fa fa-stack-overflow" title="Stack Overflow profile"></a>
35
+ {%- endif -%}
36
+ {%- if site.linkedin_url -%}
37
+ <a href="{{ site.linkedin_url }}" class="fa fa-linkedin" title="LinkedIn profile"></a>
38
+ {%- endif -%}
39
+ {%- if site.facebook_url -%}
40
+ <a href="{{ site.facebook_url }}" class="fa fa-facebook" title="Facebook profile"></a>
41
+ {%- endif -%}
42
+ {%- if site.twitter_url -%}
43
+ <a href="{{ site.twitter_url }}" class="fa fa-twitter" title="Twitter profile"></a>
44
+ {%- endif -%}
45
+ {%- if site.youtube_url -%}
46
+ <a href="{{ site.youtube_url }}" class="fa fa-youtube" title="YouTube profile"></a>
47
+ {%- endif -%}
48
+ {%- if site.email -%}
49
+ <a href="mailto:{{ site.email }}" class="fa fa-envelope" title="Email"></a>
50
+ {%- endif -%}
51
+ </div>
52
+ </div>
53
+
54
+ <!-- sections -->
55
+ {% for section in sorted_sections %}
56
+ <div class="section row" aria-label="Sections">
57
+ <div id="{{ section.anchor }}" class="section-title col-sm-5">{{ section.title | markdownify }}</div>
58
+ <div class="section-content col-sm-7">{{ section.content | markdownify }}</div>
59
+ </div>
60
+ {% endfor %}
61
+ </main>
62
+
63
+ <!-- footer -->
64
+ {%- include footer.html -%}
65
+
66
+ </body>
67
+
68
+ <!-- dark mode -->
69
+ {%- include dark_mode.html -%}
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
+ // } -->
Binary file
@@ -0,0 +1,217 @@
1
+ ---
2
+ ---
3
+ // bootstrap
4
+ @import url(https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css);
5
+ // google fonts
6
+ @import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;600&display=swap');
7
+ @import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
8
+ // social media buttons
9
+ @import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');
10
+
11
+ $xs-breakpoint: 480px;
12
+ $sm-breakpoint: 768px;
13
+
14
+ /***** FONTS *****/
15
+ $font-size-base: 1.6rem;
16
+ $font-size-jumbo: 4.2rem;
17
+ $icon-size: 4.2rem;
18
+ $icon-width: 4.2rem;
19
+
20
+ $font-family: 'Raleway', sans-serif;
21
+ $font-family-secondary: 'Roboto', sans-serif;
22
+
23
+ /***** COLORS *****/
24
+ $background-color: #ffffff;
25
+ $background-color-dark: #0e171c;
26
+ $text-color: #000000;
27
+ $text-color-dark: #ffffff;
28
+ $text-accent-color: {{ site.accent_color | default: "#0070c0" }};
29
+ $text-accent-color-dark: {{ site.accent_color_dark | default: "#039cfd" }};
30
+
31
+ /***** MARKDOWN INJECTABLE CLASSES *****/
32
+ .accent-color { // usage: {: .accent-color}
33
+ color: $text-accent-color;
34
+
35
+ a {
36
+ color:inherit
37
+ }
38
+ }
39
+
40
+ .jumbo-font { // usage: {: .jumbo-font}
41
+ font-size: $font-size-jumbo;
42
+ }
43
+
44
+ .secondary-font { // usage: {: .secondary-font}
45
+ font-family: $font-family-secondary;
46
+ }
47
+
48
+ /***** MARKDOWN STYLE OVERRIDES *****/
49
+ h1,
50
+ h2,
51
+ h3,
52
+ h4,
53
+ h5,
54
+ h6 {
55
+ margin-top: 0.2em;
56
+ margin-bottom: 0.2em;
57
+ line-height: 1.2em;
58
+ }
59
+
60
+ p {
61
+ font-size: $font-size-base;
62
+ margin-top: 0.2em;
63
+ margin-bottom: 0.2em;
64
+ }
65
+
66
+ ul,
67
+ ol {
68
+ margin-top: 0.2em;
69
+ margin-bottom: 0.2em;
70
+ padding: 0;
71
+ }
72
+
73
+ li {
74
+ font-size: $font-size-base;
75
+ margin-bottom: 0.2em;
76
+ }
77
+
78
+ a:hover {
79
+ text-decoration: none;
80
+ opacity: 0.85;
81
+ }
82
+
83
+ img {
84
+ margin-top: 0.4em;
85
+ margin-bottom: 0.4em;
86
+ width: 32rem;
87
+ max-width: 100%;
88
+ max-height: 100%;
89
+ }
90
+
91
+ table {
92
+ table-layout: fixed;
93
+ width: 100%;
94
+ }
95
+
96
+ td,
97
+ th {
98
+ font-size: $font-size-base;
99
+ margin-top: 0.2em;
100
+ margin-bottom: 0.2em;
101
+ padding: 0.4em 0;
102
+ }
103
+
104
+ /***** PAGE STYLING *****/
105
+ html {
106
+ height: 100%;
107
+ scroll-behavior: smooth;
108
+ }
109
+
110
+ body {
111
+ display: flex;
112
+ flex-direction: column;
113
+ max-width: 100rem;
114
+ min-height: 100%;
115
+ margin: auto;
116
+ padding: 7rem 10rem; // top-bottom left-right
117
+
118
+ background-color: $background-color;
119
+ color: $text-color;
120
+ font-family: $font-family;
121
+ font-size: $font-size-base;
122
+ }
123
+
124
+ nav {
125
+ text-align: right;
126
+
127
+ .nav-item {
128
+ color: inherit;
129
+ font-weight: bold;
130
+ margin: 0.4rem;
131
+ }
132
+
133
+ .nav-item:hover {
134
+ color: $text-accent-color;
135
+ text-decoration: none;
136
+ }
137
+ }
138
+
139
+ main {
140
+ flex-grow: 1;
141
+
142
+ .intro {
143
+ padding: 10em 1rem;
144
+ }
145
+
146
+ .section {
147
+ padding-bottom: 4rem;
148
+
149
+ .section-title {
150
+ padding: 1rem;
151
+ }
152
+
153
+ .section-content {
154
+ padding: 1rem;
155
+ padding-bottom: 2rem;
156
+ }
157
+ }
158
+ }
159
+
160
+ footer {
161
+ align-self: end;
162
+ width: 100%;
163
+ text-align: right;
164
+ }
165
+
166
+ .fa {
167
+ color: inherit;
168
+ margin: 0.6em;
169
+ margin-left: 0;
170
+ font-size: $icon-size;
171
+ width: $icon-width;
172
+ text-align: center;
173
+ text-decoration: none;
174
+ }
175
+
176
+ .fa:hover {
177
+ color: $text-accent-color;
178
+ text-decoration: none;
179
+ }
180
+
181
+ /***** DARK MODE *****/
182
+ .dark-mode {
183
+ background-color: $background-color-dark;
184
+ color: $text-color-dark;
185
+
186
+ .accent-color {
187
+ color: $text-accent-color-dark;
188
+ }
189
+
190
+ .fa:hover {
191
+ color: $text-accent-color-dark;
192
+ }
193
+
194
+ .nav-item:hover {
195
+ color: $text-accent-color-dark;
196
+ }
197
+ }
198
+
199
+ /***** PAGE STYLING (MOBILE) *****/
200
+ @media only screen and (max-width : $xs-breakpoint) {
201
+ body {
202
+ padding: 7rem 2rem;
203
+ }
204
+
205
+ .nav-bar {
206
+ .nav-item {
207
+ display: block;
208
+ margin: 1em 0em;
209
+ }
210
+ }
211
+ }
212
+
213
+ @media (hover:none), (hover:on-demand) {
214
+ a:hover {
215
+ color: inherit; // to avoid sticky hover
216
+ }
217
+ }
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: namecard
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - afterdusk
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-05-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 3.8.5
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 3.8.5
27
+ - !ruby/object:Gem::Dependency
28
+ name: jekyll-seo-tag
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.16'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.16'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '12.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '12.0'
69
+ description:
70
+ email:
71
+ - hello@evanau.dev
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - LICENSE.txt
77
+ - README.md
78
+ - _includes/analytics.html
79
+ - _includes/dark_mode.html
80
+ - _includes/footer.html
81
+ - _includes/head.html
82
+ - _layouts/404.html
83
+ - _layouts/main.html
84
+ - assets/namecard.png
85
+ - assets/style.scss
86
+ homepage: https://www.github.com/afterdusk/namecard
87
+ licenses:
88
+ - MIT
89
+ metadata: {}
90
+ post_install_message:
91
+ rdoc_options: []
92
+ require_paths:
93
+ - lib
94
+ required_ruby_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ required_rubygems_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 2.7.6
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: Markdown driven, single page CV
110
+ test_files: []