Skip to content

Commit 06b03c1

Browse files
committed
Update sidebar.php
1 parent 323ebd8 commit 06b03c1

File tree

1 file changed

+20
-12
lines changed
  • resources/views/default/content/user/profile

1 file changed

+20
-12
lines changed

resources/views/default/content/user/profile/sidebar.php

+20-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
<?php $profile = $data['profile']; ?>
1+
<?php
2+
$profile = $data['profile'];
3+
$counts = $data['counts']['count_posts'] + $data['counts']['count_comments'];
4+
?>
25

36
<div class="mb-none">
4-
<div class="blockquote-profile">
5-
<?php if ($profile['about'] == 'Riddle...') : ?>
6-
<?= __('app.riddle'); ?>...
7-
<?php else : ?>
8-
<?= markdown($profile['about'] ?? __('app.riddle')); ?>
9-
<?php endif; ?>
10-
</div>
7+
<?php if ($counts > 3) : ?>
8+
<div class="blockquote-profile">
9+
<?php if ($profile['about'] == 'Riddle...') : ?>
10+
<?= __('app.riddle'); ?>...
11+
<?php else : ?>
12+
<?= markdown($profile['about'] ?? __('app.riddle')); ?>
13+
<?php endif; ?>
14+
</div>
15+
<?php endif; ?>
1116

1217
<div class="mb20">
1318
<div class="gray-600 mt5">
@@ -22,12 +27,15 @@
2227
<?php foreach (config('profile', 'sidebar') as $block) : ?>
2328
<?php if ($profile[$block['title']]) : ?>
2429
<div class="mt5">
25-
<span class="gray-600"><?= __($block['lang']); ?>:</span>
2630
<?php if ($block['url']) : ?>
27-
<a href="<?php if ($block['addition']) : ?><?= $block['addition']; ?><?php endif; ?><?= $profile[$block['url']]; ?>" rel="noopener nofollow ugc">
28-
<span class="mr5 ml5"><?= $profile[$block['title']]; ?></span>
29-
</a>
31+
<?php if ($counts > 3) : ?>
32+
<span class="gray-600"><?= __($block['lang']); ?>:</span>
33+
<a href="<?php if ($block['addition']) : ?><?= $block['addition']; ?><?php endif; ?><?= $profile[$block['url']]; ?>" rel="noopener nofollow ugc">
34+
<span class="mr5 ml5"><?= $profile[$block['title']]; ?></span>
35+
</a>
36+
<?php endif; ?>
3037
<?php else : ?>
38+
<span class="gray-600"><?= __($block['lang']); ?>:</span>
3139
<span class="mr5 ml5"><?= $profile[$block['title']]; ?></span>
3240
<?php endif; ?>
3341
</div>

0 commit comments

Comments
 (0)