daiblogs 0.1.0 → 0.2.0

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 (81) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/footer.html +69 -3
  3. data/_includes/head.html +3 -0
  4. data/_includes/header.html +9 -1
  5. data/_includes/svg-defs.html +24 -6
  6. data/_includes/webfonts.html +1 -1
  7. data/_layouts/blog.html +4 -0
  8. data/_layouts/default.html +16 -4
  9. data/_layouts/home.html +181 -0
  10. data/_layouts/post.html +31 -0
  11. data/{assets/_sass/_blog.scss → _sass/blog.scss} +1 -0
  12. data/{assets/_sass → _sass}/bourbon/_bourbon-deprecated-upcoming.scss +0 -0
  13. data/{assets/_sass → _sass}/bourbon/_bourbon.scss +0 -0
  14. data/{assets/_sass → _sass}/bourbon/addons/_button.scss +0 -0
  15. data/{assets/_sass → _sass}/bourbon/addons/_clearfix.scss +0 -0
  16. data/{assets/_sass → _sass}/bourbon/addons/_font-family.scss +0 -0
  17. data/{assets/_sass → _sass}/bourbon/addons/_hide-text.scss +0 -0
  18. data/{assets/_sass → _sass}/bourbon/addons/_html5-input-types.scss +0 -0
  19. data/{assets/_sass → _sass}/bourbon/addons/_position.scss +0 -0
  20. data/{assets/_sass → _sass}/bourbon/addons/_prefixer.scss +0 -0
  21. data/{assets/_sass → _sass}/bourbon/addons/_retina-image.scss +0 -0
  22. data/{assets/_sass → _sass}/bourbon/addons/_size.scss +0 -0
  23. data/{assets/_sass → _sass}/bourbon/addons/_timing-functions.scss +0 -0
  24. data/{assets/_sass → _sass}/bourbon/addons/_triangle.scss +0 -0
  25. data/{assets/_sass → _sass}/bourbon/css3/_animation.scss +0 -0
  26. data/{assets/_sass → _sass}/bourbon/css3/_appearance.scss +0 -0
  27. data/{assets/_sass → _sass}/bourbon/css3/_backface-visibility.scss +0 -0
  28. data/{assets/_sass → _sass}/bourbon/css3/_background-image.scss +0 -0
  29. data/{assets/_sass → _sass}/bourbon/css3/_background.scss +0 -0
  30. data/{assets/_sass → _sass}/bourbon/css3/_border-image.scss +0 -0
  31. data/{assets/_sass → _sass}/bourbon/css3/_border-radius.scss +0 -0
  32. data/{assets/_sass → _sass}/bourbon/css3/_box-sizing.scss +0 -0
  33. data/{assets/_sass → _sass}/bourbon/css3/_columns.scss +0 -0
  34. data/{assets/_sass → _sass}/bourbon/css3/_flex-box.scss +0 -0
  35. data/{assets/_sass → _sass}/bourbon/css3/_font-face.scss +0 -0
  36. data/{assets/_sass → _sass}/bourbon/css3/_hidpi-media-query.scss +0 -0
  37. data/{assets/_sass → _sass}/bourbon/css3/_image-rendering.scss +0 -0
  38. data/{assets/_sass → _sass}/bourbon/css3/_inline-block.scss +0 -0
  39. data/{assets/_sass → _sass}/bourbon/css3/_keyframes.scss +0 -0
  40. data/{assets/_sass → _sass}/bourbon/css3/_linear-gradient.scss +0 -0
  41. data/{assets/_sass → _sass}/bourbon/css3/_perspective.scss +0 -0
  42. data/{assets/_sass → _sass}/bourbon/css3/_placeholder.scss +0 -0
  43. data/{assets/_sass → _sass}/bourbon/css3/_radial-gradient.scss +0 -0
  44. data/{assets/_sass → _sass}/bourbon/css3/_transform.scss +0 -0
  45. data/{assets/_sass → _sass}/bourbon/css3/_transition.scss +0 -0
  46. data/{assets/_sass → _sass}/bourbon/css3/_user-select.scss +0 -0
  47. data/{assets/_sass → _sass}/bourbon/functions/_compact.scss +0 -0
  48. data/{assets/_sass → _sass}/bourbon/functions/_flex-grid.scss +0 -0
  49. data/{assets/_sass → _sass}/bourbon/functions/_grid-width.scss +0 -0
  50. data/{assets/_sass → _sass}/bourbon/functions/_linear-gradient.scss +0 -0
  51. data/{assets/_sass → _sass}/bourbon/functions/_modular-scale.scss +0 -0
  52. data/{assets/_sass → _sass}/bourbon/functions/_px-to-em.scss +0 -0
  53. data/{assets/_sass → _sass}/bourbon/functions/_radial-gradient.scss +0 -0
  54. data/{assets/_sass → _sass}/bourbon/functions/_tint-shade.scss +0 -0
  55. data/{assets/_sass → _sass}/bourbon/functions/_transition-property-name.scss +0 -0
  56. data/{assets/_sass → _sass}/bourbon/helpers/_deprecated-webkit-gradient.scss +0 -0
  57. data/{assets/_sass → _sass}/bourbon/helpers/_gradient-positions-parser.scss +0 -0
  58. data/{assets/_sass → _sass}/bourbon/helpers/_linear-positions-parser.scss +0 -0
  59. data/{assets/_sass → _sass}/bourbon/helpers/_radial-arg-parser.scss +0 -0
  60. data/{assets/_sass → _sass}/bourbon/helpers/_radial-positions-parser.scss +0 -0
  61. data/{assets/_sass → _sass}/bourbon/helpers/_render-gradients.scss +0 -0
  62. data/{assets/_sass → _sass}/bourbon/helpers/_shape-size-stripper.scss +0 -0
  63. data/_sass/flickity.scss +137 -0
  64. data/{assets/_sass/_grid.scss → _sass/grid.scss} +1 -8
  65. data/_sass/layout.scss +991 -0
  66. data/{assets/_sass/_legacy.scss → _sass/legacy.scss} +30 -22
  67. data/{assets/_sass/_mixins.scss → _sass/mixins.scss} +2 -1
  68. data/_sass/typesetting.scss +8 -0
  69. data/{assets/_sass/_variables.scss → _sass/variables.scss} +25 -14
  70. data/assets/css/site.scss +4 -1
  71. data/assets/images/blockquote-right.svg +9 -0
  72. data/assets/images/blockquote.svg +9 -0
  73. data/assets/images/bottom-rec.svg +9 -0
  74. data/assets/images/full-rec.svg +9 -0
  75. data/assets/images/open-rec.svg +11 -0
  76. data/assets/images/top-rec.svg +9 -0
  77. data/assets/js/progress.js +73 -0
  78. data/assets/js/site.js +12 -0
  79. metadata +73 -65
  80. data/assets/_sass/_layout.scss +0 -2
  81. data/assets/_sass/_typesetting.scss +0 -0
@@ -1,4 +1,5 @@
1
1
 
2
+ @charset "utf-8";
2
3
  * {
3
4
  -webkit-box-sizing: border-box;
4
5
  -moz-box-sizing: border-box;
@@ -41,7 +42,7 @@ Classes to pul: wrapper, #header, header-utility_nav, header-site_nav, header-in
41
42
  body.st-ui-overlay-active{
42
43
  overflow: visible !important;
43
44
  }
44
- .container, .header-inner, .footer-inner{
45
+ .container, .header-inner, .footer-inner, .post-footer{
45
46
  @include width(4);
46
47
  margin: auto;
47
48
  @include responsive(small-screens){
@@ -64,12 +65,12 @@ body.st-ui-overlay-active{
64
65
  }
65
66
 
66
67
 
67
- // 🎌 HEADER 🎌
68
+ // HEADER
68
69
 
69
70
  header{
70
71
  position: fixed;
71
72
  width: 100%;
72
- z-index: 10;
73
+ z-index: 999;
73
74
  }
74
75
  .header-nav{
75
76
  @include clearfix;
@@ -102,7 +103,9 @@ header{
102
103
  margin-right: auto;
103
104
  margin-left: auto;
104
105
  }
105
- // 🎌 HEADER: UTILITY NAVIGATION 🎌
106
+
107
+ // HEADER: UTILITY NAVIGATION
108
+
106
109
  .st-ui-injected-overlay-container *:not(select){
107
110
  font-family: 'proxima-nova', helvetica, arial, sans-serif !important;
108
111
  .st-ui-header input[type="text"]:focus{
@@ -147,7 +150,7 @@ header{
147
150
  display:none !important;
148
151
  }
149
152
  .header-utility_nav{
150
- background-color: $slate;
153
+ background-color:$ofc_slate;
151
154
  height: 32px;
152
155
  @include responsive(small-screens){
153
156
  height: 44px;
@@ -159,7 +162,7 @@ header{
159
162
  height: 64.594px;
160
163
  }
161
164
  }
162
- // 🎌 HEADER: PRIMARY NAVIGATION 🎌
165
+ // HEADER: PRIMARY NAVIGATION
163
166
 
164
167
  .header-site_nav{
165
168
  background-color: $nav_gray;
@@ -235,6 +238,7 @@ header{
235
238
  ul.dropdown{
236
239
  visibility: hidden;
237
240
  opacity: 0;
241
+ z-index: 999;
238
242
  margin-top: -3px;
239
243
  transition: visibility 0s linear 0.3s, opacity 0.3s ease-in-out, margin-top 0.3s ease-in-out;
240
244
  list-style-type: none;
@@ -289,6 +293,7 @@ ul.dropdown{
289
293
  li.has-dropdown:hover ul.dropdown{
290
294
  visibility: visible;
291
295
  opacity: 1;
296
+ z-index: 999;
292
297
  margin-top: 0;
293
298
  transition: opacity 0.3s ease-in-out, margin-top 0.3s ease-in-out;
294
299
  }
@@ -297,17 +302,19 @@ li.has-dropdown:hover > a{
297
302
  }
298
303
 
299
304
  footer{
300
- background-color: $slate;
305
+ background-color:$ofc_slate;
301
306
  padding-top: 2rem;
302
- margin-top: 2rem;
303
307
  }
304
308
  .footer-inner{
305
309
  min-height: 500px;
306
310
  @include clearfix;
307
311
  }
308
312
 
309
- // 🎌 FOOTER: NAV 🎌
313
+ // FOOTER: NAV
310
314
 
315
+ .copyright{
316
+ color: $nav_links;
317
+ }
311
318
  .footer-nav{
312
319
  @include width(1);
313
320
  @include responsive(small-screens){
@@ -347,7 +354,7 @@ footer{
347
354
  .footer-nav.news{
348
355
  text-align: right;
349
356
  }
350
- // 🎌 FOOTER: BOTTOM 🎌
357
+ // FOOTER: BOTTOM
351
358
 
352
359
  .footer-bottom{
353
360
  position: relative;
@@ -418,7 +425,7 @@ footer{
418
425
  }
419
426
  }
420
427
 
421
- // 🎌 HEROBOX 🎌
428
+ // HEROBOX
422
429
  code.highlighter-rouge{
423
430
  position: relative;
424
431
  display: block;
@@ -441,14 +448,14 @@ code.highlighter-rouge{
441
448
  }
442
449
  p{
443
450
  color: $text-white;
444
- -webkit-transform: translate3d(0, 0, 0);
451
+ transform: translate3d(0, 0, 0);
445
452
  font-size: 1.5rem;
446
453
  }
447
454
  }
448
455
  .gallery-subhead{
449
456
  font-weight: 700;
450
457
  }
451
- // 🎌 GLOBAL 🎌
458
+ // GLOBAL
452
459
  html{
453
460
  line-height: 1.5;
454
461
  font-size: 10px;
@@ -489,7 +496,7 @@ a:focus {
489
496
  text-decoration: none;
490
497
  }
491
498
 
492
- // 🎌 HEADINGS 🎌
499
+ // HEADINGS
493
500
 
494
501
  h1, h2, h3, h4, h5, h6 {
495
502
  margin-bottom: .5em;
@@ -506,6 +513,7 @@ h2 {
506
513
  }
507
514
  h3 {
508
515
  font-size: 1.2rem;
516
+ line-height: 1.4;
509
517
  }
510
518
  h4, h5, h6 {
511
519
  font-size: 1.2rem;
@@ -545,7 +553,7 @@ h4, h5, h6 {
545
553
  }
546
554
  }
547
555
 
548
- // 🎌 MAIN 🎌
556
+ // MAIN
549
557
  ul, ol, dl {
550
558
  margin-top: 0;
551
559
  margin-bottom: 1rem;
@@ -635,7 +643,7 @@ strong {
635
643
  font-size: .8rem;
636
644
  }
637
645
 
638
- // 🎌 NODE 🎌
646
+ // NODE
639
647
 
640
648
  .node-nav--links{
641
649
  h4{
@@ -660,7 +668,7 @@ strong {
660
668
  .node-inner li{
661
669
  margin-bottom: .8rem;
662
670
  }
663
- // 🎌 Solutions 🎌
671
+ // Solutions
664
672
  .solution-title{
665
673
  svg{
666
674
  height: 2rem;
@@ -680,12 +688,12 @@ h2.solution-title svg{
680
688
  }
681
689
  }
682
690
 
683
- // 🎌 LEADERS 🎌
691
+ // LEADERS
684
692
  .leaders-details p{
685
693
  font-weight: bold;
686
694
  }
687
695
 
688
- // 🎌 FOOTER 🎌
696
+ // FOOTER
689
697
 
690
698
  .footer-nav{
691
699
  h4{
@@ -1693,7 +1701,7 @@ div.st-ui-overlay.dismiss div.st-ui-container-overlay,div.st-ui-overlay.dismiss
1693
1701
  z-index: 99999997;
1694
1702
  background: #F0F4F7;
1695
1703
  background-clip: padding-box;
1696
- -webkit-backface-visibility: hidden;
1704
+ backface-visibility: hidden;
1697
1705
  -moz-border-radius: 5px 5px 0 0;
1698
1706
  -webkit-border-radius: 5px;
1699
1707
  border-radius: 5px 5px 0 0
@@ -1786,7 +1794,7 @@ a.st-ui-stamp {
1786
1794
  background: #F0F4F7;
1787
1795
  z-index: 99999996;
1788
1796
  background-clip: padding-box;
1789
- -webkit-backface-visibility: hidden;
1797
+ backface-visibility: hidden;
1790
1798
  -moz-border-radius: 0 0 5px 5px;
1791
1799
  -webkit-border-radius: 0;
1792
1800
  border-radius: 0 0 5px 5px
@@ -1851,7 +1859,7 @@ a.st-ui-stamp {
1851
1859
  }
1852
1860
 
1853
1861
  .st-ui-injected-overlay-container .st-ui-content * {
1854
- -webkit-transform: translate3d(0, 0, 0)
1862
+ transform: translate3d(0, 0, 0)
1855
1863
  }
1856
1864
 
1857
1865
  .st-ui-injected-overlay-container .st-ui-content .st-query-present {
@@ -1,7 +1,8 @@
1
+ @charset "utf-8";
1
2
  .transition-basic {
2
3
  transition: all 0.4s ease;
3
4
  }
4
-
5
+ $fuck: #444B60;
5
6
  // media queries
6
7
  $breakpoints: (
7
8
  'small': 480px,
@@ -0,0 +1,8 @@
1
+ @charset "utf-8";
2
+ .emphasize{
3
+ font-weight: 200;
4
+ }
5
+
6
+ h1, h2, h3, h4{
7
+ font-family: "Helvetica", "Proxima-Nova";
8
+ }
@@ -1,25 +1,24 @@
1
+ @charset "utf-8";
1
2
 
2
- // 🎌 Variables 🎌
3
-
4
-
5
- // 🎌 Weights 🎌
6
- /*
7
- thin: 100
8
- light: 300
9
- regular: 400
10
- bold: 700
11
- black: 900
12
-
13
- */
14
3
  // Colors
4
+ $theme_primary: #455560;
5
+ $ofc_slate: #455560;
6
+ $ofc_blue: #a1c7e3;
7
+ $ofc_lightgray: #e4e5e6;
8
+ $ofc_lightblue: #B5BCC5;
9
+ $ofc_super_lightblue: #A2C7E2;
10
+ $green: #8fc73e;
11
+ $blue: #a1c7e3;
12
+
15
13
  $emphasis: #313437;
16
14
  $nav_black: #1c242b;
17
15
  $nav_gray: #f2f0ed;
18
16
  $link_green: #74BC70;
17
+ $link_blue: #1d81bf;
19
18
  $nav_links: #c8c6c2;
20
19
  $nav_links-main: #aaa7a2;
21
20
  $nav_links-main--current: #323940;
22
- $slate: #303B40;
21
+ $slate: #444B60;
23
22
  $nav_links-footer--blue: #8FC3EA;
24
23
  $button-green: rgb(116, 188, 112);
25
24
  $text-white: rgb(255, 255, 255);
@@ -32,8 +31,10 @@ $width-medium: 600px; //8bits
32
31
  $width-wide: 800px; //10bits
33
32
  $width-ultra-wide: 960px; //12bits
34
33
  $width-extra-ultra-wide: 1400px;
34
+ $superish-wide: 1500px;
35
+ $super-wide: 1830px;
35
36
 
36
- // 🎌 MIXINS 🎌
37
+ $condensed-titles: proxima-nova-condensed;
37
38
 
38
39
  // Responsive mixin for bubbled media-querries
39
40
  @mixin responsive($width){
@@ -67,4 +68,14 @@ $width-extra-ultra-wide: 1400px;
67
68
  @content;
68
69
  }
69
70
  }
71
+ @else if $width == super-wide-screens{
72
+ @media screen and (min-width: $super-wide){
73
+ @content;
74
+ }
75
+ }
76
+ @else if $width == superish-wide-screens{
77
+ @media screen and (min-width: $superish-wide){
78
+ @content;
79
+ }
80
+ }
70
81
  }
data/assets/css/site.scss CHANGED
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  ---
3
+ @charset "utf-8";
4
+
3
5
  @import "variables";
4
6
  @import "grid";
5
7
  @import "mixins";
@@ -7,4 +9,5 @@
7
9
  @import "legacy";
8
10
  @import "layout";
9
11
  @import "typesetting";
10
- @import "blog";
12
+ @import "blog";
13
+ @import "flickity";
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="259px" height="192px" viewBox="0 0 259 192" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 62 (91390) - https://sketch.com -->
4
+ <title>Untitled</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.25">
7
+ <path d="M259,192 L259,102.149466 L205.564912,102.149466 C204.65731,93.0391459 206.472515,83.5871886 211.010526,73.7935943 C218.952047,55.3451957 234.381287,42.5907473 257.298246,35.5302491 L257.298246,35.5302491 L257.298246,0 C227.120468,6.14946619 203.692982,19.0177936 187.015789,38.6049822 C170.338596,58.1921708 162,85.2953737 162,119.914591 L162,119.914591 L162,192 L259,192 Z M97,192 L97,102.149466 L43.5649123,102.149466 C42.8842105,92.1281139 44.5859649,82.4483986 48.6701754,73.1103203 C56.6116959,55.3451957 72.154386,42.8185053 95.2982456,35.5302491 L95.2982456,35.5302491 L95.2982456,0 C64.2128655,6.14946619 40.5584795,19.1316726 24.3350877,38.9466192 C8.11169591,58.7615658 0,85.7508897 0,119.914591 L0,119.914591 L0,192 L97,192 Z" id="“" fill="#D3E3F0" fill-rule="nonzero" transform="translate(129.500000, 96.000000) scale(-1, -1) translate(-129.500000, -96.000000) "></path>
8
+ </g>
9
+ </svg>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="259px" height="192px" viewBox="0 0 259 192" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 62 (91390) - https://sketch.com -->
4
+ <title>Untitled</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <path d="M259,192 L259,102.149466 L205.564912,102.149466 C204.65731,93.0391459 206.472515,83.5871886 211.010526,73.7935943 C218.952047,55.3451957 234.381287,42.5907473 257.298246,35.5302491 L257.298246,35.5302491 L257.298246,0 C227.120468,6.14946619 203.692982,19.0177936 187.015789,38.6049822 C170.338596,58.1921708 162,85.2953737 162,119.914591 L162,119.914591 L162,192 L259,192 Z M97,192 L97,102.149466 L43.5649123,102.149466 C42.8842105,92.1281139 44.5859649,82.4483986 48.6701754,73.1103203 C56.6116959,55.3451957 72.154386,42.8185053 95.2982456,35.5302491 L95.2982456,35.5302491 L95.2982456,0 C64.2128655,6.14946619 40.5584795,19.1316726 24.3350877,38.9466192 C8.11169591,58.7615658 0,85.7508897 0,119.914591 L0,119.914591 L0,192 L97,192 Z" id="“" fill="#E4E5E6" fill-rule="nonzero"></path>
8
+ </g>
9
+ </svg>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="805px" height="553px" viewBox="0 0 805 553" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 62 (91390) - https://sketch.com -->
4
+ <title>Untitled</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <rect id="Rectangle" stroke="#FFFFFF" stroke-width="9" x="5" y="-340" width="795" height="888"></rect>
8
+ </g>
9
+ </svg>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="805px" height="464px" viewBox="0 0 805 464" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 62 (91390) - https://sketch.com -->
4
+ <title>Untitled</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <rect id="Rectangle" stroke="#FFFFFF" stroke-width="9" x="5" y="12" width="795" height="445"></rect>
8
+ </g>
9
+ </svg>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="805px" height="455px" viewBox="0 0 805 455" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 63.1 (92452) - https://sketch.com -->
4
+ <title>full-rec</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <g id="full-rec" transform="translate(5.000000, 5.000000)" stroke="#FFFFFF" stroke-width="9">
8
+ <polyline id="Rectangle" transform="translate(397.500000, 222.500000) rotate(180.000000) translate(-397.500000, -222.500000) " points="765.482704 -1.13686838e-13 795 -4.11233547e-14 795 445 0 445 0 365.132034"></polyline>
9
+ </g>
10
+ </g>
11
+ </svg>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="805px" height="236px" viewBox="0 0 805 236" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 62 (91390) - https://sketch.com -->
4
+ <title>Untitled</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <rect id="Rectangle" stroke="#FFFFFF" stroke-width="9" x="5" y="12" width="795" height="888"></rect>
8
+ </g>
9
+ </svg>
@@ -0,0 +1,73 @@
1
+
2
+ const progressJS = {
3
+ "defaults": {
4
+ //color
5
+ "color": "#92BADC",
6
+ //height
7
+ "height": "5px",
8
+ "top": 91,
9
+ "bottom": 0,
10
+ "left": 0,
11
+ "right": 0,
12
+ "zIndex": 200,
13
+ //bottom or top
14
+ "ontop": true,
15
+ //left to right
16
+ "ltr": true,
17
+ //element to use value
18
+ "attach": false,
19
+ //js style or css
20
+ "css": true,
21
+ //decimal numbers
22
+ "round": false,
23
+ //use only values
24
+ "nobar": false
25
+ },
26
+ "start": function (configs = {}) {
27
+ let progressJSelem;
28
+ if (!configs.nobar) {
29
+ //create element
30
+ progressJSelem = document.createElement("div");
31
+ //use css instead of js style
32
+ progressJSelem.setAttribute('id', 'progressbarJS');
33
+ //append to body
34
+ document.body.appendChild(progressJSelem);
35
+ //styles
36
+ progressJSelem.style.position = 'fixed';
37
+ progressJSelem.style.zIndex = '200';
38
+ progressJSelem.style.width = '0%';
39
+ //configurable options
40
+ //top or bottom
41
+ configs.ontop ? progressJSelem.style.bottom = '0' : progressJSelem.style.top = progressJS.defaults.top;
42
+ //ltr or rtl
43
+ configs.ltr ? progressJSelem.style.right = '0' : progressJSelem.style.left = progressJS.defaults.left;
44
+ //height
45
+ configs.height ? progressJSelem.style.height = configs.height : progressJSelem.style.height = progressJS.defaults.height;
46
+ //color
47
+ configs.color ? progressJSelem.style.backgroundColor = configs.color : progressJSelem.style.backgroundColor = progressJS.defaults.color;
48
+ }
49
+ let attachElem = progressJS.defaults.attach;
50
+ let roundto = progressJS.defaults.round;
51
+ //round to
52
+ configs.round ? roundto = configs.round : roundto = 2;
53
+ //attach
54
+ configs.attach ? attachElem = document.querySelector(configs.attach) : false;
55
+ //scroll event
56
+ document.addEventListener('scroll', function (e) {
57
+ const maxHeight = document.body.scrollHeight;
58
+ const sizeHeight = window.innerHeight;
59
+ const scrolls = window.scrollY;
60
+ const percentage = (scrolls / (maxHeight - sizeHeight)) * 100;
61
+ if (!configs.nobar) {
62
+ progressJSelem.style.width = percentage.toFixed(roundto) + "%";
63
+ }
64
+ if (attachElem) {
65
+ attachElem.innerHTML = percentage.toFixed(roundto);
66
+ }
67
+ });
68
+
69
+ }
70
+ }
71
+
72
+
73
+