Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.DS_Store
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes to this file should be removed they're not a part of this repo

.DS_Store
.vscode

4 changes: 4 additions & 0 deletions specimen/contexts/archive-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ <h2>Support Our Work</h2>

</footer>

<div class="scroll-container">
<a href="#top" class="scroll-to-top icon-attach fa-angle-up" aria-label="Scroll to top"></a>
</div>

<script src="../../../src/js/vocabulary.js"></script>

</body>
Expand Down
52 changes: 52 additions & 0 deletions src/css/vocabulary.css
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,50 @@ body > footer .license svg {
--underline-background-color: var(--vocabulary-brand-color-soft-turquoise);
}

/* scroll to top */

html {
scroll-behavior:smooth;
}

body {
position: relative;
}

.scroll-container {
position: absolute;
top: 0;
right:0;
height: 100%;
right: 2rem;
}

.scroll-container:before {
content: '';
display: block;
height: 100vh;
pointer-events: none;
}

.scroll-container a {
position: sticky;
top: 90vh;
cursor: pointer;
font-size: 2rem;
color: var(--vocabulary-brand-color-dark-tomato);
padding: 1rem 1rem 0.5rem 1rem;
border-radius: 50%;
background-color: var(--vocabulary-brand-color-soft-tomato);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
transition: background-color 0.3s, transform 0.3s;
}

.scroll-container a:hover {
background-color: var(--vocabulary-brand-color-dark-tomato);
transform: scale(1.1);
color: white;
}

/* program-page context */


Expand All @@ -1834,6 +1878,10 @@ body > footer .license svg {
overflow-x: hidden;
}

.scroll-container {
display: block;
}

}

@media (max-width: 1140px) {
Expand All @@ -1856,6 +1904,10 @@ body > footer .license svg {
display: flex;
flex-wrap: wrap;
}

.scroll-container {
display: none;
}
}

@media (max-width: 705px) {
Expand Down