beautiful-jekyll-theme 1.1.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +5 -5
  2. data/404.html +13 -0
  3. data/{LICENSE.txt → LICENSE} +6 -6
  4. data/README.md +185 -210
  5. data/_data/ui-text.yml +494 -0
  6. data/_includes/comments.html +6 -0
  7. data/_includes/disqus.html +18 -16
  8. data/_includes/ext-css.html +7 -0
  9. data/_includes/ext-js.html +7 -0
  10. data/_includes/fb-comment.html +16 -0
  11. data/_includes/footer-minimal.html +13 -14
  12. data/_includes/footer-scripts.html +16 -18
  13. data/_includes/footer.html +30 -170
  14. data/_includes/google_analytics.html +13 -11
  15. data/_includes/gtag.html +10 -0
  16. data/_includes/gtm_body.html +5 -0
  17. data/_includes/gtm_head.html +11 -0
  18. data/_includes/head.html +77 -45
  19. data/_includes/header.html +47 -39
  20. data/_includes/matomo.html +17 -0
  21. data/_includes/nav.html +38 -51
  22. data/_includes/readtime.html +16 -0
  23. data/_includes/social-networks-links.html +267 -0
  24. data/_includes/social-share.html +32 -24
  25. data/_includes/staticman-comment.html +22 -0
  26. data/_includes/staticman-comments.html +83 -0
  27. data/_includes/utterances-comment.html +13 -0
  28. data/_layouts/base.html +16 -9
  29. data/_layouts/default.html +2 -2
  30. data/_layouts/home.html +88 -0
  31. data/_layouts/minimal.html +14 -8
  32. data/_layouts/page.html +3 -7
  33. data/_layouts/post.html +40 -16
  34. data/assets/css/main-minimal.css +2 -2
  35. data/assets/css/main.css +531 -250
  36. data/assets/css/pygment_highlights.css +0 -5
  37. data/assets/css/staticman.css +180 -0
  38. data/assets/img/404-southpark.jpg +0 -0
  39. data/assets/img/avatar-icon.png +0 -0
  40. data/assets/img/bgimage.png +0 -0
  41. data/assets/img/hello_world.jpeg +0 -0
  42. data/assets/img/install-steps.gif +0 -0
  43. data/assets/img/path.jpg +0 -0
  44. data/assets/img/thumb.png +0 -0
  45. data/assets/js/main.js +64 -103
  46. data/assets/js/staticman.js +54 -0
  47. data/{assets/feed.xml → feed.xml} +8 -4
  48. data/tags.html +36 -0
  49. metadata +57 -28
  50. data/_includes/navbarlink.html +0 -16
  51. data/_layouts/tag_index.html +0 -41
  52. data/assets/css/bootstrap-theme.css +0 -476
  53. data/assets/css/bootstrap-theme.css.map +0 -1
  54. data/assets/css/bootstrap-theme.min.css +0 -5
  55. data/assets/css/bootstrap.css +0 -6566
  56. data/assets/css/bootstrap.css.map +0 -1
  57. data/assets/css/bootstrap.min.css +0 -5
  58. data/assets/css/normalize.css +0 -427
  59. data/assets/js/bootstrap.js +0 -2306
  60. data/assets/js/bootstrap.min.js +0 -7
  61. data/assets/js/jquery-1.11.2.min.js +0 -4
@@ -59,8 +59,3 @@
59
59
  .highlight .vg { color: #008080 } /* Name.Variable.Global */
60
60
  .highlight .vi { color: #008080 } /* Name.Variable.Instance */
61
61
  .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
62
-
63
- /* Make line numbers unselectable: excludes line numbers from copy-paste user ops */
64
- .highlight .lineno {color:rgba(0,0,0,0.3);padding: 0 10px;-webkit-user-select: none;-moz-user-select: none; -o-user-select: none;}
65
- .lineno::-moz-selection {background-color: transparent;} /* Mozilla specific */
66
- .lineno::selection {background-color: transparent;} /* Other major browsers */
@@ -0,0 +1,180 @@
1
+ /* ==========================================================================
2
+ Forms
3
+ ========================================================================== */
4
+ .staticman-comments form {
5
+ margin: 0 0 5px 0;
6
+ padding: 1em;
7
+ background-color: #f2f3f3;
8
+ }
9
+ .staticman-comments form p {
10
+ margin-bottom: 2.5px;
11
+ }
12
+ .staticman-comments form br {
13
+ display: none;
14
+ }
15
+ .staticman-comments label, .staticman-comments input, .staticman-comments button, .staticman-comments textarea {
16
+ vertical-align: baseline;
17
+ vertical-align: middle;
18
+ }
19
+ .staticman-comments input, .staticman-comments button, .staticman-comments textarea {
20
+ box-sizing: border-box;
21
+ }
22
+ .staticman-comments label {
23
+ display: block;
24
+ margin-bottom: 0.25em;
25
+ color: #494e52;
26
+ cursor: pointer;
27
+ }
28
+ .staticman-comments label small {
29
+ font-size: 0.75em;
30
+ }
31
+ .staticman-comments label input, .staticman-comments label textarea {
32
+ display: block;
33
+ }
34
+ .staticman-comments input, .staticman-comments textarea {
35
+ display: inline-block;
36
+ width: 100%;
37
+ padding: 0.25em;
38
+ margin-bottom: 0.5em;
39
+ color: #494e52;
40
+ background-color: #fff;
41
+ border: #f2f3f3;
42
+ border-radius: 4px;
43
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.125);
44
+ }
45
+ .staticman-comments .input-mini {
46
+ width: 60px;
47
+ }
48
+ .staticman-comments .input-small {
49
+ width: 90px;
50
+ }
51
+ .staticman-comments input[type="button"], .staticman-comments input[type="reset"], .staticman-comments input[type="submit"] {
52
+ width: auto;
53
+ height: auto;
54
+ cursor: pointer;
55
+ overflow: visible;
56
+ }
57
+ .staticman-comments textarea {
58
+ resize: vertical;
59
+ height: auto;
60
+ overflow: auto;
61
+ vertical-align: top;
62
+ }
63
+ .staticman-comments input[type="hidden"] {
64
+ display: none;
65
+ }
66
+ .staticman-comments .form {
67
+ position: relative;
68
+ }
69
+ /*
70
+ Focus & active state
71
+ ========================================================================== */
72
+ .staticman-comments input:focus, .staticman-comments textarea:focus {
73
+ border-color: #7a8288;
74
+ outline: 0;
75
+ outline: thin dotted \9;
76
+ box-shadow: inset 0 1px 3px rgba(73, 78, 82, 0.06), 0 0 5px rgba(122, 130, 136, 0.7);
77
+ }
78
+ .staticman-comments input[type="file"]:focus, .staticman-comments input[type="radio"]:focus, .staticman-comments input[type="checkbox"]:focus:focus {
79
+ box-shadow: none;
80
+ }
81
+ /*
82
+ Help text
83
+ ========================================================================== */
84
+ .staticman-comments .form-text {
85
+ color: #898c8e;
86
+ }
87
+ .staticman-comments .form-text {
88
+ display: block;
89
+ margin-bottom: 1em;
90
+ line-height: 1em;
91
+ }
92
+ /*
93
+ .form-group
94
+ ========================================================================== */
95
+ .staticman-comments .form-group {
96
+ margin-bottom: 5px;
97
+ padding: 0;
98
+ border-width: 0;
99
+ }
100
+ /*
101
+ Comments
102
+ ========================================================================== */
103
+ .staticman-comments .page__comments {
104
+ float: left;
105
+ margin-left: 0;
106
+ margin-right: 0;
107
+ width: 100%;
108
+ clear: both;
109
+ }
110
+ .staticman-comments .page__comments-title {
111
+ margin-top: 2rem;
112
+ margin-bottom: 10px;
113
+ padding-top: 2rem;
114
+ border-top: 1px solid #f2f3f3;
115
+ }
116
+ .staticman-comments .page__comments-form {
117
+ -webkit-transition: all 0.2s ease-in-out;
118
+ transition: all 0.2s ease-in-out;
119
+ }
120
+ .staticman-comments .page__comments-form.disabled input, .staticman-comments .page__comments-form.disabled button, .staticman-comments .page__comments-form.disabled textarea, .staticman-comments .page__comments-form.disabled label {
121
+ pointer-events: none;
122
+ cursor: not-allowed;
123
+ filter: alpha(opacity=65);
124
+ box-shadow: none;
125
+ opacity: 0.65;
126
+ }
127
+ .staticman-comments .comment {
128
+ margin: 1em 0;
129
+ }
130
+ .staticman-comments .comment:not(:last-child) {
131
+ border-bottom: 1px solid #f2f3f3;
132
+ }
133
+ .staticman-comments .comment__avatar-wrapper {
134
+ float: left;
135
+ width: 60px;
136
+ height: 60px;
137
+ }
138
+ .staticman-comments .comment__avatar {
139
+ width: 40px;
140
+ height: 40px;
141
+ border-radius: 50%;
142
+ }
143
+ .staticman-comments .comment__content-wrapper {
144
+ width: calc(100% - 60px);
145
+ }
146
+ .staticman-comments .comment__author {
147
+ margin: 0;
148
+ }
149
+ .staticman-comments .comment__author a {
150
+ text-decoration: none;
151
+ }
152
+ .staticman-comments .comment__date {
153
+ margin: 0;
154
+ }
155
+ .staticman-comments .comment__date a {
156
+ text-decoration: none;
157
+ }
158
+ /* ==========================================================================
159
+ PRINT STYLES
160
+ ========================================================================== */
161
+ .staticman-comments @media print {
162
+ /*
163
+ Hide the following elements on print
164
+ ========================================================================== */
165
+ .staticman-comments [hidden] {
166
+ display: none;
167
+ }
168
+ .staticman-comments .masthead, .staticman-comments .toc, .staticman-comments .page__share, .staticman-comments .page__related, .staticman-comments .pagination, .staticman-comments .ads, .staticman-comments .page__footer, .staticman-comments .page__comments-form, .staticman-comments .author__avatar, .staticman-comments .author__content, .staticman-comments .author__urls-wrapper, .staticman-comments .nav__list, .staticman-comments .sidebar, .staticman-comments .adsbygoogle {
169
+ display: none !important;
170
+ height: 1px !important;
171
+ }
172
+ }
173
+ /*
174
+ Post pagination navigation links
175
+ ========================================================================== */
176
+ .staticman-comments .page__comments + .staticman-comments .pagination {
177
+ margin-top: 2em;
178
+ padding-top: 2em;
179
+ border-top: 1px solid #f2f3f3;
180
+ }
Binary file
Binary file
Binary file
@@ -1,6 +1,6 @@
1
- // Dean Attali / Beautiful Jekyll 2016
1
+ // Dean Attali / Beautiful Jekyll 2020
2
2
 
3
- var main = {
3
+ var BeautifulJekyllJS = {
4
4
 
5
5
  bigImgEl : null,
6
6
  numImgs : null,
@@ -14,7 +14,7 @@ var main = {
14
14
  $(".navbar").removeClass("top-nav-short");
15
15
  }
16
16
  });
17
-
17
+
18
18
  // On mobile, hide the avatar when expanding the navbar menu
19
19
  $('#main-navbar').on('show.bs.collapse', function () {
20
20
  $(".navbar").addClass("top-nav-expanded");
@@ -22,117 +22,78 @@ var main = {
22
22
  $('#main-navbar').on('hidden.bs.collapse', function () {
23
23
  $(".navbar").removeClass("top-nav-expanded");
24
24
  });
25
-
26
- // On mobile, when clicking on a multi-level navbar menu, show the child links
27
- $('#main-navbar').on("click", ".navlinks-parent", function(e) {
28
- var target = e.target;
29
- $.each($(".navlinks-parent"), function(key, value) {
30
- if (value == target) {
31
- $(value).parent().toggleClass("show-children");
32
- } else {
33
- $(value).parent().removeClass("show-children");
34
- }
35
- });
36
- });
37
-
38
- // Ensure nested navbar menus are not longer than the menu header
39
- var menus = $(".navlinks-container");
40
- if (menus.length > 0) {
41
- var navbar = $("#main-navbar ul");
42
- var fakeMenuHtml = "<li class='fake-menu' style='display:none;'><a></a></li>";
43
- navbar.append(fakeMenuHtml);
44
- var fakeMenu = $(".fake-menu");
45
-
46
- $.each(menus, function(i) {
47
- var parent = $(menus[i]).find(".navlinks-parent");
48
- var children = $(menus[i]).find(".navlinks-children a");
49
- var words = [];
50
- $.each(children, function(idx, el) { words = words.concat($(el).text().trim().split(/\s+/)); });
51
- var maxwidth = 0;
52
- $.each(words, function(id, word) {
53
- fakeMenu.html("<a>" + word + "</a>");
54
- var width = fakeMenu.width();
55
- if (width > maxwidth) {
56
- maxwidth = width;
57
- }
58
- });
59
- $(menus[i]).css('min-width', maxwidth + 'px')
60
- });
61
-
62
- fakeMenu.remove();
63
- }
64
-
65
- // show the big header image
66
- main.initImgs();
25
+
26
+ // show the big header image
27
+ BeautifulJekyllJS.initImgs();
67
28
  },
68
-
29
+
69
30
  initImgs : function() {
70
31
  // If the page was large images to randomly select from, choose an image
71
32
  if ($("#header-big-imgs").length > 0) {
72
- main.bigImgEl = $("#header-big-imgs");
73
- main.numImgs = main.bigImgEl.attr("data-num-img");
74
-
75
- // 2fc73a3a967e97599c9763d05e564189
76
- // set an initial image
77
- var imgInfo = main.getImgInfo();
78
- var src = imgInfo.src;
79
- var desc = imgInfo.desc;
80
- main.setImg(src, desc);
81
-
82
- // For better UX, prefetch the next image so that it will already be loaded when we want to show it
83
- var getNextImg = function() {
84
- var imgInfo = main.getImgInfo();
85
- var src = imgInfo.src;
86
- var desc = imgInfo.desc;
87
-
88
- var prefetchImg = new Image();
89
- prefetchImg.src = src;
90
- // if I want to do something once the image is ready: `prefetchImg.onload = function(){}`
91
-
92
- setTimeout(function(){
93
- var img = $("<div></div>").addClass("big-img-transition").css("background-image", 'url(' + src + ')');
94
- $(".intro-header.big-img").prepend(img);
95
- setTimeout(function(){ img.css("opacity", "1"); }, 50);
96
-
97
- // after the animation of fading in the new image is done, prefetch the next one
98
- //img.one("transitioned webkitTransitionEnd oTransitionEnd MSTransitionEnd", function(){
99
- setTimeout(function() {
100
- main.setImg(src, desc);
101
- img.remove();
102
- getNextImg();
103
- }, 1000);
104
- //});
105
- }, 6000);
106
- };
107
-
108
- // If there are multiple images, cycle through them
109
- if (main.numImgs > 1) {
110
- getNextImg();
111
- }
33
+ BeautifulJekyllJS.bigImgEl = $("#header-big-imgs");
34
+ BeautifulJekyllJS.numImgs = BeautifulJekyllJS.bigImgEl.attr("data-num-img");
35
+
36
+ // 2fc73a3a967e97599c9763d05e564189
37
+ // set an initial image
38
+ var imgInfo = BeautifulJekyllJS.getImgInfo();
39
+ var src = imgInfo.src;
40
+ var desc = imgInfo.desc;
41
+ BeautifulJekyllJS.setImg(src, desc);
42
+
43
+ // For better UX, prefetch the next image so that it will already be loaded when we want to show it
44
+ var getNextImg = function() {
45
+ var imgInfo = BeautifulJekyllJS.getImgInfo();
46
+ var src = imgInfo.src;
47
+ var desc = imgInfo.desc;
48
+
49
+ var prefetchImg = new Image();
50
+ prefetchImg.src = src;
51
+ // if I want to do something once the image is ready: `prefetchImg.onload = function(){}`
52
+
53
+ setTimeout(function(){
54
+ var img = $("<div></div>").addClass("big-img-transition").css("background-image", 'url(' + src + ')');
55
+ $(".intro-header.big-img").prepend(img);
56
+ setTimeout(function(){ img.css("opacity", "1"); }, 50);
57
+
58
+ // after the animation of fading in the new image is done, prefetch the next one
59
+ //img.one("transitioned webkitTransitionEnd oTransitionEnd MSTransitionEnd", function(){
60
+ setTimeout(function() {
61
+ BeautifulJekyllJS.setImg(src, desc);
62
+ img.remove();
63
+ getNextImg();
64
+ }, 1000);
65
+ //});
66
+ }, 6000);
67
+ };
68
+
69
+ // If there are multiple images, cycle through them
70
+ if (BeautifulJekyllJS.numImgs > 1) {
71
+ getNextImg();
72
+ }
112
73
  }
113
74
  },
114
-
75
+
115
76
  getImgInfo : function() {
116
- var randNum = Math.floor((Math.random() * main.numImgs) + 1);
117
- var src = main.bigImgEl.attr("data-img-src-" + randNum);
118
- var desc = main.bigImgEl.attr("data-img-desc-" + randNum);
119
-
120
- return {
121
- src : src,
122
- desc : desc
123
- }
77
+ var randNum = Math.floor((Math.random() * BeautifulJekyllJS.numImgs) + 1);
78
+ var src = BeautifulJekyllJS.bigImgEl.attr("data-img-src-" + randNum);
79
+ var desc = BeautifulJekyllJS.bigImgEl.attr("data-img-desc-" + randNum);
80
+
81
+ return {
82
+ src : src,
83
+ desc : desc
84
+ }
124
85
  },
125
-
86
+
126
87
  setImg : function(src, desc) {
127
- $(".intro-header.big-img").css("background-image", 'url(' + src + ')');
128
- if (typeof desc !== typeof undefined && desc !== false) {
129
- $(".img-desc").text(desc).show();
130
- } else {
131
- $(".img-desc").hide();
132
- }
88
+ $(".intro-header.big-img").css("background-image", 'url(' + src + ')');
89
+ if (typeof desc !== typeof undefined && desc !== false) {
90
+ $(".img-desc").text(desc).show();
91
+ } else {
92
+ $(".img-desc").hide();
93
+ }
133
94
  }
134
95
  };
135
96
 
136
97
  // 2fc73a3a967e97599c9763d05e564189
137
98
 
138
- document.addEventListener('DOMContentLoaded', main.init);
99
+ document.addEventListener('DOMContentLoaded', BeautifulJekyllJS.init);
@@ -0,0 +1,54 @@
1
+ ---
2
+ layout: null
3
+ ---
4
+
5
+ (function ($) {
6
+ var $comments = $('.js-comments');
7
+
8
+ $('#new_comment').submit(function () {
9
+ var form = this;
10
+
11
+ $(form).addClass('disabled');
12
+
13
+ {% assign sm = site.staticman -%}
14
+ var endpoint = '{{ sm.endpoint | default: "https://staticman3.herokuapp.com/v3/entry/github/" }}';
15
+ var repository = '{{ sm.repository }}';
16
+ var branch = '{{ sm.branch }}';
17
+
18
+ $.ajax({
19
+ type: $(this).attr('method'),
20
+ url: endpoint + repository + '/' + branch + '/comments',
21
+ data: $(this).serialize(),
22
+ contentType: 'application/x-www-form-urlencoded',
23
+ success: function (data) {
24
+ $('#comment-form-submit').addClass('hidden');
25
+ $('#comment-form-submitted').removeClass('hidden');
26
+ $('.page__comments-form .js-notice').removeClass('notice--danger');
27
+ $('.page__comments-form .js-notice').addClass('notice--success');
28
+ showAlert('success');
29
+ },
30
+ error: function (err) {
31
+ console.log(err);
32
+ $('#comment-form-submitted').addClass('hidden');
33
+ $('#comment-form-submit').removeClass('hidden');
34
+ $('.page__comments-form .js-notice').removeClass('notice--success');
35
+ $('.page__comments-form .js-notice').addClass('notice--danger');
36
+ showAlert('failure');
37
+ $(form).removeClass('disabled');
38
+ }
39
+ });
40
+
41
+ return false;
42
+ });
43
+
44
+ function showAlert(message) {
45
+ $('.page__comments-form .js-notice').removeClass('hidden');
46
+ if (message == 'success') {
47
+ $('.page__comments-form .js-notice-text-success').removeClass('hidden');
48
+ $('.page__comments-form .js-notice-text-failure').addClass('hidden');
49
+ } else {
50
+ $('.page__comments-form .js-notice-text-success').addClass('hidden');
51
+ $('.page__comments-form .js-notice-text-failure').removeClass('hidden');
52
+ }
53
+ }
54
+ })(jQuery);