summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2021-11-27 17:42:38 +0100
committerxengineering <me@xengineering.eu>2021-11-27 17:42:38 +0100
commitbda3a75cfd92ddb83e9aea2ba33d56b625a4fddb (patch)
tree2e22efd21fa756347f7f7c607b73707ff03cd805
parentcc06d4c5e70909da7070e566d6c4737ad77362be (diff)
downloadlibweb-bda3a75cfd92ddb83e9aea2ba33d56b625a4fddb.tar
libweb-bda3a75cfd92ddb83e9aea2ba33d56b625a4fddb.tar.zst
libweb-bda3a75cfd92ddb83e9aea2ba33d56b625a4fddb.zip
Re-implement Navigation Section
-rw-r--r--css/xengineering_nav_main.css104
-rw-r--r--html/test_nav_main.html31
-rw-r--r--html/test_simple.html4
3 files changed, 138 insertions, 1 deletions
diff --git a/css/xengineering_nav_main.css b/css/xengineering_nav_main.css
new file mode 100644
index 0000000..ac0ebe1
--- /dev/null
+++ b/css/xengineering_nav_main.css
@@ -0,0 +1,104 @@
+/*
+vim: shiftwidth=2 tabstop=2 expandtab
+
+libweb - reusable code for websites
+
+ Copyright (C) 2021 xengineering
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+contact via mail: me@xengineering.eu
+*/
+
+/***************************** DEFAULT / MOBILE *******************************/
+
+nav {
+ background-color: var(--background-color-dark);
+}
+
+#menu-button {
+ width: 100%;
+ padding-top: 1em;
+ padding-bottom: 1em;
+ margin: 0;
+ text-align: center;
+ color: var(--font-color-light);
+ background-color: var(--background-color-dark);
+}
+
+.menu-anchor {
+ padding-top: 1em;
+ padding-bottom: 1em;
+ padding-left: 0;
+ padding-right: 0;
+ margin: 0;
+ text-align: center;
+ color: var(--font-color-light);
+ background-color: var(--background-color-dark);
+}
+
+/******************************************************************************/
+
+
+
+/********************************** TABLET ************************************/
+
+@media only screen and (min-aspect-ratio: 11/12) {
+
+}
+
+/******************************************************************************/
+
+
+
+/********************************* DESKTOP ************************************/
+
+@media only screen and (min-aspect-ratio: 14/9) {
+
+nav {
+ display: inline-block;
+ height: 100%;
+ width: 15vw;
+ position: fixed;
+ margin 0;
+ padding 0;
+}
+
+#menu-button {
+ display: none;
+}
+
+.menu-anchor {
+ text-align: left;
+ padding-left: 1em;
+ padding-right: 1em;
+}
+
+.menu-anchor:hover {
+ color: black;
+ background-color: lightgray;
+}
+
+main {
+ width: auto;
+ margin: 0;
+ margin-left: 15vw;
+ padding: 0;
+ padding-left: 15vw;
+ padding-right: 15vw;
+}
+
+}
+
+/******************************************************************************/
diff --git a/html/test_nav_main.html b/html/test_nav_main.html
index 8a6cd7d..1b99eca 100644
--- a/html/test_nav_main.html
+++ b/html/test_nav_main.html
@@ -32,6 +32,7 @@ contact via mail: me@xengineering.eu
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/xengineering.css" type="text/css">
+ <link rel="stylesheet" href="../css/xengineering_nav_main.css" type="text/css">
</head>
@@ -40,6 +41,8 @@ contact via mail: me@xengineering.eu
<nav>
<button id="menu-button" onclick=toggleMenu()>MENU</button>
<a class="menu-anchor" href="https://xengineering.eu">xengineering.eu</a>
+ <a class="menu-anchor" href="https://xengineering.eu">xengineering.eu</a>
+ <a class="menu-anchor" href="https://xengineering.eu">xengineering.eu</a>
</nav>
<main>
@@ -136,7 +139,33 @@ echo "I am $(whoami)"
</pre>
<!-- .card -->
- <div class="card"></div>
+ <div class="card">
+ <h3 class="card-first-item">This is a Card</h3>
+ <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
+ diam nonumy eirmod tempor invidunt ut labore et dolore magna
+ aliquyam erat, sed diam voluptua. At vero eos et accusam et
+ justo duo dolores et ea rebum. Stet clita kasd gubergren, no
+ sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem
+ ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+ nonumy eirmod tempor invidunt ut labore et dolore magna
+ aliquyam erat, sed diam voluptua. At vero eos et accusam et
+ justo duo dolores et ea rebum. Stet clita kasd gubergren, no
+ sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
+ <h3>This is a Card</h3>
+ <p class="card-last-item">Lorem ipsum dolor sit amet,
+ consetetur sadipscing elitr, sed diam nonumy eirmod tempor
+ invidunt ut labore et dolore magna aliquyam erat, sed diam
+ voluptua. At vero eos et accusam et justo duo dolores et ea
+ rebum. Stet clita kasd gubergren, no sea takimata sanctus est
+ Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
+ consetetur sadipscing elitr, sed diam nonumy eirmod tempor
+ invidunt ut labore et dolore magna aliquyam erat, sed diam
+ voluptua. At vero eos et accusam et justo duo dolores et ea
+ rebum. Stet clita kasd gubergren, no sea takimata sanctus est
+ Lorem ipsum dolor sit amet.</p>
+ </div>
+
+ <footer></footer>
</main>
diff --git a/html/test_simple.html b/html/test_simple.html
index f771b29..3791429 100644
--- a/html/test_simple.html
+++ b/html/test_simple.html
@@ -37,6 +37,8 @@ contact via mail: me@xengineering.eu
<body>
+ <main>
+
<!-- h1 h2 h3 h4 h5 h6 -->
<h1>A simple Test Page</h1>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
@@ -165,6 +167,8 @@ echo "I am $(whoami)"
<footer></footer>
<script src="../js/xengineering.js"></script>
+
+ </main>
</body>