Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index pages #13

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions docs/assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/**
* Example information
*/

.md-typeset .author {
text-align: right;
}

/**
* Tag filters
*/
.md-typeset .filters {
background-color: lightgray;
}

.md-typeset .tagcheck {
display: none;
}

.md-typeset .taglabel {
background: var(--md-primary-fg-color);
border-radius: 10px;
padding-left: 5px;
padding-right: 5px;
color: white;
font-size: .64rem;
}

.md-typeset .taglist {
float:right;
padding-left:1em;
}

.md-typeset input:not(:checked) + .taglabel {
background: #909090;
}

/** First row: Materials version and integration **/

#public:not(:checked) ~ .example[data-tags~="public"]{
display:none;
}

#insiders:not(:checked) ~ .example[data-tags~="insiders"]{
display:none;
}

#integration:not(:checked) ~ .example[data-tags~="integration"]{
display:none;
}

/** Second row: functionality */

#colors:not(:checked) ~ .example[data-tags~="colors"]{
display:none;
}

#fonts:not(:checked) ~ .example[data-tags~="fonts"]{
display:none;
}

#icons:not(:checked) ~ .example[data-tags~="icons"]{
display:none;
}

#page_status:not(:checked) ~ .example[data-tags~="page_status"]{
display:none;
}

/** Third row: plugin */

#blog:not(:checked) ~ .example[data-tags~="blog"]{
display:none;
}

#group:not(:checked) ~ .example[data-tags~="group"]{
display:none;
}

#info:not(:checked) ~ .example[data-tags~="info"]{
display:none;
}

#meta:not(:checked) ~ .example[data-tags~="meta"]{
display:none;
}

#offline:not(:checked) ~ .example[data-tags~="offline"]{
display:none;
}

#optimize:not(:checked) ~ .example[data-tags~="optimize"]{
display:none;
}

#privacy:not(:checked) ~ .example[data-tags~="privacy"]{
display:none;
}

#projects:not(:checked) ~ .example[data-tags~="projects"]{
display:none;
}

#search:not(:checked) ~ .example[data-tags~="search"]{
display:none;
}

#social:not(:checked) ~ .example[data-tags~="social"]{
display:none;
}

#tags:not(:checked) ~ .example[data-tags~="tags"] {
display: none;
}

#typeset:not(:checked) ~ .example[data-tags~="typeset"] {
display: none;
}
23 changes: 19 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
---
template: exampleindex.html
---
# Examples

This project lists all options that are supported by Material for MkDocs and
can be used as a basis for new projects or reproductions. Note that some options
might currently be reserved for [sponsors]. Check the list of [available features]
to be sure.
The examples in this repository augment the documentation of Material for
MkDocs by providing worked examples of the functionality it provides. There
are also extended examples showing common integrations with third-party plugins
or that demonstrate specific use cases.

Our aim is to cover all the options that are supported by Material for MkDocs
so that the examples can be used as a basis for new projects or [reproductions].

Note that some options might currently be reserved for [sponsors]. We aim to
indicate this in the tags that are displayed with each examples but please
check the list of [available features] to be sure.

[sponsors]: https://squidfunk.github.io/mkdocs-material/insiders/
[available features]: https://squidfunk.github.io/mkdocs-material/insiders/#whats-in-for-me
[reproductions]: https://squidfunk.github.io/mkdocs-material/guides/creating-a-reproduction/

Use the filters below to choose which examples should be shown. For an example
to show, the filters matching *all* of its tags need to be selected. Note that
some examples have addtional tags that do not show in the filters - these are
not used in filtering.
10 changes: 0 additions & 10 deletions examples/blog-basic/.example.yml

This file was deleted.

15 changes: 12 additions & 3 deletions examples/blog-basic/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# Adding a blog to your site
---
tags:
- public
- blog
authors:
alexvoss:
name: Alex Voss
description: Collaborator
ghuser: alexvoss
---

This example shows how to add a [blog] to your site.
# Adding a blog to your site

It shows how to:
This example shows how to add a [blog] to your site. It shows how to:

- configure the `mkdocs.yml` to activate and configure the plugin
- set up a directory structure in your `docs/` folder
Expand Down
10 changes: 0 additions & 10 deletions examples/blog-rss/.example.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions examples/blog-rss/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
---
tags:
- public
- blog
- integration
authors:
alexvoss:
name: Alex Voss
description: Collaborator
ghuser: alexvoss
---
# Adding an RSS feed to a blog

This example shows how to [add an RSS feed to a blog]. You should be
Expand Down
11 changes: 0 additions & 11 deletions examples/blog-update/.example.yml

This file was deleted.

12 changes: 12 additions & 0 deletions examples/blog-update/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
---
name: Blog that shows post updates
tags:
- public
- blog
- customization
authors:
alexvoss:
name: Alex Voss
description: Collaborator
ghuser: alexvoss
---
# A blog with update dates shown

This example shows how to add a small customization that will show
Expand Down
5 changes: 5 additions & 0 deletions examples/color-palette-system-preference/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
tags:
- colors
- public
---
# Using the color palette system preference

This example shows how to implement the [color palette toggle] so that it
Expand Down
6 changes: 6 additions & 0 deletions examples/color-palette-toggle/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
tags:
- colors
- public
---

# Using the color palette toggle

This example shows how to implement the [color palette toggle] to let users switch
Expand Down
5 changes: 5 additions & 0 deletions examples/cookie-consent/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
tags:
- privacy
- insiders
---
# Adding a cookie consent

This example shows how to add a [cookie consent]. [Click here] to bring
Expand Down
5 changes: 5 additions & 0 deletions examples/custom-colors/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
tags:
- colors
- public
---
# Using custom colors

This example shows how to set [custom colors] with [additional CSS].
Expand Down
5 changes: 5 additions & 0 deletions examples/custom-cookies/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
tags:
- insiders
- privacy
---
# Adding a custom cookie

This example shows how to add a [custom cookie] to the [cookie consent] and
Expand Down
11 changes: 11 additions & 0 deletions examples/fonts-builtin/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
---
tags:
- public
- fonts
authors:
alexvoss:
name: Alex Voss
description: Collaborator
ghuser: alexvoss
---

# Using built-in browser fonts

This example shows what happens when auto-loading of fonts from Google
Expand Down
11 changes: 11 additions & 0 deletions examples/fonts-custom/.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
example:
name: Using a custom font
tags:
- public # works without Insiders
- fonts # functionality demonstrated
- simple # uses only Material functionality
authors:
alexvoss:
name: Alex Voss
description: Collaborator
ghuser: alexvoss
10 changes: 10 additions & 0 deletions examples/fonts-custom/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
---
tags:
- public
- fonts
authors:
alexvoss:
name: Alex Voss
description: Collaborator
ghuser: alexvoss
---
# Using a custom font

This example uses the Noto Serif and Noto Mono font families to show
Expand Down
5 changes: 5 additions & 0 deletions examples/page-status/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
tags:
- public
- "page_status"
---
# Using page status

This example shows how to add a [page status] to a page. This works for section
Expand Down
5 changes: 5 additions & 0 deletions examples/tags-with-icons/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
tags:
- public
- tags
---
# Using tags with icons

This example shows how to use [tags with icons] and includes the following pages:
Expand Down
5 changes: 5 additions & 0 deletions examples/tags/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
tags:
- public
- tags
---
# Using tags

This example shows how to use [tags] and includes the following pages:
Expand Down
Loading