jekyll-theme-clean-blog 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +131 -13
  3. data/_includes/scripts.html +77 -3
  4. metadata +3 -4
  5. data/assets/mail.js +0 -75
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 147b241932daef526351c11c7aa329d6f566710cd6e79ed8af5461437e95cb4e
4
- data.tar.gz: ecfa70bb28d382777e3dfe417897ae29a7973cc73164fe2454e5749614e601bb
3
+ metadata.gz: c03dd0645a94547c225d5fca2dca4e926a221572a1006055c49da2db8441b5fc
4
+ data.tar.gz: f237ba73383e1cc091407e3d79d477f119737f858da93a9f7fdd3649edaa10cc
5
5
  SHA512:
6
- metadata.gz: 9b96ee6b690558f77557a65db0032da4ee808b6afd2675e962a4be06f63d96de93897f1d1de3276f02ac73754268e7604d208acbc04cebc925fc7215ea598452
7
- data.tar.gz: db6eaf67da022536ceefd1f0823980e7dd2fbe0d5393ed11a0e32996315e306695831f95ac49b77937162ab1f68f12538fbe0552c133e4d7f2c6c1b86d6d00d1
6
+ metadata.gz: 4e02531f54e535fa283ea9e2df43a6f0b8c4d1c61ebdfa34323cdd78bb6de60b495b522ac5c1f9dde7bf4757a30717b11ef6d13348bc8a223ab4e089757e2919
7
+ data.tar.gz: ddf11ad27e22a2d9b7993cde18315bb9a63fa81effd94ab24c35c763da6bcd5d774672bb03a729a9621181546e995a4f917cdbcbff70e4e4e493ec3023759fc8
data/README.md CHANGED
@@ -1,24 +1,142 @@
1
- # Clean Blog by Start Bootstrap - Jekyll Version
1
+ # [Start Bootstrap - Clean Blog](https://startbootstrap.com/template-overviews/clean-blog/) - Official Jekyll Version
2
2
 
3
- The official Jekyll version of the Clean Blog theme by [Start Bootstrap](http://startbootstrap.com/).
3
+ [Clean Blog](http://startbootstrap.com/template-overviews/clean-blog/) is a stylish, responsive blog theme for [Bootstrap](http://getbootstrap.com/) created by [Start Bootstrap](http://startbootstrap.com/). This theme features a blog homepage, about page, contact page, and an example post page along with a working contact form powered by [Formspree](https://formspree.io/).
4
4
 
5
- ### [View Live Demo →](http://blackrockdigital.github.io/startbootstrap-clean-blog-jekyll/)
5
+ This repository holds the official Jekyll version of the Clean Blog!
6
6
 
7
- ## Before You Begin
7
+ ## Preview
8
8
 
9
- In the _config.yml file, the base URL is set to /startbootstrap-clean-blog-jekyll which is this themes gh-pages preview. It's recommended that you remove the base URL before working with this theme locally!
9
+ [![Clean Blog (Jekyll) Preview](https://startbootstrap.com/assets/img/templates/clean-blog.jpg)](http://blackrockdigital.github.io/startbootstrap-clean-blog-jekyll/)
10
10
 
11
- It should look like this:
12
- `baseurl: ""`
11
+ **[View Live Preview](http://blackrockdigital.github.io/startbootstrap-clean-blog-jekyll/)**
13
12
 
14
- ## What's Included
13
+ ## Installation & Setup
15
14
 
16
- A full Jekyll environment is included with this theme. If you have Jekyll installed, simply run `jekyll serve` in your command line and preview the build in your browser. You can use `jekyll serve --watch` to watch for changes in the source files as well.
15
+ ### Using RubyGems:
17
16
 
18
- A Grunt environment is also included. There are a number of tasks it performs like minification of the JavaScript, compiling of the LESS files, adding banners to apply the MIT license, and watching for changes. Run the grunt default task by entering `grunt` into your command line which will build the files. You can use `grunt watch` if you are working on the JavaScript or the LESS.
17
+ When installing the theme using RubyGems, demo images, posts, and pages are not included. Follow the instructions below for complete setup.
19
18
 
20
- You can run `jekyll serve --watch` and `grunt watch` at the same time to watch for changes and then build them all at once.
19
+ 1. (Optional) Create a new Jekyll site: `jekyll new my-site`
20
+ 2. Replace the current theme in your `Gemfile` with `gem "jekyll-theme-clean-blog"`.
21
+ 3. Install the theme: `bundle install`
22
+ 4. Replace the current theme in your `_config.yml` file with `theme: jekyll-theme-awesome`.
23
+ 5. Build your site: `bundle exec jekyll serve`
21
24
 
22
- ## Support
25
+ Assuming there are no errors and the site is building properly, follow these steps next:
23
26
 
24
- Visit Clean Blog's template overview page on Start Bootstrap at http://startbootstrap.com/template-overviews/clean-blog/ and leave a comment, email feedback@startbootstrap.com, or open an issue here on GitHub for support.
27
+ 1. Create the following pages if they do not exist already (or change the extension of exsiting markdown files from `.md` to `.html`):
28
+ - `index.html` - set to `layout: home`
29
+ - `about.html` - set to `layout: page`
30
+ - `contact.html` - set to `layout: page`
31
+ - `posts/index.html` - set to `layout: page` (you will also need to create a `posts` directory)
32
+ 2. Configure the `index.html` front matter. Example:
33
+ ```
34
+ ---
35
+ layout: home
36
+ background: '/PATH_TO_IMAGE'
37
+ ---
38
+ ```
39
+ 3. Configure the `about.html`, `contact.html`, and `posts/index.html` front matter. Example:
40
+ ```
41
+ ---
42
+ layout: page
43
+ title: Page Title
44
+ description: This is the page description.
45
+ background: '/PATH_TO_IMAGE'
46
+ ---
47
+ ```
48
+ 4. For each post in the `_posts` directory, update the front matter. Example:
49
+ ```
50
+ ---
51
+ layout: post
52
+ title: "Post Title"
53
+ subtitle: "This is the post subtitle."
54
+ date: YYYY-MM-DD HH:MM:SS
55
+ background: '/PATH_TO_IMAGE'
56
+ ---
57
+ ```
58
+
59
+ For reference, look at the [demo repository](https://github.com/BlackrockDigital/startbootstrap-clean-blog-jekyll) to see how the files are set up.
60
+
61
+ 5. Add the form to the `contact.html` page. Add the following code to your `contact.html` page:
62
+ ```
63
+ <form name="sentMessage" id="contactForm" novalidate>
64
+ <div class="control-group">
65
+ <div class="form-group floating-label-form-group controls">
66
+ <label>Name</label>
67
+ <input type="text" class="form-control" placeholder="Name" id="name" required data-validation-required-message="Please enter your name.">
68
+ <p class="help-block text-danger"></p>
69
+ </div>
70
+ </div>
71
+ <div class="control-group">
72
+ <div class="form-group floating-label-form-group controls">
73
+ <label>Email Address</label>
74
+ <input type="email" class="form-control" placeholder="Email Address" id="email" required data-validation-required-message="Please enter your email address.">
75
+ <p class="help-block text-danger"></p>
76
+ </div>
77
+ </div>
78
+ <div class="control-group">
79
+ <div class="form-group col-xs-12 floating-label-form-group controls">
80
+ <label>Phone Number</label>
81
+ <input type="tel" class="form-control" placeholder="Phone Number" id="phone" required data-validation-required-message="Please enter your phone number.">
82
+ <p class="help-block text-danger"></p>
83
+ </div>
84
+ </div>
85
+ <div class="control-group">
86
+ <div class="form-group floating-label-form-group controls">
87
+ <label>Message</label>
88
+ <textarea rows="5" class="form-control" placeholder="Message" id="message" required data-validation-required-message="Please enter a message."></textarea>
89
+ <p class="help-block text-danger"></p>
90
+ </div>
91
+ </div>
92
+ <br>
93
+ <div id="success"></div>
94
+ <div class="form-group">
95
+ <button type="submit" class="btn btn-primary" id="sendMessageButton">Send</button>
96
+ </div>
97
+ </form>
98
+ ```
99
+
100
+ Make sure you have the `email` setting in your `_config.yml` file set to a working email address! Once this is set, fill out the form and then check your email, verify the email address using the link sent to you by Formspree, and then the form will be working!
101
+
102
+ 6. Build your site: `bundle exec jekyll serve`
103
+
104
+ ### Using Core Files
105
+
106
+ When using the core files, the demo images, posts, and pages are all included with the download. After following the instructions below, you can then go and change the content of the pages and posts.
107
+
108
+ 1. [Download](https://github.com/BlackrockDigital/startbootstrap-clean-blog-jekyll/archive/master.zip) or Clone the repository.
109
+ 2. Update the following configuration settings in your `_config.yml` file:
110
+ - `baserul`
111
+ - `url`
112
+ - `title`
113
+ - `email` (after setting this setting to a working email address, fill out the form on the contact page and send it - then check your email and verify the address and the form will send you messages when used)
114
+ - `description`
115
+ - `author`
116
+ - `twitter_username` (Optional)
117
+ - `facebook_username` (Optional)
118
+ - `github_username` (Optional)
119
+ 3. Build your site: `bundle exec jekyll serve`
120
+
121
+ ## Bugs and Issues
122
+
123
+ Have a bug or an issue with this template? [Open a new issue](https://github.com/BlackrockDigital/startbootstrap-clean-blog-jekyll/issues) here on GitHub!
124
+
125
+ ## About
126
+
127
+ Start Bootstrap is an open source library of free Bootstrap templates and themes. All of the free templates and themes on Start Bootstrap are released under the MIT license, which means you can use them for any purpose, even for commercial projects.
128
+
129
+ * https://startbootstrap.com
130
+ * https://twitter.com/SBootstrap
131
+
132
+ Start Bootstrap was created by and is maintained by **[David Miller](http://davidmiller.io/)**, Owner of [Blackrock Digital](http://blackrockdigital.io/).
133
+
134
+ * http://davidmiller.io
135
+ * https://twitter.com/davidmillerskt
136
+ * https://github.com/davidtmiller
137
+
138
+ Start Bootstrap is based on the [Bootstrap](http://getbootstrap.com/) framework created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thorton](https://twitter.com/fat).
139
+
140
+ ## Copyright and License
141
+
142
+ Copyright 2013-2017 Blackrock Digital LLC. Code released under the [MIT](https://github.com/BlackrockDigital/startbootstrap-clean-blog-jekyll/blob/gh-pages/LICENSE) license.
@@ -4,7 +4,81 @@
4
4
 
5
5
  <script src="{{"/assets/scripts.js" | relative_url }}"></script>
6
6
 
7
+ {% if page.url contains 'contact' %}
8
+ <!-- Form Validation -->
9
+ <script src="{{"/assets/vendor/startbootstrap-clean-blog/js/jqBootstrapValidation.js" | relative_url }}"></script>
10
+ <!-- Send Form -->
11
+ <script>
12
+ $(function () {
7
13
 
8
- <!-- Mail Scripts -->
9
- <script src="{{"/assets/vendor/startbootstrap-clean-blog/js/jqBootstrapValidation.js" | relative_url }}"></script>
10
- <script src="{{"/assets/mail.js" | relative_url }}"></script>
14
+ $("#contactForm input,#contactForm textarea").jqBootstrapValidation({
15
+ preventSubmit: true,
16
+ submitError: function ($form, event, errors) {
17
+ // additional error messages or events
18
+ },
19
+ submitSuccess: function ($form, event) {
20
+ event.preventDefault(); // prevent default submit behaviour
21
+ // get values from FORM
22
+ var name = $("input#name").val();
23
+ var email = $("input#email").val();
24
+ var phone = $("input#phone").val();
25
+ var message = $("textarea#message").val();
26
+ var firstName = name; // For Success/Failure Message
27
+ // Check for white space in name for Success/Fail message
28
+ if (firstName.indexOf(' ') >= 0) {
29
+ firstName = name.split(' ').slice(0, -1).join(' ');
30
+ }
31
+ $this = $("#sendMessageButton");
32
+ $this.prop("disabled", true); // Disable submit button until AJAX call is complete to prevent duplicate messages
33
+ $.ajax({
34
+ url: "//formspree.io/{{ site.email }}",
35
+ type: "POST",
36
+ data: {
37
+ name: name,
38
+ phone: phone,
39
+ email: email,
40
+ message: message
41
+ },
42
+ cache: false,
43
+ success: function () {
44
+ // Success message
45
+ $('#success').html("<div class='alert alert-success'>");
46
+ $('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;").append("</button>");
47
+ $('#success > .alert-success').append("<strong>Your message has been sent. </strong>");
48
+ $('#success > .alert-success').append('</div>');
49
+ //clear all fields
50
+ $('#contactForm').trigger("reset");
51
+ },
52
+ error: function () {
53
+ // Fail message
54
+ $('#success').html("<div class='alert alert-danger'>");
55
+ $('#success > .alert-danger').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;").append("</button>");
56
+ $('#success > .alert-danger').append($("<strong>").text("Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!"));
57
+ $('#success > .alert-danger').append('</div>');
58
+ //clear all fields
59
+ $('#contactForm').trigger("reset");
60
+ },
61
+ complete: function () {
62
+ setTimeout(function () {
63
+ $this.prop("disabled", false); // Re-enable submit button when AJAX call is complete
64
+ }, 1000);
65
+ }
66
+ });
67
+ },
68
+ filter: function () {
69
+ return $(this).is(":visible");
70
+ }
71
+ });
72
+
73
+ $("a[data-toggle=\"tab\"]").click(function (e) {
74
+ e.preventDefault();
75
+ $(this).tab("show");
76
+ });
77
+ });
78
+
79
+ /*When clicking on Full hide fail/success boxes */
80
+ $('#name').focus(function () {
81
+ $('#success').html('');
82
+ });
83
+ </script>
84
+ {% endif %}
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-clean-blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
- - David Miller
7
+ - Start Bootstrap
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '10.0'
55
55
  description:
56
56
  email:
57
- - hello@davidmiller.io
57
+ - feedback@startbootstrap.com
58
58
  executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
@@ -70,7 +70,6 @@ files:
70
70
  - _layouts/page.html
71
71
  - _layouts/post.html
72
72
  - _sass/styles.scss
73
- - assets/mail.js
74
73
  - assets/main.scss
75
74
  - assets/scripts.js
76
75
  - assets/vendor/bootstrap/css/bootstrap-grid.css
data/assets/mail.js DELETED
@@ -1,75 +0,0 @@
1
- $(function() {
2
-
3
- $("#contactForm input,#contactForm textarea").jqBootstrapValidation({
4
- preventSubmit: true,
5
- submitError: function($form, event, errors) {
6
- // additional error messages or events
7
- },
8
- submitSuccess: function($form, event) {
9
- event.preventDefault(); // prevent default submit behaviour
10
- // get values from FORM
11
- var name = $("input#name").val();
12
- var email = $("input#email").val();
13
- var phone = $("input#phone").val();
14
- var message = $("textarea#message").val();
15
- var firstName = name; // For Success/Failure Message
16
- // Check for white space in name for Success/Fail message
17
- if (firstName.indexOf(' ') >= 0) {
18
- firstName = name.split(' ').slice(0, -1).join(' ');
19
- }
20
- $this = $("#sendMessageButton");
21
- $this.prop("disabled", true); // Disable submit button until AJAX call is complete to prevent duplicate messages
22
- $.ajax({
23
- url: "//formspree.io/your@email.com",
24
- type: "POST",
25
- data: {
26
- name: name,
27
- phone: phone,
28
- email: email,
29
- message: message
30
- },
31
- cache: false,
32
- success: function() {
33
- // Success message
34
- $('#success').html("<div class='alert alert-success'>");
35
- $('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
36
- .append("</button>");
37
- $('#success > .alert-success')
38
- .append("<strong>Your message has been sent. </strong>");
39
- $('#success > .alert-success')
40
- .append('</div>');
41
- //clear all fields
42
- $('#contactForm').trigger("reset");
43
- },
44
- error: function() {
45
- // Fail message
46
- $('#success').html("<div class='alert alert-danger'>");
47
- $('#success > .alert-danger').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
48
- .append("</button>");
49
- $('#success > .alert-danger').append($("<strong>").text("Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!"));
50
- $('#success > .alert-danger').append('</div>');
51
- //clear all fields
52
- $('#contactForm').trigger("reset");
53
- },
54
- complete: function() {
55
- setTimeout(function() {
56
- $this.prop("disabled", false); // Re-enable submit button when AJAX call is complete
57
- }, 1000);
58
- }
59
- });
60
- },
61
- filter: function() {
62
- return $(this).is(":visible");
63
- },
64
- });
65
-
66
- $("a[data-toggle=\"tab\"]").click(function(e) {
67
- e.preventDefault();
68
- $(this).tab("show");
69
- });
70
- });
71
-
72
- /*When clicking on Full hide fail/success boxes */
73
- $('#name').focus(function() {
74
- $('#success').html('');
75
- });