alembic-jekyll-theme 3.0.3 → 3.0.4

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
  SHA1:
3
- metadata.gz: 4646f29c7a2a6279c257214803e7b686d892bc0d
4
- data.tar.gz: 692c30643d263a526c748060a1c6c7ef38857375
3
+ metadata.gz: bf9e2748c6169725b0b06a7fe104dda21b466069
4
+ data.tar.gz: e713c1596fef680a23a6404de14b924023c1ae17
5
5
  SHA512:
6
- metadata.gz: 3742ecb25df366ee0835151720ba32dd3dd1d48b8be9dbe5321802f0579afcec798065fc4198386568c37e02992a025879df0263e0a4b6237b501f4f0b00c7da
7
- data.tar.gz: d013487763767545fa75e4dc7b09a68f61be4188dbcde4af44f86fd5973d64dd95f366307afc9b45da9126a2c023924bae59ab2f76e4f758a971382b692a7808
6
+ metadata.gz: 90f849e9a87280213c45b03a5736dae807ad2cd6feead2b0285f8b72b9c4dd09b99e9a8c8f2981f06ab16c19a50a0c4e7be03fe70506aa2fd8616b6a5a27676d
7
+ data.tar.gz: 85debec99a46c0dd31313afed165b5048cbd31aa97758faae198fe9277ad6869354a4854baa2a6b185d3b74fde73139afb1be69bf780fcafb15135df32b2e7e3
data/README.md CHANGED
@@ -40,7 +40,7 @@
40
40
  - Modular Jekyll components
41
41
  - Post category support in the form of a single post index page grouped by category
42
42
  - Built in live search using JavaScript
43
- - **Contact form** built in using [Formspree](https://formspree.io/)
43
+ - **Contact form** built in using [Formspree](https://formspree.io/) or [Netlify Forms](https://www.netlify.com/features/#forms)
44
44
  - Designed with **[Siteleaf](http://www.siteleaf.com/)** in mind
45
45
  - Has 9 of the most popular networks as performant sharing buttons
46
46
  - Has documentation
@@ -55,13 +55,22 @@ Here are a few examples of Alembic out in the wild being used in a variety of wa
55
55
  - [case2111.github.io](http://case2111.github.io/)
56
56
  - [www.10people.co.uk](http://www.10people.co.uk/)
57
57
  - [hrkeni.me](http://hrkeni.me/)
58
- - [venuthatikonda.github.io](https://venuthatikonda.github.io/)
59
58
  - [ccs17.bsc.es](https://ccs17.bsc.es/)
60
59
  - [karateca.org](http://www.karateca.org/)
61
60
  - [p-recs.github.io](https://p-recs.github.io/2018/)
62
61
 
63
62
  ## Installation
64
63
 
64
+ ### Quick setup
65
+
66
+ To give you a running start I've put together some starter kits that you can download, fork or even deploy immediately:
67
+
68
+ - Vanilla Jekyll starter kit - [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/daviddarnes/alembic-kit)
69
+ - Forestry starter kit - [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/daviddarnes/alembic-forestry-kit)
70
+ - Netlify CMS starter kit - [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/daviddarnes/alembic-netlifycms-kit&stack=cms)
71
+
72
+ - GitHub Pages with remote theme kit - **[Download kit](https://github.com/daviddarnes/alembic-kit/archive/remote-theme.zip)**
73
+
65
74
  ### As a Jekyll theme
66
75
 
67
76
  1. Add `gem "alembic-jekyll-theme"` to your `Gemfile` to add the theme as a dependancy
@@ -96,7 +105,7 @@ When using Alembic as a theme means you can take advantage of the file overridin
96
105
 
97
106
  To add your own styles copy the [`styles.scss`](https://github.com/daviddarnes/alembic/blob/master/assets/styles.scss) into your own project with the same file path (`assets/styles.scss`). From there you can add your own styles, you can even optionally ignore the theme styles by removing the `@import "alembic";` line.
98
107
 
99
- If you're just looking to set your own colours and fonts copy the [`_settings.scss`](https://github.com/daviddarnes/alembic/blob/master/_sass/_settings.scss) file into your project at the same file path (`_sass/_settings.scss`) and change variables however you wish. The settings are a mixture of custom variables and settings from [Sassline](https://medium.com/@jakegiltsoff/sassline-v2-0-e424b2881e7e) - follow the link to find out how to configure the typographic settings.
108
+ If you're just looking to set your own colours and fonts copy the [`_settings.scss`](https://github.com/daviddarnes/alembic/blob/master/_sass/_settings.scss) and main theme styles file [`alembic.scss`](https://github.com/daviddarnes/alembic/blob/master/_sass/alembic.scss) into your project at the same file path (`_sass/`) and change variables however you wish. The settings are a mixture of custom variables and settings from [Sassline](https://medium.com/@jakegiltsoff/sassline-v2-0-e424b2881e7e) - follow the link to find out how to configure the typographic settings.
100
109
 
101
110
  ## Configuration
102
111
 
@@ -210,11 +219,16 @@ Available options:
210
219
  - `id`: The map ID for the video _required_
211
220
 
212
221
  ### `site-form.html`
213
- Adds a contact form to the page.
222
+ Adds a contact form to the page. This can be used with [Formspree](https://formspree.io/) or [Netlify Forms](https://www.netlify.com/docs/form-handling/) depending on your setup.
214
223
 
215
224
  Example usage: `{% include site-form.html %}`
216
225
 
217
- This include has no options. Use the `email` option in the `/_config.yml` to change to the desired email.
226
+ Available options:
227
+ - `netlify_form=true`: Set whether you would like to use Netlify Forms, otherwise the form will default to Formspree
228
+ - `name`: Give the form a name, by default the form is called "Contact". The name will be reflected when form submissions come through in Netlify or in your email client. The name is also used in the label and input elements for accessibility
229
+
230
+
231
+ Use the `email` option in the `/_config.yml` to change to the desired email.
218
232
 
219
233
  ### `site-search.html`
220
234
  Adds a search form to the page.
@@ -1,27 +1,53 @@
1
- <div class="form form--contact">
2
- <form class="contact-form" action="" method="POST">
3
- <label class="label" for="name">Name: <span class="required">*</span></label>
4
- <input class="input" id="name" type="text" name="name" value="" placeholder="Your Name" required="required" />
1
+ {% if include.name %}
2
+ {% assign name = include.name %}
3
+ {% else %}
4
+ {% assign name = "Contact" %}
5
+ {% endif %}
5
6
 
6
- <label class="label" for="_replyto">Email Address: <span class="required">*</span></label>
7
- <input class="input" id="_replyto" type="email" name="_replyto" value="" placeholder="email@website.com" required="required" />
7
+ {% assign name_id = name | downcase | replace: " ", "-" %}
8
8
 
9
- <label class="label" for="message">Message: <span class="required">*</span></label>
10
- <textarea class="textarea" id="message" name="message" placeholder="Your message..." required="required"></textarea>
9
+ {% if include.thanks_url %}
10
+ {% assign thanks_url = include.thanks_url %}
11
+ {% else %}
12
+ {% assign thanks_url = "/thanks/" %}
13
+ {% endif %}
14
+
15
+ <form class="form form--{{ name_id }}" method="post" name="{{ name }}" action="{{ thanks_url }}"
16
+ {% if include.netlify_form %}
17
+ netlify-honeypot="bot-field"
18
+ netlify
19
+ {% endif %}
20
+ >
21
+ <fieldset class="fieldset form__fieldset">
22
+ <legend class="legend form__legend">{{ name }}</legend>
23
+ <label class="label" for="name--{{ name_id }}">Name: <span class="required">*</span></label>
24
+ <input class="input" id="name--{{ name_id }}" type="text" name="name" value="" placeholder="Your Name" required="required" />
25
+
26
+ <label class="label" for="email--{{ name_id }}">Email Address: <span class="required">*</span></label>
27
+ <input class="input" id="email--{{ name_id }}" type="email" name="email" value="" placeholder="email@website.com" required="required" />
28
+
29
+ <label class="label" for="message--{{ name_id }}">Message: <span class="required">*</span></label>
30
+ <textarea class="textarea" id="message--{{ name_id }}" name="message" placeholder="Your message..." required="required"></textarea>
11
31
 
12
32
  <input class="button" type="submit" value="Send message" />
13
33
  <br/>
14
34
  <small class="small"><span class="required">*</span> indicates a required field</small>
15
35
 
16
- <input type="text" name="_gotcha" style="display:none">
17
- <input type="hidden" name="_subject" value="Message from {{ site.name }} website">
18
- <input type="hidden" name="_next" value="/thanks/" />
19
- </form>
20
- </div>
21
- <script>
22
- var email = "{{ site.email | split: "" | reverse | join: "" }}";
23
- var unraveledEmail = email.split("").reverse().join("");
24
- var form = document.querySelector(".contact-form");
25
- form.setAttribute("action", "https://formspree.io/" + unraveledEmail);
26
- </script>
27
- <noscript>Please enable JavaScript to use the form.</noscript>
36
+ {% if include.netlify_form %}
37
+ <label style="display:none">Don’t fill this out if you’re human: <input name="bot-field" /></label>
38
+ {% else %}
39
+ <input type="text" name="_gotcha" style="display:none">
40
+ <input type="hidden" name="_subject" value="{{ site.title }} submission from {{ name }}">
41
+ <input type="hidden" name="_next" value="{{ thanks_url }}" />
42
+ {% endif %}
43
+ </fieldset>
44
+ </form>
45
+ {% unless include.netlify_form %}
46
+ <script>
47
+ var email = "{{ site.email | split: "" | reverse | join: "" }}";
48
+ var unraveledEmail = email.split("").reverse().join("");
49
+ var form = document.querySelector(".form--{{ name_id }}");
50
+ form.setAttribute("action", "https://formspree.io/" + unraveledEmail);
51
+ </script>
52
+ <noscript>Please enable JavaScript to use the form.</noscript>
53
+ {% endunless %}
data/_sass/_theme.scss CHANGED
@@ -260,7 +260,8 @@ img {
260
260
 
261
261
  .figure,
262
262
  .video,
263
- .map {
263
+ .map,
264
+ .form {
264
265
  margin-bottom: .8rem;
265
266
  }
266
267
 
@@ -271,6 +272,18 @@ video {
271
272
 
272
273
 
273
274
  // Form elements and buttons
275
+ .form {
276
+ position: relative;
277
+ &__legend {
278
+ font-style: italic;
279
+ color: $captionColour;
280
+ position: absolute;
281
+ overflow: hidden;
282
+ right: 0;
283
+ clip: rect(0 0 0 0);
284
+ }
285
+ }
286
+
274
287
  button,
275
288
  .button,
276
289
  input[type="text"],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alembic-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Darnes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-25 00:00:00.000000000 Z
11
+ date: 2018-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll