mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-12 01:50:52 +01:00
Moved copyright into dedicated partial
This commit is contained in:
parent
7f4458eb18
commit
fe06e8dcba
@ -194,28 +194,6 @@ The following template blocks are provided by the theme:
|
||||
| `styles` | Wraps the style sheets (also extra sources) |
|
||||
| `tabs` | Wraps the tabs navigation (if available) |
|
||||
|
||||
#### Additional variables
|
||||
|
||||
Besides template blocks, Material for MkDocs provides extra variables for parts
|
||||
that cannot be overridden with template blocks (due to technical limitations of
|
||||
the template engine). If you want to add further information after the _Made
|
||||
with Material for MkDocs_ hint in the footer, add the following line to
|
||||
`main.html`:
|
||||
|
||||
``` html
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% set extracopyright %}
|
||||
<!-- Add additional copyright information here -->
|
||||
{% endset %}
|
||||
```
|
||||
|
||||
The following template variables are provided by the theme:
|
||||
|
||||
| Block name | Purpose |
|
||||
|:------------------|:------------------------------------------------|
|
||||
| `extracopyright` | Adds custom copyright information |
|
||||
|
||||
## Theme development
|
||||
|
||||
Material for MkDocs is built on top of [TypeScript], [RxJS] and [SASS], and
|
||||
|
2
material/assets/stylesheets/main.9bd947bf.min.css
vendored
Normal file
2
material/assets/stylesheets/main.9bd947bf.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
material/assets/stylesheets/main.9bd947bf.min.css.map
Normal file
1
material/assets/stylesheets/main.9bd947bf.min.css.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -34,7 +34,7 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.9e98b581.min.css' | url }}">
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.9bd947bf.min.css' | url }}">
|
||||
{% if config.theme.palette %}
|
||||
{% set palette = config.theme.palette %}
|
||||
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.9204c3b2.min.css' | url }}">
|
||||
|
16
material/partials/copyright.html
Normal file
16
material/partials/copyright.html
Normal file
@ -0,0 +1,16 @@
|
||||
{#-
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
<div class="md-copyright">
|
||||
{% if config.copyright %}
|
||||
<div class="md-copyright__highlight">
|
||||
{{ config.copyright }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not config.extra.generator == false %}
|
||||
Made with
|
||||
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
||||
Material for MkDocs
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
@ -41,20 +41,7 @@
|
||||
{% endif %}
|
||||
<div class="md-footer-meta md-typeset">
|
||||
<div class="md-footer-meta__inner md-grid">
|
||||
<div class="md-footer-copyright">
|
||||
{% if config.copyright %}
|
||||
<div class="md-footer-copyright__highlight">
|
||||
{{ config.copyright }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not config.extra.generator == false %}
|
||||
Made with
|
||||
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
||||
Material for MkDocs
|
||||
</a>
|
||||
{% endif %}
|
||||
{{ extracopyright }}
|
||||
</div>
|
||||
{% include "partials/copyright.html" %}
|
||||
{% if config.extra.social %}
|
||||
{% include "partials/social.html" %}
|
||||
{% endif %}
|
||||
|
@ -1,14 +1,14 @@
|
||||
{#-
|
||||
This file was automatically generated - do not edit
|
||||
-#}
|
||||
<div class="md-footer-social">
|
||||
<div class="md-social">
|
||||
{% for social in config.extra.social %}
|
||||
{% set title = social.name %}
|
||||
{% if not title and "//" in social.link %}
|
||||
{% set _, url = social.link.split("//") %}
|
||||
{% set title = url.split("/")[0] %}
|
||||
{% endif %}
|
||||
<a href="{{ social.link }}" target="_blank" rel="noopener" title="{{ title | e }}" class="md-footer-social__link">
|
||||
<a href="{{ social.link }}" target="_blank" rel="noopener" title="{{ title | e }}" class="md-social__link">
|
||||
{% include ".icons/" ~ social.icon ~ ".svg" %}
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
@ -159,8 +159,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Footer copyright and theme information
|
||||
.md-footer-copyright {
|
||||
// Copyright and theme information
|
||||
.md-copyright {
|
||||
width: 100%;
|
||||
margin: auto px2rem(12px);
|
||||
padding: px2rem(8px) 0;
|
||||
@ -179,8 +179,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Footer social links
|
||||
.md-footer-social {
|
||||
// Social links
|
||||
.md-social {
|
||||
margin: 0 px2rem(8px);
|
||||
padding: px2rem(4px) 0 px2rem(12px);
|
||||
|
||||
|
39
src/partials/copyright.html
Normal file
39
src/partials/copyright.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!--
|
||||
Copyright (c) 2016-2021 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Copyright and theme information -->
|
||||
<div class="md-copyright">
|
||||
{% if config.copyright %}
|
||||
<div class="md-copyright__highlight">
|
||||
{{ config.copyright }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not config.extra.generator == false %}
|
||||
Made with
|
||||
<a
|
||||
href="https://squidfunk.github.io/mkdocs-material/"
|
||||
target="_blank" rel="noopener"
|
||||
>
|
||||
Material for MkDocs
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
@ -83,25 +83,7 @@
|
||||
<!-- Further information -->
|
||||
<div class="md-footer-meta md-typeset">
|
||||
<div class="md-footer-meta__inner md-grid">
|
||||
|
||||
<!-- Copyright and theme information -->
|
||||
<div class="md-footer-copyright">
|
||||
{% if config.copyright %}
|
||||
<div class="md-footer-copyright__highlight">
|
||||
{{ config.copyright }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not config.extra.generator == false %}
|
||||
Made with
|
||||
<a
|
||||
href="https://squidfunk.github.io/mkdocs-material/"
|
||||
target="_blank" rel="noopener"
|
||||
>
|
||||
Material for MkDocs
|
||||
</a>
|
||||
{% endif %}
|
||||
{{ extracopyright }}
|
||||
</div>
|
||||
{% include "partials/copyright.html" %}
|
||||
|
||||
<!-- Social links -->
|
||||
{% if config.extra.social %}
|
||||
|
@ -21,7 +21,7 @@
|
||||
-->
|
||||
|
||||
<!-- Social links in footer -->
|
||||
<div class="md-footer-social">
|
||||
<div class="md-social">
|
||||
{% for social in config.extra.social %}
|
||||
{% set title = social.name %}
|
||||
{% if not title and "//" in social.link %}
|
||||
@ -32,7 +32,7 @@
|
||||
href="{{ social.link }}"
|
||||
target="_blank" rel="noopener"
|
||||
title="{{ title | e }}"
|
||||
class="md-footer-social__link"
|
||||
class="md-social__link"
|
||||
>
|
||||
{% include ".icons/" ~ social.icon ~ ".svg" %}
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user