-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from yamat47/root-hero
Add hero image to top page.
- Loading branch information
Showing
8 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
@keyframes image-switch-animation { | ||
0% { opacity: 0; } | ||
5% { opacity: 1; } | ||
25% { opacity: 1; } | ||
30% { opacity: 0; } | ||
100% { opacity: 0; } | ||
} | ||
|
||
.hero-container { | ||
width: 100vw; | ||
height: 50vw; | ||
position: relative; | ||
|
||
@media (max-width: 768px) { | ||
height: 75vw; | ||
} | ||
} | ||
|
||
.hero-image { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
bottom: 0; | ||
right: 0; | ||
opacity: 0; | ||
|
||
animation: image-switch-animation 25s infinite; | ||
|
||
&:nth-child(1) { | ||
animation-delay: 0s; | ||
} | ||
|
||
&:nth-child(2) { | ||
animation-delay: 5s; | ||
} | ||
|
||
&:nth-child(3) { | ||
animation-delay: 10s; | ||
} | ||
|
||
&:nth-child(4) { | ||
animation-delay: 15s; | ||
} | ||
|
||
&:nth-child(5) { | ||
animation-delay: 20s; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
This is 'homes#show' | ||
:ruby | ||
images = %w[hero-1.jpg hero-2.jpg hero-3.jpg hero-4.jpg hero-5.jpg] | ||
|
||
.hero-container | ||
- images.each do |image| | ||
= image_tag image, class: 'hero-image' |