madness 1.2.5 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -1
  3. data/app/public/css/main.css +652 -401
  4. data/app/public/css/main.css.map +17 -19
  5. data/app/public/js/theme.js +81 -0
  6. data/app/public/js/vendor/mermaid.min.js +1509 -915
  7. data/app/styles/_anchor.scss +11 -3
  8. data/app/styles/_breadcrumbs.scss +8 -1
  9. data/app/styles/_code.scss +26 -8
  10. data/app/styles/_footnotes.scss +29 -0
  11. data/app/styles/_general.scss +6 -3
  12. data/app/styles/_image.scss +18 -0
  13. data/app/styles/_keyboard.scss +6 -4
  14. data/app/styles/_manifest.scss +1 -2
  15. data/app/styles/_nav.scss +200 -16
  16. data/app/styles/_pandoc_code.scss +55 -51
  17. data/app/styles/_rouge.scss +57 -211
  18. data/app/styles/_scrollbar.scss +17 -3
  19. data/app/styles/_search.scss +20 -8
  20. data/app/styles/_table.scss +6 -5
  21. data/app/styles/_typography.scss +44 -16
  22. data/app/styles/_variables.scss +216 -35
  23. data/app/views/_icon.slim +23 -0
  24. data/app/views/_mobile_search.slim +1 -1
  25. data/app/views/_nav.slim +18 -8
  26. data/app/views/_nav_tree.slim +13 -0
  27. data/app/views/layout.slim +26 -1
  28. data/lib/madness/directory.rb +7 -0
  29. data/lib/madness/item.rb +1 -0
  30. data/lib/madness/navigation.rb +24 -0
  31. data/lib/madness/rendering/pandoc.rb +2 -1
  32. data/lib/madness/rendering/redcarpet_custom.rb +6 -1
  33. data/lib/madness/settings.rb +1 -0
  34. data/lib/madness/templates/madness.yml +5 -0
  35. data/lib/madness/version.rb +1 -1
  36. metadata +5 -8
  37. data/app/public/font/fontello.eot +0 -0
  38. data/app/public/font/fontello.svg +0 -16
  39. data/app/public/font/fontello.ttf +0 -0
  40. data/app/public/font/fontello.woff +0 -0
  41. data/app/public/font/fontello.woff2 +0 -0
  42. data/app/styles/_fontello.scss +0 -59
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd23bce526e8a8f0292bb76d566e374b11dcfbc9098ffe3bd917aaa5882e280c
4
- data.tar.gz: 63f3098a8a7bd3a38433c133ce3d17960bbb6f9518234b6acd81a4af471ef91c
3
+ metadata.gz: 7ae3cdf3ac2b5f6b10c753eea82d7d1582638dbe9cd07d74a3b9dae1538d71ec
4
+ data.tar.gz: 28ad6247d60993951bcdc8523ceffec325db4ec03d9d2fcf3bc39148a4af7660
5
5
  SHA512:
6
- metadata.gz: cbc4a3ed4eaa5128c3b5bc15ace61e051d01dfa40ef3aaa0541e66a32867791234c6c74a97226a3322faa36292a1ea6e6a40005913df121899d98df76c769ade
7
- data.tar.gz: 987e1dab1dfeee1163d633c96a55f7fbbaddb91c81ec087107e12d7fa63ef5f8f64d79bffe277c171bf5ebfc63deaff2d5ec2f0f31038c27c29b244e6ab3b344
6
+ metadata.gz: a56ccf5bd4beb475f1a1b4d1ccbdc4b35fb22bfb472d9b538316b66263c5c3fc26a7ab2f2154ae43701ea3325dfd10ba5efe59344da7164c57ff543bd072d157
7
+ data.tar.gz: 3b666bcc03cce4e6b93fd1178811cedbc94d36f8caf00f2d38a9e34deebbbf9ad17d30b92522d54968cb49b8c9148ae2740216f7c1ed0a6ae5aa3174d7baccbc
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  # Madness - Instant Markdown Server
4
4
 
5
+ ![repocard](https://repocard.dannyben.com/svg/madness.svg)
6
+
5
7
  Madness is a command line server for rendering markdown documents in your
6
8
  browser. It is designed to facilitate easy development of internal
7
9
  markdown-based documentation sites.
@@ -40,6 +42,7 @@ $ alias madness='docker run --rm -it -v $PWD:/docs -p 3000:3000 dannyben/madness
40
42
  - Compatible with how markdown files are displayed on GitHub and GitHub pages.
41
43
  - Configure with a configuration file or command arguments.
42
44
  - Fully customizable theme.
45
+ - Built-in light and dark theme support.
43
46
  - Automatic generation of navigation sidebar.
44
47
  - Automatic generation of Table of Contents (site-wide and per page).
45
48
  - Can optionally show additional file types in the navigation menu (e.g. PDF
@@ -134,6 +137,11 @@ sort_order: dirs_first
134
137
  # enable sidebar
135
138
  sidebar: true
136
139
 
140
+ # render the sidebar as a recursive tree of the entire docroot, with
141
+ # collapsible folders. when false, the sidebar shows only the current
142
+ # folder's immediate children.
143
+ nav_tree: false
144
+
137
145
  # add H1 title to files that do not have one
138
146
  auto_h1: true
139
147
 
@@ -224,6 +232,16 @@ For example, for a directory named "API Documentation":
224
232
 
225
233
  Madness comes with a full text search page.
226
234
 
235
+ ### Navigation Tree
236
+
237
+ By default, the sidebar shows the current folder's immediate children. To render
238
+ the sidebar as a recursive tree of the entire documentation root, enable the
239
+ `nav_tree` option:
240
+
241
+ ```yaml
242
+ nav_tree: true
243
+ ```
244
+
227
245
  ### Images and Static Files
228
246
 
229
247
  You can put images and other asset files anywhere in your documentation
@@ -377,6 +395,11 @@ auth: <%= ENV['BASIC_AUTH'] %>
377
395
 
378
396
  There are three ways to change how Madness looks.
379
397
 
398
+ The built-in theme supports light and dark color schemes. It follows the
399
+ browser or operating system preference by default, and readers can use the theme
400
+ toggle to switch between light and dark. The selected preference is stored in
401
+ the browser for future visits.
402
+
380
403
  ### Option 1: CSS Overrides
381
404
 
382
405
  Any CSS file found in the `./css` directory of your documentation root will
@@ -470,4 +493,3 @@ For more information about the docker image, see:
470
493
  [dockerfile]: https://github.com/DannyBen/madness/blob/master/Dockerfile
471
494
  [css]: https://github.com/DannyBen/madness/blob/master/app/public/css/main.css
472
495
  [sasstool]: https://github.com/DannyBen/sasstool
473
-