From 0910a614df9693ec2881d555ac043df66217ca60 Mon Sep 17 00:00:00 2001
From: Ankit
Date: Wed, 22 Mar 2023 15:30:41 +0530
Subject: [PATCH] added content-list
---
docs/index.html | 31 ++++++++++++++++++++++++++++++-
docs/script.js | 10 ++++++++++
docs/style.css | 21 +++++++++++++++++++++
3 files changed, 61 insertions(+), 1 deletion(-)
diff --git a/docs/index.html b/docs/index.html
index d9ec359c..24677032 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -84,7 +84,7 @@ Water.css
Now you can write your simple static site with nice semantic html, and Water.css will manage
the styling for you.
-
+
+
+
+
+
+
+
Installation
diff --git a/docs/script.js b/docs/script.js
index fb821c08..5914255b 100644
--- a/docs/script.js
+++ b/docs/script.js
@@ -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'
+}
diff --git a/docs/style.css b/docs/style.css
index a0c3fc92..58d66356 100755
--- a/docs/style.css
+++ b/docs/style.css
@@ -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;
+}