]> gitweb.factorcode.org Git - factor.git/commitdiff
webapps: simplify navrow.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 7 Aug 2022 00:40:03 +0000 (17:40 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 7 Aug 2022 00:40:03 +0000 (17:40 -0700)
extra/webapps/blogs/blogs-common.xml
extra/webapps/pastebin/pastebin-common.xml
extra/webapps/planet/planet-common.xml
extra/webapps/todo/todo.xml
extra/webapps/wiki/page-common.xml
extra/webapps/wiki/wiki-common.xml
extra/webapps/wiki/wiki-contents.css [deleted file]
extra/webapps/wiki/wiki-contents.js [deleted file]
extra/webapps/wiki/wiki.css
extra/websites/concatenative/page.css

index 30a53564170087e04ca7d0d9c57c6b08cef30e63..881192af27c46d825ebe6e75cb6c0fd575b0e4ea 100644 (file)
@@ -7,8 +7,6 @@
     <t:style t:include="resource:extra/webapps/blogs/blogs.css" />
 
     <nav>
-    <div class="navrow">
-
         <t:a t:href="$blogs/">All Posts</t:a>
         <t:a t:href="$blogs/by">My Posts</t:a>
         <t:a t:href="$blogs/new-post">New Post</t:a>
@@ -22,8 +20,6 @@
             <t:button t:action="$login-realm/logout" t:aside="begin" class="link-button link">Logout</t:button>
 
         </t:if>
-
-    </div>
     </nav>
 
     <div class="page">
index 44d0859875827f73ca357c61b502b76faa2b561c..04ab572e29dd4c7abde7213e669ec1dff0021458 100644 (file)
@@ -7,7 +7,6 @@
        <t:style t:include="resource:extra/webapps/pastebin/pastebin.css" />
 
     <nav>
-    <div class="navrow">
         <a href="https://factorcode.org"><img src="https://factorcode.org/favicon.ico" width="24" height="24" /></a>
 
         <t:a t:href="$pastebin">Pastes</t:a>
@@ -21,7 +20,6 @@
 
             <t:button t:action="$login-realm/logout" t:aside="begin" class="link-button link">Logout</t:button>
         </t:if>
-    </div>
     </nav>
 
     <div class="page">
index bb8aafd8742c62dc06ba1f3c44f475727d081ce7..08819385395be1430461b062048cd657e26b4db5 100644 (file)
@@ -5,7 +5,6 @@
        <t:style t:include="resource:extra/webapps/planet/planet.css" />
 
     <nav>
-       <div class="navrow">
                <a href="https://factorcode.org"><img src="https://factorcode.org/favicon.ico" width="24" height="24" /></a>
 
                <t:a t:href="$planet">Front Page</t:a>
@@ -19,7 +18,6 @@
        
                        <t:button t:action="$login-realm/logout" t:aside="begin" class="link-button link">Logout</t:button>
         </t:if>
-       </div>
        </nav>
 
     <div class="page">
index d74e93972dd4d5e900bb8ca24bc4e73f34fa9474..32101ebd249967d0a48b98890b819f1ec7ab819f 100644 (file)
@@ -11,7 +11,6 @@
     <body>
 
     <nav>
-       <div class="navrow">
                <t:a t:href="$todo-list/list">List Items</t:a>
                <t:a t:href="$todo-list/new">Add Item</t:a>
 
@@ -20,7 +19,6 @@
                </t:if>
 
                <t:button t:action="$login-realm/logout" t:aside="begin" class="link-button link">Logout</t:button>
-       </div>
        </nav>
 
        <div class="page">
index 42291693cfa51b33a66b749f2a229572edf218c0..df9da4b9c70bf6a2bde8a778eac0032c02564e2a 100644 (file)
@@ -9,12 +9,10 @@
        <t:call-next-template />
 
     <nav>
-       <div class="navrow">
                <t:a t:href="$wiki/view" t:rest="title">Latest</t:a>
                <t:a t:href="$wiki/revisions" t:rest="title">Revisions</t:a>
                <t:a t:href="$wiki/edit" t:rest="title" rel="nofollow">Edit</t:a>
                <t:button t:action="$wiki/delete" t:for="title" class="link-button link">Delete</t:button>
-       </div>
        </nav>
 
 </t:chloe>
index f8a1820ed696899ef32ca458a66ae6828f8a069d..422d79d199aac06b5573cab2fbf31523c0b304d5 100644 (file)
@@ -11,9 +11,9 @@
     <div id="left">
 
         <t:if t:value="contents">
-            <t:script t:include="resource:extra/webapps/wiki/wiki-contents.js" />
 
-            <t:style t:include="resource:extra/webapps/wiki/wiki-contents.css" />
+            <t:script t:include="resource:extra/webapps/wiki/wiki.js" />
+
             <div class="contents">
                 <t:bind t:name="contents">
                     <h2>
@@ -32,8 +32,6 @@
     <div id="right">
 
         <nav>
-        <div class="navrow">
-
             <t:if t:value="contents">
                 <img id="menu" onclick="toggleSidebar()" src="data:image/svg+xml;utf8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 xmlns:xlink=%27http://www.w3.org/1999/xlink%27 width=%2724%27 height=%2724%27 viewBox=%270 0 100 100%27 fill=%27rgb(0,0,0)%27%3E%3Crect x=%2710%27 y=%2720%27 width=%2780%27 height=%2712%27 rx=%276%27 /%3E%3Crect x=%2710%27 y=%2744%27 width=%2780%27 height=%2712%27 rx=%276%27 /%3E%3Crect x=%2710%27 y=%2768%27 width=%2780%27 height=%2712%27 rx=%276%27 /%3E%3C/svg>" />
             </t:if>
@@ -52,8 +50,6 @@
                 <t:button t:action="$login-realm/logout" t:aside="begin" class="link-button link">Logout</t:button>
 
             </t:if>
-
-        </div>
         </nav>
 
         <div class="page">
diff --git a/extra/webapps/wiki/wiki-contents.css b/extra/webapps/wiki/wiki-contents.css
deleted file mode 100644 (file)
index 111a153..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-#left {
-    float: left;
-    width: 200px;
-    z-index: 99;
-    border-right: 1px solid #ccc;
-    background: #f3f2ea;
-}
-
-#right {
-    margin-left: 200px;
-    width: calc(100% - 200px);
-}
-
-nav img {
-    margin: -15px;
-    margin-top: -19px;
-    margin-right: 0px;
-    padding: 15px;
-    padding-top: 13px;
-    padding-bottom: 11px;
-    vertical-align: middle;
-    display: none;
-}
-
-.navrow {
-    left: 0;
-}
-
-.page {
-    max-width: 800px;
-    left: 0;
-}
-
-.page nav {
-    position: relative;
-    width: calc(100vw - 200px);
-    left: 0;
-}
-
-@media screen and (max-width: 600px) {
-    #left {
-        position: absolute;
-        margin-top: 32px;
-        display: none;
-    }
-
-    #right {
-        margin-left: 0;
-        width: 100vw;
-    }
-
-    nav img {
-        display: inline;
-    }
-
-    .page nav {
-        width: 100vw;
-    }
-}
-
-
-/* Dark mode */
-@media (prefers-color-scheme: dark) {
-    nav img {
-        filter: invert(80%);
-    }
-
-    #left {
-        background-color: #373e48;
-        border-right: 1px solid #666;
-    }
-
-    .description pre {
-        color: black;
-    }
-}
diff --git a/extra/webapps/wiki/wiki-contents.js b/extra/webapps/wiki/wiki-contents.js
deleted file mode 100644 (file)
index 80112a9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-function toggleSidebar() {
-    var l = document.getElementById("left");
-    var m = document.getElementById("menu");
-    if (l.style.display === "") {
-        l.style.display = "inline";
-        var darkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
-        if (!darkMode) {
-            m.style.backgroundColor = "#f3f2ea";
-        }
-    } else {
-        l.style.display = "";
-        m.style.backgroundColor = "";
-    }
-}
index 7a3429cb55903f14cd05e535f771f7b867852eba..1337974a1b31bf092300b4dfb7feeaf53e611ada 100644 (file)
@@ -115,3 +115,76 @@ footer {
     padding-left: 15px;
     font-size: smaller;
 }
+
+#left {
+    float: left;
+    width: 200px;
+    z-index: 99;
+    border-right: 1px solid #ccc;
+    background: #f3f2ea;
+}
+
+#right {
+    margin-left: 200px;
+    width: calc(100% - 200px);
+}
+
+nav img {
+    margin: -15px;
+    margin-top: -19px;
+    margin-right: 0px;
+    padding: 15px;
+    padding-top: 13px;
+    padding-bottom: 11px;
+    vertical-align: middle;
+    display: none;
+}
+
+.page {
+    max-width: 800px;
+    left: 0;
+}
+
+.page nav {
+    position: relative;
+    width: calc(100vw - 200px);
+    left: 0;
+}
+
+@media screen and (max-width: 600px) {
+    #left {
+        position: absolute;
+        margin-top: 32px;
+        display: none;
+    }
+
+    #right {
+        margin-left: 0;
+        width: 100vw;
+    }
+
+    nav img {
+        display: inline;
+    }
+
+    .page nav {
+        width: 100vw;
+    }
+}
+
+
+/* Dark mode */
+@media (prefers-color-scheme: dark) {
+    nav img {
+        filter: invert(80%);
+    }
+
+    #left {
+        background-color: #373e48;
+        border-right: 1px solid #666;
+    }
+
+    .description pre {
+        color: black;
+    }
+}
index c420456f7a154f8abe6b16bbffadda94c6adf272..1513ab1989b58d3ca67294ac53cf8c72f1fa0f7b 100644 (file)
@@ -6,8 +6,9 @@ html {
     box-sizing: inherit;
 }
 
-body {
+html, body {
     margin: 0;
+    padding: 0;
 }
 
 body, button {
@@ -55,21 +56,15 @@ a:hover, .link:hover { text-decoration: underline; }
 nav {
     border-bottom: 1px solid #ccc;
     background-color: #f5f5f5;
+    padding: 15px;
+    padding-left: calc(max(50% - 500px, 15px));
 }
 
-.navrow {
-    max-width: 1000px;
-    position: relative;
-    left: calc(max(-500px,-50%) + 50%);
-    margin: 0;
-    padding: 10px 15px 10px 15px;
-}
-
-.navrow a, .navrow .link {
-    margin-right: 10px;
+nav a, nav .link {
+    margin-right: 5px;
 }
 
-.navrow img {
+nav img {
     vertical-align: middle;
 }