materialize-jekyll 1.1.0 → 1.6.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
- SHA1:
3
- metadata.gz: 4c1e359bec60af2be8404d49a12db6ddf4f935da
4
- data.tar.gz: 0bfa50bfe5dfe27bf1715d0c0b08b74d63484feb
2
+ SHA256:
3
+ metadata.gz: e97d851dd33e6e3c75a68ffac6d8c2f1086336badd0b3ecf50d30375ba0f9dc4
4
+ data.tar.gz: '0071028f3ee258eb9c3462eefb4c9965a2ede8e18e7dc3cae3cbde6de3c0ad16'
5
5
  SHA512:
6
- metadata.gz: baadfcc0e2039804995ba933dd7b59b507d5a89aebf84c32f8cb40f5097682aa118a7f6b3c73aebc53fa96bb5fb0b059a41f857cdcb8f00f6cd9cc4eed332306
7
- data.tar.gz: 03a821b6fac6bebd3b17f2137e599c3c8bfab2dea0d7e139ada3e98e64067ebd292c36e7bb40c5750259726ba5709768b4834999bfa7151ff444e11a40319f79
6
+ metadata.gz: eb9b4c2d48201f484a89f89244308a814272d5d1758353ea38ab21c17d936787b4c956107f58df873e48d5eb7e4ae87fdabddfc9226dea8100aebdf4785af193
7
+ data.tar.gz: 9c8985fe51690da77655c683534bd84ddad359a252c6778d6fcc4ea6e70e9bb2ab1d00007c08663ce5dfc066d0c91f6c18b180e87df322b8d6033d2a878ee814
@@ -4,7 +4,7 @@
4
4
  <img itemprop="image" src="{{site.profile_img_url}}" alt="{{site.name}}" class="circle author-img responsive-img">
5
5
  </div>
6
6
  <div class="col s12 m7 author-info">
7
- <h5 class="">Autor</h5>
7
+ <h5 class="">Author</h5>
8
8
  <h3 class="white-text author-name">{{ site.name }}</h3>
9
9
  <p class="white-text author-description">{{ site.user_description }}</p>
10
10
  <div class="contact-info">
@@ -10,10 +10,11 @@
10
10
  </footer>
11
11
  <!-- Scripts-->
12
12
  <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
13
- <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.1/js/materialize.min.js"></script>
13
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
14
14
  <script src="https://unpkg.com/scrollreveal/dist/scrollreveal.min.js"></script>
15
15
  <script src="{{ "/assets/js/vendor/masonry.pkgd.min.js" | prepend: site.baseurl }}"></script>
16
16
  <script src="{{ "/assets/js/init.js" | prepend: site.baseurl }}"></script>
17
+ <script src="{{ "/assets/js/mode-switcher.js" | prepend: site.baseurl }}"></script>
17
18
  {% include stats.html %}
18
19
  </body>
19
20
  </html>
@@ -9,7 +9,7 @@
9
9
  <!-- CSS -->
10
10
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
11
11
  <link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
12
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.1/css/materialize.min.css">
12
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
13
13
 
14
14
  <link href="{{ "/assets/css/main.css" | prepend: site.baseurl }}" type="text/css" rel="stylesheet" media="screen,projection"/>
15
15
  </head>
@@ -1,7 +1,7 @@
1
1
  {% assign words = content | number_of_words %}
2
2
 
3
3
  {% if words < 360 %}
4
- {% assign minutesText = '1 min de leitura' %}
4
+ {% assign minutesText = '1 min.' %}
5
5
  {% else %}
6
- {% assign minutesText = words | divided_by:180 | append: ' mins de leitura' %}
6
+ {% assign minutesText = words | divided_by:180 | append: ' mins.' %}
7
7
  {% endif %}
@@ -1,9 +1,8 @@
1
-
2
1
  <div class="navbar-fixed">
3
2
  <nav class="z-depth-5" role="navigation">
4
3
  <div class="nav-wrapper main-nav">
5
- <a href="#" class="brand-logo">&lt;/&gt; {{ site.username }}</a>
6
- <a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
4
+ <a href="#" class="brand-logo center">&lt;/&gt; {{ site.username }}</a>
5
+ <a href="#" data-target="nav-mobile" class="sidenav-trigger"><i class="material-icons">menu</i></a>
7
6
  <ul class="right hide-on-med-and-down">
8
7
  {% for link in site.links %}
9
8
  {% if link.external %}
@@ -13,16 +12,20 @@
13
12
  {% endif %}
14
13
  {% endfor %}
15
14
  </ul>
16
-
17
- <ul class="side-nav" id="nav-mobile" >
18
- {% for link in site.links %}
19
- {% if link.external %}
20
- <li><a href="{{ link.url }}">{{ link.title }}</a></li>
21
- {% else %}
22
- <li><a href="{{ site.url }}{{ site.baseurl }}{{ link.url }}">{{ link.title }}</a></li>
23
- {% endif %}
24
- {% endfor %}
25
- </ul>
26
15
  </div>
27
16
  </nav>
28
17
  </div>
18
+
19
+
20
+ <ul class="sidenav" id="nav-mobile" >
21
+ {% for link in site.links %}
22
+ {% if link.external %}
23
+ <li><a href="{{ link.url }}">{{ link.title }}</a></li>
24
+ {% else %}
25
+ <li><a href="{{ site.url }}{{ site.baseurl }}{{ link.url }}">{{ link.title }}</a></li>
26
+ {% endif %}
27
+ {% endfor %}
28
+ </ul>
29
+
30
+
31
+ <a id="theme-toggle" class="" onclick="modeSwitcher()"></a>
@@ -1,7 +1,7 @@
1
1
  <section class="row share">
2
2
  <div class="col s12 valign-wrapper center-align">
3
3
  <div class="col s10 offset-s1">
4
- <p class="share-header">Compartilhe</p>
4
+ <p class="share-header">{{ page.share_text }}</p>
5
5
  <a href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ site.baseurl }}{{ page.url }}" class="btn-floating btn-large waves-effect waves-light fb-color" onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;" title="Compartilhar no Facebook">
6
6
  <div class="fb-btn btn-white ">
7
7
  </div>
@@ -8,11 +8,13 @@ layout: default
8
8
  <div id="masonry-grid" class="row">
9
9
  {% for post in site.posts %}
10
10
  <div class="col s12 m6 l4 card-wrapper">
11
- <div class="card hoverable">
11
+ <div class="card card-hoverable">
12
12
  {% if post.image %}
13
- <div class="card-image">
14
- <img src="{{ post.image }}">
15
- </div>
13
+ <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">
14
+ <div class="card-image">
15
+ <img src="{{ post.image }}">
16
+ </div>
17
+ </a>
16
18
 
17
19
  <div class="btn-menu" style="padding:0px">
18
20
  <div class="fixed-action-btn horizontal click-to-toggle" style="position:relative; float:right; bottom:30px; right:10px; z-index: 1">
@@ -36,10 +38,12 @@ layout: default
36
38
 
37
39
  {% endif %}
38
40
  <div class="card-content">
39
- <span class="grey-text text-lighten-1">{% include date.html date=post.date %}</span>
40
- <a class="post-link" href="{{ post.url | prepend: site.baseurl }}"><span class="flow-text card-title"><b>{{ post.title }}</b></span></a>
41
41
  <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">
42
- <p class="post-description">{{ post.description }}</p>
42
+ <div>
43
+ <span class="grey-text text-lighten-1">{% include date.html date=post.date %}</span>
44
+ <span class="flow-text card-title"><b>{{ post.title }}</b></span>
45
+ <p class="post-description">{{ post.description }}</p>
46
+ </div>
43
47
  </a>
44
48
  <br>
45
49
  <div class="tags">
@@ -48,11 +52,6 @@ layout: default
48
52
  {% endfor %}
49
53
  </div>
50
54
  </div>
51
- <div class="card-action">
52
- <div class="center-align">
53
- <a href="{{ post.url | prepend: site.baseurl }}" class="read-more">Read More</a>
54
- </div>
55
- </div>
56
55
  </div>
57
56
  </div>
58
57
  {% endfor %}
@@ -5,30 +5,25 @@ layout: default
5
5
 
6
6
  <header id="top-bar" class="main-top"></header>
7
7
  <div class="container container-main">
8
- <div class="post content">
9
- <div class="row">
10
- <div class="col s12 m12">
8
+ <div class="post content">
9
+ <div class="row">
10
+ <div class="col s12 m12">
11
11
  <div class="col s10 offset-s1" >
12
- <div class="col s12 m5 l5 xl4">
13
- <p class="grey-text text-lighten-1 valign-wrapper">
14
- <i class="material-icons">today </i> &nbsp; {% include date.html date=page.date %}
15
- </p>
12
+ <h2 class="post-title col s12 center-align">{{ page.title }}</h2>
13
+ <div class="col s12">
14
+ <div class="grey-text text-lighten-1 center-align valign post-specs">
15
+ <i class="material-icons">today </i> {% include date.html date=page.date %} &nbsp; — &nbsp;<i class="material-icons">access_time </i> {{ minutesText }} {{ page.reading_time }}
16
+ </div>
16
17
  </div>
17
- <div class="col s12 m7 l7 xl8">
18
- <p class="grey-text text-lighten-1 valign-wrapper">
19
- <i class="material-icons">access_time </i> &nbsp;{{ minutesText }}
20
- </p>
21
- </div>
22
- <h2 class="post-title col s12">{{ page.title }}</h2>
23
- <p class="flow-text grey-text text-lighten-1 col s12">{{ page.introduction }}</p>
24
- <img class="center-align" style="width: 100%;" src="{{ page.image }}">
25
- {{ content }}
26
- </div>
27
- </div>
28
- </div>
29
- {% include share.html %}
30
- {% include author.html %}
31
- </div>
18
+ <p class="flow-text grey-text text-lighten-1 col s12">{{ page.introduction }}</p>
19
+ <img class="center-align" style="width: 100%;" src="{{ page.image }}">
20
+ {{ content }}
21
+ </div>
22
+ </div>
23
+ </div>
24
+ {% include share.html %}
25
+ {% include author.html %}
26
+ </div>
32
27
  </div>
33
28
 
34
29
  {% include comments.html %}
@@ -1,5 +1,5 @@
1
1
  .author {
2
- background-color: $lighterMainColor;
2
+ background-color: var(--ligther-main-color);
3
3
  }
4
4
  .author-img-wrapper {
5
5
  margin: 25px 0;
@@ -2,44 +2,65 @@
2
2
  color: rgba(0, 0, 0, 0.87);
3
3
  }
4
4
 
5
- .hoverable {
6
- overflow: hidden;
7
- }
5
+ .card-hoverable {
6
+ position: relative; /* For positioning the pseudo-element */
7
+ box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
8
8
 
9
- .hoverable:hover {
10
- transition: box-shadow .25s;
11
- box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19), 0 0 0 0 rgba(0, 0, 0, 0);
9
+ .post-link-hidden {
10
+ position: absolute;
11
+ top: 0;
12
+ left: 0;
13
+ width: 100%;
14
+ height: 100%;
15
+ }
12
16
  }
13
17
 
14
- .hoverable:hover .card-image img {
15
- -webkit-transform: scale(1.08);
16
- transform: scale(1.08);
18
+ .card-hoverable::before {
19
+ /* Position the pseudo-element. */
20
+ content: ' ';
21
+ position: absolute;
22
+ top: 0;
23
+ right: 0;
24
+ bottom: 0;
25
+ left: 0;
26
+
27
+ /* Create the box shadow at expanded size. */
28
+ box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.5);
29
+
30
+ /* Hidden by default. */
31
+ opacity: 0;
32
+ transition: opacity 500ms;
17
33
  }
18
34
 
19
- .card-image img {
20
- -webkit-transition: 0.4s ease;
21
- transition: 0.4s ease;
35
+ .card-hoverable:hover::before {
36
+ /* Show the pseudo-element on hover. */
37
+ cursor: pointer;
38
+ opacity: 1;
22
39
  }
23
40
 
24
- .btm-menu {
25
- .btn-floating {
26
- background-color: $secondaryColor;
27
- }
41
+ .btn-floating {
42
+ background-color: var(--secondary-color);
28
43
  }
44
+
29
45
  .nested-btn {
30
46
  width: 36px !important;
31
47
  height: 22px !important;
32
48
  margin-top: 8px;
33
49
  }
34
50
 
35
- .post-description {
36
- color: rgba(0, 0, 0, 0.87) !important;
51
+ a.post-link {
52
+ text-decoration: none;
53
+ position: relative;
37
54
  }
38
55
 
39
- .read-more {
40
- color: $mainColor !important;
41
- }
56
+ .card-content {
57
+ background-color: var(--card-color);
42
58
 
43
- a.post-link {
44
- text-decoration: none;
59
+ .card-title {
60
+ color: var(--main-text-color);
61
+ }
62
+
63
+ .post-description {
64
+ color: var(--main-text-color) !important;
65
+ }
45
66
  }
@@ -1,14 +1,15 @@
1
1
  .nav-wrapper {
2
2
  z-index: 150;
3
- background-color: $mainColor;
3
+ background-color: var(--main-color);
4
4
 
5
5
  li a {
6
- color: $lighterMainColor;
6
+ color: var(--ligther-main-color);
7
7
  }
8
8
 
9
9
  #nav-mobile {
10
+ background-color: var(--main-background-color);
10
11
  a {
11
- color: #000;
12
+ color: var(--text-color);
12
13
  }
13
14
  }
14
15
  }
@@ -30,7 +31,7 @@
30
31
  }
31
32
 
32
33
  .button-collapse {
33
- color: $lighterMainColor;
34
+ color: var(--ligther-main-color);
34
35
  }
35
36
 
36
37
  @media only screen and (max-width : 537px) {
@@ -1,5 +1,5 @@
1
1
  .main-top {
2
- background-color: $lighterMainColor;
2
+ background-color: var(--ligther-main-color);
3
3
  height: 200px;
4
4
  float: left;
5
5
  width: 100%;
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  .content {
11
- background-color: #fff;
11
+ background-color: var(--card-color);
12
12
  box-shadow: 5px 10px 15px 5px rgba(0, 0, 0, 0.26);
13
13
  border-radius: 2px;
14
14
  overflow: hidden;
@@ -20,6 +20,7 @@
20
20
  display: inline-block;
21
21
  padding: 50px 0 0 0;
22
22
  max-width: 100%;
23
+ color: var(--main-text-color);
23
24
  }
24
25
 
25
26
  .post > .row {
@@ -46,6 +47,10 @@ section {
46
47
  .blog-post-img img {
47
48
  width: 100%;
48
49
  }
50
+
51
+ .post-specs {
52
+ font-size: .8em;
53
+ }
49
54
  }
50
55
 
51
56
  .browser-default > li {
@@ -54,3 +59,10 @@ section {
54
59
  font-size: 1.25rem;
55
60
  letter-spacing: 0.1rem;
56
61
  }
62
+
63
+ .material-icons {
64
+ display: inline-flex;
65
+ align-items: center;
66
+ justify-content: center;
67
+ vertical-align: middle;
68
+ }
@@ -211,7 +211,7 @@
211
211
  margin: 0 auto;
212
212
  color: #f8f8f2;
213
213
  background-color: #222;
214
- overflow-x: scroll;
214
+ overflow-x: hidden;
215
215
  overflow-y: hidden;
216
216
  white-space: nowrap;
217
217
  -webkit-overflow-scrolling: touch;
@@ -1,3 +1,7 @@
1
+ .tag-name {
2
+ position: relative;
3
+ }
4
+
1
5
  .tags-collection {
2
6
  padding: 50px 25px 100px 25px;
3
7
  }
@@ -12,7 +16,7 @@
12
16
  li {
13
17
  transition: 0.4s ease;
14
18
  margin-bottom: 50px;
15
- border-bottom: 1px solid $lighterMainColor;
19
+ border-bottom: 1px solid var(--ligther-main-color);
16
20
  line-height: 50px;
17
21
  }
18
22
 
@@ -22,7 +26,7 @@
22
26
 
23
27
  .post-title {
24
28
  font-size: 20px;
25
- color: $lighterMainColor;
29
+ color: var(--ligther-main-color);
26
30
  font-weight: 300;
27
31
  border-bottom: 5px;
28
32
  .entry-date{
@@ -35,22 +39,22 @@
35
39
  }
36
40
 
37
41
  .chip {
38
- color: $secondaryColor;
39
- background: white;
40
- border: $secondaryColor solid 1px;
42
+ color: var(--secondary-color);
43
+ background-color: var(--card-color);
44
+ border: var(--secondary-color) solid 1px;
41
45
  transition: background-color 0.4s ease;
42
46
  transition: border-color 0.4s ease;
43
47
  transition: color 0.4s ease;
44
48
  }
45
49
 
46
50
  .chip:hover {
47
- background: $secondaryColor;
51
+ background: var(--secondary-color);
48
52
  color: #fff;
49
53
  border: #e4e4e4 solid 1px;
50
54
  }
51
55
 
52
56
  .chip.active {
53
- background: $secondaryColor;
57
+ background: var(--secondary-color);
54
58
  color: #fff;
55
59
  border: #e4e4e4 solid 1px;
56
60
  }
@@ -1,7 +1,18 @@
1
1
  $mainColor: #8d6e63;
2
+ $cardColor: #fff;
3
+ $textColor: #000;
2
4
  $lightMainColor: #bcaaa4;
3
5
  $lighterMainColor: #d7ccc8;
6
+ $background: #fff;
4
7
  $secondaryColor: #26a69a;
5
8
 
9
+ $darkMainColor: #3A3A3A;
10
+ $darkCardColor: #191919;
11
+ $darkTextColor: #e0e0e0;
12
+ $darkLightMainColor: #757575;
13
+ $darkLighterMainColor: #616161;
14
+ $darkBackground: #808080;
15
+ $darkSecondaryColor: #00796b;
16
+
6
17
  $facebookColor: #3b5998;
7
18
  $twitterColor: #55acee;
@@ -10,9 +10,50 @@
10
10
  @import "post";
11
11
 
12
12
  body {
13
+ background-color: var(--main-background-color);
13
14
  display: flex;
14
15
  min-height: 100vh;
15
16
  flex-direction: column;
17
+
18
+ .highlighter-rouge {
19
+ color: #000;
20
+ }
21
+ }
22
+
23
+ nav {
24
+ background-color: var(--main-color);
25
+ }
26
+
27
+ #theme-toggle {
28
+ &.dark {
29
+ background-color: #fff;
30
+ mask: url(../img/icons/sun.svg) no-repeat;
31
+ -webkit-mask: url(../img/icons/sun.svg) no-repeat;
32
+
33
+ &:hover {
34
+ background-color: #212121;
35
+ }
36
+ }
37
+
38
+ &.light {
39
+ background-color: #000;
40
+ mask: url(../img/icons/moon.svg) no-repeat;
41
+ -webkit-mask: url(../img/icons/moon.svg) no-repeat;
42
+ &:hover {
43
+ background-color: #9e9e9e;
44
+ }
45
+ }
46
+ cursor: pointer;
47
+ right: 30px;
48
+ top: 75px;
49
+ position: absolute;
50
+ display: inline-block;
51
+ width: 35px;
52
+ height: 35px;
53
+ -webkit-mask-size: contain;
54
+ mask-size: contain;
55
+ -webkit-mask-position: center;
56
+ mask-position: center;
16
57
  }
17
58
 
18
59
  main {
@@ -24,10 +65,10 @@ main {
24
65
  }
25
66
 
26
67
  p {
27
- line-height: 2.0rem;
28
- font-size: 1.25rem;
29
- letter-spacing: 0.1rem;
30
- font-weight: 300;
68
+ line-height: 2.0rem;
69
+ font-size: 1.25rem;
70
+ letter-spacing: 0.1rem;
71
+ font-weight: 300;
31
72
  }
32
73
 
33
74
 
@@ -60,31 +101,112 @@ p {
60
101
  .author-info {
61
102
  text-align: center;
62
103
  }
104
+
105
+ #theme-toggle {
106
+ top: 12px;
107
+ z-index: 1000;
108
+ }
63
109
  }
64
110
 
65
111
  @media screen and (max-width : 1250px ){
66
- .blog-posts {
67
- width: 98%;
68
- }
112
+ .blog-posts {
113
+ width: 75%;
114
+ }
115
+
116
+ #theme-toggle {
117
+ z-index: 1;
118
+ }
69
119
  }
70
120
 
71
121
  @media screen and (max-width : 768px ){
72
- .container-main {
73
- width: 98%;
74
- }
122
+ .container-main {
123
+ width: 98%;
124
+ }
125
+ .blog-posts {
126
+ width: 90%;
127
+ }
128
+ #top-bar {
129
+ padding-top: 0px;
130
+ height: 150px;
131
+ }
132
+
133
+ #theme-toggle {
134
+ position: fixed;
135
+ top: 12px;
136
+ z-index: 1000;
137
+ }
138
+ }
139
+
140
+ @media screen and (max-width : 425px ){
141
+ #theme-toggle {
142
+ top: 12px;
143
+ }
75
144
  }
76
145
 
77
146
  footer.page-footer {
78
147
  margin: 0;
79
148
  padding-top: 0px;
80
- background-color: $mainColor;
149
+ background-color: var(--main-color);
81
150
 
82
151
  .footer-copyright {
83
- background-color: $mainColor;
152
+ background-color: var(--main-color);
84
153
  }
85
154
 
86
155
  .container {
87
- color: $lighterMainColor;
156
+ color: var(--ligther-main-color);
157
+ }
158
+ }
159
+
160
+ html, html[data-theme="light"] {
161
+ --text-color: #{$textColor};
162
+ --main-color: #{$mainColor};
163
+ --card-color: #{$cardColor};
164
+ --main-background-color: #{$background};
165
+ --light-main-color: #{$lightMainColor};
166
+ --ligther-main-color: #{$lighterMainColor};
167
+ --main-text-color: #{$textColor};
168
+ --secondary-color: #{$secondaryColor};
169
+ }
170
+
171
+ html[data-theme="dark"] {
172
+ --text-color: #{$darkTextColor};
173
+ --main-color: #{$darkMainColor};
174
+ --card-color: #{$darkCardColor};
175
+ --main-background-color: #{$darkBackground};
176
+ --light-main-color: #{$darkLightMainColor};
177
+ --ligther-main-color: #{$darkLighterMainColor};
178
+ --main-text-color: #{$darkTextColor};
179
+ --secondary-color: #{$darkSecondaryColor};
180
+ }
181
+
182
+ @media (prefers-color-scheme: dark) {
183
+ html, html[data-theme="dark"] {
184
+ --text-color: #{$darkTextColor};
185
+ --main-color: #{$darkMainColor};
186
+ --card-color: #{$darkCardColor};
187
+ --main-background-color: #{$darkBackground};
188
+ --light-main-color: #{$darkLightMainColor};
189
+ --ligther-main-color: #{$darkLighterMainColor};
190
+ --main-text-color: #{$darkTextColor};
191
+ --secondary-color: #{$darkSecondaryColor};
192
+ }
193
+
194
+ html[data-theme="light"] {
195
+ --text-color: #{$textColor};
196
+ --main-color: #{$mainColor};
197
+ --card-color: #{$cardColor};
198
+ --main-background-color: #{$background};
199
+ --light-main-color: #{$lightMainColor};
200
+ --ligther-main-color: #{$lighterMainColor};
201
+ --main-text-color: #{$textColor};
202
+ --secondary-color: #{$secondaryColor};
88
203
  }
89
204
  }
90
205
 
206
+ html,
207
+ html *,
208
+ html *:before,
209
+ html *:after {
210
+ transition: color 1s;
211
+ transition: background-color 1s;
212
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 312.999 312.999"><path d="M305.6 178.053c-3.2-.8-6.4 0-9.2 2-10.4 8.8-22.4 16-35.6 20.8-12.4 4.8-26 7.2-40.4 7.2-32.4 0-62-13.2-83.2-34.4-21.2-21.2-34.4-50.8-34.4-83.2 0-13.6 2.4-26.8 6.4-38.8 4.4-12.8 10.8-24.4 19.2-34.4 3.6-4.4 2.8-10.8-1.6-14.4-2.8-2-6-2.8-9.2-2-34 9.2-63.6 29.6-84.8 56.8-20.4 26.8-32.8 60-32.8 96.4 0 43.6 17.6 83.2 46.4 112s68.4 46.4 112 46.4c36.8 0 70.8-12.8 98-34 27.6-21.6 47.6-52.4 56-87.6 2-6-1.2-11.6-6.8-12.8zm-61.2 83.6c-23.2 18.4-52.8 29.6-85.2 29.6-38 0-72.4-15.6-97.2-40.4-24.8-24.8-40.4-59.2-40.4-97.2 0-31.6 10.4-60.4 28.4-83.6 12.4-16 28-29.2 46-38.4-2 4.4-4 8.8-5.6 13.6-5.2 14.4-7.6 29.6-7.6 45.6 0 38 15.6 72.8 40.4 97.6s59.6 40.4 97.6 40.4c16.8 0 32.8-2.8 47.6-8.4 5.2-2 10.4-4 15.2-6.4-9.6 18.4-22.8 34.8-39.2 47.6z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 302.4 302.4"><path d="M204.8 97.6C191.2 84 172 75.2 151.2 75.2s-40 8.4-53.6 22.4c-13.6 13.6-22.4 32.8-22.4 53.6s8.8 40 22.4 53.6c13.6 13.6 32.8 22.4 53.6 22.4s40-8.4 53.6-22.4c13.6-13.6 22.4-32.8 22.4-53.6s-8.4-40-22.4-53.6zm-14.4 92.8c-10 10-24 16-39.2 16s-29.2-6-39.2-16-16-24-16-39.2 6-29.2 16-39.2 24-16 39.2-16 29.2 6 39.2 16 16 24 16 39.2-6 29.2-16 39.2zM292 140.8h-30.8c-5.6 0-10.4 4.8-10.4 10.4 0 5.6 4.8 10.4 10.4 10.4H292c5.6 0 10.4-4.8 10.4-10.4 0-5.6-4.8-10.4-10.4-10.4zM151.2 250.8c-5.6 0-10.4 4.8-10.4 10.4V292c0 5.6 4.8 10.4 10.4 10.4 5.6 0 10.4-4.8 10.4-10.4v-30.8c0-5.6-4.8-10.4-10.4-10.4zM258 243.6l-22-22c-3.6-4-10.4-4-14.4 0s-4 10.4 0 14.4l22 22c4 4 10.4 4 14.4 0s4-10.4 0-14.4zM151.2 0c-5.6 0-10.4 4.8-10.4 10.4v30.8c0 5.6 4.8 10.4 10.4 10.4 5.6 0 10.4-4.8 10.4-10.4V10.4c0-5.6-4.8-10.4-10.4-10.4zM258.4 44.4c-4-4-10.4-4-14.4 0l-22 22c-4 4-4 10.4 0 14.4 3.6 4 10.4 4 14.4 0l22-22c4-4 4-10.4 0-14.4zM41.2 140.8H10.4c-5.6 0-10.4 4.8-10.4 10.4s4.4 10.4 10.4 10.4h30.8c5.6 0 10.4-4.8 10.4-10.4 0-5.6-4.8-10.4-10.4-10.4zM80.4 221.6c-3.6-4-10.4-4-14.4 0l-22 22c-4 4-4 10.4 0 14.4s10.4 4 14.4 0l22-22c4-4 4-10.4 0-14.4zM80.4 66.4l-22-22c-4-4-10.4-4-14.4 0s-4 10.4 0 14.4l22 22c4 4 10.4 4 14.4 0s4-10.4 0-14.4z"/></svg>
@@ -46,11 +46,6 @@
46
46
  $("#sidenav-overlay").addClass("adjust-index");
47
47
  }
48
48
 
49
- $(".button-collapse").sideNav({
50
- menuWidth: 1000, // Default is 240
51
- edge: 'left', // Choose the horizontal origin
52
- closeOnClick: true // Closes side-nav on <a> clicks, useful for Angular/Meteor
53
- });
54
49
 
55
50
  $('.button-collapse').click(function(){
56
51
  adjustIndex();
@@ -61,9 +56,18 @@
61
56
  var icon = $(this).find(".btn-floating > i");
62
57
  if ($(this).hasClass('active')) {
63
58
  icon.text("share");
64
- }else{
59
+ } else{
65
60
  icon.text("clear");
66
61
  }
67
62
  });
68
63
  }); // end of document ready
69
64
  })(jQuery); // end of jQuery name space
65
+
66
+ document.addEventListener('DOMContentLoaded', function() {
67
+ const M = window.M;
68
+ var elems = document.querySelectorAll('.sidenav');
69
+ var opts = {
70
+ edge: 'left' // Choose the horizontal origin
71
+ };
72
+ var instances = M.Sidenav.init(elems, opts);
73
+ });
@@ -0,0 +1,64 @@
1
+ let systemInitiatedDark = window.matchMedia("(prefers-color-scheme: dark)");
2
+ let theme = sessionStorage.getItem('theme');
3
+
4
+ if (systemInitiatedDark.matches) {
5
+ document.getElementById("theme-toggle").classList.add('dark');
6
+ document.getElementById("theme-toggle").classList.remove('light');
7
+ } else {
8
+ document.getElementById("theme-toggle").classList.add('light');
9
+ document.getElementById("theme-toggle").classList.remove('dark');
10
+ }
11
+
12
+ function prefersColorTest(systemInitiatedDark) {
13
+ if (systemInitiatedDark.matches) {
14
+ document.documentElement.setAttribute('data-theme', 'dark');
15
+ document.getElementById("theme-toggle").classList.add('light');
16
+ document.getElementById("theme-toggle").classList.remove('dark');
17
+ sessionStorage.setItem('theme', '');
18
+ } else {
19
+ document.documentElement.setAttribute('data-theme', 'light');
20
+ document.getElementById("theme-toggle").classList.add('dark');
21
+ document.getElementById("theme-toggle").classList.remove('light');
22
+ sessionStorage.setItem('theme', '');
23
+ }
24
+ }
25
+ systemInitiatedDark.addListener(prefersColorTest);
26
+
27
+
28
+ function modeSwitcher() {
29
+ let theme = sessionStorage.getItem('theme');
30
+ if (theme === "dark") {
31
+ document.getElementById("theme-toggle").classList.add('light');
32
+ document.getElementById("theme-toggle").classList.remove('dark');
33
+ document.documentElement.setAttribute('data-theme', 'light');
34
+ sessionStorage.setItem('theme', 'light');
35
+ } else if (theme === "light") {
36
+ document.getElementById("theme-toggle").classList.add('dark');
37
+ document.getElementById("theme-toggle").classList.remove('light');
38
+ document.documentElement.setAttribute('data-theme', 'dark');
39
+ sessionStorage.setItem('theme', 'dark');
40
+ } else if (systemInitiatedDark.matches) {
41
+ document.getElementById("theme-toggle").classList.add('dark');
42
+ document.getElementById("theme-toggle").classList.remove('light');
43
+ document.documentElement.setAttribute('data-theme', 'light');
44
+ sessionStorage.setItem('theme', 'light');
45
+ } else {
46
+ document.getElementById("theme-toggle").classList.add('dark');
47
+ document.getElementById("theme-toggle").classList.remove('light');
48
+ document.documentElement.setAttribute('data-theme', 'dark');
49
+ sessionStorage.setItem('theme', 'dark');
50
+ }
51
+ }
52
+
53
+ if (theme === "dark") {
54
+ document.getElementById("theme-toggle").classList.add('dark');
55
+ document.getElementById("theme-toggle").classList.remove('light');
56
+ document.documentElement.setAttribute('data-theme', 'dark');
57
+ sessionStorage.setItem('theme', 'dark');
58
+ // document.getElementById("theme-toggle").innerHTML = sun;
59
+ } else if (theme === "light") {
60
+ document.getElementById("theme-toggle").classList.add('light');
61
+ document.getElementById("theme-toggle").classList.remove('dark');
62
+ document.documentElement.setAttribute('data-theme', 'light');
63
+ sessionStorage.setItem('theme', 'light');
64
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: materialize-jekyll
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Presumido
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-29 00:00:00.000000000 Z
11
+ date: 2020-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.16.1
47
+ version: 1.17.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.16.1
54
+ version: 1.17.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -96,16 +96,17 @@ files:
96
96
  - _sass/_syntax.scss
97
97
  - _sass/_tags.scss
98
98
  - _sass/_variables.scss
99
- - assets/.DS_Store
100
99
  - assets/css/.DS_Store
101
100
  - assets/css/main.scss
102
- - assets/img/.DS_Store
103
101
  - assets/img/icons/facebook.svg
104
102
  - assets/img/icons/github.svg
105
103
  - assets/img/icons/instagram.svg
106
104
  - assets/img/icons/linkedin.svg
105
+ - assets/img/icons/moon.svg
106
+ - assets/img/icons/sun.svg
107
107
  - assets/img/icons/twitter.svg
108
108
  - assets/js/init.js
109
+ - assets/js/mode-switcher.js
109
110
  - assets/js/vendor/masonry.pkgd.min.js
110
111
  homepage: https://github.com/victorpre/materialize-jekyll
111
112
  licenses:
@@ -127,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
128
  version: '0'
128
129
  requirements: []
129
130
  rubyforge_project:
130
- rubygems_version: 2.6.12
131
+ rubygems_version: 2.7.6
131
132
  signing_key:
132
133
  specification_version: 4
133
134
  summary: A material design Jekyll theme for blog using MaterializeCSS.
Binary file
Binary file