Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added content-list #329

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
31 changes: 30 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ <h1>Water.css</h1>
Now you can write your simple static site with nice semantic html, and Water.css will manage
the styling for you.
</p>

<div class="row">
<div>
<a href="#installation"><b>Get it already!</b></a>
Expand All @@ -108,6 +108,35 @@ <h1>Water.css</h1>
</a>
</div>

<div class="content-container">

<div class="content-list">

<ul>
<h4>content-list</h4>
<a href="#installation"> <li>Installation</li></a>

<a href="#goals"> <li>Goals</li></a>
<a href="#demo"><li>Element demos</li></a>
<a href="#code"><li>Code</li></a>
<a href="#typography"> <li>Typography</li></a>



</ul>


</div>




</div>





<h2>Installation</h2>
<div id="installation">
<header class="row">
Expand Down
10 changes: 10 additions & 0 deletions docs/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,13 @@ document.getElementById('dialog-trigger').addEventListener('click', () => {
document.getElementById('dialog').addEventListener('close', (event) => {
document.getElementById('dialog-result').innerText = `Your answer: ${event.target.returnValue}`
})

// hide content-list on small screen size
const screenSize = window.innerWidth
const contentContainer = document.querySelector('.content-container')

if (screenSize < 1200) {
contentContainer.style.display = 'none'
} else {
contentContainer.style.display = 'block'
}
21 changes: 21 additions & 0 deletions docs/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,24 @@ body > footer {
align-items: center;
justify-content: space-between;
}

.content-container {
position: fixed;
}

.content-list {
position: absolute;
top: -131px;
left: -194px;
}

.content-list li,
.content-list a {
list-style: none;
text-decoration: none;
cursor: pointer;
}

.content-list li:hover {
color: black;
}