JMRI Web page styles and templates
As you see here, we ignore a no-sidebar (formerly nomenu) #mBody page.
TODO: add some small Sidebar on all pages so the Hamburger menu always has work to do.
And note that if you do not wrap text in a <p> (like the next paragraphs) it will flow up to the
sides. A quick test!
To demonstrate some of the current html and css options built into the jmri.org site, this page
describes the most important ones.
You can also study the comments in the html code of the main page templates:
When you include a link to /Sidebar.shtml
you will see the one currently shown (see
Responsive HTML note).
Color scheme
In the jmri.org cascading stylesheet (CSS) we manage tho color scheme and all other styling used on our
website and help pages.
Three main colors:
- var(--primary-color1) = #554FA0; /* Purple */
- var(--primary-color2) = #FFD700; /* Orange */ =
attention
- var(--primary-color3) = #778899; /* LightSlateGray */ = navigation,
boxes
Button hover color is LightGray. This is applied in the menu buttons along the top.
Two supporting background colors, light enough to read black/purple text:
- var(--background-color1) = #B695C0; /* LightPurple */
- var(--background-color2) = #F5F5DC; /* Sand Beige */
Fine lines, fade shadows for floating/box, graphic weight in headers/color only.
To guarantee accessibility:
sufficient contrast, information (read, or text-to-speech...)
For maintainability:
please focus your contributions on contents, and follow along with the available style guide.
Avoid adding your own custom formatting, empty <p> tags to add space around other elements or
make an effort to align stuff on a page by embeddding it inside html tables etc.
Screen parts
main
Sidebar
Header
Footer
Includes
Note the h4 header before this line uses a color as a var. Please report your browser and
version if the above title is not displayed on a light purple colored band.
Style:
Scripts:
Standard Components
Flex is a set for responsive positioning on different screen sizes. We provide 4 of them:
Responsive HTML
To present the optimum viewing experience on different screen sizes, since fall 2020 jmri.org
supports so called 'responsive' page layout and matching css style sheets.
An obvious example of this is the collapsed Sidebar when you view this page on a mobile device
(portrait mode). Instead of filling part of the screen, you will find a hamburger menu on the top left.
Click it to see the Sidebar slide in from the left.
Subjects to be added: