mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-28 00:32:42 -04:00
Fixed #79: Modularized social links integration
This commit is contained in:
@@ -169,7 +169,7 @@
|
||||
|
||||
// Adjust line-height to match height for correct alignment
|
||||
&::before {
|
||||
line-height: 2;
|
||||
line-height: 1.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,9 +40,3 @@
|
||||
<!-- Material icons as a default iconset -->
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
||||
|
||||
<!-- Social icon webfont, if necessary -->
|
||||
{% if config.extra.social %}
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="https://file.myfontastic.com/n6vo44Re5QaWo8oCKShBs7/icons.css">
|
||||
{% endif %}
|
||||
|
||||
@@ -89,15 +89,10 @@
|
||||
Material for MkDocs</a>
|
||||
</div>
|
||||
|
||||
<!-- Link to social media accounts, if any -->
|
||||
{% if config.extra.social %}
|
||||
<div class="md-footer-social">
|
||||
{% for social in config.extra.social %}
|
||||
<a href="{{ social.link }}" class="md-footer-social__link
|
||||
socicon-{{ social.type }}"></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- Social links -->
|
||||
{% block social %}
|
||||
{% include "partials/social.html" %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
34
src/partials/social.html
Normal file
34
src/partials/social.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!--
|
||||
Copyright (c) 2016 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.
|
||||
-->
|
||||
|
||||
<!-- Social links in footer -->
|
||||
{% if config.extra.social %}
|
||||
<div class="md-footer-social">
|
||||
{% set path = "ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" %}
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="https://cdnjs.cloudflare.com/{{ path }}">
|
||||
{% for social in config.extra.social %}
|
||||
<a href="{{ social.link }}" class="md-footer-social__link
|
||||
fa fa-{{ social.type }}"></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user