From 3730de18eabe49841ec76e045c1bb901cc255e21 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 16 Nov 2018 10:56:50 -0500 Subject: [PATCH 1/7] Add support for task lists --- _sass/content.scss | 16 ++++++++++++++++ docs/index-test.md | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/_sass/content.scss b/_sass/content.scss index 4ef15ce..7a41e3a 100644 --- a/_sass/content.scss +++ b/_sass/content.scss @@ -56,6 +56,22 @@ } } + .task-list { + padding-left: 0; + } + + .task-list-item { + display: flex; + align-items: center; + &::before { + content: ""; + } + } + + .task-list-item-checkbox { + margin-right: 0.6em; + } + hr + * { margin-top: 0; } diff --git a/docs/index-test.md b/docs/index-test.md index ab7a1f2..1d0db73 100644 --- a/docs/index-test.md +++ b/docs/index-test.md @@ -94,6 +94,12 @@ end - level 2 item - level 1 item +### And a task list + +- [ ] Hello, this is a TODO item +- [ ] Hello, this is another TODO item +- [x] Goodbye, this item is done + ### Small image ![](https://assets-cdn.github.com/images/icons/emoji/octocat.png) From 45eea0efb69642a451d38157ab03a8cb6a5e9386 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 16 Nov 2018 10:57:07 -0500 Subject: [PATCH 2/7] Add docs for lists --- docs/ui-components/lists.md | 98 +++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 docs/ui-components/lists.md diff --git a/docs/ui-components/lists.md b/docs/ui-components/lists.md new file mode 100644 index 0000000..364316e --- /dev/null +++ b/docs/ui-components/lists.md @@ -0,0 +1,98 @@ +--- +layout: default +title: Lists +parent: UI Components +nav_order: 5 +--- + +# Lists +{:.no_toc} + +## Table of contents +{: .no_toc .text-delta } + +1. TOC +{:toc} + +--- + +Most lists can be rendered with pure markdown... + +## Unordered list +
+- Item 1 +- Item 2 +- Item 3 + +_or_ + +* Item 1 +* Item 2 +* Item 3 +
+```markdown +- Item 1 +- Item 2 +- Item 3 + +_or_ + +* Item 1 +* Item 2 +* Item 3 +``` + + +## Ordered list +
+1. Item 1 +1. Item 2 +1. Item 3 +
+ ```markdown +1. Item 1 +1. Item 2 +1. Item 3 + ``` +## Task list + +
+- [ ] hello, this is a todo item +- [ ] hello, this is another todo item +- [x] goodbye, this item is done +
+ ```markdown +- [ ] hello, this is a todo item +- [ ] hello, this is another todo item +- [x] goodbye, this item is done + ``` + +## Definition list + +Definition lists require HTML syntax and aren't supported with the GitHub flavored markdown compiler. + +
+
+
Name
+
Godzilla
+
Born
+
1952
+
Birthplace
+
Japan
+
Color
+
Green
+
+
+```html +
+
Name
+
Godzilla
+
Born
+
1952
+
Birthplace
+
Japan
+
Color
+
Green
+
+``` + From d11e332dc692ba9c61ac0c0796a9c8e4e2431e51 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 16 Nov 2018 11:46:43 -0500 Subject: [PATCH 3/7] Create condition for no search and add config/css --- _config.yml | 3 +++ _includes/head.html | 2 ++ _layouts/default.html | 6 ++++-- _sass/layout.scss | 7 ++++--- _sass/navigation.scss | 2 +- _sass/search.scss | 2 +- assets/js/just-the-docs.js | 4 +++- 7 files changed, 18 insertions(+), 8 deletions(-) diff --git a/_config.yml b/_config.yml index 58d048a..22aef3f 100644 --- a/_config.yml +++ b/_config.yml @@ -21,6 +21,9 @@ baseurl: "/just-the-docs/" # the subpath of your site, e.g. /blog permalink: pretty exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile"] +# Enable or disable the site search +search_enabled: true + # Aux links for the upper right navigation aux_links: "Just the Docs on GitHub": diff --git a/_includes/head.html b/_includes/head.html index 8aae2cf..cbd41f9 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -4,7 +4,9 @@ {{ page.title }} - {{ site.title }} + {% if site.search_enabled != nil %} + {% endif %} diff --git a/_layouts/default.html b/_layouts/default.html index fe76346..cc76786 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -16,7 +16,8 @@