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.
- checksums.yaml +4 -4
- data/README.md +131 -13
- data/_includes/scripts.html +77 -3
- metadata +3 -4
- data/assets/mail.js +0 -75
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c03dd0645a94547c225d5fca2dca4e926a221572a1006055c49da2db8441b5fc
|
4
|
+
data.tar.gz: f237ba73383e1cc091407e3d79d477f119737f858da93a9f7fdd3649edaa10cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e02531f54e535fa283ea9e2df43a6f0b8c4d1c61ebdfa34323cdd78bb6de60b495b522ac5c1f9dde7bf4757a30717b11ef6d13348bc8a223ab4e089757e2919
|
7
|
+
data.tar.gz: ddf11ad27e22a2d9b7993cde18315bb9a63fa81effd94ab24c35c763da6bcd5d774672bb03a729a9621181546e995a4f917cdbcbff70e4e4e493ec3023759fc8
|
data/README.md
CHANGED
@@ -1,24 +1,142 @@
|
|
1
|
-
#
|
1
|
+
# [Start Bootstrap - Clean Blog](https://startbootstrap.com/template-overviews/clean-blog/) - Official Jekyll Version
|
2
2
|
|
3
|
-
|
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
|
-
|
5
|
+
This repository holds the official Jekyll version of the Clean Blog!
|
6
6
|
|
7
|
-
##
|
7
|
+
## Preview
|
8
8
|
|
9
|
-
|
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
|
-
|
12
|
-
`baseurl: ""`
|
11
|
+
**[View Live Preview](http://blackrockdigital.github.io/startbootstrap-clean-blog-jekyll/)**
|
13
12
|
|
14
|
-
##
|
13
|
+
## Installation & Setup
|
15
14
|
|
16
|
-
|
15
|
+
### Using RubyGems:
|
17
16
|
|
18
|
-
|
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
|
-
|
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
|
-
|
25
|
+
Assuming there are no errors and the site is building properly, follow these steps next:
|
23
26
|
|
24
|
-
|
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.
|
data/_includes/scripts.html
CHANGED
@@ -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
|
-
|
9
|
-
|
10
|
-
|
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'>×").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'>×").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.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
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
|
-
-
|
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'>×")
|
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'>×")
|
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
|
-
});
|