[gnomeweb-wp] unified news sidebar both for list and post.
- From: Vinicius Scopel Depizzol <vdepizzol src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnomeweb-wp] unified news sidebar both for list and post.
- Date: Tue, 29 Mar 2011 05:15:17 +0000 (UTC)
commit 4ad2328223305bc4618966147f15895bcfd1f535
Author: Vinicius Depizzol <vdepizzol gmail com>
Date: Tue Mar 29 02:13:31 2011 -0300
unified news sidebar both for list and post.
wp-content/themes/gnome-grass/news.php | 12 +++++---
wp-content/themes/gnome-grass/news_sidebar.php | 35 ++++++++++++++++++++++++
wp-content/themes/gnome-grass/page-news.php | 35 ++---------------------
3 files changed, 46 insertions(+), 36 deletions(-)
---
diff --git a/wp-content/themes/gnome-grass/news.php b/wp-content/themes/gnome-grass/news.php
index 03120ea..872deb6 100644
--- a/wp-content/themes/gnome-grass/news.php
+++ b/wp-content/themes/gnome-grass/news.php
@@ -3,6 +3,12 @@
* @package GNOME Website
* @subpackage Grass Theme
*/
+
+add_action('wp_head', 'add_news_stylesheet');
+
+function add_news_stylesheet() {
+ echo '<link rel="stylesheet" type="text/css" media="all" href="'.get_bloginfo('template_url').'/css/news.css" />';
+}
require_once("header.php"); ?>
@@ -27,10 +33,8 @@ require_once("header.php"); ?>
</div>
<div class="sidebar">
-
- <p>For more GNOME news, check out the <a href="#">Planet GNOME</a>.</p>
-
- <p>FIXME</p>
+
+ <?php require_once("news_sidebar.php");?>
</div>
<?php require_once("footer_art.php"); ?>
diff --git a/wp-content/themes/gnome-grass/news_sidebar.php b/wp-content/themes/gnome-grass/news_sidebar.php
new file mode 100644
index 0000000..808602a
--- /dev/null
+++ b/wp-content/themes/gnome-grass/news_sidebar.php
@@ -0,0 +1,35 @@
+<?php if(!isset($is_news_home) || $is_news_home == false) { ?>
+<a class="action_button" href="<?php bloginfo('url'); ?>/news/" style="display: block; text-align: center; margin-bottom: 20px;"><?php _e('Read the archives...', 'grass'); ?></a>
+<?php } ?>
+
+<div class="subtle_box">
+ <h4><?php _e('Connect with GNOME', 'grass'); ?></h4>
+
+ <div class="social_network_icons">
+ <ul>
+ <li>
+ <a href="http://identi.ca/gnome">
+ <img src="<?php bloginfo('template_url')?>/images/social_networks/identica.png" alt=" " />
+ Identi.ca
+ </a>
+ </li>
+ <li>
+ <a href="http://twitter.com/gnome">
+ <img src="<?php bloginfo('template_url')?>/images/social_networks/twitter.png" alt=" " />
+ Twitter
+ </a>
+ </li>
+ <li>
+ <a href="http://www.facebook.com/GNOMEDesktop">
+ <img src="<?php bloginfo('template_url')?>/images/social_networks/facebook.png" alt=" " />
+ Facebook
+ </a>
+ </li>
+ </ul>
+ </div>
+</div>
+
+<div class="subtle_box">
+ <h4>Development News</h4>
+ <p>Lorem ipsum dolor sit amet avec sans consequer domulus sit</p>
+</div>
diff --git a/wp-content/themes/gnome-grass/page-news.php b/wp-content/themes/gnome-grass/page-news.php
index 0031f90..424a945 100644
--- a/wp-content/themes/gnome-grass/page-news.php
+++ b/wp-content/themes/gnome-grass/page-news.php
@@ -10,6 +10,8 @@ function add_news_stylesheet() {
echo '<link rel="stylesheet" type="text/css" media="all" href="'.get_bloginfo('template_url').'/css/news.css" />';
}
+$is_news_home = true;
+
require_once("header.php"); ?>
<!-- container -->
@@ -55,39 +57,8 @@ require_once("header.php"); ?>
<div class="sidebar">
- <div class="subtle_box">
- <h4><?php _e('Connect with GNOME', 'grass'); ?></h4>
-
- <div class="social_network_icons">
- <ul>
- <li>
- <a href="http://identi.ca/gnome">
- <img src="<?php bloginfo('template_url')?>/images/social_networks/identica.png" alt=" " />
- Identi.ca
- </a>
- </li>
- <li>
- <a href="http://twitter.com/gnome">
- <img src="<?php bloginfo('template_url')?>/images/social_networks/twitter.png" alt=" " />
- Twitter
- </a>
- </li>
- <li>
- <a href="http://www.facebook.com/GNOMEDesktop">
- <img src="<?php bloginfo('template_url')?>/images/social_networks/facebook.png" alt=" " />
- Facebook
- </a>
- </li>
- </ul>
- </div>
- </div>
-
- <div class="subtle_box">
- <h4>Development News</h4>
- <p>Lorem ipsum dolor sit amet avec sans consequer domulus sit</p>
- </div>
+ <?php require_once("news_sidebar.php");?>
-
</div>
<?php require_once("footer_art.php"); ?>
</div>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]