SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/401427 )

Change subject: Move styles to BlogPage for custom UserProfile module
......................................................................

Move styles to BlogPage for custom UserProfile module

Originally, these were located in SocialProfile. They have been
moved here to keep code more contained. (The code for this extension
registering it's own UserProfile module is located here, so it makes
the most sense to have the styles in the same place too).

Change-Id: If6297f4ae57d2372b7b063e49be4a8930e07c1ae
---
M extension.json
M includes/BlogPage.hooks.php
A resources/css/ext.blogpage.userprofile.module.css
3 files changed, 50 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlogPage 
refs/changes/27/401427/1

diff --git a/extension.json b/extension.json
index 75e33b8..6226c9f 100644
--- a/extension.json
+++ b/extension.json
@@ -105,6 +105,10 @@
                        "styles": 
"resources/css/ext.blogpage.createblogpost.css",
                        "position": "top"
                },
+               "ext.blogPage.userprofile.module.css": {
+                       "styles": 
"resources/css/ext.blogpage.userprofile.module.css",
+                       "position": "top"
+               },
                "ext.blogPage.create.js": {
                        "scripts": 
"resources/js/ext.blogpage.createblogpost.js",
                        "messages": [
diff --git a/includes/BlogPage.hooks.php b/includes/BlogPage.hooks.php
index da61042..e86e40d 100644
--- a/includes/BlogPage.hooks.php
+++ b/includes/BlogPage.hooks.php
@@ -189,6 +189,8 @@
                $user_name = $userProfile->user_name;
                $output = '';
 
+               $wgOut->addModuleStyles( 'ext.blogPage.userprofile.module.css' 
);
+
                // Try cache first
                $key = wfMemcKey( 'user', 'profile', 'articles', 
$userProfile->user_id );
                $data = $wgMemc->get( $key );
diff --git a/resources/css/ext.blogpage.userprofile.module.css 
b/resources/css/ext.blogpage.userprofile.module.css
new file mode 100644
index 0000000..f3a0d53
--- /dev/null
+++ b/resources/css/ext.blogpage.userprofile.module.css
@@ -0,0 +1,44 @@
+.user-articles-container {
+       padding: 0 0 23px 0;
+}
+
+.article-item {
+       margin: 0;
+       padding: 7px 0 2px 0;
+       border-top: 1px solid #dcdcdc;
+}
+
+.user-articles-container a {
+       text-decoration: none;
+       font-weight: 700;
+}
+
+.article-item-top {
+       margin: 0;
+       padding: 7px 0 2px 0;
+       border: none;
+}
+
+.number-of-votes {
+       margin: 0 10px 3px 0;
+       text-align: center;
+       float: left;
+       width: 25px;
+}
+
+.vote-number {
+       background-color: #89c46f;
+       color: #fff;
+       font-size: 12px !important;
+       margin: 0 0 2px 0;
+       font-weight: 700;
+       height: 25px;
+       line-height: 25px;
+}
+
+.vote-text {
+       color: #777;
+       font-size: 9px;
+       line-height: 9px;
+       margin: -1px 0 0 0;
+}
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/401427
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6297f4ae57d2372b7b063e49be4a8930e07c1ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlogPage
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen <samanthanguyen1...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to