diff --git a/doc/assets/style.css b/doc/assets/style.css index 1d72734..b884d23 100644 --- a/doc/assets/style.css +++ b/doc/assets/style.css @@ -37,14 +37,14 @@ html,body{ } #navbar{ margin:0 auto; - max-width: 85%; + max-width: 80%; display: flex; justify-content:flex-end; flex-direction: row; } #book{ margin:0 auto; - max-width: 85%; + max-width: 80%; max-height: 100%; display: block; justify-content:flex-end; @@ -53,7 +53,6 @@ html,body{ height: 100%; } div.doc-name { - width: 300px; text-align: left; padding-top:3px; } @@ -62,7 +61,21 @@ div.doc-name a { color: #c9c9c9; } -div.doc-name a:before{ +a.x-link, a.x-link:hover { + text-decoration: none; + color: #c9c9c9; + padding-left: 15px; + padding-top: 7px; +} +a.x-link::before{ + content: "\f08e"; + color:#c9c9c9; + width:20px; + height: 25px; + font-family: "FontAwesome"; + font-size: 15px; +} +div.doc-name a::before{ /* padding-top:13px; */ content: "\f015"; color:#c9c9c9; @@ -77,6 +90,7 @@ input.search-box{ flex:1; padding:0; margin:0; + margin-left: 10px; /* padding-top:13px; */ height: 25px; background-color: transparent; diff --git a/doc/controllers/AntosController.lua b/doc/controllers/AntosController.lua index 9a6e260..f480eb0 100644 --- a/doc/controllers/AntosController.lua +++ b/doc/controllers/AntosController.lua @@ -4,5 +4,8 @@ DocController:subclass("AntosController", { vfs_path = "home://testws/antos", local_path = "/home/mrsang/testws/antos" }, - name = "antos" + name = "antos", + elinks = { + { name = "API", url = "https://doc.iohub.dev/antos/api/" } + } }) diff --git a/doc/controllers/doccontroller.lua b/doc/controllers/doccontroller.lua index 04877bf..d6a6613 100644 --- a/doc/controllers/doccontroller.lua +++ b/doc/controllers/doccontroller.lua @@ -86,6 +86,8 @@ function DocController:index(...) local toc = self:loadTOC() toc.controller = self.name self.template:set("toc", toc) + self.template:set("elinks", self.elinks) + -- read data from the parameter local path = nil if args[1] then @@ -153,6 +155,7 @@ function DocController:search(...) self.template:set("data", result) self.template:set("controller", self.name) self.template:set("map", self.path_map) + self.template:set("elinks", self.elinks) else return self:actionnotfound(table.unpack(args)) end diff --git a/doc/views/default/layout.ls b/doc/views/default/layout.ls index 8d7e4b1..82a23b9 100644 --- a/doc/views/default/layout.ls +++ b/doc/views/default/layout.ls @@ -1,5 +1,6 @@ @@ -60,6 +61,17 @@ local tocdata = __main__:get("toc") + + + + +