mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-29 17:22:37 -04:00
Added name attribute to social links and improved defaults
This commit is contained in:
@@ -24,12 +24,15 @@
|
||||
{% if config.extra.social %}
|
||||
<div class="md-footer-social">
|
||||
{% for social in config.extra.social %}
|
||||
{% set _,rest = social.link.split("//") %}
|
||||
{% set domain = rest.split("/")[0] %}
|
||||
{% 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="{{ domain }}"
|
||||
title="{{ title }}"
|
||||
class="md-footer-social__link"
|
||||
>
|
||||
{% include ".icons/" ~ social.icon ~ ".svg" %}
|
||||
|
||||
Reference in New Issue
Block a user