Commit 201f39ae authored by MediaFormat's avatar MediaFormat
Browse files

Fix: mastodon display username if display name is not set

Fix: more consistent styling in mastodon
parent 2a15545b
...@@ -95,10 +95,11 @@ ...@@ -95,10 +95,11 @@
.account__header__tabs__name { .account__header__tabs__name {
padding: 5px; padding: 5px;
} }
.account__header__tabs__name h1 { .account__header__bar .account__header__tabs__name h1 {
font-size: 16px; font-size: 16px;
line-height: 24px; line-height: 24px;
color: #000; color: #000;
font-family: inherit;
font-weight: 500; font-weight: 500;
margin: 0; margin: 0;
overflow: hidden; overflow: hidden;
...@@ -124,6 +125,9 @@ ...@@ -124,6 +125,9 @@
padding: 20px 15px 5px; padding: 20px 15px 5px;
color: #000; color: #000;
} }
.account__header__bio .account__header__content p {
font-family: inherit;
}
.account__header__content { .account__header__content {
color: #282c37; color: #282c37;
font-size: 14px; font-size: 14px;
......
...@@ -174,7 +174,7 @@ class FediConfig ...@@ -174,7 +174,7 @@ class FediConfig
//getStatus from remote instance //getStatus from remote instance
$status = $client->getStatus($atts['only_media'], $atts['pinned'], $atts['exclude_replies'], null, null, null, $atts['limit'], $atts['exclude_reblogs']); $status = $client->getStatus($atts['only_media'], $atts['pinned'], $atts['exclude_replies'], null, null, null, $atts['limit'], $atts['exclude_reblogs']);
//if(WP_DEBUG_DISPLAY === true): echo '<details><summary>Mastodon</summary><pre>'; var_dump($client->getStatus($atts)); echo '</pre></details>'; endif; //if(WP_DEBUG_DISPLAY === true): echo '<details><summary>Mastodon</summary><pre>'; var_dump($client->getStatus($atts['only_media'], $atts['pinned'], $atts['exclude_replies'], null, null, null, $atts['limit'], $atts['exclude_reblogs'])); echo '</pre></details>'; endif;
$show_header = $atts['show_header']; $show_header = $atts['show_header'];
$account = $status[0]->account; $account = $status[0]->account;
include(plugin_dir_path(__FILE__) . 'templates/mastodon.tpl.php' ); include(plugin_dir_path(__FILE__) . 'templates/mastodon.tpl.php' );
......
...@@ -62,7 +62,16 @@ ...@@ -62,7 +62,16 @@
<div class="status__avatar"> <div class="status__avatar">
<div class="account__avatar" style="background-image: url(<?php if(is_null($statut->reblog)): echo $statut->account->avatar; else: echo $statut->reblog->account->avatar; endif; ?>); background-size: 40px; width: 40px; height: 40px;"></div> <div class="account__avatar" style="background-image: url(<?php if(is_null($statut->reblog)): echo $statut->account->avatar; else: echo $statut->reblog->account->avatar; endif; ?>); background-size: 40px; width: 40px; height: 40px;"></div>
</div> </div>
<span class="display-name"><?php if(is_null($statut->reblog)): echo apply_filters('fedi_emoji', $statut->account->display_name, $statut->account->emojis); else: echo apply_filters('fedi_emoji', $statut->reblog->account->display_name, $statut->reblog->account->emojis); endif; ?></span> <span class="display-name"><?php
if(is_null($statut->reblog)):
echo apply_filters('fedi_emoji', $statut->account->display_name, $statut->account->emojis);
else:
if(empty($statut->reblog->account->display_name)):
echo $statut->reblog->account->username;
else:
echo apply_filters('fedi_emoji', $statut->reblog->account->display_name, $statut->reblog->account->emojis);
endif;
endif; ?></span>
</a> </a>
</div> </div>
<div class="status__content"><?php <div class="status__content"><?php
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment