[gnome-web-www: 28/68] Add a new Homepage
- From: Tom Tryfonidis <tomtryf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-web-www: 28/68] Add a new Homepage
- Date: Tue, 24 Jan 2017 15:49:33 +0000 (UTC)
commit 85d0d61717b8ee5b2f0440883ec0e6833f9afafc
Author: Tom Tryfonidis <tomtryf gnome org>
Date: Mon Jan 9 17:09:03 2017 +0200
Add a new Homepage
Redesigned homepage for gnome.org. Keep the old page as a backup option
theme/css/home.css | 3 +
theme/images/home/featured_image.png | Bin 0 -> 320739 bytes
theme/page-newhome.php | 81 ++++++++++++++++++++++++++++++++++
theme/style.css | 12 +++++
4 files changed, 96 insertions(+), 0 deletions(-)
---
diff --git a/theme/css/home.css b/theme/css/home.css
index 3268074..3d6e200 100644
--- a/theme/css/home.css
+++ b/theme/css/home.css
@@ -37,6 +37,9 @@
box-shadow: inset 0 -1px rgba(100%, 100%, 100%, 0.6); */
}
+.home_banner {
+ padding: 70px 0 40px;
+}
/* About GNOME Box */
/* ========================================================================== */
diff --git a/theme/images/home/featured_image.png b/theme/images/home/featured_image.png
new file mode 100644
index 0000000..375708b
Binary files /dev/null and b/theme/images/home/featured_image.png differ
diff --git a/theme/page-newhome.php b/theme/page-newhome.php
new file mode 100644
index 0000000..f226654
--- /dev/null
+++ b/theme/page-newhome.php
@@ -0,0 +1,81 @@
+<?php
+/*
+ * Add link to global feeds instead of current page comments
+ */
+add_theme_support( 'automatic-feed-links');
+add_action('wp_head', function() {
+ echo '<link rel="alternate" type="application/rss+xml" title="'.get_bloginfo('name').' » Feed"
href="'.home_url('/').'feed/" />';
+});
+?>
+
+<?php get_header(); ?>
+
+<div class="content">
+ <div class="container">
+ <div class="row">
+ <div class="col-sm-12">
+ <img src="<?php if (get_theme_mod( 'release_screenshot' )) : echo get_theme_mod(
'release_screenshot'); else: echo get_template_directory_uri().'/images/home/featured_image.png'; endif; ?>"
class="img-responsive center-block home_banner" alt="Featured image showing GNOME shell">
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-12 text-center">
+ <p class="main_heading"><?php echo get_theme_mod( 'featured_heading');?></p>
+ <div class="col-md-6 col-centered">
+ <p><?php echo get_theme_mod( 'featured_subheading');?></p>
+ <div class="col-md-12">
+ <?php if ( get_theme_mod( 'featured_button_url_1' ) ) : ?>
+ <a class="btn btn-default" href="<?php echo esc_url( get_page_link(
get_theme_mod('featured_button_url_1'))) ?>"><?php echo esc_html( get_theme_mod( 'featured_button_text_1'))
?></a>
+ <?php endif; ?>
+
+ <?php if ( get_theme_mod( 'featured_button_url_2' ) ) : ?>
+ <a class="btn btn-default" href="<?php echo esc_url( get_page_link(
get_theme_mod('featured_button_url_2'))) ?>"><?php echo esc_html( get_theme_mod( 'featured_button_text_2'))
?></a>
+ <?php endif; ?>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <section class="bg-grey">
+ <div class="container">
+ <div class="row">
+ <div class="col-sm-12">
+ <div class="col-sm-6">
+ <h4><a href="<?php echo esc_url( get_page_link(
get_theme_mod('featured_section_button_url_1'))) ?>"><?php echo esc_html( get_theme_mod(
'featured_section_button_text_1')) ?></a></h4>
+ <?php echo get_theme_mod( 'featured_section_text_1');?>
+ </div>
+ <div class="col-sm-6">
+ <h4><a href="<?php echo esc_url( get_page_link(
get_theme_mod('featured_section_button_url_2'))) ?>"><?php echo esc_html( get_theme_mod(
'featured_section_button_text_2')) ?></a></h4>
+ <?php echo get_theme_mod( 'featured_section_text_2');?>
+ </div>
+ </div>
+ </div>
+ </div>
+ </section>
+ <!-- news -->
+ <div class="container">
+ <div class="news_list">
+ <?php
+ query_posts (array('post_type' => 'post', 'category_name' => 'news', 'posts_per_page' => 3));
+
+ while ( have_posts() ) : the_post();
+ ?>
+ <div class="col-md-12 news">
+ <span class="date">
+ <?php the_date(); ?>
+ </span>
+ <a href="<?php the_permalink(); ?>">
+ <strong><?php the_title(); ?></strong>
+ <?php echo strip_tags(get_the_excerpt()); ?>
+ </a>
+ </div>
+ <?php
+ endwhile;
+ ?>
+ <div class="col-md-12">
+ <a href="/news/" class="btn btn-default pull-right"><?php esc_html_e( 'News Archives',
'grass' ); ?></a>
+ </div>
+ </div>
+ </div> <!-- END news -->
+</div> <!-- END content -->
+
+<?php get_footer(); ?>
diff --git a/theme/style.css b/theme/style.css
index 974a481..e25ed93 100644
--- a/theme/style.css
+++ b/theme/style.css
@@ -1459,3 +1459,15 @@ class[*="span"] .omega {
.social_network_icons .fa-rss:hover {
color: #ff6600;
}
+
+/* Hero Sections */
+/* ========================================================================== */
+
+section {
+ padding: 60px;
+ margin: 60px 0;
+}
+
+.bg-grey {
+ background: #f6f6f6;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]