Skip to content

Commit 8804763

Browse files
use full width and change sidebar
1 parent 2c58db8 commit 8804763

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

classes/Visualizer/Render/Library.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,17 @@ private function _renderLibrary() {
120120
echo '<div id="visualizer-content-wrapper">';
121121
if ( ! empty( $this->charts ) ) {
122122
echo '<div id="visualizer-library" class="visualizer-clearfix">';
123+
$count = 0;
123124
foreach ( $this->charts as $placeholder_id => $chart ) {
124125
$this->_renderChartBox( $placeholder_id, $chart['id'] );
126+
// show the sidebar after the first 3 charts.
127+
if ( $count++ === 2 ) {
128+
$this->_renderSidebar();
129+
}
130+
}
131+
// show the sidebar if there are less than 3 charts.
132+
if ( $count < 3 ) {
133+
$this->_renderSidebar();
125134
}
126135
echo '</div>';
127136
} else {
@@ -140,9 +149,9 @@ private function _renderLibrary() {
140149
echo '</span>';
141150
echo '</div>';
142151
echo '</div>';
152+
$this->_renderSidebar();
143153
echo '</div>';
144154
}
145-
$this->_renderSidebar();
146155
echo '</div>';
147156
if ( is_array( $this->pagination ) ) {
148157
echo '<ul class=" subsubsub">';
@@ -229,11 +238,13 @@ private function _renderSidebar() {
229238
echo '<h3>' . __( 'Gain more editing power', 'visualizer' ) . '</h3><ul>';
230239
echo '<li>' . __( 'Spreadsheet like editor', 'visualizer' ) . '</li>';
231240
echo '<li>' . __( 'Import from other charts', 'visualizer' ) . '</li>';
241+
echo '<li>' . __( 'Use database query to create charts', 'visualizer' ) . '</li>';
242+
echo '<li>' . __( 'Create charts from WordPress tables', 'visualizer' ) . '</li>';
232243
echo '<li>' . __( 'Frontend editor', 'visualizer' ) . '</li>';
233244
echo '<li>' . __( 'Private charts', 'visualizer' ) . '</li>';
234245
echo '<li>' . __( 'Auto-sync with online files', 'visualizer' ) . '</li>';
235-
echo '<li>' . __( '3 more chart types', 'visualizer' ) . '</li></ul>';
236-
echo '<a href="' . Visualizer_Plugin::PRO_TEASER_URL . '" target="_blank" class="button button-primary">' . __( 'View more features', 'visualizer' ) . '</a>';
246+
echo '<li>' . __( '6 more chart types', 'visualizer' ) . '</li></ul>';
247+
echo '<p><a href="' . Visualizer_Plugin::PRO_TEASER_URL . '" target="_blank" class="button button-primary">' . __( 'View more features', 'visualizer' ) . '</a></p>';
237248
echo '</div>';
238249
echo '</div>';
239250
}

css/library.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,16 @@
151151
}
152152

153153
#visualizer-sidebar {
154-
display: table-cell;
155-
width: 250px;
154+
clear: both;
155+
margin: 20px 0px;
156+
width: 96%;
156157
}
157158

158159
.visualizer-sidebar-box ul li {
159160
margin: 4px 0;
160161
color: #23282d;
162+
float: left;
163+
width: 25%;
161164
}
162165

163166
.visualizer-sidebar-box ul {
@@ -168,13 +171,10 @@
168171

169172
.visualizer-sidebar-box {
170173
display: block;
171-
width: 95%;
172-
margin: 0;
173-
margin-top: 20px;
174-
margin-left: 2.5%;
175174
padding-top: 10px;
176175
padding-bottom: 15px;
177176
border-top: 5px solid #0073aa;
177+
border-bottom: 5px solid #0073aa;
178178
color: #0073aa;
179179
background: white;
180180
text-align: center;

0 commit comments

Comments
 (0)