Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/86757
Change subject: Stylistic changes to profile page
......................................................................
Stylistic changes to profile page
* Separate into 3 sections, use icons rather than headings to identify
them
* fix wording of photo upload caption
* clean up dead css
Change-Id: I2fdc4a9013c847e4a843fc583d8d80699aa804c3
---
M MobileFrontend.i18n.php
M includes/specials/SpecialUserProfile.php
M less/specials/userprofile.less
A stylesheets/specials/images/profile/activity.png
A stylesheets/specials/images/profile/registration.png
A stylesheets/specials/images/profile/user.png
M stylesheets/specials/userprofile.css
7 files changed, 69 insertions(+), 37 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/57/86757/1
diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 3ba67b1..863f651 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -309,7 +309,7 @@
'mobile-frontend-profile-uploads' => '{{PLURAL:$1|1 upload|$1
uploads|0=No uploads}} in last month',
'mobile-frontend-profile-edits-limit' => 'Over {{PLURAL:$1|$1 edit|$1
edits}} in last month',
'mobile-frontend-profile-uploads-limit' => 'Over {{PLURAL:$1|$1
upload|$1 uploads}} in last month',
- 'mobile-frontend-profile-upload-caption' => '$1 was the last upload by
{{GENDER:$2|$2}} and was uploaded {{PLURAL:$3|$3 day ago|$3 days ago}}.',
+ 'mobile-frontend-profile-last-upload-caption' => 'Last uploaded by
{{GENDER:$1|$1}}, {{PLURAL:$2|yesterday|$2 days ago|0=today}}.',
'mobile-frontend-profile-heading-recent' => 'Recent',
'mobile-frontend-profile-registered' => 'Member for {{PLURAL:$1|$1
day|$1 days}} with {{PLURAL:$2|$2 edit|$2 edits}}.',
'mobile-frontend-profile-usertalk' => 'View talk page.',
@@ -792,7 +792,7 @@
See also:
* {{msg-mw|Mobile-frontend-profile-edits}}',
'mobile-frontend-profile-uploads-limit' => 'Upload count when expressed
to be over a certain number.',
- 'mobile-frontend-profile-upload-caption' => '$1 is the filename, $2 is
the username and $3 is the amount of days ago the image was uploaded.',
+ 'mobile-frontend-profile-last-upload-caption' => '$1 is the username
and $2 is the amount of days ago the image was uploaded.',
'mobile-frontend-profile-heading-recent' => 'Heading for recent section
profile.
{{Identical|Recent}}',
'mobile-frontend-profile-registered' => 'Summary saying how many days
the user has been a member ($1) and how many total edits they have made ($2).',
diff --git a/includes/specials/SpecialUserProfile.php
b/includes/specials/SpecialUserProfile.php
index c461745..af5bb48 100644
--- a/includes/specials/SpecialUserProfile.php
+++ b/includes/specials/SpecialUserProfile.php
@@ -106,11 +106,11 @@
$ts = new MWTimestamp( wfTimestamp( TS_UNIX,
$row->img_timestamp ) );
$daysAgo = $this->getDaysAgo( $ts );
- $img = Html::openElement( 'div', array( 'class' =>
'thumb' ) ) .
+ $img = Html::openElement( 'div', array( 'class' =>
'last-upload end-of-grouping' ) ) .
Html::openElement( 'a', array( 'href' =>
$title->getLocalUrl() ) ) .
$file->transform( array( 'width' => 320,
'height' => 320 ) )->toHtml() .
- Html::openElement( 'div', array( 'class' =>
'thumbcaption' ) ) .
- $this->msg(
'mobile-frontend-profile-upload-caption', $title->getText(), $user, $daysAgo
)->parse() .
+ Html::openElement( 'div', array( 'class' =>
'thumbcaption secondary-statement' ) ) .
+ $this->msg(
'mobile-frontend-profile-last-upload-caption', $user, $daysAgo )->parse() .
Html::closeElement( 'div' ) .
Html::closeElement( 'a' ) .
Html::closeElement( 'div' );
@@ -133,9 +133,11 @@
$role = $this->msg(
'mobile-frontend-profile-user-desc-3', $user );
}
- return Html::element( 'p', array( 'class' => 'statement' ),
+ return Html::openElement( 'div', array( 'class' => 'section
section-registered' ) ) .
+ Html::element( 'p', array( 'class' => 'statement' ),
$this->msg( 'mobile-frontend-profile-registered',
$daysAgo, $editCount )->parse() ) .
- Html::element( 'p', array( 'class' =>
'secondary-statement' ), $role );
+ Html::element( 'p', array( 'class' =>
'secondary-statement end-of-grouping' ), $role ) .
+ Html::closeElement( 'div' );
}
protected function getRecentActivityHtml( User $user ) {
@@ -151,16 +153,19 @@
$msgEdits = $count > self::LIMIT ? $this->msg(
'mobile-frontend-profile-edits-limit', self::LIMIT ) :
$this->msg( 'mobile-frontend-profile-edits',
$count );
$statsRecent = array(
- Html::element( 'a', array( 'href' => $urlContributions
), $msgEdits ),
- Html::element( 'a', array( 'href' => $urlUploads ),
$msgUploads ),
+ Html::element( 'a',
+ array( 'href' => $urlContributions, 'class' =>
'statement' ),
+ $msgEdits ),
+ Html::element( 'a',
+ array( 'href' => $urlUploads, 'class' =>
'statement' ),
+ $msgUploads ),
);
$lastUploadHtml = $this->getLastUpload( $user );
if ( $lastUploadHtml ) {
$statsRecent[] = $lastUploadHtml;
}
- $html = Html::element( 'h2', array(), $this->msg(
'mobile-frontend-profile-heading-recent' ) ) .
- $this->getListHtml( 'ul', array( 'class' =>
'statements' ), $statsRecent );
+ $html = $this->getListHtml( 'ul', array( 'class' => 'section
section-activity' ), $statsRecent );
return $html;
}
@@ -215,6 +220,7 @@
$this->setUserProfileUIElements( $user );
$html = Html::openElement( 'div', array(
'class' => 'profile' ) ) .
$this->getUserSummary( $user ) .
$this->getRecentActivityHtml( $user ) . '</div>';
+ $html .= Html::element( 'a', array( 'class' =>
'user-page', 'href' => '' ), 'Visit user page' );
} else {
$html = $this->getHtmlNoArg();
}
diff --git a/less/specials/userprofile.less b/less/specials/userprofile.less
index c509b66..1a909de 100644
--- a/less/specials/userprofile.less
+++ b/less/specials/userprofile.less
@@ -1,25 +1,40 @@
.profile {
- .statements li,
+ .last-upload {
+ margin-top: 0.6em;
+ }
+
.statement {
- font-family: Georgia;
- font-size: 1.95em;
+ font-size: 1.65em;
+ line-height: 1.25;
margin-bottom: 0;
}
+
.secondary-statement {
- font-family: Arial;
- font-style: italic;
- font-size: 21px;
+ font-size: 1.2em;
color: #919191;
+ }
+ .end-of-grouping {
+ margin-bottom: 26pt;
}
}
-.content h2 {
- font-family: Arial;
- font-size: 1.47em;
- text-transform: uppercase;
- color: rgb(145, 145, 145);
+.section,
+.user-page {
+ background-repeat: no-repeat;
+ background-size: 24px 24px;
+ line-height: 24px;
+ padding-left: 32px;
}
-ul {
- list-style: none;
+.section-registered {
+ background-image: url(images/registration.png);
+}
+
+.section-activity {
+ background-image: url(images/activity.png);
+}
+
+.user-page {
+ display: inline-block;
+ background-image: url(images/user.png);
}
diff --git a/stylesheets/specials/images/profile/activity.png
b/stylesheets/specials/images/profile/activity.png
new file mode 100644
index 0000000..6c057e8
--- /dev/null
+++ b/stylesheets/specials/images/profile/activity.png
Binary files differ
diff --git a/stylesheets/specials/images/profile/registration.png
b/stylesheets/specials/images/profile/registration.png
new file mode 100644
index 0000000..ca4548b
--- /dev/null
+++ b/stylesheets/specials/images/profile/registration.png
Binary files differ
diff --git a/stylesheets/specials/images/profile/user.png
b/stylesheets/specials/images/profile/user.png
new file mode 100644
index 0000000..781e24f
--- /dev/null
+++ b/stylesheets/specials/images/profile/user.png
Binary files differ
diff --git a/stylesheets/specials/userprofile.css
b/stylesheets/specials/userprofile.css
index 7dbbae9..283b240 100644
--- a/stylesheets/specials/userprofile.css
+++ b/stylesheets/specials/userprofile.css
@@ -1,21 +1,32 @@
-.profile .statements li,
+.profile .last-upload {
+ margin-top: 0.6em;
+}
.profile .statement {
- font-family: Georgia;
- font-size: 1.95em;
+ font-size: 1.65em;
+ line-height: 1.25;
margin-bottom: 0;
}
.profile .secondary-statement {
- font-family: Arial;
- font-style: italic;
- font-size: 21px;
+ font-size: 1.2em;
color: #919191;
}
-.content h2 {
- font-family: Arial;
- font-size: 1.47em;
- text-transform: uppercase;
- color: #919191;
+.profile .end-of-grouping {
+ margin-bottom: 26pt;
}
-ul {
- list-style: none;
+.section,
+.user-page {
+ background-repeat: no-repeat;
+ background-size: 24px 24px;
+ line-height: 24px;
+ padding-left: 32px;
+}
+.section-registered {
+ background-image: url(images/registration.png);
+}
+.section-activity {
+ background-image: url(images/activity.png);
+}
+.user-page {
+ display: inline-block;
+ background-image: url(images/user.png);
}
--
To view, visit https://gerrit.wikimedia.org/r/86757
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2fdc4a9013c847e4a843fc583d8d80699aa804c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits