Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Internet of Things

You're reading from  Mastering Internet of Things

Product type Book
Published in Mar 2018
Publisher Packt
ISBN-13 9781788397483
Pages 410 pages
Edition 1st Edition
Languages
Author (1):
Peter Waher Peter Waher
Profile icon Peter Waher
Toc

Table of Contents (24) Chapters close

Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
1. Preparing Our First Raspberry Pi Project 2. Creating a Sensor to Measure Ambient Light 3. Creating an Actuator for Controlling Illumination 4. Publishing Information Using MQTT 5. Publishing Data Using HTTP 6. Creating Web Pages for Your Devices 7. Communicating More Efficiently Using CoAP 8. Interoperability 9. Social Interaction with Your Devices Using XMPP 10. The Controller 11. Product Life Cycle 12. Concentrators and Bridges 13. Using an Internet of Things Service Platform 14. IoT Harmonization 15. Security for the Internet of Things 16. Privacy 1. Other Books You May Enjoy Index

Creating a menu system


We now have two pages on the sensor that we would like to navigate between, using some kind of menu system. Instead of having to insert this menu structure manually into each page, the Markdown engine we use allows us to define a master/detail view of our page. We can create a master Markdown document that contains the menu, and that embeds detail documents in it.

Creating the master document

We begin by creating a new Markdown document in the Root folder and call it Menu.md. In it, we add the headers that we want all detail pages to have. We, therefore, move the CSS file to the Menu.md file, since we want all pages to have the same design. We can also define an Icon header.

We then go on to provide the general disposition of the page, using the HTML5 elements header, nav, main, and footer. We define the menu using a bullet-point list. This list is rendered to ul and li tags respectively. We can use the CSS file to transform this bullet-point list into a nicer-looking...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime}