Add HTML link to profile to account name

- Normalize white space in HTML
This commit is contained in:
Hypolite Petovan 2022-04-25 21:39:38 -04:00
parent 2e84f5aa7b
commit 2aba91d42c
1 changed files with 21 additions and 14 deletions

View File

@ -26,12 +26,19 @@ if (!empty($profile['country'])) {
</a>
<div class="media-body">
<h5 class="name">
<?php if ($profile['dfrn_request']): ?>
<?php if ($profile['dfrn_request']): ?>
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['dfrn_request'])); ?>" class="card-link btn btn-primary float-right">
<i class="fa fa-external-link-alt"></i> <?php echo $this->p__('verb', 'Follow')?>
</a>
<?php endif; ?>
<?php echo $this->escapeHtml($profile['name']) ?>
<?php endif; ?>
<?php if ($profile['follow']): ?>
<a href="<?php echo $this->escapeHtmlAttr($profile['follow']); ?>" class="card-link btn btn-primary float-right" target="_blank" rel="noopener noreferrer">
<i class="fa fa-external-link-alt"></i> <?php echo $this->p__('verb', 'Follow')?>
</a>
<?php endif; ?>
<a href="<?php echo $this->escapeHtmlAttr($profile['profile_url']) ?>">
<?php echo $this->escapeHtml($profile['name']) ?>
</a>
</h5>
<p class="url">
<a href="<?php echo $this->escapeHtmlAttr($this->u($profile['profile_url'])) ?>">
@ -42,7 +49,7 @@ if (!empty($profile['country'])) {
</div>
</div>
<p class="description d-md-none"><?php echo $this->escapeHtml($profile['pdesc']) ?></p>
<?php if ($profile['language']):?>
<?php if ($profile['language']):?>
<div class="language">
<i class="fa fa-language" alt="<?php echo $this->__('Language')?>" title="<?php echo $this->__('Language')?>"></i>
<?php echo $this->e(Friendica\Directory\Utils\L10n::localeToLanguageString($profile['language'])) ?>
@ -50,26 +57,26 @@ if (!empty($profile['country'])) {
<i class="fa fa-filter" title="<?php echo $this->__('Filter by language')?>"></i>
</a>
</div>
<?php endif;?>
<?php endif;?>
<div class="location">
<?php if (count($parts)): ?>
<?php if (count($parts)): ?>
<i class="fa fa-globe" alt="<?php echo $this->__('Location')?>" title="<?php echo $this->__('Location')?>"></i>
<?php echo implode(', ', $parts); ?>
<?php endif ?>
<?php echo implode(', ', $parts); ?>
<?php endif ?>
</div>
<?php if ($profile['tags']): ?>
<?php if ($profile['tags']): ?>
<div class="tags">
<?php
$tags = array_map('trim', explode(' ', $profile['tags']));
foreach ($tags as $tag):?>
<?php
$tags = array_map('trim', explode(' ', $profile['tags']));
foreach ($tags as $tag):?>
<span class="badge">
<?php echo $this->escapeHtml($tag) ?>
<a href="<?php echo $this->escapeHtmlAttr($this->r('search', [], ['q' => $tag])) ?>">
<i class="fa fa-tag" title="<?php echo $this->__('Search Tag')?>"></i>
</a>
</span>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php endif; ?>
</figure>