Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Hi all. Wrote an article on creating navigation menus in asciidoc. There's a demo and a ZIP download on the site. Find it here: www.tomswan/blog/. Look for "Menus in Asciidoc." Please share if you want. PS: I wrote most of my site using asciidoctor and -pdf. Fantastic tool!
www.tomswan.com
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Tom - very nice article.
I am finding a lot a people trying to accomplish the same thing. Thanks for writing it. Here's a direct link to Tom's how-to article: http://www.tomswan.com/blog/posts/2015-07-10-menus-in-asciidoc.html
- Ted
@TedAtCIS
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Thank you Ted and thanks for sharing it. -- Tom On July 26, 2016 at 11:10 AM "Ted [via Asciidoctor :: Discussion]" <[hidden email]> wrote: ... [show rest of quote]
www.tomswan.com
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
In reply to this post by Ted
> Tom - very nice article.
> > I am finding a lot a people trying to accomplish the same thing. Thanks for writing it. > +1. Lovely and pithy. "I could probably eat my notes and survive" made me guffaw. Minor pernicketiness: * I think the correct capitalization is "Asciidoctor" (as opposed to AsciiDoc). * The footer of http://tomswan.com/blog/posts/2015-07-10-menus-in-asciidoc.html looks odd in Firefox. Screenshot here: http://imgur.com/KF4f9zd. --Martin |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Yeah I don't know what's right A..D A..d a..d. If it matters I'll use whatever spelling is judged correct. Thanks for the screenshot. I am trying things out and appreciate the feedback. What do you find odd? If it's the blank space above that's because my eyes are bad and I like to scroll the bottom of a page up so I can see it. Normal behaviour in FireFox for me is apparently to stop scrolling at the bottom and I can't see that line without putting my nose down on the keyboard! Long winded explanation -- sorry -- alternate suggestions welcome. Nit pick away! I just want to make some useful things and have some fun. Tom On July 26, 2016 at 3:19 PM "rappard [via Asciidoctor :: Discussion]" <[hidden email]> wrote: ... [show rest of quote]
www.tomswan.com
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
Very interesting use of AsciiDoc, Tom. For those who want to dive into the code, you can find it on GitHub. My one suggestion with the design would be to use a unordered list for the menu items instead of a table. [.main-menu] * link:{home} * link:{page1} * link:{page2} * link:{page3} * link:{readme} I think that would be more semantic. You could also use inter-document cross references instead of links. [.main-menu] * <<home#,Home>> Just a bit cleaner, I think. > I don't know what's right A..D A..d a..d. AsciiDoc and Asciidoctor. Cheers, -Dan On Tue, Jul 26, 2016 at 4:00 PM, Tom Swan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
... [show rest of quote] Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Thanks for the suggestions, Dan. I used a table to create a horizontal navigation bar at the top of the document. But won't the unordered list display each menu link on a separate line? That wouldn't work for my needs, although it does create a nice ad-hoc toc. Good thought using inter-document links. I am wondering if I can apply that to create nested AsciiDoc menus. Tom On August 14, 2016 at 9:49 PM "mojavelinux [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
... [show rest of quote]
www.tomswan.com
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
On Mon, Aug 15, 2016 at 12:42 PM, Tom Swan [via Asciidoctor :: Discussion] <[hidden email]> wrote: But won't the unordered list display each menu link on a separate line? Through the magic of CSS, you can get a list to display however you want. In fact, most websites use a list for navigation menus. You just wouldn't know it by looking at it. Example: http://foundation.zurb.com/ |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Here's some sample code to get you started.
DocWithMenu.adoc = Doc With Menu :docinfo1: [.main-menu] * link:{home}[Home] * link:{page1}[Page 1] * link:{page2}[Page 2] * link:{page3}[Page 3] * link:{readme}[Readme] == Display menu at top Using CSS to display an unordered list as a menu across the top ---- this is the docinfo.html file <style type="text/css"> .main-menu ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; position: fixed; top: 0; width: 100%; } .main-menu li { float: left; } .main-menu li a { display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } /* Change the link color to #111 (black) on hover */ .main-menu li a:hover { background-color: #111; } h1 { padding-top: 50px; } </style>
- Ted
@TedAtCIS
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Thank you Ted. That's great. I fully admit to a lack of CSS skills -- definitely will study this. -- Tom On August 15, 2016 at 3:58 PM "Ted [via Asciidoctor :: Discussion]" <[hidden email]> wrote: ... [show rest of quote]
www.tomswan.com
|
Free forum by Nabble | Edit this page |