diff --git a/material/overrides/partials/actions.html b/material/overrides/partials/actions.html new file mode 100644 index 000000000..a31b0b725 --- /dev/null +++ b/material/overrides/partials/actions.html @@ -0,0 +1,13 @@ +{#- + This file was automatically generated - do not edit +-#} +{% if page.edit_url %} + {% set edit = "https://github.com/squidfunk/mkdocs-material/edit" %} + {% set view = "https://raw.githubusercontent.com/squidfunk/mkdocs-material" %} + + {% include ".icons/material/file-edit-outline.svg" %} + + + {% include ".icons/material/file-eye-outline.svg" %} + +{% endif %} diff --git a/material/overrides/partials/content.html b/material/overrides/partials/content.html index 3ce64ce8b..10acfc0cc 100644 --- a/material/overrides/partials/content.html +++ b/material/overrides/partials/content.html @@ -1,19 +1,10 @@ {#- This file was automatically generated - do not edit -#} -{% if page.edit_url %} - {% set edit = "https://github.com/squidfunk/mkdocs-material/edit" %} - {% set view = "https://raw.githubusercontent.com/squidfunk/mkdocs-material" %} - - {% include ".icons/material/file-edit-outline.svg" %} - - - {% include ".icons/material/file-eye-outline.svg" %} - -{% endif %} {% if "tags" in config.plugins %} {% include "partials/tags.html" %} {% endif %} +{% include "overrides/partials/actions.html" %} {% if not "\x3ch1" in page.content %}

{{ page.title | d(config.site_name, true)}}

{% endif %} diff --git a/material/partials/actions.html b/material/partials/actions.html new file mode 100644 index 000000000..2c33c0249 --- /dev/null +++ b/material/partials/actions.html @@ -0,0 +1,9 @@ +{#- + This file was automatically generated - do not edit +-#} +{% if page.edit_url %} + + {% set icon = config.theme.icon.edit or "material/pencil" %} + {% include ".icons/" ~ icon ~ ".svg" %} + +{% endif %} diff --git a/material/partials/content.html b/material/partials/content.html index 11b7581b4..cff00de2a 100644 --- a/material/partials/content.html +++ b/material/partials/content.html @@ -1,15 +1,10 @@ {#- This file was automatically generated - do not edit -#} -{% if page.edit_url %} - - {% set icon = config.theme.icon.edit or "material/pencil" %} - {% include ".icons/" ~ icon ~ ".svg" %} - -{% endif %} {% if "tags" in config.plugins %} {% include "partials/tags.html" %} {% endif %} +{% include "partials/actions.html" %} {% if not "\x3ch1" in page.content %}

{{ page.title | d(config.site_name, true)}}

{% endif %} diff --git a/src/overrides/partials/actions.html b/src/overrides/partials/actions.html new file mode 100644 index 000000000..e422b2750 --- /dev/null +++ b/src/overrides/partials/actions.html @@ -0,0 +1,41 @@ + + + +{% if page.edit_url %} + {% set edit = "https://github.com/squidfunk/mkdocs-material/edit" %} + {% set view = "https://raw.githubusercontent.com/squidfunk/mkdocs-material" %} + + {% include ".icons/material/file-edit-outline.svg" %} + + + {% include ".icons/material/file-eye-outline.svg" %} + +{% endif %} diff --git a/src/overrides/partials/content.html b/src/overrides/partials/content.html index 0e0b7fb06..b954431ad 100644 --- a/src/overrides/partials/content.html +++ b/src/overrides/partials/content.html @@ -20,31 +20,14 @@ IN THE SOFTWARE. --> - -{% if page.edit_url %} - {% set edit = "https://github.com/squidfunk/mkdocs-material/edit" %} - {% set view = "https://raw.githubusercontent.com/squidfunk/mkdocs-material" %} - - {% include ".icons/material/file-edit-outline.svg" %} - - - {% include ".icons/material/file-eye-outline.svg" %} - -{% endif %} - {% if "tags" in config.plugins %} {% include "partials/tags.html" %} {% endif %} + +{% include "overrides/partials/actions.html" %} + + {{ page.content }} diff --git a/src/partials/actions.html b/src/partials/actions.html new file mode 100644 index 000000000..7c0fcc553 --- /dev/null +++ b/src/partials/actions.html @@ -0,0 +1,33 @@ + + + +{% if page.edit_url %} + + {% set icon = config.theme.icon.edit or "material/pencil" %} + {% include ".icons/" ~ icon ~ ".svg" %} + +{% endif %} diff --git a/src/partials/content.html b/src/partials/content.html index 58f798b02..f3b045555 100644 --- a/src/partials/content.html +++ b/src/partials/content.html @@ -20,23 +20,14 @@ IN THE SOFTWARE. --> - -{% if page.edit_url %} - - {% set icon = config.theme.icon.edit or "material/pencil" %} - {% include ".icons/" ~ icon ~ ".svg" %} - -{% endif %} - {% if "tags" in config.plugins %} {% include "partials/tags.html" %} {% endif %} + +{% include "partials/actions.html" %} + + {{ page.content }}