Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Social media icons are overweight and open in a new window Editorial

theme

Started by Stanislav 2 years ago · 6 replies · 63 views
2 years ago

The social network icons located in the header are not hidden and convey weight.
In addition, clicking on them you go to the same browser window.
I tried to change this: /user/themes/editorial/templates/partials/social.html.twig

TWIG
<ul class="icons">
    {% for item in theme_config.social %}
    {% if item.icon != "mastodon" %}
        <li><a href="{{ item.url }}" class="icon brands fa-{{ item.icon }}" title="{{ item.name }}" rel="nofollow" target="_blank"><span class="label">{{ item.name }}</span></a></li>
    {% else %}
        <li><a href="{{ item.url }}" rel="me" class="icon brands fa-{{ item.icon }}" title="{{ item.name }}"><span class="label">{{ item.name }}</span></a></li>
    {% endif %}
    {% endfor %}
</ul>

I may not have done it very gracefully or beautifully, but it works.

2 years ago

@RobotWerter:
The social network icons located in the header are not hidden and convey weight.

I don't quite understand what you mean by this.

@RobotWerter:
In addition, clicking on them you go to the same browser window.

In the next version of the Editorial theme, I will implement this option, to be able to open the links in the same window or in a blank window.

👍 1
2 years ago

@RobotWerter. You can try the GitHub version of the Editorial theme (upcoming version 2.2.3). I have included the target option in the social icon links.

👍 1
2 years ago

@pmoreno:
Я не совсем понимаю, что вы имеете в виду.

Sorry for my bad English.
I just added this:
rel="nofollow"

last edited 08/13/24 by Stanislav
2 years ago

@RobotWerter, the new version is ready to use and includes the target tag to social media icons
and rel=nofollow attribute to improve SEO in some templates, but not on the header social media icons.

👍 1
2 years ago

👍 greatly news. I plan to update the topic tomorrow. In the meantime, I continue to study it. I am really looking forward to the implementation of the company description according to the requirements of schema dot org)

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 76 8 hours ago
General · by pamtbaau, 13 hours ago
1 47 12 hours ago
General · by Andy Miller, 1 day ago
0 44 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago