From 96624d2cbdfdf33882697151c353d54c31c5dcde Mon Sep 17 00:00:00 2001 From: lxsang Date: Sun, 7 Feb 2021 13:23:46 +0100 Subject: [PATCH] enable mobile compatibility --- doc/assets/style.css | 47 ++++++++++++++++++++------- doc/controllers/JarvisController.lua | 6 +++- doc/views/default/layout.ls | 48 +++++++++++++++++----------- 3 files changed, 70 insertions(+), 31 deletions(-) diff --git a/doc/assets/style.css b/doc/assets/style.css index 59212a8..da55dff 100644 --- a/doc/assets/style.css +++ b/doc/assets/style.css @@ -54,10 +54,36 @@ body { text-align: justify; height: 100%; } -div.doc-name { +div.doc-toc-menu { text-align: left; padding-top: 3px; } +div.doc-toc-menu a { + text-decoration: none; + color: #c9c9c9; +} +div.doc-toc-legend::before +{ + content: "\f0c9"; + color: #2c2c2c; + width: 20px; + height: 25px; + margin-right: 3px; + font-family: "FontAwesome"; + font-size: 18px; +} +div.doc-toc-menu a::before { + /* padding-top:13px; */ + content: "\f02d"; + color: #c9c9c9; + width: 20px; + height: 25px; + font-family: "FontAwesome"; + font-size: 18px; +} +div.doc-name{ + font-weight: bold; +} div.doc-name a { text-decoration: none; color: #c9c9c9; @@ -66,13 +92,14 @@ div.doc-name a { a.x-link, a.x-link:hover { text-decoration: none; - color: #c9c9c9; - padding-left: 15px; + color: #2c2c2c; + font-weight: bold; + /* padding-left: 15px; */ padding-top: 7px; } a.x-link::before { content: "\f08e"; - color: #c9c9c9; + color: #2c2c2c; width: 20px; height: 25px; font-family: "FontAwesome"; @@ -81,7 +108,7 @@ a.x-link::before { div.doc-name a::before { /* padding-top:13px; */ content: "\f015"; - color: #c9c9c9; + color: #2c2c2c; width: 20px; height: 25px; font-family: "FontAwesome"; @@ -135,20 +162,18 @@ div.doc-toc { button#btn_toc { width: 33px; height: 33px; - position: fixed; border: 1px solid #c9c9c9; background-color: #e3e3e3; - z-index: 21; outline: none; } -div.doc-to-header{ +div.doc-toc-header{ display: block; padding: 0px; margin: 0px; - padding-left: 37px; - padding-top: 9px; - height: 24px; + padding-left: 10px; + padding: 3px; + /* height: 24px; */ border-bottom: 1px solid #c9c9c9; font-weight: bold; } diff --git a/doc/controllers/JarvisController.lua b/doc/controllers/JarvisController.lua index 65c5bb9..33c8ac7 100644 --- a/doc/controllers/JarvisController.lua +++ b/doc/controllers/JarvisController.lua @@ -4,5 +4,9 @@ DocController:subclass("JarvisController", { vfs_path = "book://", local_path = "/home/mrsang/doc/jarvis", }, - name = "jarvis" + name = "jarvis", + elinks = { + { name = "API", url = "https://doc.iohub.dev/antos/api/index.html" }, + { name = "Code", url = "https://github.com/lxsang/antos" } + } }) diff --git a/doc/views/default/layout.ls b/doc/views/default/layout.ls index d22d080..c91525d 100644 --- a/doc/views/default/layout.ls +++ b/doc/views/default/layout.ls @@ -84,25 +84,16 @@ end