type-on-strap 0.4.2 → 0.5.3

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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +31 -8
  3. data/_includes/gallery.html +24 -0
  4. data/_includes/head.html +4 -9
  5. data/_includes/navbar.html +20 -34
  6. data/_layouts/bootstrap.html +1 -6
  7. data/_layouts/home.html +1 -1
  8. data/_layouts/search.html +2 -29
  9. data/_sass/.DS_Store +0 -0
  10. data/_sass/base/_global.scss +7 -9
  11. data/_sass/base/_utility.scss +10 -0
  12. data/_sass/base/_variables.scss +5 -3
  13. data/_sass/external/_syntax.scss +51 -0
  14. data/_sass/includes/_grid.scss +50 -0
  15. data/_sass/includes/_navbar.scss +22 -3
  16. data/_sass/{layouts → includes}/_portfolio.scss +0 -0
  17. data/_sass/layouts/_index.scss +9 -11
  18. data/_sass/type-on-strap.scss +2 -1
  19. data/assets/css/.DS_Store +0 -0
  20. data/assets/css/vendor/.DS_Store +0 -0
  21. data/assets/css/{bootstrap-iso.min.css → vendor/bootstrap-iso.min.css} +0 -0
  22. data/assets/css/vendor/font-awesome.min.css +4 -0
  23. data/assets/css/vendor/katex.min.css +1 -0
  24. data/assets/data/search.json +30 -0
  25. data/assets/js/.DS_Store +0 -0
  26. data/assets/js/main.min.js +1 -1
  27. data/assets/js/masonry_init.js +14 -0
  28. data/assets/js/navbar.js +28 -27
  29. data/assets/js/vendor/.DS_Store +0 -0
  30. data/assets/js/vendor/imagesloaded.min.js +1 -0
  31. data/assets/js/{katex.min.js → vendor/katex.min.js} +0 -0
  32. data/assets/js/vendor/masonry.pkgd.min.js +9 -0
  33. data/assets/js/{simple-jekyll-search.min.js → vendor/simple-jekyll-search.min.js} +0 -0
  34. metadata +19 -10
  35. data/assets/css/font-awesome.min.css +0 -4
  36. data/assets/css/katex.min.css +0 -1
  37. data/assets/js/bootstrap.min.js +0 -12
  38. data/assets/js/jquery-3.2.1.min.js +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82b5b5c11368433c2c385ae85a584e8b90be4021
4
- data.tar.gz: de33a7e934937ebf744c112fec92f39588b60dc7
3
+ metadata.gz: 8bad504dcdfc7c8ebdfacd2e2891ff14c1bc1207
4
+ data.tar.gz: 97c5fffe56086fffd571762ab90a5518817bf30e
5
5
  SHA512:
6
- metadata.gz: 8b0b4dc66af2c021ea11daa54491963102ee595749263bfbffb9d1f20dd6d7eaf18360ae7a080afca0827a44cebe57b70bb9c0de3cea2d7756afebc414af0e21
7
- data.tar.gz: ecd271cbd0587a1cffee6def6b6b7e24fd8b9c30e59092290806f2ed30a39c4d86922a8408678323fc92729d88e1fdc04a64f1aebedc5acb2ba1a6d07a4e936d
6
+ metadata.gz: 85bb8a6e1647d83f4bf6a535d40167e59724152b4361f33c9d1818194dfc9f4af15ed666d8910182eee8c8ed816647daeb678dd238b9cda892fd689cd003f426
7
+ data.tar.gz: c58bd421161c8072c36ca2ed390c41348749f365090fb27560f2c99e3f61dfbdf402881a42004cd3150e0ef3c59faf8147969e6d5f77e4e6bb1f7a14881d160e
data/README.md CHANGED
@@ -289,13 +289,32 @@ You can use this layout in another page (adding a title to it will make it appea
289
289
 
290
290
  ### Portfolio
291
291
 
292
- Portfolio is a feature bootstrapped page that will take all the markdown/html files in the `_portfolio` folder to create a 3x3 image portfolio matrix.
292
+ Portfolio is a feature bootstrapped page that will take all the markdown/html files in the `_portfolio` folder to create a 3-columns image portfolio matrix.
293
293
 
294
- The portfolio page can be enable/disable in the navigation bar through the `_config.yml` via:
294
+ To use the portfolio, simply create a `portfolio.md` with this information inside:
295
295
  ```yml
296
- # Scripts / Feature
297
- portfolio: true
296
+ ---
297
+ layout: bootstrap
298
+ title : Portfolio
299
+ ---
300
+
301
+ {% include portfolio.html %}
302
+ ```
303
+
304
+ ### Gallery
305
+
306
+ You can create a gallery using [Masonry JS](https://masonry.desandro.com/) which will placing the pictures in optimal position based on available vertical space. You need to specify the `gallery_path` which will be used to find the pictures to render. It will take all of the picture under that directory. Then use the `include` to add it in your page.
307
+
298
308
  ```
309
+ ---
310
+ layout: page
311
+ title: Gallery
312
+ gallery: "assets/img/pexels"
313
+ ---
314
+
315
+ {% include gallery.html gallery_path=page.gallery %}
316
+ ```
317
+
299
318
 
300
319
  ### Search
301
320
 
@@ -306,8 +325,10 @@ Then there's a `search.js` displaying the formated results entered in the `searc
306
325
 
307
326
  The search page can be enable/disable in the navigation bar through the `_config.yml` via:
308
327
  ```yml
309
- # Scripts / Feature
310
- search: true
328
+ special_page:
329
+ search:
330
+ icon: "search"
331
+ enabled: true
311
332
  ```
312
333
 
313
334
  ### Tags
@@ -330,8 +351,10 @@ All the tags will be listed in `tags.html` with a link toward the pages or posts
330
351
  The tags page can be enable/disable in the navigation bar through the `_config.yml` via:
331
352
 
332
353
  ```yml
333
- # Scripts / Feature
334
- tags: true
354
+ special_page:
355
+ tags:
356
+ icon: "tags"
357
+ enabled: true
335
358
  ```
336
359
 
337
360
  ## Template as a Gem
@@ -0,0 +1,24 @@
1
+ <style>
2
+ /* force scrollbar */
3
+ html { overflow-y: scroll; }
4
+
5
+ /* To overwrite page's padding, to get bigger images */
6
+ /* article {padding:2%;} */
7
+
8
+ </style>
9
+
10
+ <div id='masonry' class="grid">
11
+ <div class="grid-sizer"></div>
12
+ <div class="gutter-sizer"></div>
13
+ {% for image in site.static_files %}
14
+ {% if image.path contains include.gallery_path %}
15
+
16
+ <img src="{{ image.path | prepend: site.baseurl }}" alt="" class="grid-item" style="padding: 0;">
17
+
18
+ {% endif %}
19
+ {% endfor %}
20
+ </div>
21
+
22
+ <!-- Require JQuery >= 3.2.1 Requireas well -->
23
+ <script src="{{ site.baseurl }}/assets/js/vendor/masonry.pkgd.min.js" type="text/javascript"></script>
24
+ <script src="{{ site.baseurl }}/assets/js/vendor/imagesloaded.min.js" type="text/javascript"></script>
data/_includes/head.html CHANGED
@@ -2,10 +2,7 @@
2
2
  <meta charset="utf-8">
3
3
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
4
4
 
5
- <!-- JQuery (used for bootstrap and jekyll search) -->
6
- <script src="{{ site.baseurl }}/assets/js/jquery-3.2.1.min.js" ></script>
7
-
8
- <!-- Main JS (navbar.js and katex_init.js)-->
5
+ <!-- Main JS (navbar.js, katex_init.js and masonry_init.js)-->
9
6
  <script defer=true src="{{ site.baseurl }}/assets/js/main.min.js"></script>
10
7
 
11
8
  <!-- CSS -->
@@ -22,7 +19,7 @@
22
19
 
23
20
  <!-- Font Awesome -->
24
21
  <!-- <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"> -->
25
- <link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/css/font-awesome.min.css">
22
+ <link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/css/vendor/font-awesome.min.css">
26
23
 
27
24
  <!-- Google Fonts -->
28
25
  {% if site.theme_settings.google_fonts %}
@@ -31,10 +28,8 @@
31
28
 
32
29
  <!-- KaTeX 0.8.3 -->
33
30
  {% if site.theme_settings.katex %}
34
- <!--<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.css">
35
- <script src="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.js"></script> -->
36
- <link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/css/katex.min.css">
37
- <script src="{{ site.baseurl }}/assets/js/katex.min.js">
31
+ <link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/css/vendor/katex.min.css">
32
+ <script src="{{ site.baseurl }}/assets/js/vendor/katex.min.js">
38
33
  </script>
39
34
  {% endif %}
40
35
 
@@ -18,50 +18,36 @@
18
18
  </a>
19
19
 
20
20
  <!-- Menu -->
21
- <ul>
21
+ <ul class="hide">
22
+ <!-- Auto Generation of NORMAL pages in the navbar -->
23
+ {% assign name_page = "" %}
24
+
22
25
  {% for page in site.pages %}
23
26
  {% if page.title and page.hide != true %}
24
- <li class="separator">
25
- |
26
- </li>
27
+ {% if name_page contains page.title %}
28
+ {% else %}
29
+ <li class="separator"> | </li>
27
30
  <li>
28
31
  <a class="clear" href="{{ page.url | relative_url }}">
29
32
  {{ page.title }}
30
33
  </a>
31
34
  </li>
32
35
  {% endif %}
33
- {% endfor %}
34
- {% if site.theme_settings.portfolio %}
35
- <li class="separator">
36
- |
37
- </li>
38
- <li>
39
- <a class="clear" href="{{ site.url }}{{ site.baseurl }}/portfolio">
40
- Portfolio
41
- </a>
42
- </li>
43
- {% endif %}
44
- {% if site.theme_settings.search %}
45
- <li class="separator">
46
- |
47
- </li>
48
- <li>
49
- <a class="clear" href="{{ site.url }}{{ site.baseurl }}/search">
50
- <i class="fa fa-search" aria-hidden="true"></i>
51
- </a>
52
- </li>
53
- {% endif %}
54
- {% if site.theme_settings.tags %}
55
- <li class="separator">
56
- |
57
- </li>
58
- <li>
59
- <a class="clear" href="{{ site.url }}{{ site.baseurl }}/tags">
60
- <i class="fa fa-tags" aria-hidden="true"></i>
61
- </a>
62
- </li>
36
+ {% assign name_page = page.title | append: name_page %}
63
37
  {% endif %}
38
+ {% endfor %}
64
39
 
40
+ <!-- Auto Generation of SPECIAL pages in the navbar -->
41
+ {% for item in site.theme_settings.special_page %}
42
+ {% if item[1].enabled %}
43
+ <li class="separator"> | </li>
44
+ <li>
45
+ <a class="clear" href="{{ site.url }}{{ site.baseurl }}/{{ item[1].icon }}">
46
+ <i class="fa fa-{{ item[1].icon }}" aria-hidden="true"></i>
47
+ </a>
48
+ </li>
49
+ {% endif %}
50
+ {% endfor %}
65
51
  </ul>
66
52
 
67
53
  </nav>
@@ -3,10 +3,7 @@ layout: default
3
3
  ---
4
4
 
5
5
  <!-- Bootstrap-3.3.7 isolation CSS -->
6
- <link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/css/bootstrap-iso.min.css">
7
-
8
- <!-- Bootstrap JS -->
9
- <script src="{{ site.baseurl }}/assets/js/bootstrap.min.js"></script>
6
+ <link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/assets/css/vendor/bootstrap-iso.min.css">
10
7
 
11
8
  <article {% if page.feature-img %}class="feature-image" {% endif %}>
12
9
  <header id="main" style="background-image: url('{{ site.baseurl }}/{{ page.feature-img }}')">
@@ -20,8 +17,6 @@ layout: default
20
17
  </section>
21
18
  {% endif %}
22
19
 
23
-
24
-
25
20
  <!-- Bootstrap will work within this div -->
26
21
  <section>
27
22
  <div class="bootstrap-iso">
data/_layouts/home.html CHANGED
@@ -30,7 +30,7 @@ layout: default
30
30
  </p>
31
31
  </header>
32
32
  <div class="excerpt">
33
- {{ post.excerpt | strip_html }}
33
+ {{ post.excerpt | strip_html | escape }}
34
34
  <!--{{ post.content | strip_html | truncate: "250" }}-->
35
35
  <!--<a class="button" href="{{ post.url | prepend: site.baseurl }}">
36
36
  {{ site.theme_settings.str_continue_reading }}
data/_layouts/search.html CHANGED
@@ -10,40 +10,13 @@ layout: page
10
10
 
11
11
  <section>
12
12
  <!-- Script pointing to jekyll-search.js -->
13
- <script src="{{ site.baseurl }}/assets/js/simple-jekyll-search.min.js" type="text/javascript"></script>
13
+ <script src="{{ site.baseurl }}/assets/js/vendor/simple-jekyll-search.min.js" type="text/javascript"></script>
14
14
 
15
15
  <script type="text/javascript">
16
16
  SimpleJekyllSearch({
17
17
  searchInput: document.getElementById('search-input'),
18
18
  resultsContainer: document.getElementById('results-container'),
19
- json: [
20
- {% if site.theme_settings.search %}
21
- {% for post in site.posts %}
22
- {
23
- "title" : "{{ post.title | escape }}",
24
- "category" : "{{ post.category }}",
25
- "tags" : "{{ post.tags | join: ', ' | prepend: " " }}",
26
- "url" : "{{ site.baseurl }}{{ post.url }}",
27
- "date" : "{{ post.date | date: "%B %-d, %Y" }}",
28
- "excerpt" : "{{ post.content | strip_html | strip_newlines | replace: '"', '\\"' | truncate: '250'}}",
29
- "content" : "{{ post.content | strip_html | strip_newlines | replace: '"', '\\"' }}"
30
- } {% unless forloop.last %},{% endunless %}
31
- {% endfor %},
32
- {% for page in site.portfolio %}
33
- {
34
- {% if page.title != nil %}
35
- "title" : "{{ page.title | escape }}",
36
- "category" : "{{ page.category }}",
37
- "tags" : "{{ page.tags | join: ', ' | prepend: " " }}",
38
- "url" : "{{ site.baseurl }}{{ page.url }}",
39
- "date" : "{{ page.date | date: "%B %-d, %Y" }}",
40
- "excerpt" : "{{ post.content | strip_html | strip_newlines | replace: '"', '\\"' | truncate: '250'}}",
41
- "content" : "{{ page.content | strip_html | strip_newlines | replace: '"', '\\"' }}"
42
- {% endif %}
43
- } {% unless forloop.last %},{% endunless %}
44
- {% endfor %}
45
- {% endif %}
46
- ],
19
+ json: '{{ site.baseurl }}/assets/data/search.json',
47
20
  searchResultTemplate: '<div class="search-title"><a href="{url}"><h3> {title}</h3></a><div class="meta">{date} <div class="right"><i class="fa fa-tag"></i> {tags}</div></div><p>{excerpt}</p></div><hr> ',
48
21
  noResultsText: 'No results found',
49
22
  limit: 10,
data/_sass/.DS_Store ADDED
Binary file
@@ -48,11 +48,11 @@ h6 {
48
48
  }
49
49
 
50
50
  h1 {
51
- font-size: 2.5em;
51
+ font-size: 2.3em;
52
52
  }
53
53
 
54
54
  h2 {
55
- font-size: 2em;
55
+ font-size: 1.75em;
56
56
  }
57
57
 
58
58
  h3 {
@@ -80,10 +80,8 @@ table {
80
80
  table-layout: fixed;
81
81
  width: 100%;
82
82
  word-wrap: break-word;
83
- @media (max-width: 1100px) {
84
- overflow-x: scroll;
85
- display: inline-block;
86
- }
83
+ overflow-x: scroll;
84
+ display: inline-block;
87
85
  }
88
86
 
89
87
  td,
@@ -171,7 +169,7 @@ img[align=right] {
171
169
 
172
170
  /* ---- Responsive ---- */
173
171
 
174
- @media screen and (max-width: $sm-break) {
172
+ @media screen and (max-width: $break) {
175
173
  h1 {
176
174
  font-size: 2em;
177
175
  }
@@ -182,10 +180,10 @@ img[align=right] {
182
180
  font-size: 1em;
183
181
  }
184
182
  h4 {
185
- font-size: 0.75em;
183
+ font-size: 0.9em;
186
184
  }
187
185
  p,
188
186
  li {
189
- font-size: 0.75em;
187
+ font-size: 0.8em;
190
188
  }
191
189
  }
@@ -16,6 +16,16 @@
16
16
  }
17
17
  }
18
18
 
19
+ %padding-medium {
20
+ padding: $padding-medium $padding-large;
21
+ @media (max-width: 1000px) {
22
+ padding: $padding-medium * 1.5 $padding-large / 1.6;
23
+ }
24
+ @media (max-width: 576px) {
25
+ padding: $padding-medium;
26
+ }
27
+ }
28
+
19
29
  .header-txt-shadow {
20
30
  text-shadow: 1px 1px 2px $text-shadow;
21
31
  }
@@ -6,17 +6,19 @@ $font-size: 1.25em;
6
6
 
7
7
  // Padding
8
8
  $padding-large: 20%;
9
- $padding-small: 5%;
9
+ $padding-medium: 6%;
10
+ $padding-small: 4%;
10
11
  $padding-x-small: 3%;
11
12
 
12
13
  // Brand colours
14
+ $theme-color: #507492;
13
15
  $brand-color: #fff;
14
16
  $background-color: #fff;
15
17
  $border-color: rgba(0, 0, 0, 0.1); // rgba recommended if using feature images
16
18
 
17
19
  // Typography colours
18
20
  $text-color: #383838;
19
- $link-color: #507492; // #1ABC9C;
21
+ $link-color: $theme-color; // #1ABC9C;
20
22
  $selection-color: #D4D4D4; // visible when highlighting text
21
23
  $blockquote-color: #EEF7FA; // $background-color;
22
24
 
@@ -33,7 +35,7 @@ $navbar-separator-opacity: 0;
33
35
  $feature-image-text-color: #fff;
34
36
  $feature-image-size: cover; // options include "cover", "contain", "auto"
35
37
  // Header description box
36
- $header-desc-background-color: #507492;
38
+ $header-desc-background-color: $theme-color;
37
39
  $header-desc-text-color: #FFF;
38
40
 
39
41
  // Mobile display
@@ -124,3 +124,54 @@ figure.highlight {
124
124
  .gist .blob-num {
125
125
  width: 3.5% !important;
126
126
  }
127
+
128
+ // Fix nbconvert dataframe
129
+ .dataframe tbody {
130
+ font-size: 0.8em;
131
+ border-color: white;
132
+
133
+ tr{
134
+ :nth-child(even) {
135
+ background-color: #f8f8f8;
136
+ }
137
+
138
+ th {
139
+ border-top: 0;
140
+ border-left: 0;
141
+ border-bottom: 0;
142
+ }
143
+
144
+
145
+ td {
146
+ padding: 0;
147
+ border: 0;
148
+ text-align: center;
149
+ }
150
+ }
151
+
152
+
153
+ }
154
+
155
+ .dataframe thead tr {
156
+ :nth-child(n+2) {
157
+ color: black;
158
+ //width: 100px;
159
+
160
+ font-size: 0.75em;
161
+ text-align: center !important;
162
+ border-top: 0;
163
+ border-left: 0;
164
+ border-right: 0;
165
+ }
166
+
167
+ :first-child {
168
+ border-top: 0;
169
+ border-left: 0;
170
+ }
171
+
172
+ }
173
+
174
+ table.dataframe {
175
+ border: 0px solid $border-color;
176
+ border-collapse: collapse;
177
+ }
@@ -0,0 +1,50 @@
1
+ /* ---- grid ---- */
2
+
3
+ .grid {
4
+ padding-bottom: 6%;
5
+ padding-top: 1%;
6
+
7
+
8
+ /* clear fix */
9
+ &:after {
10
+ content: '';
11
+ display: block;
12
+ clear: both;
13
+ }
14
+ }
15
+
16
+ /* ---- .grid-item within masonry ---- */
17
+
18
+ .grid-sizer,
19
+ .grid-item {
20
+ /* state column width */
21
+ width: 32.6%;
22
+ }
23
+
24
+ .grid-item {
25
+ float: left;
26
+ border-radius: 5px;
27
+
28
+
29
+ img {
30
+ /* for image formatting in the masonry */
31
+ display: block;
32
+ max-width: 100%;
33
+ min-height: 30%;
34
+ }
35
+ }
36
+
37
+ /* --- Masonry gutter size --- */
38
+
39
+ .gutter-sizer {
40
+
41
+ width: 1%;
42
+ }
43
+
44
+ .grid-item:first-of-type {
45
+ margin: 0;
46
+ }
47
+
48
+ .grid-item {
49
+ margin-bottom: 1%;
50
+ }