simple-material 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +20 -0
  3. data/README.md +181 -0
  4. data/_includes/adsense_head.html +3 -0
  5. data/_includes/analytics_head.html +13 -0
  6. data/_includes/analytics_head_legacy.html +25 -0
  7. data/_includes/appbar.html +60 -0
  8. data/_includes/disqus.html +18 -0
  9. data/_includes/drawer.html +10 -0
  10. data/_includes/footer.html +64 -0
  11. data/_includes/github_head.html +6 -0
  12. data/_includes/list_blog_categories.html +26 -0
  13. data/_includes/list_blog_posts.html +74 -0
  14. data/_includes/list_posts.html +25 -0
  15. data/_includes/list_projects_featured.html +14 -0
  16. data/_includes/list_services.html +13 -0
  17. data/_includes/meta.html +47 -0
  18. data/_includes/nav_drawer.html +32 -0
  19. data/_includes/nav_footer.html +23 -0
  20. data/_includes/nav_social.html +71 -0
  21. data/_includes/pullquote.html +1 -0
  22. data/_includes/widget_feedback.html +15 -0
  23. data/_includes/widget_github.html +28 -0
  24. data/_includes/widget_goodreads.html +50 -0
  25. data/_includes/widget_search.html +15 -0
  26. data/_includes/widget_share.html +14 -0
  27. data/_layouts/default.html +190 -0
  28. data/_layouts/page.html +13 -0
  29. data/_layouts/post.html +35 -0
  30. data/_layouts/project.html +109 -0
  31. data/_sass/_code.scss +53 -0
  32. data/_sass/_colors.scss +124 -0
  33. data/_sass/_typography.scss +140 -0
  34. data/assets/images/icons/192.png +0 -0
  35. data/assets/images/logo.png +0 -0
  36. data/assets/raw/search.json +13 -0
  37. data/assets/scripts/navigation.js +54 -0
  38. data/assets/scripts/projects.js +72 -0
  39. data/assets/scripts/script.js +0 -0
  40. data/assets/scripts/service-worker.js +14 -0
  41. data/assets/scripts/simple-jekyll-search.min.js +6 -0
  42. data/assets/scripts/webapp.js +22 -0
  43. data/assets/styles/app.scss +1008 -0
  44. data/assets/styles/github.css +73 -0
  45. data/assets/styles/style.css +0 -0
  46. data/assets/vendors/isotope/isotope-min.js +12 -0
  47. data/pwabuilder-sw.js +23 -0
  48. metadata +204 -0
@@ -0,0 +1,124 @@
1
+ body,
2
+ .mdc-top-app-bar,
3
+ .mdc-drawer,
4
+ .mdc-card {
5
+ background-color: var(--mdc-theme-surface);
6
+ color: var(--mdc-theme-on-surface);
7
+ }
8
+
9
+ .main-content {
10
+ background-color: var(--mdc-theme-background);
11
+ color: var(--mdc-theme-on-surface);
12
+ }
13
+
14
+ .main-content article,
15
+ .main-content aside,
16
+ .main-content .footer {
17
+ background-color: var(--mdc-theme-surface);
18
+ color: var(--mdc-theme-on-surface);
19
+ }
20
+
21
+ .mdc-drawer,
22
+ .material-icons,
23
+ .mdc-icon-button,
24
+ .mdc-list,
25
+ .mdc-list-item,
26
+ .mdc-list-item .mdc-list-item__primary-text,
27
+ .mdc-list-item .mdc-list-item__secondary-text,
28
+ .mdc-drawer .mdc-list-item,
29
+ .mdc-drawer .mdc-list-item__graphic {
30
+ color: var(--mdc-theme-on-surface) !important;
31
+ }
32
+
33
+ .mdc-drawer .mdc-list-item--activated {
34
+ color: var(--mdc-theme-on-surface) !important;
35
+ }
36
+
37
+ .mdc-drawer .mdc-list-item--activated,
38
+ .mdc-drawer .mdc-list-item--activated .mdc-list-item__graphic, {
39
+ color: var(--mdc-theme-on-surface) !important;
40
+ }
41
+
42
+ .mdc-floating-label,
43
+ .mdc-text-field__input,
44
+ .mdc-drawer__title,
45
+ .mdc-drawer__subtitle {
46
+ color: var(--mdc-theme-on-surface) !important;
47
+ }
48
+
49
+ .mdc-icon-button:hover .material-icons {
50
+ color: var(--mdc-theme-primary);
51
+ }
52
+
53
+ .mdc-button--unelevated {
54
+ background-color: var(--mdc-theme-primary) !important;
55
+ }
56
+
57
+ .mdc-button .mdc-button__label {
58
+ color: var(--mdc-theme-primary);
59
+ }
60
+
61
+ .mdc-button--unelevated .mdc-button__label {
62
+ color: var(--mdc-theme-on-secondary);
63
+ }
64
+
65
+ .mdc-card--outlined,
66
+ .mdc-button--outlined {
67
+ border-color: var(--mdc-theme-border) !important;
68
+ }
69
+
70
+ .mdc-button--outlined .mdc-button__label {
71
+ color: var(--mdc-theme-primary);
72
+ }
73
+
74
+ .mdc-chip {
75
+ background-color: var(--mdc-theme-surface);
76
+ border: 1px solid var(--mdc-theme-border);
77
+ color: var(--mdc-theme-on-surface);
78
+ }
79
+
80
+ .mdc-chip:focus,
81
+ .mdc-chip:hover {
82
+ background-color: var(--mdc-theme-background);
83
+ }
84
+
85
+ .mdc-tab {
86
+ background-color: var(mdc-theme-surface);
87
+ }
88
+
89
+ .mdc-tab .mdc-tab__text-label,
90
+ .mdc-tab .mdc-tab__icon {
91
+ color: var(--mdc-theme-on-surface);
92
+ }
93
+
94
+ .mdc-tab--active .mdc-tab__text-label,
95
+ .mdc-tab--active .mdc-tab__icon {
96
+ color: var(--mdc-theme-primary);
97
+ }
98
+
99
+ .mdc-chip.active {
100
+ background-color: var(--mdc-theme-overlay);
101
+ color: var(--mdc-theme-primary);
102
+ }
103
+
104
+ hr {
105
+ background-color: var(--mdc-theme-overlay);
106
+ }
107
+
108
+ a {
109
+ color: var(--mdc-theme-primary);
110
+ }
111
+
112
+ a:focus,
113
+ a:hover {
114
+ color: var(--mdc-theme-primary-variant);
115
+ }
116
+
117
+ a.muted {
118
+ color: var(--mdc-theme-on-surface);
119
+ }
120
+
121
+ a.muted:focus,
122
+ a.muted:hover {
123
+ color: var(--mdc-theme-primary);
124
+ }
@@ -0,0 +1,140 @@
1
+ /*
2
+ *------------------------------------------------
3
+ * text styles
4
+ *------------------------------------------------
5
+ */
6
+ @import url('https://fonts.googleapis.com/css2?family=Lato:wght@400&family=Source+Sans+Pro:ital,wght@0,300;0,400;1,200&display=swap');
7
+
8
+ body {
9
+ font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
10
+ font-size: 12pt;
11
+ font-weight: 300;
12
+ line-height: normal;
13
+ }
14
+
15
+ h1, h2, h3, h4, h5, h6 {
16
+ font-family: 'Lato', Helvetica, Arial, sans-serif;
17
+ font-weight: 400;
18
+ margin: 0;
19
+ }
20
+
21
+ h2:not(:first-child) {
22
+ margin-top: 24px;
23
+ }
24
+
25
+ h3:not(:first-child) {
26
+ margin-top: 16px;
27
+ }
28
+
29
+ h4:not(:first-child) {
30
+ margin-top: 8px;
31
+ }
32
+
33
+ h1 {
34
+ margin-bottom: 24px;
35
+ }
36
+
37
+ h2, h3, h4 {
38
+ margin-bottom: 4px;
39
+ }
40
+
41
+ h5, h6 {
42
+ margin-bottom: 0px;
43
+ }
44
+
45
+ h1 {
46
+ font-size: 22pt;
47
+ }
48
+
49
+ h2 {
50
+ font-size: 11pt;
51
+ text-transform: uppercase;
52
+ }
53
+
54
+ h3 {
55
+ font-size: 12pt;
56
+ }
57
+
58
+ h4 {
59
+ font-size: 10pt;
60
+ text-transform: uppercase;
61
+ }
62
+
63
+ h5, h5 {
64
+ font-size: 10pt;
65
+ }
66
+
67
+ h1.subtitle, h2.subtitle, h3.subtitle,
68
+ h4.subtitle, h5.subtitle, h6.subtitle {
69
+ font-size: 90%;
70
+ opacity: 0.75;
71
+ text-transform: uppercase;
72
+ }
73
+
74
+ b, strong, sub, sup {
75
+ font-weight: 400;
76
+ margin: 0;
77
+ }
78
+
79
+ a, a:hover, a:focus {
80
+ font-weight: 400;
81
+ text-decoration: none;
82
+ margin: 0;
83
+ }
84
+
85
+ a.light, a.light:hover, a.light:focus {
86
+ font-weight: 300;
87
+ margin: 0;
88
+ }
89
+
90
+ small, i {
91
+ font-weight: 200;
92
+ margin: 0;
93
+ }
94
+
95
+ p {
96
+ margin: 0px;
97
+ margin-bottom: 16px;
98
+ }
99
+
100
+ blockquote {
101
+ font-weight: 200;
102
+ font-style: italic;
103
+ text-align: justify;
104
+ }
105
+
106
+ button {
107
+ text-transform: uppercase;
108
+ }
109
+
110
+ .text-uppercase {
111
+ text-transform: uppercase;
112
+ }
113
+
114
+ .text-title {
115
+ text-transform: capitalize;
116
+ }
117
+
118
+ .text-left {
119
+ text-align: left !important;
120
+ }
121
+
122
+ .text-left * {
123
+ text-align: left;
124
+ }
125
+
126
+ .text-right {
127
+ text-align: right !important;
128
+ }
129
+
130
+ .text-right * {
131
+ text-align: right;
132
+ }
133
+
134
+ .text-center {
135
+ text-align: center !important;
136
+ }
137
+
138
+ .text-center * {
139
+ text-align: center;
140
+ }
Binary file
Binary file
@@ -0,0 +1,13 @@
1
+ ---
2
+ ---
3
+ [
4
+ {% for post in site.posts %}
5
+ {
6
+
7
+ "title" : "{% if post.title != "" %}{{ post.title }}{% else %}{{ post.description | strip_html | escape | strip }}{%endif%}",
8
+ "url" : "{{ site.baseurl }}{{ post.url }}",
9
+ "category" : "{{ post.categories }}",
10
+ "date" : "{{ post.date | date: "%B %e, %Y" }}"
11
+ } {% unless forloop.last %},{% endunless %}
12
+ {% endfor %}
13
+ ]
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @file Manages the main navigation for the web app.
3
+ * @author saifkhichi96
4
+ */
5
+ 'use strict';
6
+
7
+
8
+ $(function() {
9
+ console.log("Setting up site navigation...");
10
+ // Instantiate toolbar
11
+ const topAppBarEl = document.querySelector('.mdc-top-app-bar');
12
+ const topAppBar = new mdc.topAppBar.MDCTopAppBar.attachTo(topAppBarEl);
13
+
14
+ // Instantiate navigation drawer
15
+ const drawerEl = document.querySelector('.mdc-drawer');
16
+ const drawer = new mdc.drawer.MDCDrawer.attachTo(drawerEl);
17
+
18
+ // Attach toolbar to navigation drawer
19
+ topAppBar.setScrollTarget(document.querySelector('.main-content'));
20
+ topAppBar.listen('MDCTopAppBar:nav', () => {
21
+ drawer.open = !drawer.open;
22
+ });
23
+
24
+ console.log("Navigation setup complete!");
25
+ });
26
+
27
+ // Spread breadcrumbs
28
+ var hardcodedCrumbs = $('.breadcrumbs').html()
29
+ $('.breadcrumbs').html("<li class='breadcrumb-item'><a class='muted' href='/'>Home</a></li>")
30
+ var pages = location.href.split("://")[1].split('#')[0].split('?')[0].split("/").filter(function(el) {
31
+ return el != "" && el != "index.html";
32
+ });
33
+ var url = ''
34
+ for (var i = 1, len = pages.length; i < len; i++) {
35
+ var page = pages[i].split('.')[0].replace('-', ' ').replace('_', ' ')
36
+ url += '/' + pages[i]
37
+ var oldHtml = $('.breadcrumbs').html()
38
+ if (i == pages.length - 1) {
39
+ var newHtml = oldHtml + hardcodedCrumbs
40
+ } else {
41
+ var newHtml = oldHtml + "<li class='breadcrumb-item'><a class='muted' href='" + url + "/'>" + page + "</a></li>"
42
+ }
43
+ $('.breadcrumbs').html(newHtml);
44
+ }
45
+
46
+ $('#last-modified').html(document.lastModified);
47
+
48
+ function back() {
49
+ if (document.referrer.indexOf(location.protocol + "//" + location.host) === 0) {
50
+ history.back();
51
+ } else {
52
+ window.location = '/';
53
+ }
54
+ }
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @file Manages filtering and navigation on the projects page.
3
+ * @author saifkhichi96
4
+ */
5
+ 'use strict';
6
+
7
+
8
+ $(function() {
9
+ // Define filters and grid (requires Isotope js)
10
+ console.log("Creating isotope grid...");
11
+ var platform = '.all';
12
+ var data = '.all';
13
+ var $workGrid = $('.grid').isotope({
14
+ itemSelector: '.all',
15
+ masonry: {
16
+ columnWidth: '.all',
17
+ isFitWidth: true
18
+ }
19
+ });
20
+
21
+ /** Callback to when a tab item is clicked. Activates selected tab
22
+ category and filters projects accordingly. */
23
+ function onTabClicked(tab) {
24
+ const tabBar = new mdc.tabBar.MDCTabBar(document.querySelector('.mdc-tab-bar'));
25
+ tabBar.activateTab(parseInt(tab.attr('role')));
26
+
27
+ platform = tab.attr('data-filter');
28
+ $workGrid.isotope({
29
+ filter: data + platform
30
+ });
31
+ }
32
+
33
+ /** Callback to when a platform filter is selected. Filters view to
34
+ show only projects for the selected platform. */
35
+ function onFilterClicked(filter) {
36
+ $('.mdc-chip').removeClass('active');
37
+ filter.find('.mdc-chip__text').parent().parent().addClass('active');
38
+
39
+ data = filter.attr('data-filter');
40
+ $workGrid.isotope({
41
+ filter: data + platform
42
+ });
43
+ }
44
+
45
+ /** Updates view to show default category, depending on the screen
46
+ size. */
47
+ function showDefaultCategory() {
48
+ if ($('.bottom-navigation').is(':visible')) {
49
+ $('.bottom-navigation .mdc-tab--active').click();
50
+ } else {
51
+ platform = '.all';
52
+ $workGrid.isotope({
53
+ filter: data + platform
54
+ });
55
+ }
56
+ }
57
+
58
+ // Set up click listeners
59
+ console.log("Registering view filters...");
60
+ $('.bottom-navigation .mdc-tab').click(function() { onTabClicked($(this)) });
61
+ $('.portfolio-filter li').click(function() { onFilterClicked($(this)) });
62
+
63
+ // Update view on window resize
64
+ $(window).resize(showDefaultCategory);
65
+
66
+ // Show defaults on start
67
+ console.log("Activating default view...");
68
+ $('.mdc-chip__text.active').parent().parent().click();
69
+ showDefaultCategory();
70
+
71
+ console.log("Projects setup complete!");
72
+ });
File without changes
@@ -0,0 +1,14 @@
1
+ self.addEventListener('install', (event) => {
2
+ console.log('👷', 'install', event);
3
+ self.skipWaiting();
4
+ });
5
+
6
+ self.addEventListener('activate', (event) => {
7
+ console.log('👷', 'activate', event);
8
+ return self.clients.claim();
9
+ });
10
+
11
+ self.addEventListener('fetch', function(event) {
12
+ // console.log('👷', 'fetch', event);
13
+ event.respondWith(fetch(event.request));
14
+ });
@@ -0,0 +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
+ */
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)}();
@@ -0,0 +1,22 @@
1
+ const divInstall = document.getElementById('installContainer');
2
+ const butInstall = document.getElementById('butInstall');
3
+
4
+ /* Only register a service worker if it's supported */
5
+ if ('serviceWorker' in navigator) {
6
+ navigator.serviceWorker.register('/assets/scripts/service-worker.js');
7
+ }
8
+
9
+ /**
10
+ * Warn the page must be served over HTTPS
11
+ * The `beforeinstallprompt` event won't fire if the page is served over HTTP.
12
+ * Installability requires a service worker with a fetch event handler, and
13
+ * if the page isn't served over HTTPS, the service worker won't load.
14
+ */
15
+ if (window.location.protocol === 'http:') {
16
+ const requireHTTPS = document.getElementById('requireHTTPS');
17
+ if (requireHTTPS != null) {
18
+ const link = requireHTTPS.querySelector('a');
19
+ link.href = window.location.href.replace('http://', 'https://');
20
+ requireHTTPS.classList.remove('hidden');
21
+ }
22
+ }