Skip to content

Commit

Permalink
Merge pull request #13 from hello-ulises/home-links
Browse files Browse the repository at this point in the history
home links and proto scroll
  • Loading branch information
bulbil authored Jan 22, 2024
2 parents 5bd7af1 + 2d538f4 commit fa784b8
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 4 deletions.
44 changes: 44 additions & 0 deletions assets/css/components/_header-noun-scroll.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.header-noun-scroll > span {
position: absolute;
top: 0;
}

.header-noun-scroll__wrapper {
display: inline-block;
position: relative;
left: 4rem;
height: 2.5rem;
overflow: hidden;
}

.header-noun-scroll__list {
display: inline-block;
transition: 300ms all;
margin-top: 0;
animation: slide 10s infinite alternate $easing--bezier-sharp 2s;
}

.header-noun-scroll__list span {
display: block;
padding-bottom: 0.25rem;
}
@keyframes slide {
0% {
margin-top: 0;
}
20% {
margin-top: calc(-1 * 2.5rem);
}
40% {
margin-top: calc(-2 * 2.5rem);
}
60% {
margin-top: calc(-3 * 2.5rem);
}
80% {
margin-top: calc(-4 * 2.5rem);
}
100% {
margin-top: calc(-5 * 2.5rem);
}
}
6 changes: 3 additions & 3 deletions assets/css/components/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
height: 100%;
}

&.nav--open .nav__header-noun {
&.nav--open .header-noun-scroll {
opacity: 0;
}

Expand All @@ -66,7 +66,7 @@
}
}

.nav__header-noun {
.header-noun-scroll {
position: absolute;
display: none;
padding-left: 0.5rem;
Expand Down Expand Up @@ -134,7 +134,7 @@
// page specific styles

.p-home {
.nav__header-noun {
.header-noun-scroll {
display: inline;
}
}
Expand Down
1 change: 1 addition & 0 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@import "components/pagination";
@import "components/footer";
@import "components/page";
@import "components/header-noun-scroll";

@import "pages/home";
@import "pages/post-page";
Expand Down
13 changes: 13 additions & 0 deletions includes/header-noun-scroll.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<span class="header-noun-scroll"><span>is a</span>
<div class="header-noun-scroll__wrapper">
<div class="header-noun-scroll__list">
<span>Shop</span>
<span>Gallery</span>
<span>Archive</span>
<span>Institute</span>
<span>Company</span>
<span>Project</span>
<span>Group</span>
</div>
</div>
</span>
2 changes: 1 addition & 1 deletion includes/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="nav" id="nav">
<div class="nav__wrapper">
<div class="nav__header">
<h1 class="nav__header-title"><a href="/">ulises</a><span class="nav__header-noun"> is a archive</span></h1>
<h1 class="nav__header-title"><a href="/">ulises</a>{% include "header-noun-scroll.html" %}</h1>
</div>

<div class="nav__links">
Expand Down

0 comments on commit fa784b8

Please sign in to comment.