[gnome-web-www: 18/68] More changes to the pages



commit 0534e74bb3b01e45592759c2bd0411a13e8b4905
Author: Tom Tryfonidis <tomtryf gmail com>
Date:   Tue Nov 1 20:56:59 2016 +0200

    More changes to the pages

 theme/footer.php                |    4 +-
 theme/functions.php             |   42 ++++++++++++++++++++++++++++++++++----
 theme/news_sidebar.php          |   27 +------------------------
 theme/page-friends-of-gnome.php |    6 ++--
 theme/page-home.php             |    2 +-
 theme/page-news.php             |    4 +--
 theme/page-thank-you.php        |    8 +------
 theme/social_icons.php          |   12 +++++-----
 theme/style.css                 |   12 ++++------
 9 files changed, 57 insertions(+), 60 deletions(-)
---
diff --git a/theme/footer.php b/theme/footer.php
index 29b02b8..8c26d12 100644
--- a/theme/footer.php
+++ b/theme/footer.php
@@ -6,7 +6,7 @@
         </div>
 
         <div class="container">
-            <div class="links col-sm-12 col-md-9">
+            <div class="links col-sm-9 col-md-9">
                 <?php
                 wp_nav_menu('menu=footer');
                 ?>
@@ -32,7 +32,7 @@
             }
             ?>
             
-            <div class="icons col-sm-8 col-md-3">
+            <div class="icons col-sm-3">
                  <?php require_once("social_icons.php"); ?>
             </div>
            </div>
diff --git a/theme/functions.php b/theme/functions.php
index 90e51b4..a61b50a 100644
--- a/theme/functions.php
+++ b/theme/functions.php
@@ -47,28 +47,42 @@ add_image_size( 'fog-hacker-icon', 80, 80, true );
 /*
  * Enqueue scripts and styles.
  */
+ 
+function friends_common_resources() {
+        wp_enqueue_script( 'friends-js', get_template_directory_uri() . '/js/friends.js', false, null, true);
+        wp_enqueue_style('friends-style', get_template_directory_uri() . '/css/friends20.css', 
array('bootstrap'), null, false);
+}
 
 function gnomegrass_resources() {
 
+    // Common scripts
     wp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', 
array('jquery'), null, true);
     wp_enqueue_script( 'template', get_template_directory_uri() . '/js/template.js', array('jquery'), null, 
true);
     wp_enqueue_script( 'responsive-menu', get_template_directory_uri() . '/js/responsive.js', 
array('jquery'), null, true);
 
+    // Common stylesheets
     wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');
     wp_enqueue_style('style', get_stylesheet_uri());
     wp_enqueue_style('font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css' );
 
     // Scripts and styles for page-friends-of-gnome and page-donate
-    if (is_page('friends-of-gnome') || is_page('donate')){
-        wp_enqueue_script( 'friends-js', get_template_directory_uri() . '/js/friends.js', false, null, true);
-        wp_enqueue_style('friends-style', get_template_directory_uri() . '/css/friends20.css', 
array('bootstrap'), null, false);
+    if (is_page('friends-of-gnome') || is_page('donate')) {
+        friends_common_resources();
+    }
+    
+    // Scripts and styles for page-thank-you
+    if (is_page('thank-you')) {
+        friends_common_resources();
+        wp_enqueue_script( 'clipboard', get_template_directory_uri() . '/js/clipboard.min.js', 
array('jquery'), null, true);
     }
+    
     // Scripts and styles for page-support-us
-    if (is_page('support-us')){
+    if (is_page('support-us')) {
         wp_enqueue_style('friends-style', get_template_directory_uri() . '/css/friends20.css', 
array('bootstrap'), null, false);
     }
+    
     // Scripts and styles for page-home
-    if (is_page('home')){
+    if (is_page('home')) {
         wp_enqueue_style('friends-style', get_template_directory_uri() . '/css/home.css', 
array('bootstrap'), null, false);
         wp_enqueue_style('friends-style', get_template_directory_uri() . '/css/news.css', 
array('bootstrap'), null, false);
     }
@@ -472,3 +486,21 @@ function display_theme_panel_fields() {
 
 add_action("admin_init", "display_theme_panel_fields");
 add_action("admin_menu", "add_theme_menu_item");
+
+add_action( 'admin_head', 'replace_default_featured_image_meta_box', 100 );
+function replace_default_featured_image_meta_box() {
+    add_meta_box('postimagediv', __('FoG Hacker Image'), 'post_thumbnail_meta_box', 'hackers', 'side', 
'high');
+    add_meta_box('postexcerpt', __('FoG Hacker Description'), 'post_excerpt_meta_box', 'hackers', 'normal', 
'high');
+    
+    remove_meta_box( 'postimagediv', 'my-post-type-here', 'side' );
+    remove_meta_box( 'postexcerpt', 'post', 'side' );
+}
+
+
+
+add_action( 'after_setup_theme', 'wpt_setup' );
+    if ( ! function_exists( 'wpt_setup' ) ):
+        function wpt_setup() {  
+            register_nav_menu( 'primary', __( 'Primary navigation', 'grass' ) );
+        } endif;
+
diff --git a/theme/news_sidebar.php b/theme/news_sidebar.php
index c7a8d8b..bb75fc6 100644
--- a/theme/news_sidebar.php
+++ b/theme/news_sidebar.php
@@ -6,32 +6,7 @@
     <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>
-            <li>
-                <a href="https://plus.google.com/108054458791366257368/posts";>
-                    <img src="<?php bloginfo('template_url')?>/images/social_networks/gplus.png" alt="GNOME 
on Google+" rel="publisher" />
-                    Google+
-                </a>
-            </li>
-        </ul>
+        <?php require("social_icons.php");?>
     </div>
 </div>
     
diff --git a/theme/page-friends-of-gnome.php b/theme/page-friends-of-gnome.php
index f39c127..ac13fbe 100644
--- a/theme/page-friends-of-gnome.php
+++ b/theme/page-friends-of-gnome.php
@@ -11,7 +11,7 @@ require_once("header.php"); ?>
             
                        <div class="content">
                                <div class="grid_12">
-                                       <img class="img-responsive" src="<?php 
bloginfo('stylesheet_directory'); ?>/images/donations/friends-banner.png" alt="">
+                                       <img class="img-responsive center-block" src="<?php 
bloginfo('stylesheet_directory'); ?>/images/donations/friends-banner.png" alt="">
                                        <p><?php _e( "Joining Friends of GNOME is the best way to support 
GNOME. Regular monthly subscriptions provide us with predictable income that we can use to keep the GNOME 
Foundation's lights on.", 'grass' ); ?></p>
                                </div>
 
@@ -43,7 +43,7 @@ require_once("header.php"); ?>
 
                                <div class="col-md-12">
                                        <h3><?php _e( 'Monthly subscription amount', 'grass'); ?></h3>
-                                               <div class="form-group">
+                        <div class="form-group">
                             <div class="col-sm-2">
                                 <label class="control-label"><?php _e( 'Currency', 'grass' ); ?></label>
                             </div>
@@ -125,7 +125,7 @@ require_once("header.php"); ?>
                                                        <label>
                                                                <input type="hidden" name="os2" 
id="list_donor" value="No" />
                                                                <input name="os2" id="list_donor" 
type="checkbox" value="Yes" checked /> <?php _e( 'Include me on the list of donors', 'grass' ); ?>
-                                                               <input type="hidden" name="on2" value="List 
me on the donors page" />
+                                <input type="hidden" name="on2" value="List me on the donors page" />
                                                        </label>
                             </div>
                             <div class="checkbox col-md-12">
diff --git a/theme/page-home.php b/theme/page-home.php
index 9718feb..e8de3a0 100644
--- a/theme/page-home.php
+++ b/theme/page-home.php
@@ -18,7 +18,7 @@ require_once("header.php"); ?>
     <div id="home">
     <div id="home-crafted-content" class="row">
             <div class="col-sm-12 col-md-6">
-                <a href="<?php echo $screenshot ?>"><img src="<?php echo $screenshot ?>" alt="release 
screenshost"></a>
+                <a href="<?php echo $screenshot ?>"><img src="<?php echo $screenshot ?>" 
class="img-responsive" alt="release screenshost"></a>
             </div>
             <div class="text col-sm-12 col-md-6">
                 <h3>GNOME 3: Ease, comfort and control</h3>
diff --git a/theme/page-news.php b/theme/page-news.php
index 5fe9112..b8d4851 100644
--- a/theme/page-news.php
+++ b/theme/page-news.php
@@ -16,7 +16,7 @@ $is_news_home = true;
 /*
  * Add link to global feeds instead of current page comments
  */
-automatic_feed_links(false);
+add_theme_support( 'automatic-feed-links');
 add_action('wp_head', function() {
    echo '<link rel="alternate" type="application/rss+xml" title="'.get_bloginfo('name').' &raquo; Feed" 
href="'.home_url('/').'feed/" />'; 
 });
@@ -68,9 +68,7 @@ require_once("header.php"); ?>
             </div>
             
             <div class="sidebar col-md-3">
-                
                 <?php require_once("news_sidebar.php");?>
-                
             </div>
             <?php require_once("footer_art.php"); ?>
         </div>
diff --git a/theme/page-thank-you.php b/theme/page-thank-you.php
index 5c63d8e..6a38cc0 100644
--- a/theme/page-thank-you.php
+++ b/theme/page-thank-you.php
@@ -1,11 +1,5 @@
 <?php
 
-add_action('wp_head', function() {
-    echo '<link rel="stylesheet" type="text/css" media="all" 
href="'.get_bloginfo('template_url').'/css/friends20.css" />' . "\n";
-    echo '<script type="text/javascript" src="'.get_bloginfo('template_url').'/js/friends.js"></script>' . 
"\n";
-    echo '<script type="text/javascript" 
src="'.get_bloginfo('template_url').'/js/clipboard.min.js"></script>' . "\n";
-});
-
 require_once("header.php"); ?>
 
        <!-- container -->
@@ -17,7 +11,7 @@ require_once("header.php"); ?>
             
                        <div class="content">
                                <div class="col-md-12 text-center">
-                                       <img class="img-responsive" src="<?php 
bloginfo('stylesheet_directory'); ?>/images/donations/thankyou-banner.png" alt="">
+                                       <img class="img-responsive center-block" src="<?php 
bloginfo('stylesheet_directory'); ?>/images/donations/thankyou-banner.png" alt="">
                                        <div class="main_feature">
                                <p><?php _e( 'Thank you for supporting GNOME and our mission to give everyone 
access to Free Software.', 'grass' ); ?></p>
                        </div>
diff --git a/theme/social_icons.php b/theme/social_icons.php
index fd811ee..5fd544b 100644
--- a/theme/social_icons.php
+++ b/theme/social_icons.php
@@ -1,14 +1,14 @@
 <div class="social_network_icons">
-    <a href="https://gnome.org/feed";>
+    <a href="https://gnome.org/feed"; target="_blank">
         <i class="fa fa-2x fa-rss"></i>
     </a>
-    <a href="https://twitter.com/gnome";>
+    <a href="https://www.facebook.com/GNOMEDesktop"; target="_blank">
+        <i class="fa fa-2x fa-facebook"></i>
+    </a>
+    <a href="https://twitter.com/gnome"; target="_blank">
         <i class="fa fa-2x fa-twitter"></i>
     </a>
-    <a href="https://plus.google.com/+gnome";>
+    <a href="https://plus.google.com/+gnome"; target="_blank">
         <i class="fa fa-2x fa-google-plus"></i>
     </a>
-    <a href="https://www.facebook.com/GNOMEDesktop";>
-        <i class="fa fa-2x fa-facebook"></i>
-    </a>
 </div>
diff --git a/theme/style.css b/theme/style.css
index bf818a1..052cde4 100644
--- a/theme/style.css
+++ b/theme/style.css
@@ -248,18 +248,16 @@ a:visited {
 }
 /*------------Search for tablets and above-----------------------------*/
 #top_bar_search {
-/*  height: 36px;
-*/  background: #2e3436 url("images/top_bar-bg.png") top repeat-x;
-/*    padding: 8px 0;
-*/  margin-top: 55px;
+    background: #2e3436 url("images/top_bar-bg.png") top repeat-x;
+    margin-top: 55px;
     margin-left: 0px;
     font-size: 13px;
     -moz-border-radius: 0 6px 6px 0;
     -webkit-border-radius: 0 6px 6px 0;
     border-radius: 0 6px 6px 0;
-    -moz-box-shadow: 0 0px 0px rgba(0,0,0,0.2);
-    -webkit-box-shadow: 0 0px 0px rgba(0,0,0,0.2);
-    box-shadow: 0 0px 0px rgba(0,0,0,0.2);
+    -moz-box-shadow: 0 2px 4px rgba(0,0,0,0.2);
+    -webkit-box-shadow: 0 2px 4px rgba(0,0,0,0.2);
+    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
 }
 #top_bar_search #main_search {
     text-align: right;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]