Skip to content

Commit

Permalink
#1334 Update avatars
Browse files Browse the repository at this point in the history
This commit gives me the feeling that we should unify the styling for
avatars one day...
  • Loading branch information
Yannick committed Sep 7, 2015
1 parent 225d98f commit bd108c3
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 69 deletions.
9 changes: 9 additions & 0 deletions inbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@
// Start building page
$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Private Messages', 'luna'), __('Inbox', 'luna'));

$result = $db->query('SELECT username, title FROM '.$db->prefix.'users WHERE id='.$id) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
if (!$db->num_rows($result))
message(__('Bad request. The link you followed is incorrect, outdated or you are simply not allowed to hang around here.', 'luna'), false, '404 Not Found');

$user = $db->fetch_assoc($result);

$user_username = luna_htmlspecialchars($user['username']);
$user_usertitle = get_title($user);

define('FORUM_ACTIVE_PAGE', 'pm');
require load_page('header.php');

Expand Down
2 changes: 1 addition & 1 deletion include/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class Version {
// See http://getluna.org/docs/version.php for more info
const FORUM_VERSION = '1.2-alpha';
const FORUM_CORE_VERSION = '1.2.4859';
const FORUM_CORE_VERSION = '1.2.4867';
const LUNA_CORE_REVISION = 104;

// The Luna Core code name
Expand Down
1 change: 1 addition & 0 deletions notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
$user = $db->fetch_assoc($result);

$user_username = luna_htmlspecialchars($user['username']);
$user_usertitle = get_title($user);
$avatar_field = generate_avatar_markup($id);
$avatar_user_card = draw_user_avatar($id);

Expand Down
3 changes: 3 additions & 0 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,9 @@
$signature_preview = $parsed_signature;
else
$signature_preview = __('No signature currently stored in profile.', 'luna');

$user_username = luna_htmlspecialchars($user['username']);
$user_usertitle = get_title($user);

$page_title = array(luna_htmlspecialchars($luna_config['o_board_title']), __('Profile', 'luna'), __('Settings', 'luna'));
define('FORUM_ACTIVE_PAGE', 'me');
Expand Down
2 changes: 1 addition & 1 deletion themes/Sixteen/inbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="col-sm-3 profile-nav">
<div class="profile-card">
<div class="profile-card-head">
<div class="user-avatar thumbnail">
<div class="user-avatar">
<?php echo $avatar_user_card; ?>
</div>
<h2><?php echo $user_username; ?></h2>
Expand Down
4 changes: 3 additions & 1 deletion themes/Sixteen/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
<div class="row first-run-content">
<div class="col-md-4 col-sm-6 col-xs-5 first-run-profile">
<h3 class="first-run-title"><span class="hidden-xs"><?php echo sprintf(__('Hi there, %s', 'luna'), luna_htmlspecialchars($luna_user['username'])) ?></span><span class="visible-xs-block"><?php echo luna_htmlspecialchars($luna_user['username']) ?></span></h3>
<span class="first-run-avatar thumbnail">
<span class="first-run-avatar">
<div class="user-avatar">
<?php echo $user_avatar ?>
</div>
</span>
</div>
<?php if (!$luna_user['is_guest']) { ?>
Expand Down
2 changes: 1 addition & 1 deletion themes/Sixteen/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="col-sm-3 profile-nav">
<div class="profile-card">
<div class="profile-card-head">
<div class="user-avatar thumbnail">
<div class="user-avatar">
<?php echo $avatar_user_card; ?>
</div>
<h2><?php echo $user_username; ?></h2>
Expand Down
2 changes: 1 addition & 1 deletion themes/Sixteen/objects/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="col-md-3">
<div class="profile-card">
<div class="profile-card-head">
<div class="user-avatar thumbnail <?php echo $is_online; ?>">
<div class="user-avatar <?php echo $is_online; ?>">
<?php echo $user_avatar ?>
</div>
<h2><?php echo $username ?></h2>
Expand Down
2 changes: 1 addition & 1 deletion themes/Sixteen/objects/user.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="row user-row">
<div class="col-sm-8 col-xs-9">
<span class="user-avatar thumbnail">
<span class="user-avatar">
<?php echo $user_avatar; ?>
</span>
<span class="userlist-name"><?php echo '<a href="profile.php?id='.$user_data['id'].'">'.luna_htmlspecialchars($user_data['username']).'</a>' ?> <small><?php echo $user_title_field ?></small></span>
Expand Down
2 changes: 1 addition & 1 deletion themes/Sixteen/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="col-sm-3 profile-nav">
<div class="profile-card">
<div class="profile-card-head">
<div class="user-avatar thumbnail">
<div class="user-avatar">
<?php echo $avatar_user_card; ?>
</div>
<h2><?php echo $user_username; ?></h2>
Expand Down
4 changes: 2 additions & 2 deletions themes/Sixteen/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<div class="col-sm-3 profile-nav">
<div class="profile-card">
<div class="profile-card-head">
<div class="user-avatar thumbnail">
<?php echo $avatar_user_card; ?>
<div class="user-avatar">
<?php echo $user_avatar ?>
</div>
<h2><?php echo $user_username; ?></h2>
<h3><?php echo $user_usertitle; ?></h3>
Expand Down
113 changes: 53 additions & 60 deletions themes/Sixteen/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,22 @@ hr {
.first-run-avatar {
background: none;
border: none;
margin-bottom: 0;
margin-top: 12px;
}

.first-run-avatar .user-avatar {
height: 120px;
}

.first-run-avatar img {
border-radius: 3px;
border-radius: 999px;
box-shadow: 0px 0px 13px rgba(0, 0, 0, .2);
max-height: 120px;
max-width: 120px;
margin: 0 auto;
margin-top: 18px;
vertical-align: bottom;
}

.first-run-list {
Expand Down Expand Up @@ -427,6 +438,10 @@ hr {
margin-bottom: 16px;
}

.tab-pane .img-responsive {
border-radius: 999px;
}

/* Post messages */
.bblinks {
padding-top: 5px;
Expand Down Expand Up @@ -532,10 +547,6 @@ hr {
margin-bottom: -10px;
border-radius: 0 !important;
}

.user-avatar {
border-radius: 0 !important;
}
}

#quickpostform > .panel {
Expand Down Expand Up @@ -841,12 +852,12 @@ textarea {
padding: 0 15px;
}

.user-row .user-avatar {
.user-row .user-avatar .img-responsive {
max-width: 50px;
margin-top: 0;
margin-left: -6px;
position: absolute;
border-radius: 0;
border-radius: 999px;
height: 50px;
min-height: 50px;
min-width: 50px;
Expand All @@ -864,10 +875,6 @@ textarea {
color: #999;
}

.user-row .thumbnail {
padding: 2px;
}

.user-row {
color: #232323;
background-color: #fff;
Expand Down Expand Up @@ -923,30 +930,19 @@ textarea {
}

.topic .profile-card-head .user-avatar {
max-width: 54px;
max-width: 50px;
height: 50px;
margin-top: 4px;
margin-left: 4px;
margin-bottom: 4px;
position: absolute;
border-radius: 0;
border-top-left-radius: 3px;
}

.topic .profile-card-quickpost .user-avatar {
border-bottom-left-radius: 3px;
}

.topic .profile-card-head .user-avatar img {
height: 48px;
width: 100%;
}

.topic .profile-card-head .is-online {
border-left: 4px #93dd00 solid;
}

.topic .profile-card-head .is-offline {
border-left: 4px #eee solid;
height: auto;
}

.profile-card-head h2 {
Expand All @@ -965,6 +961,9 @@ textarea {
.topic .profile-card-head h3 {
padding-left: 64px;
padding-bottom: 7px;
margin-top: -10px;
font-size: 100%;
margin-bottom: 0;
}

.topic hr {
Expand All @@ -986,44 +985,47 @@ textarea {
height: 59px;
background-color: #057ed4;
color: #fff;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}

.profile-card-quickpost {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}

.profile-card-head .thumbnail {
.profile-card-head img {
max-width: 100px;
max-height: 100px;
width: 100px;
height: 100px;
margin-top: -50px;
margin-left: 9px;
position: absolute;
border-radius: 0;
border-radius: 999px;
}

.thumbnail > .user-avatar {
width: 100%;
height: 100%;
.profile-nav .profile-card .profile-card-head {
height: auto;
text-align: center;
}

.profile-card-head h2 {
padding-left: 120px;
padding-top: 3px;
margin-top: 0;
margin-bottom: 0;
.profile-nav .profile-card .profile-card-head img {
max-width: 128px;
max-height: 128px;
margin: 0 auto;
}

.profile-card-head h3 {
padding-left: 120px;
padding-bottom: 7px;
.profile-nav .profile-card .profile-card-head {
padding-top: 12px;
}

.profile-nav h2 {
padding-top: 10px;
margin-bottom: 5px;
}

.profile-nav h3 {
margin-top: 0;
font-size: 100%;
margin-bottom: 0;
padding-bottom: 12px;
font-size: 111%;
}

.postview .user-avatar img {
border: 2px solid #ddd;
}

.postview .user-avatar.is-online img {
border: 2px solid #64b450;
}

.profile-card-body {
Expand Down Expand Up @@ -1064,11 +1066,6 @@ textarea {
margin-top: 5px;
}

.topic .thumbnail {
padding: 0;
border: 1px solid #fff;
}

@media(max-width:991px) {
.topic .panel {
margin-top: 0;
Expand Down Expand Up @@ -1257,10 +1254,6 @@ blockquote footer {
margin-bottom: 10px;
}

.profile-card-head h2 {
margin-left: 0;
}

.topic .profile-card {
margin-top: 0;
}
Expand Down

0 comments on commit bd108c3

Please sign in to comment.