Better looking user list
This commit is contained in:
parent
83a966f1af
commit
27c780602c
2 changed files with 55 additions and 41 deletions
|
@ -1,27 +1,3 @@
|
|||
.user img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
float: left;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
.user h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.25em;
|
||||
}
|
||||
|
||||
.user {
|
||||
line-height: 1.5em;
|
||||
margin-bottom: 1em;
|
||||
margin-right: 1em;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.user .details {
|
||||
display: inline-block;
|
||||
max-width: 25em;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
nav.sort-styles ul {
|
||||
list-style-type: none;
|
||||
margin: 0 0 2.5em 0;
|
||||
|
@ -37,3 +13,39 @@ nav.sort-styles li {
|
|||
nav.sort-styles li.active {
|
||||
border-bottom: 3px solid firebrick;
|
||||
}
|
||||
|
||||
.users-wrapper {
|
||||
text-align: center;
|
||||
}
|
||||
.users {
|
||||
column-width: 20em;
|
||||
-moz-column-width: 20em;
|
||||
-webkit-column-width: 20em;
|
||||
}
|
||||
|
||||
.user {
|
||||
text-align: initial;
|
||||
line-height: 1.5em;
|
||||
margin-bottom: 1em;
|
||||
margin-right: 1em;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.user a.avatar {
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
.user img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin-right: 1em;
|
||||
}
|
||||
.user .details {
|
||||
display: inline-block;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.user h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.25em;
|
||||
}
|
||||
|
|
|
@ -36,25 +36,27 @@ if ($this->context->user->hasEnabledEndlessScrolling())
|
|||
<?php if (empty($this->context->transport->users)): ?>
|
||||
<p class="alert alert-warning">No users to show.</p>
|
||||
<?php else: ?>
|
||||
<div class="users paginator-content">
|
||||
<?php foreach ($this->context->transport->users as $user): ?>
|
||||
<div class="user">
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>">
|
||||
<img src="<?php echo htmlspecialchars($user->getAvatarUrl(100)) ?>" alt="<?php echo $user->name ?>"/>
|
||||
</a>
|
||||
<div class="details">
|
||||
<h1>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>">
|
||||
<?php echo $user->name ?>
|
||||
</a>
|
||||
</h1>
|
||||
<div class="users-wrapper">
|
||||
<div class="users paginator-content">
|
||||
<?php foreach ($this->context->transport->users as $user): ?>
|
||||
<div class="user">
|
||||
<a class="avatar" href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>">
|
||||
<img src="<?php echo htmlspecialchars($user->getAvatarUrl(100)) ?>" alt="<?php echo $user->name ?>"/>
|
||||
</a>
|
||||
<div class="details">
|
||||
<h1>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>">
|
||||
<?php echo $user->name ?>
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
<div class="date-registered">Date registered: <?php echo date('Y-m-d H:i', $user->joinDate) ?></div>
|
||||
<div class="fav-count">Favorite count: <?php echo $user->getFavoriteCount() ?></div>
|
||||
<div class="post-count">Post count: <?php echo $user->getPostCount() ?></div>
|
||||
<div class="date-registered">Registered: <?php echo date('Y-m-d H:i', $user->joinDate) ?></div>
|
||||
<div class="fav-count">Favorite count: <?php echo $user->getFavoriteCount() ?></div>
|
||||
<div class="post-count">Post count: <?php echo $user->getPostCount() ?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->renderFile('paginator') ?>
|
||||
|
|
Loading…
Reference in a new issue