-
Notifications
You must be signed in to change notification settings - Fork 0
15 Navigation bars, badges and buttons
Navigation bars are convenient mechanisms for switching between pages within the Wiki, buttons allow for the downloading of files and badges are simple images that show the status of a Wiki page.
All are covered in the following sections.
Navigation bars are used in all PracticalSeries sidebars and footers, they are used to navigate around the Wiki, they look like this:
![]() |
Figure 15.1 — Navigation bars |
---|
The navigation bars in the sidebar and footer are identical for a particular page, the icons have the following meanings:
![]() |
Figure 15.2 — Navigation bar details |
---|
The navigation bar is constructed as a five-column table, each cell is configured with a link to the relevant page. The table is constructed using HTML, the following is a typical example:
This is the link from the side bar of section 6.7.
Each cell of the table <td>
contains a link in the form:
Where the
❶ |
Do not add the .md extension to the |
❷ |
Any spaces within the |
❸ | All uppercase letters are made lowercase (optional) |
The
Image | Filename | Description | Function |
---|---|---|---|
wi-l.svg |
Wiki image, left arrow | Prev page | |
wi-u.svg |
Wiki image, up arrow | Prev chapter | |
wi-h.svg |
Wiki image, home | Home page | |
wi-d.svg |
Wiki image, down arrow | Next chapter | |
wi-r.svg |
Wiki image, right arrow | Next page | |
wi-b.svg |
Wiki image, white square (blank) | Place holder for a blank cell | |
Table 15.2 — Navigation bar icon images |
If you wish to use these images, I make them available to you, they are contained in the following zip file:
The
The text for each of these is listed in the Function column of the above table.
Most pages in a Wiki contain a whole chapter. Under these circumstances, the previous page and the previous chapter have the same link (to the previous chapter). Similarly, the next page and the next chapter are also identical.
Where chapters are split, the previous/next page links to the adjacent section in the current chapter, the previous/next chapter always links to the chapter preceding or following the current chapter.
The first page in the Wiki (generally, the home
page) does not have any previous chapter or previous page options; similarly the last page in the Wiki does not have next chapter or next page entries.
In these cases, where a cell in the navigation bar is empty, the entry becomes:
I.e. the cell simply contains the blank image (it has the same dimensions as the link images), this maintains the cell width. The cell does not contain an <a>
anchor tag, there is no link.
Badges are used extensively in GitHub; these are some examples:
These types of badges are used on all the PracticalSeries Wiki pages. The Web ID
one at the top contains the chapter and section number of the current page, the three letters at the end (eck
in this case), are a mechanism for tracking the page revision💠1.
The loc
badge is used on sidebar and footer pages to identify which folder the sidebar or footer is located in (it is a mechanism for identifying a particular sidebar or footer, it isn’t always clear which sidebar or footer you are working on, they all have the same name, just the folder is different, see section 4 for details).
The badge in the middle is just an example of what can be done with badges.
The badges used by the PracticalSeries Wiki (and judging by appearances, most GitHub repositories), are generated on demand by the Shields.IO website.
These badges are not images stored in the Wiki. They are created dynamically by the Shields.IO website from data passed to it from the Wiki page. Here’s an example:
HTML and GitHub output |
---|
|
<img src="https://img.shields.io/badge/BadgeName-BadgeText-blue">
|
|
|
This is what Shields IO refer to as a static badge. Static badges contain fixed information passed to the website when the page is rendered (as opposed to dynamic badges that can read various live data values from a repository, such as the number of commits &c.).
By default static badges are 20 px high (this is generally about right for the GitHub pages). To make the badges bigger or smaller, include the height attribute:
HTML and GitHub output |
---|
|
<img height="40px" src="https://img.shields.io/badge/BadgeName-BadgeText-blue">
|
|
|
Important
The Shields IO badges are generated as SVG images and will scale either up or down without distortion.
The image source is always the URL: https://img.shields.io/badge/
, this is followed by the text for the BadgeName
(the left-hand section of the badge with the grey background), followed by a dash character -
and then the BadgeText
(the right-hand section of the badge with the coloured background).
This is followed by an addition dash -
and then the colour for the background of the right-hand side of the badge.
The predefined colours are as follows; each is a range of colours from the top to the bottom:
Colour | Name | Top colour | Bottom colour |
---|---|---|---|
![]() |
brightgreen, success |
#4FCA21 |
#3DB80F |
![]() |
green |
#9AC812 |
#89B701 |
![]() |
yellow |
#DBB327 |
#C9A115 |
![]() |
yellowgreen |
#A6A82C |
#94961A |
![]() |
orange, important |
#F78344 |
#E57132 |
![]() |
red, critical |
#DC664F |
#CA543D |
![]() |
blue, informational |
#4FCA21 |
#3DB80F |
![]() |
grey, gray |
#5F5F5F |
#4D4D4D |
![]() |
lightgrey, lightgray, inactive |
#A1A1A1 |
#8F8F8F |
Table 15.3 — Shield.IO predefined colours and names |
The colour can also be specified in hexadecimal RGB format:
HTML and GitHub output |
---|
|
<img height="40px" src="https://img.shields.io/badge/BadgeName-BadgeText-4472C4">
|
|
|
Note
The hexadecimal number is entered without a leading hash #
.
Spaces can be inserted into the text strings by using an underscore _
or by using the %20
character string (see section 9.6.2). For example:
HTML and GitHub output |
---|
|
<img height="40px" src="https://img.shields.io/badge/Badge_Name-Badge%20Text-4472C4">
|
|
|
Other escape sequences are:
A dash character -
is entered as a double dash --
An underscore character _
is entered as a double underscore __
HTML and GitHub output |
---|
|
<img height="40px" src="https://img.shields.io/badge/Badge__Name-Badge--Text-4472C4">
|
|
|
The basic form of the static badge:
HTML |
---|
|
<img src="https://img.shields.io/badge/BadgeName-BadgeText-Colour">
|
Can be supplemented by various other parameters. These are added to the URL as queries after the Colour
entry as follows:
HTML |
---|
|
<img src="https://img.shields.io/badge/BadgeName-BadgeText-Colour?style=[style]&logo=[logo]
&logoColor=[logoColor]&logoSize=[logoSize]&labelColor=[labelColor]&color=[Color]">
|
Where:
Parameter | Function | Values | Example |
---|---|---|---|
[style] |
Changes the appearance of the badge. Note: any defined colours are ignored if the social style is selected. |
#flat (default) |
|
flat-square |
|||
plastic |
|||
for-the-badge |
|||
social |
|||
[logo] |
Adds a particular logo to the badge before the BadgeName The full list of logo codes is available here: https://simpleicons.org/ |
dotenv |
|
github |
|||
git |
|||
[logoColor] |
Changes the colour of any selected logo (see [logo]) | blue |
|
[logoSize] |
The only option is auto , it resizes some logos and make them fit better |
auto |
|
[labelColor] |
Changes the background colour of the left-hand side of the badge | #C00000 |
|
[Color] |
Changes the background colour of the right-hand side of the badge (overrides any colour specified in the link) |
orange |
|
Table 15.4 — Shields.IO static badge parameters |
The following produces this badge:
HTML and GitHub output |
---|
|
<img height="40" src="https://img.shields.io/badge/BadgeName-BadgeText-blue?style=flat&logo=dotenv
&logoColor=grey&logoSize=auto&labelColor=brightgreen&color=red">
|
|
Dynamic badges display some information about a repository (number of commits, repository size, releases status &c.). Dynamic badges are orientated towards the repository itself and not the Wiki associated with a repository so they have limited use as far as the Wiki is concerned.
Dynamic badges are again created by the Shields.IO website from data passed to it from the Wiki page. Here’s an example (repository size):
HTML and GitHub output |
---|
|
<img height="40" src="https://img.shields.io/github/repo-size/practicalseries/PS2001-pal-software">
|
|
The data in the badge updates each time the webpage is reloaded or refreshed.
Dynamic badges require information about the repository, in the above example it needed the username and repository name in the format:
The repo-size
entry changes depending on the metric being accessed.
There are a great many different dynamic badges available via the Shields.IO website. The website also has a built-in configuration tool that generates and tests the badge from information you supply.
The following is the populated webpage for the above badge, the page is available here:
https://shields.io/badges/git-hub-repo-size
The populated page looks like this:
![]() |
Figure 15.1 — Dynamic badge configuration |
---|
Enter the username in point 1 and enter the repository name in point 2.
To see what the badge looks like, click the
The populated link can be copied by hovering the mouse over it and clicking the copy button, point 5. This is the src="https:…"
link in the <img>
tag above.
There is a very brief description of what each entry means in the centre of the page, point 6. Sometimes these are not very helpful and some experimentation is required.
All the dynamic badges for GitHub are listed in the entries on the left-hand side, in this case it was under Size, point 7 and GitHub repo size, point 8. The biggest problem is guessing the title under which the badge you require is listed.
Note
All the dynamic badges that can be used on GitHub start with the word GitHub.
Some badges require a commit number, generally give this as the full 40-digit sha number. E.g.: 224d0145ba4afb930a9517c91817ed61c732cb2c
.
Dynamic badges can be coloured and the text changed using the same options as for a static badge, see section 15.2.2.
GitHub doesn’t directly support the use of buttons in Markdown, despite having its own buttons on the screen (the
It is possible to add a button by creating an image (with any associated text) and pasting it into a Wiki page as a link (see section 11.2.4).
There is, however, a much easier way using the Shield IO (discussed in the previous sections). Look at the following (it works by the way):
This uses a Shields IO badge in a HTML link as follows:
HTML and GitHub output |
---|
|
<a href="https://github.com/practicalseries/GitHub-Wiki-Design-and-Implementation/wiki/00-0000/04-data/github-wiki-design.pdf"><img height="30" src="https://img.shields.io/badge/Download_the_pdf_document-1F883D"></a>
|
|
Table 15.5 — An example button |
The first part is an anchor link to the downloadable document (see section 9.6 for details). In this case it is:
https://github.com/practicalseries/GitHub-Wiki-Design-and-Implementation/wiki/00-0000/04-data/github-wiki-design.pdf
This is the download link to the pdf version of this Wiki, it works if you put it into a web browser.
This is followed by an <img>
tag that contains a Shields IO badge (just like those in the previous sections). The only difference is that the BadgeName (the left-hand side of the badge) is missing.
This is a perfectly acceptable arrangement for Shield IO badges.
The normal format for a Shields IO badge is:
HTML and GitHub output |
---|
|
<img src="https://img.shields.io/badge/BadgeName-BadgeText-blue">
|
|
|
By removing the BadgeName
and the first dash -
we have:
HTML and GitHub output |
---|
|
<img src="https://img.shields.io/badge/BadgeText-blue">
|
|
|
That’s all we’ve done here, the general format for a button is thus:
HTML |
---|
|
<a href="[LinkURL]" download><img height="30" src="https://img.shields.io/badge/[BadgeText]-1F883D"></a>
|
Table 15.6 — Button general format |
Where [LinkURL]
is the link to whatever the button is linking to.
The [BadgeText]
is the text that appears on the button.
The button itself is given the colour #1F883D
which is the green colour of the GitHub buttons (obviously, you can choose any colour for your button, I’ve just made mine the same as GitHub).
To centre a button on the screen put a <p align="center">
before the link and </p>
after it:
HTML and GitHub output |
---|
|
<p align="center"><a href="https://github.com/practicalseries/GitHub-Wiki-Design-and-Implementation/
wiki/00-0000/04-data/github-wiki-design.pdf"><img height="30" src="https://img.shields.io/badge/
Download_the_pdf_document-1F883D"></a></p>
|
|
Footnotes:
Note
💠1 The encoding I use is just the date I posted the page, it helps me keep track of which revision the page is at. The first letter is the year (starting at a
=2021, b
=2022 &c.). The second letter is the month (a
=January, b
=February &c) and the third is the day (a
=1, b
=2, … A
=27, … E
=31).
In the example, eck
corresponds to 11th March 2025.↩
|
|
|
|
|
The PracticalSeries of Publications — Copyright © 2025 Michael Gledhill
⬆️ Top | [email protected] | PracticalSeries of Publications | Main repository
|
|
|
|
|
Licence
The licences and other details
The Licence
Why did I choose the MIT Licence?
Permissive licences
Copyleft licence
Limiting liabilities
Which licence to use?
A note on spelling: licence or license
1 Introducing the GitHub Wiki
1.1 What are GitHub Wiki pages?
1.2 Understanding the Wiki pages
1.3 Creating a Wiki for a repository
1.3.1 Creating the first Wiki page
1.3.2 Creating additional pages
1.3.3 Editing a Wiki page
1.4 The Wiki is its own repository
1.4.1 Viewing a Wiki page history
1.4.2 How GitHub handles Wiki branche
1.4.3 The Wiki link to the main repository
1.5 Basic components of a Wiki page
1.5.1 Title bar and revision
1.5.2 Contents (pages) area
Listing pages in the order you want
1.5.3 Sidebars
1.5.4 Footers
1.6 Sidebars and footers
1.6.1 Creating a sidebar and footer
2 Cloning a Wiki
2.1 Why clone a Wiki?
2.2 How to clone a Wiki
2.3 Pushing local changes to GitHub
2.3.1 Configuring username and email
2.3.2 Modifying the local repository
2.3.3 Committing and synchronising
3 A Wiki folder structure
3.1 The default arrangement
3.2 Create a sidebar or footer locally
3.3 Page naming and Wiki limits
3.3.1 Supported file types
3.3.2 Page names and numbering
3.3.3 Rules for page numbering
3.3.4 Limits for Wiki pages
3.4 A Practical Wiki folder structure
3.4.1 Subfolder names for Wiki pages
3.4.2 Storing images and other data
4 Different sidebars and footers
4.1 How sidebars work
4.1.1 The PracticalSeries sidebar
4.2 How footers work
4.2.1 The PracticalSeries footer
5 Markdown, GitHub Markdown and HTML
5.1 Some useful Markdown sites
5.2 An overview of Markdown
5.3 How Markdown works
5.4 Markdown flavours
5.4.1 GitHub Flavoured Markdown (GFM)
5.5 HTML and Markdown
5.5.1 HTML with GFM
GFM blacklisted HTML tags
GFM whitelisted HTML tags
GFM HTML tags - the grey area
GFM whitelisted HTML attributes
5.5.2 PracticalSeries and Markdown
5.6 Markdown difference between files
6 Basic Markdown and text formatting
6.1 Body text and fonts
6.1.1 Body text responsive design
6.1.2 Body text in sidebars and footers
6.1.3 Rules for body text
6.1.4 Body text examples
6.1.5 Alignment of Body text
Left aligned text (default)
Right aligned text
Centred text
Justified text
6.1.6 Body text propertie
6.2 Paragraphs and line breaks
6.2.1 Forced line break
6.2.2 Blank line and a line break
6.2.3 Trailing space line break
6.2.4 Paragraph and line break rules
6.2.5 Paragraph and line break examples
6.3 Horizontal line
6.3.1 Rules for horizontal lines
6.4 Emphasis with bold
6.4.1 Rules for bold
6.4.2 Bold text examples
6.5 Emphasis with italics
6.5.1 Rules for italics
6.5.2 Italic text examples
6.6 Emphasis with bold and italics
6.6.1 Rules for bold and italics
6.6.2 Bold and italic text examples
6.7 Emphasis with underlining
6.7.1 Rules for underlining
6.7.2 Underlining text examples
6.8 Emphasis with strikethrough
6.8.1 Rules for strikethrough
6.8.2 Strikethrough text examples
6.9 Superscript and subscript
6.9.1 Rules for superscript and subscript
6.9.2 Superscript and subscript examples
6.10 Headings
Alternatives for heading 1 and 2
6.10.1 Headings Markdown rules
6.10.2 Heading properties
7 Special characters and escaping characters
7.1 Escape characters and codes
7.1.1 Markdown escape sequences
7.1.2 HTML escape sequences
7.1.3 Decimal and hexadecimal codes
Hexadecimal escape codes
7.2 Special space characters
7.2.1 Escape sequence restrictions
7.3 Emojis and emoticons
A note by the Author about emojis
7.4 Comments
8 Block quotes, lists and alerts
8.1 Block quotes
8.1.1 Nested block quotes
8.1.2 Adding other elements
8.1.3 Rules for block quotes
8.2 Unordered (unnumbered) lists
8.2.1 Nested unordered lists
8.2.2 Type of bullet point
8.2.3 Indents and spacing
8.2.4 Numbers in an unordered list
8.2.5 Adding paragraphs
8.2.6 Adding other elements
8.2.7 Rules for unordered lists
8.3 Ordered (numbered) lists
8.3.1 Starting at a different number
8.3.2 Nested ordered lists
8.3.3 Type of numbering
8.3.4 Indents and spacing
8.3.5 Adding paragraphs
8.3.6 Adding other elements
8.3.7 Rules for ordered lists
8.4 Mixing ordered and unordered lists
8.5 Task lists (check boxes)
8.5.1 Nested task lists
8.6 Alerts
8.6.1 Rules for alerts
9 Links
9.1 Link to an external web page
9.1.1 A direct link to a URL
9.1.2 A link using substitute text
9.1.3 A link using tooltips
9.2 Link to another page in the Wiki
9.2.1 Rules for linking to a Wiki page
9.3 Link to headings on current page
9.3.1 Converting a heading to a link
9.3.2 An example of a heading link
9.3.3 Heading link with tooltips
9.4 Link to headings on a different page
9.4.1 An example of a heading link
9.5 Link to a named element
A note by the Author
9.5.1 Link to a point on another page
9.6 Downloading a file
9.6.1 The download attribute
9.6.2 Spaces in filenames
9.6.3 Downloading a .md file
9.7 Reference style links
9.8 Relative links
9.8.1 Relative links from any Wiki page
10 Tables
10.1 Markdown tables
10.1.1 Horizontal alignment
10.1.2 Table construction
10.1.3 Vertical line breaks and alignment
10.1.4 Making columns wider
10.1.5 Other elements in a table
10.1.6 Markdown table restrictions
10.2 HTML tables
10.2.1 A basic HTML table
10.2.2 Aligning a table on a page
10.2.3 Text wrap and side-by-side tables
What this means in practice
The problem with the align attribute
How to stop text wrapping
10.2.4 Setting the width of a table column
10.2.5 Setting the height of a table row
10.2.6 Horizontal alignment
10.2.7 Vertical alignment
10.2.8 Spanning columns and rows
10.2.9 Table border
10.2.10 Giving a table a navigable name
10.2.11 Additional HTML tags
11 Images
11.1 Markdown images
11.1.1 Image size in Markdown
11.1.2 Making the image a link
11.1.3 Drag and drop image link
A note by the Author
11.2 HTML images
11.2.1 A basic HTML image
11.2.2 Image size in HTML
11.2.3 Horizontal alignment
11.2.4 Making the image a link
11.2.5 Using a table to contain an image
11.3 Forcing an image refresh
11.4 Using a spacer image
11.5 Mermaid diagrams
11.5.1 Inserting a Mermaid diagram
11.5.2 The rendered Mermaid diagram
11.5.3 Supported version of Mermaid
11.6 Interactive maps
11.7 3D models
12 Contents (collapsible) and footnotes
12.1 A basic table of contents
12.2 Understanding the space characters
12.3 Collapsible content
12.3.1 Defaulting to open
12.3.2 Markdown restrictions
12.4 Collapsible TOC
12.5 TOCs in tables
12.6 Footnotes
13 Code fragments
13.1 Inline code
13.2 Code blocks
13.2.1 Preferred mechanism
13.3 Syntax highlighting
13.3.1 Supported languages
13.4 HTML code fragments
13.4.1 Converting HTML to code
14 Mathematical formulae
14.1 An overview of LaTex
14.2 Inserting an inline formula
14.2.1 Alternative delimiter
14.3 A formula block
14.4 Some example formulae
14.5 LaTeX syntax
14.5.1 Greek lowercase
14.5.2 Greek uppercase and Hebrew
14.5.3 Mathematical constructions
14.5.4 Variable sized delimiters
14.5.5 Variable sized symbols
14.5.6 Variable sized symbols with limits
14.5.7 Standard functions
14.5.8 Operators and relational symbols
14.5.9 Arrows
14.5.10 Other symbols
14.5.11 Accents
14.5.12 Matrices
14.5.13 Cases
Aligning multiple equations
14.5.14 Text formatting
Font size
Font colour
The text command
Font restrictions
14.6 Abusing LaTeX
14.6.1 Changing font colour with LaTeX
15 Navigation bars, badges and buttons
15.1 Navigation bars
15.1.1 Navigation bar practicalities
15.2 Badges
15.2.1 Creating a badge
15.2.2 Static badge options
15.2.3 Dynamic badges
15.3 Buttons
16 PracticalSeries Wiki conventions
16.1 The PracticalSeries Wiki page
16.2 The PracticalSeries folder structure
16.2.1 The root folder and home page
16.2.2 Leading pages
16.2.3 .gitkeep files
16.2.4 Folder and Markdown file names
Wiki pages that start at a section
16.3 The page title area
16.4 The page heading area
16.4.1 Top of page marker
16.4.2 Logo image
16.4.3 Web ID badge
16.5 Main body area
16.5.1 Common page elements
End of page marker
End of section elements
16.5.2 Headings
Compensating for number widths
Appendices headings
16.5.3 Tables
Links to a table
A note on Markdown tables
16.5.4 Images
Images that open in a new tab
Double images
Links to a figure
16.5.5 Lists
Common points for all lists
Basic unordered list
Basic ordered list
Mixed ordered and unordered lists
Enhanced mixed lists
Index list
Reverse index list
Index list with text wrap
Reverse index list with text wrap
Indexed, mixed list
Reverse indexed, mixed list
Task list
Enhanced task list with observations
16.5.6 Code fragments
16.5.7 Formulae
Standard formulae
Alternate formulae
16.6 Sidebar
16.6.1 sidebar files and locations
16.6.2 Sidebar title and location badge
16.6.3 Navigation bar
16.6.4 Table of contents
Unnumbered, non-collapsible TOC
Unnumbered, collapsible TOC
Single digit, collapsible TOC
Double digit, collapsible TOC
TOCs for appendices
16.6.5 End of page link
16.7 Footer
16.7.1 Footer files and locations
16.7.2 Location badge
16.7.3 Navigation bar
16.7.4 Colophon
16.7.5 Links and contacts
17 Managing a Wiki
17.1 Revision control
17.1.1 Managing commits
17.2 Finding the first Wiki commit
17.3 Rebasing the Wiki
17.3.1 Summarising the rebase process
17.3.2 Executing the rebase process
17.4 Wikis and search engine visibility
Appendices
B Full list of all emoji characters
B.1 Emojis, a brief explanation
B.1.1 Emoji short names
B.1.2 Emoji escape codes
B.1.3 Emoji variations
B.1.4 Emoji numbers
B.2 Emojis characters by category
Smileys and emotion
People and body
Component
Animals and nature
Food and drink
Travel and places
Activities
Objects
Symbols
Flags
B.3 Emoji characters by Unicode
C Segoe UI full character set
A note by the Author
C.1 Inserting Unicode characters
C.2 Characters U+00000 to U+00FFF
C.3 Characters U+01000 to U+01FFF
C.4 Characters U+02000 to U+02FFF
C.5 Characters U+03000 to U+09FFF
C.6 Characters U+0A000 to U+0AFFF
C.7 Characters U+0B000 to U+0FFFF
C.8 Characters U+10000 to U+10FFF
C.9 Characters U+11000 to U+11FFF
C.10 Characters U+12000 to U+12FFF
C.11 Characters U+13000 to U+15FFF
C.12 Characters U+16000 to U+1CFFF
C.13 Characters U+1D000 to U+1EFFF
C.14 Characters U+1F000 to U+3FFFF
⬇️ End of page |