Skip to content

Commit 9759a25

Browse files
committed
Widgets: add missing styles to Goodreads widget
Add CSS and RTL CSS files Queue CSS file to be concatenated
1 parent 5ba465a commit 9759a25

File tree

5 files changed

+105
-1
lines changed

5 files changed

+105
-1
lines changed

Gruntfile.js

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ var frontendcss = [
6767
'modules/tiled-gallery/tiled-gallery/tiled-gallery.css',
6868
'modules/widgets/wordpress-post-widget/style.css',
6969
'modules/widgets/gravatar-profile.css',
70+
'modules/widgets/goodreads/css/goodreads.css',
7071
'modules/widgets/top-posts/style.css',
7172
'modules/widgets/widgets.css' // TODO Moved to image-widget/style.css
7273
];

class.jetpack.php

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class Jetpack {
4848
'gravatar-profile-widget',
4949
'widget-grid-and-list',
5050
'jetpack-widgets',
51+
'goodreads-widget',
5152
);
5253

5354
var $plugins_to_deactivate = array(

modules/widgets/goodreads.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ function __construct() {
4040
}
4141

4242
function enqueue_style() {
43-
wp_enqueue_style( 'widget-goodreads', plugins_url( 'css/goodreads.css', __FILE__ ) );
43+
if ( is_rtl() ) {
44+
wp_enqueue_style( 'goodreads-widget', plugins_url( 'goodreads/css/rtl/goodreads-rtl.css', __FILE__ ) );
45+
} else {
46+
wp_enqueue_style( 'goodreads-widget', plugins_url( 'goodreads/css/goodreads.css', __FILE__ ) );
47+
}
4448
}
4549

4650
function widget( $args, $instance ) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
div[class^="gr_custom_container"] {
2+
/* customize your Goodreads widget container here*/
3+
border: 1px solid gray;
4+
border-radius:10px;
5+
padding: 10px 5px 10px 5px;
6+
background-color: #FFF;
7+
color: #000;
8+
}
9+
10+
div[class^="gr_custom_container"] a {
11+
color: #000;
12+
}
13+
14+
h2[class^="gr_custom_header"] {
15+
/* customize your Goodreads header here*/
16+
display: none;
17+
}
18+
div[class^="gr_custom_each_container"] {
19+
/* customize each individual book container here */
20+
width: 100%;
21+
clear: both;
22+
margin-bottom: 10px;
23+
overflow: auto;
24+
padding-bottom: 4px;
25+
border-bottom: 1px solid #aaa;
26+
}
27+
div[class^="gr_custom_book_container"] {
28+
/* customize your book covers here */
29+
float: right;
30+
overflow: hidden;
31+
height: 60px;
32+
margin-left: 4px;
33+
width: 39px;
34+
}
35+
div[class^="gr_custom_author"] {
36+
/* customize your author names here */
37+
font-size: 10px;
38+
}
39+
div[class^="gr_custom_tags"] {
40+
/* customize your tags here */
41+
font-size: 10px;
42+
color: gray;
43+
}
44+
div[class^="gr_custom_review"] {
45+
}
46+
div[class^="gr_custom_rating"] {
47+
display: none;
48+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/* This file was automatically generated on Nov 19 2013 15:54:57 */
2+
3+
div[class^="gr_custom_container"] {
4+
/* customize your Goodreads widget container here*/
5+
border: 1px solid gray;
6+
border-radius:10px;
7+
padding: 10px 5px 10px 5px;
8+
background-color: #FFF;
9+
color: #000;
10+
}
11+
12+
div[class^="gr_custom_container"] a {
13+
color: #000;
14+
}
15+
16+
h2[class^="gr_custom_header"] {
17+
/* customize your Goodreads header here*/
18+
display: none;
19+
}
20+
div[class^="gr_custom_each_container"] {
21+
/* customize each individual book container here */
22+
width: 100%;
23+
clear: both;
24+
margin-bottom: 10px;
25+
overflow: auto;
26+
padding-bottom: 4px;
27+
border-bottom: 1px solid #aaa;
28+
}
29+
div[class^="gr_custom_book_container"] {
30+
/* customize your book covers here */
31+
float: left;
32+
overflow: hidden;
33+
height: 60px;
34+
margin-right: 4px;
35+
width: 39px;
36+
}
37+
div[class^="gr_custom_author"] {
38+
/* customize your author names here */
39+
font-size: 10px;
40+
}
41+
div[class^="gr_custom_tags"] {
42+
/* customize your tags here */
43+
font-size: 10px;
44+
color: gray;
45+
}
46+
div[class^="gr_custom_review"] {
47+
}
48+
div[class^="gr_custom_rating"] {
49+
display: none;
50+
}

0 commit comments

Comments
 (0)