material-blog-jp 0.2.0 → 0.3.0

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
  SHA256:
3
- metadata.gz: 76f629aaddb1d7459c4ae3d4f8d5d60412e1701cb074770c3bab69902c1ba6cc
4
- data.tar.gz: 4efc6ff50d29195da51a27876c771bdc33a1b7e448fed3181b7f6a96a453b687
3
+ metadata.gz: 2c8b71423bebf7ad395fd384e8b1f9b5db1feee04dcd67cd35a06b9ef3f94307
4
+ data.tar.gz: f161cfaf8633a9c5b56a04a78259de1dbd5a6bd19e98ac83b735ad1911349210
5
5
  SHA512:
6
- metadata.gz: bb0c1cff27ad4f9001e7b21affce7f1eeb50b3cc6d542df44ff64d4c2f9724d771706c326a20eb977f3cbc1b0e0cdc317de7e8bc02ca7bda81f88168b855d7fe
7
- data.tar.gz: 316ce7a8685d5201bc13185f2a22f95e9a1003294c3d2eb38ed4003652bce44c2d7f6018401c19ce2cf363361d4c934534418fb616d8932ba156bce35373913e
6
+ metadata.gz: eb207d347a1bc2d0ae24358d2154cedd91debf2baceb3436c215eabeebd64f337a0fc272b76ca31166ffe79c06856223ba3f4c60f5626d9f35e1e8d299c2f6ba
7
+ data.tar.gz: 8d878e1de3e155e66473d356ce9ca2c40fad6f00dbf82b1f426c01393529869cef4bfc1cbd460e1e97d732a9ec1be7573858ca7f55cc450cf3cb2478994f3fe7
data/README.md CHANGED
@@ -1,50 +1,55 @@
1
- # material-blog-jp
1
+ # material-blog-jp (Jekyll Theme)
2
+ Material-blog-jp is a blog build following material design principles. This theme is built using material design lite web framework.
2
3
 
3
- Welcome to your new Jekyll theme! In this directory, you'll find the files you need to be able to package up your theme into a gem. Put your layouts in `_layouts`, your includes in `_includes`, your sass files in `_sass` and any other assets in `assets`.
4
+ This theme consists of four web pages, index, about, search and 404. Index will display all the blog posts, starting from the latest. Search will display a text field input and two of the latest blog posting. About will contain a description about the blog. 404 will display when someone tried to access a resource that can not be found. This theme is optimized for mobile phones, iPads, etc
4
5
 
5
- To experiment with this code, add some sample content and run `bundle exec jekyll serve` this directory is setup just like a Jekyll site!
6
-
7
- TODO: Delete this and the text above, and describe your gem
6
+ Due to some of the limitations, please have at least two posts to push the footers to the bottom of the page, same goes for the "about" section.
8
7
 
8
+ ![GitHub Logo](/screenshot.PNG)
9
9
 
10
10
  ## Installation
11
+ Setup Jekyll in your environment https://jekyllrb.com/docs/installation/windows/
11
12
 
12
- Add this line to your Jekyll site's `Gemfile`:
13
+ Clone or fork this repository
13
14
 
14
- ```ruby
15
- gem "material-blog-jp"
16
- ```
15
+ `git clone https://github.com/johnnymythology/material-blog-jp.git`
17
16
 
18
- And add this line to your Jekyll site's `_config.yml`:
17
+ `gem install material-blog-jp`
19
18
 
20
- ```yaml
21
- theme: material-blog-jp
22
- ```
19
+ `bundle exec jekyll serve`
23
20
 
24
- And then execute:
21
+ ## Usage
25
22
 
26
- $ bundle
23
+ There are four default pages:
24
+ - index.md
25
+ - about.md
26
+ - search.md
27
+ - 404.md
27
28
 
28
- Or install it yourself as:
29
+ Each page has a different title. Edit the title in the Front Matter.
29
30
 
30
- $ gem install material-blog-jp
31
+ The blog title needs to be edited in _config.yml
32
+ Fill in the options in _config.yml accordingly. This will be used for SEO (Search Engine Optimization).
31
33
 
32
- ## Usage
34
+ To create a new post, follow the naming format in the two example post. Since this blog uses images for each post, select an image and put it inside the assets folder. Follow the naming convention as the two sample image.
33
35
 
34
- TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
36
+ ## Technical
37
+ Web Framework: Material Design Lite
35
38
 
36
- ## Contributing
39
+ Static Site Generator: Jekyll
37
40
 
38
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. 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.
41
+ Javascript Libraries: jQuery
39
42
 
40
- ## Development
43
+ For search, I am using "simple jekyll search" by Chistian Fei
41
44
 
42
- To set up your environment to develop this theme, run `bundle install`.
45
+ Material design lite header I am using is not mobile optimized and requires some additional CSS.
43
46
 
44
- Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
47
+ jQuery is used for the arrow button to scroll the screen back to the top.
48
+
49
+
50
+ ## Contributing
45
51
 
46
- When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
47
- To add a custom directory to your theme-gem, please edit the regexp in `material-design-blog-jp.gemspec` accordingly.
52
+ Bug reports and pull requests are welcome on GitHub at https://github.com/johnnymythology/material-blog-jp.
48
53
 
49
54
  ## License
50
55
 
data/_includes/head.html CHANGED
@@ -22,6 +22,7 @@
22
22
  <link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.blue_grey-red.min.css" />
23
23
  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
24
24
  <link rel="stylesheet" href="/assets/css/style.css">
25
+ <link rel="stylesheet" href="/assets/css/syntax.css">
25
26
 
26
27
  <script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
27
28
  <script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
@@ -7,7 +7,7 @@
7
7
  <div class="demo-layout-transparent mdl-layout--fixed-header mdl-js-layout">
8
8
  <header class="mdl-layout__header mdl-layout__header--transparent">
9
9
  <div class="mdl-layout__header-row">
10
- <span class="mdl-layout-title">Material-blog-jp</span>
10
+ <span class="mdl-layout-title">{{ site.title }}</span>
11
11
  <div class="mdl-layout-spacer"></div>
12
12
  <nav class="mdl-navigation remove-mdl-navigation-link">
13
13
  <a class="mdl-navigation__link" href="/index.html">Home</a>
@@ -18,7 +18,7 @@
18
18
  </div>
19
19
  </header>
20
20
  <div class="mdl-layout__drawer">
21
- <span class="mdl-layout-title">Johnny Pan</span>
21
+ <span class="mdl-layout-title">{{ site.title }}</span>
22
22
  <nav class="mdl-navigation">
23
23
  <a class="mdl-navigation__link" href="/index.html">Home</a>
24
24
  <a class="mdl-navigation__link" href="/search.html">Search</a>
Binary file
@@ -1,6 +1,6 @@
1
- /*!
2
- * Simple-Jekyll-Search v1.7.2 (https://github.com/christian-fei/Simple-Jekyll-Search)
3
- * Copyright 2015-2018, Christian Fei
4
- * Licensed under the MIT License.
5
- */
1
+ /*!
2
+ * Simple-Jekyll-Search v1.7.2 (https://github.com/christian-fei/Simple-Jekyll-Search)
3
+ * Copyright 2015-2018, Christian Fei
4
+ * Licensed under the MIT License.
5
+ */
6
6
  !function(){"use strict";var f={load:function w(t,e){var n=function r(){return window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")}();n.open("GET",t,!0),n.onreadystatechange=function i(e,n){return function(){if(4===e.readyState&&200===e.status)try{n(null,JSON.parse(e.responseText))}catch(t){n(t,null)}}}(n,e),n.send()}};(function y(t){if(!function e(t){return!!t&&"undefined"!=typeof t.required&&t.required instanceof Array}(t))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof y))return new y(t);var r=t.required;this.getRequiredOptions=function(){return r},this.validate=function(e){var n=[];return r.forEach(function(t){"undefined"==typeof e[t]&&n.push(t)}),n}});var n=function g(t,e){var n=e.length,r=t.length;if(n<r)return!1;if(r===n)return t===e;t:for(var i=0,o=0;i<r;i++){for(var u=t.charCodeAt(i);o<n;)if(e.charCodeAt(o++)===u)continue t;return!1}return!0},e=new function t(){this.matches=function(t,e){return n(e.toLowerCase(),t.toLowerCase())}};var r=new function O(){this.matches=function(e,t){return!!e&&(e=e.trim().toLowerCase(),(t=t.trim().toLowerCase()).split(" ").filter(function(t){return 0<=e.indexOf(t)}).length===t.split(" ").length)}};var l={put:function z(t){if(c(t))return s(t);if(function e(t){return Boolean(t)&&"[object Array]"===Object.prototype.toString.call(t)}(t))return function i(t){var e=[];a();for(var n=0,r=t.length;n<r;n++)c(t[n])&&e.push(s(t[n]));return e}(t);return undefined},clear:a,search:function S(t){return t?function a(t,e,n,r){for(var i=[],o=0;o<t.length&&i.length<r.limit;o++){var u=d(t[o],e,n,r);u&&i.push(u)}return i}(o,t,u.searchStrategy,u).sort(u.sort):[]},setOptions:function q(t){(u=t||{}).fuzzy=t.fuzzy||!1,u.limit=t.limit||10,u.searchStrategy=t.fuzzy?e:r,u.sort=t.sort||i}};function i(){return 0}var o=[],u={};function a(){return o.length=0,o}function c(t){return Boolean(t)&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return o.push(t),o}function d(t,e,n,r){for(var i in t)if(!p(t[i],r.exclude)&&n.matches(t[i],e))return t}function p(t,e){for(var n=!1,r=0,i=(e=e||[]).length;r<i;r++){var o=e[r];!n&&new RegExp(t).test(o)&&(n=!0)}return n}u.fuzzy=!1,u.limit=10,u.searchStrategy=u.fuzzy?e:r,u.sort=i;var h={compile:function j(r){return m.template.replace(m.pattern,function(t,e){var n=m.middleware(e,r[e],m.template);return void 0!==n?n:r[e]||t})},setOptions:function C(t){m.pattern=t.pattern||m.pattern,m.template=t.template||m.template,"function"==typeof t.middleware&&(m.middleware=t.middleware)}},m={};m.pattern=/\{(.*?)\}/g,m.template="",m.middleware=function(){};var v={merge:function L(t,e){var n={};for(var r in t)n[r]=t[r],"undefined"!=typeof e[r]&&(n[r]=e[r]);return n},isJSON:function M(t){try{return!!(t instanceof Object&&JSON.parse(JSON.stringify(t)))}catch(e){return!1}}};!function(t){var o={searchInput:null,resultsContainer:null,json:[],success:Function.prototype,searchResultTemplate:'<li><a href="{url}" title="{desc}">{title}</a></li>',templateMiddleware:Function.prototype,sortMiddleware:function(){return 0},noResultsText:"No results found",limit:10,fuzzy:!1,exclude:[]},n=["searchInput","resultsContainer","json"],r=function y(e){if(!function n(t){return!!t&&"undefined"!=typeof t.required&&t.required instanceof Array}(e))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof y))return new y(e);var r=e.required;this.getRequiredOptions=function(){return r},this.validate=function(e){var n=[];return r.forEach(function(t){"undefined"==typeof e[t]&&n.push(t)}),n}}({required:n});function i(t){o.success(t),l.put(t),function e(){o.searchInput.addEventListener("keyup",function(t){(function e(t){return-1===[13,16,20,37,38,39,40,91].indexOf(t)})(t.which)&&(u(),c(t.target.value))})}()}function u(){o.resultsContainer.innerHTML=""}function a(t){o.resultsContainer.innerHTML+=t}function c(t){(function e(t){return t&&0<t.length})(t)&&(u(),function i(t,e){var n=t.length;if(0===n)return a(o.noResultsText);for(var r=0;r<n;r++)t[r].query=e,a(h.compile(t[r]))}(l.search(t),t))}function s(t){throw new Error("SimpleJekyllSearch --- "+t)}t.SimpleJekyllSearch=function(t){return 0<r.validate(t).length&&s("You must specify the following required options: "+n),o=v.merge(o,t),h.setOptions({template:o.searchResultTemplate,middleware:o.templateMiddleware}),l.setOptions({fuzzy:o.fuzzy,limit:o.limit,sort:o.sortMiddleware}),v.isJSON(o.json)?i(o.json):function e(n){f.load(n,function(t,e){t&&s("failed to get JSON ("+n+")"),i(e)})}(o.json),{search:c}}}(window)}();
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material-blog-jp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johnny Pan
@@ -87,6 +87,7 @@ files:
87
87
  - assets/2019-08-02.jpg
88
88
  - assets/blog-icon.ico
89
89
  - assets/css/style.css
90
+ - assets/css/syntax.css
90
91
  - assets/header.jpg
91
92
  - assets/script/script.js
92
93
  - assets/script/search-script.js