Skip to content

Commit 20516d3

Browse files
committed
test new style underline
new underline effects text .
1 parent 307435f commit 20516d3

File tree

3 files changed

+34
-10
lines changed

3 files changed

+34
-10
lines changed

_layouts/default.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ <h1 class="site-name"><a href="{{ site.url }}/">{{ site.name }}</a></h1>
2727
</div>
2828

2929
<nav>
30-
<a href="{{ site.url }}/">Blog</a>
31-
<a href="{{ site.url }}/logo">Logo</a>
32-
<a href="{{ site.url }}/gallery">Gallery</a>
33-
<a href="{{ site.url }}/about">About</a>
30+
<a href="{{ site.url }}/" class="under">Blog</a>
31+
<a href="{{ site.url }}/logo" class="under">Logo</a>
32+
<a href="{{ site.url }}/gallery" class="under">Gallery</a>
33+
<a href="{{ site.url }}/about" class="under">About</a>
3434
</nav>
3535
</header>
3636
</div>

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
1212
{{ post.excerpt }}
1313
</div>
1414

15-
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
15+
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more under">Read More</a>
1616
</article>
1717
{% endfor %}
1818
</div>
@@ -23,12 +23,12 @@ <h1><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h1>
2323
Previous
2424
</a>
2525
{% else %}
26-
<span class="previous">Previous</span>
26+
<span class="previous under">Previous</span>
2727
{% endif %}
2828
&nbsp;&middot;&nbsp;
2929
{% if paginator.next_page %}
3030
<a href="{{ paginator.next_page_path }}" class="next">Next</a>
3131
{% else %}
32-
<span class="next ">Next</span>
32+
<span class="next under">Next</span>
3333
{% endif %}
34-
</div>
34+
</div>

style.scss

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ h1 {
5050
color: inherit;
5151
}
5252
a:hover{
53-
transition: 0.5s;
53+
transition: 0.3s;
5454
transition-timing-function: cubic-bezier(0, 0.84, 0.19, 0.11);
5555
color: $white;
5656
background-color: $darkGray;
@@ -95,6 +95,30 @@ a {
9595
}
9696
}
9797

98+
a.under{
99+
display: inline-block;
100+
position: relative;
101+
text-decoration: none;
102+
}
103+
104+
a.under:after{
105+
content: '';
106+
position: absolute;
107+
width: 100%;
108+
transform: scaleX(0);
109+
height: 2px;
110+
bottom: 0;
111+
left: 0;
112+
background-color: #0099ff;
113+
transform-origin: bottom right;
114+
transition: transform 0.25s ease-out;
115+
}
116+
117+
a.under:hover:after{
118+
transform: scaleX(1);
119+
transform-origin: bottom left;
120+
}
121+
98122
ul, ol {
99123
margin: 15px 0;
100124
padding-left: 30px;
@@ -332,7 +356,7 @@ footer {
332356
background-color: $darkGray;
333357
}
334358
.title:hover{
335-
transition: 0.5s;
359+
transition: 0.3s;
336360
transition-timing-function: cubic-bezier(0.01,-1.51,0,1);
337361
color: $gray;
338362
background-color: $lightGray;

0 commit comments

Comments
 (0)