[Xfce4-commits] [www/blog.xfce.org] 01/01: Initial push for the WordPress theme. Uses the centralized CSS system.

noreply at xfce.org noreply at xfce.org
Mon Jun 12 23:14:22 CEST 2017


This is an automated email from the git hooks/post-receive script.

k   n   o   m   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository www/blog.xfce.org.

commit 7a184506bc74c6b60e0d92c9c8a8fe28251ee0b4
Author: Pasi Lallinaho <pasi at shimmerproject.org>
Date:   Tue Jun 13 00:13:47 2017 +0300

    Initial push for the WordPress theme.
    Uses the centralized CSS system.
---
 wp-content/themes/xfce-2017/functions.php      |  57 ++++++++++++++++++++
 wp-content/themes/xfce-2017/images/favicon.ico | Bin 0 -> 1082 bytes
 wp-content/themes/xfce-2017/index.php          |  70 +++++++++++++++++++++++++
 wp-content/themes/xfce-2017/style.css          |  14 +++++
 wp-content/themes/xfce-2017/xfce-header.php    |  19 +++++++
 5 files changed, 160 insertions(+)

diff --git a/wp-content/themes/xfce-2017/functions.php b/wp-content/themes/xfce-2017/functions.php
new file mode 100644
index 0000000..ccf2097
--- /dev/null
+++ b/wp-content/themes/xfce-2017/functions.php
@@ -0,0 +1,57 @@
+<?php
+
+/*
+ *  Load translation
+ *
+ */
+
+load_theme_textdomain( 'xfce', TEMPLATEPATH . '/languages' );
+
+/*
+ *  Register HTML5 support for WordPress
+ *
+ */
+
+add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) );
+
+/*
+ *  Register sidebars
+ *
+ */
+
+if( function_exists( 'register_sidebar' ) ) {
+	register_sidebar( array(
+		'name' => __( 'Sidebar', 'xfce' ),
+		'id' => 'sidebar_main',
+		'before_widget' => ' ',
+		'after_widget' => ' ',
+		'before_title' => '<h2>',
+		'after_title' => '</h2>'
+	) );
+	/* Add more sidebars here if needed */
+}
+
+/*
+ *  Register menus
+ *
+ */
+
+if( function_exists( 'register_nav_menu' ) ) {
+	register_nav_menus( array(
+		'navi_main' => __( 'Main navigation', 'xfce' )
+		/* Add more menus here if needed */
+	) );
+}
+
+/*
+ *  Include stylesheets
+ *
+ */
+
+add_action( 'wp_enqueue_scripts', 'xfce_styles' );
+
+function xfce_styles( ) {
+	wp_enqueue_style( 'xfce-base', 'https://www.xfce.org/style/css.php?site=blog' );
+}
+
+?>
diff --git a/wp-content/themes/xfce-2017/images/favicon.ico b/wp-content/themes/xfce-2017/images/favicon.ico
new file mode 100644
index 0000000..9dbd75a
Binary files /dev/null and b/wp-content/themes/xfce-2017/images/favicon.ico differ
diff --git a/wp-content/themes/xfce-2017/index.php b/wp-content/themes/xfce-2017/index.php
new file mode 100644
index 0000000..a0e0df5
--- /dev/null
+++ b/wp-content/themes/xfce-2017/index.php
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes( 'xhtml' ); ?>>
+<head>
+	<title><?php wp_title( '«', true, 'right' ); ?><?php bloginfo( 'name' ); ?></title>
+	<meta charset="<?php bloginfo( 'charset' ); ?>" />
+
+	<meta name="copyright" content="Copyright 2003–<?php echo date( 'Y' ); ?> Xfce Development Team" />
+	<meta name="description" content="<?php bloginfo( 'name' ); ?><?php if( strlen( get_bloginfo( 'description' ) ) > 0 ) { ?> – <?php bloginfo( 'description' ); } ?>" />
+
+	<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri( ); ?>/images/favicon.ico">
+	<meta name="viewport" content="width=device-width, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1" />
+
+	<?php wp_head( ); ?>
+</head>
+
+<body <?php body_class( ); ?>>
+
+	<?php get_template_part( 'xfce-header' ); ?>
+
+	<div id="main">
+		<div id="mainnav" class="group">
+			<div>
+				<?php wp_nav_menu( array( 'theme_location' => 'navi_main', 'fallback_cb' => FALSE ) ); ?>
+			</div>
+		</div>
+
+		<div id="content">
+			<div id="article">
+			<?php
+				if( have_posts( ) ) {
+					while( have_posts( ) ) {
+						the_post( );
+						echo '<div class="single">';
+						echo '<h1 class="xfce-title"><a href="' . get_the_permalink( ) . '" rel="bookmark" title="' . get_the_title( ) .'">' . get_the_title( ) . '</a></h1>';
+						echo '<ul class="meta"><li class="date">' . date_i18n( get_option( 'date_format' ), get_the_time( 'U' ) ) . '</li><li class="author">' . get_the_author( ) . '</li></ul>';
+						the_content( __( 'Read the rest of this article »', 'xfce' ) ); 
+						echo '</div>';
+					}
+				} else {
+					echo '<h1>' . __( 'Content not found.', 'xfce' ) . '</h1>';
+					echo '<p>' . __( 'The content you were looking for was not found.', 'xfce' ) . '</p>';
+				}
+			?>
+			<?php
+				$next = get_next_posts_link( );
+				$prev = get_previous_posts_link( );
+				if( $next || $prev ) {
+					echo '<div class="pagination">';
+					if( $prev ) { echo '<div class="prev">' . $prev . '</div>'; }
+					if( $next ) { echo '<div class="next">' . $next . '</div>'; }
+					echo '</div>';
+				}
+			?>
+		 	</div>
+			<div id="related">
+				<?php if( function_exists( 'dynamic_sidebar' ) ) {
+					dynamic_sidebar( 'sidebar_main' );
+				} ?>
+			</div>
+		</div>
+	</div>
+
+	<div id="footer" class="group">
+		<p>Copyright 2003-2017 <a href="https://xfce.org/about/credits">Xfce Development Team</a>.</p>
+		<?php wp_footer( ); ?>
+	</div>
+
+</body>
+</html>
diff --git a/wp-content/themes/xfce-2017/style.css b/wp-content/themes/xfce-2017/style.css
new file mode 100644
index 0000000..09ae4ba
--- /dev/null
+++ b/wp-content/themes/xfce-2017/style.css
@@ -0,0 +1,14 @@
+/*
+ *  Theme Name: Xfce 2017
+ *  Theme URI: https://xfce.org/
+ *  Description: A theme for the Xfce blog imitating the main website
+ *  Author: Pasi Lallinaho
+ *  Author URI: https://open.knome.fi/
+ *  Version: 2017
+ *
+ */
+
+/*
+ *  Edit the styles for the blog at /var/www/cdn.xfce.org/style/site_blog.css
+ *
+ */
\ No newline at end of file
diff --git a/wp-content/themes/xfce-2017/xfce-header.php b/wp-content/themes/xfce-2017/xfce-header.php
new file mode 100644
index 0000000..09b793f
--- /dev/null
+++ b/wp-content/themes/xfce-2017/xfce-header.php
@@ -0,0 +1,19 @@
+<div id="xfce-header">
+	<div>
+		<h1 id="xfce-header-title">Xfce</h1>
+		<h5 id="xfce-header-subtitle">Subdomains</h5>
+		 
+		<ul>
+			<li><a href="https://xfce.org" title="Go to the homepage">Home</a></li>
+			<li><a href="https://docs.xfce.org" title="Official documentation">Docs</a></li>
+			<li><a href="http://archive.xfce.org" title="Download location of tarballs">Archive</a></li>
+			<li><a href="https://wiki.xfce.org" title="Community documentation">Wiki</a></li>
+			<li><a href="https://forum.xfce.org" title="Community forums">Forum</a></li>
+			<li><a href="https://bugzilla.xfce.org" title="Report and track bugs">Bugs</a></li>
+			<li><a href="https://blog.xfce.org" title="Visit the blog" class="active">Blog</a></li>
+			<li><a href="https://xfce.org/getinvolved/translation" title="Help translating the Xfce project">Translate</a></li>
+			<li><a href="https://git.xfce.org" title="Project repositories">GIT</a></li>
+		</ul>
+	</div>
+	<div id="xfce-header-clear"></div>
+</div>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list