Progress
This commit is contained in:
1 parent
625567394d
commit
4cf35cd174
18 files changed
+665
-61
No files matched your search
@@ -5,7 +5,7 @@
|
||||
<article <?php neuf_post_class(); ?>>
|
||||
|
||||
<h1 class="entry-title">404: Denne siden er på grisefest</h1>
|
||||
<img src="http://neuf.neuf.no/fat-pig1.jpg" alt="" />
|
||||
<img src="<?php bloginfo('stylesheet_directory'); ?>/dist/images/fat-pig1.jpg" alt="" />
|
||||
<div class="entry-content">
|
||||
<p>Lykke til videre.</p>
|
||||
</div> <!-- .entry-content -->
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php get_header(); ?>
|
||||
|
||||
<div id="content"
|
||||
|
||||
<article <?php neuf_post_class(); ?>>
|
||||
|
||||
<h1 class="entry-title">404: Denne siden er på grisefest</h1>
|
||||
<img src="http://neuf.neuf.no/fat-pig1.jpg" alt="" />
|
||||
<div class="entry-content">
|
||||
<p>Lykke til videre.</p>
|
||||
</div> <!-- .entry-content -->
|
||||
|
||||
</article> <!-- .post -->
|
||||
|
||||
</div> <!-- #content -->
|
||||
|
||||
<?php get_footer(); ?>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php $footer_about_text = get_theme_mod( 'footer_about_text',""); ?>
|
||||
<footer id="site-footer">
|
||||
<?php echo $footer_about_text; ?>
|
||||
</footer> <!-- #site-footer -->
|
||||
|
||||
<div class="credits-wrap">
|
||||
<div class="credits">Laget med <span class="love" title="kærlighed">♥</span> av <a href="http://kak.studentersamfundet.no/" title="Kommunikasjonsavdelingen">KAK</a></div>
|
||||
</div>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,373 @@
|
||||
<?php
|
||||
add_theme_support( 'menus' );
|
||||
add_theme_support( 'post-thumbnails');
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
|
||||
$content_width = 770;
|
||||
|
||||
add_image_size( 'cover-photo' , 1440, 480, true );
|
||||
add_image_size( 'six-column-promo' , 570 , 322 , true );
|
||||
add_image_size( 'six-column-slim' , 570 , 161 , true );
|
||||
|
||||
/**
|
||||
* Register navigation menus.
|
||||
*/
|
||||
function neuf_register_nav_menus() {
|
||||
register_nav_menus(
|
||||
array( 'main-menu' => __( 'Hovedmeny' ) )
|
||||
);
|
||||
}
|
||||
add_action( 'init' , 'neuf_register_nav_menus' );
|
||||
|
||||
/**
|
||||
* Enqueue various scripts we use.
|
||||
*/
|
||||
function neuf_enqueue_scripts() {
|
||||
// enqueue the scripts
|
||||
wp_enqueue_script( 'jquery' );
|
||||
wp_enqueue_script( 'underscore' );
|
||||
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts' , 'neuf_enqueue_scripts' );
|
||||
|
||||
/**
|
||||
* Force large uploaded images.
|
||||
*
|
||||
* Denies uploads of images smaller (in pixels) than given width and height values.
|
||||
*/
|
||||
function neuf_handle_upload_prefilter( $file ) {
|
||||
$width = 640;
|
||||
$height = 480;
|
||||
|
||||
$img = getimagesize( $file['tmp_name'] );
|
||||
$minimum = array( 'width' => $width , 'height' => $height );
|
||||
$width = $img[0];
|
||||
$height =$img[1];
|
||||
|
||||
if ( $width < $minimum['width'] )
|
||||
return array( "error" => "Image dimensions are too small. Minimum width is {$minimum['width']}px. Uploaded image width is $width px" );
|
||||
|
||||
elseif ($height < $minimum['height'])
|
||||
return array( "error" => "Image dimensions are too small. Minimum height is {$minimum['height']}px. Uploaded image width is $width px" );
|
||||
else
|
||||
return $file;
|
||||
}
|
||||
// Commenting out for testing purposes
|
||||
add_filter( 'wp_handle_upload_prefilter' , 'neuf_handle_upload_prefilter' );
|
||||
|
||||
/**
|
||||
* Adds more semantic classes to WP's post_class.
|
||||
*
|
||||
* Adds these classes:
|
||||
* i) a class with a page-wide post count. The first post on this page is named .p1, the second p2 and so forth.
|
||||
* ii) a class 'alt' to every other post.
|
||||
*/
|
||||
function neuf_post_class( $classes = '' ) {
|
||||
global $neuf_pagewide_post_count;
|
||||
|
||||
if ( $classes )
|
||||
$classes = array ( $classes );
|
||||
|
||||
$classes[] = 'p' . ++$neuf_pagewide_post_count;
|
||||
|
||||
if ( 0 == $neuf_pagewide_post_count % 2 )
|
||||
$classes[] = 'alt';
|
||||
|
||||
$classes = join( ' ' , $classes );
|
||||
|
||||
post_class( $classes );
|
||||
}
|
||||
|
||||
/* Gets nicely the regular and member price nicely formated */
|
||||
function neuf_get_price( $neuf_event ) {
|
||||
$price_regular = get_post_meta( $neuf_event->ID , '_neuf_events_price_regular' , true );
|
||||
$price_member = get_post_meta( $neuf_event->ID , '_neuf_events_price_member' , true );
|
||||
if ( $price_regular ) {
|
||||
if ( $price_member )
|
||||
$cc = "$price_regular/$price_member";
|
||||
else
|
||||
$cc = $price_regular;
|
||||
} else
|
||||
$cc = '';
|
||||
|
||||
return $cc;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds more semantic classes to WP's body_class.
|
||||
*
|
||||
* Adds these classes:
|
||||
* i) For pages, adds 'page-slug'
|
||||
*/
|
||||
function neuf_body_class( $classes = '' ) {
|
||||
global $post;
|
||||
|
||||
if ( $classes )
|
||||
$classes .= ' ';
|
||||
|
||||
if ( is_page() )
|
||||
$classes .= 'page-' . $post->post_name ;
|
||||
|
||||
body_class( $classes );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determines what to display in our title element.
|
||||
*
|
||||
* Most of this borrowed from the Thematic theme framework.
|
||||
*/
|
||||
function neuf_doctitle() {
|
||||
$site_name = get_bloginfo( 'name' );
|
||||
$separator = '|';
|
||||
|
||||
if ( is_single() ) {
|
||||
$content = single_post_title( '' , false );
|
||||
|
||||
} elseif ( is_home() || is_front_page() ) {
|
||||
$content = get_bloginfo( 'description' );
|
||||
|
||||
} elseif ( is_page() ) {
|
||||
$content = single_post_title( '' , false );
|
||||
|
||||
} elseif ( is_search() ) {
|
||||
$content = __( 'Søkeresultater for', 'neuf-web' );
|
||||
$content .= ' ' . esc_html(stripslashes(get_search_query()));
|
||||
|
||||
} elseif ( is_category() ) {
|
||||
$content = __( 'Arkiv for kategorien' , 'neuf-web' );
|
||||
$content .= ' ' . single_cat_title( "" , false );;
|
||||
|
||||
} elseif ( is_tag() ) {
|
||||
$content = __( 'Arkiv for stikkordet' , 'neuf-web' );
|
||||
$content .= ' ' . neuf-web_tag_query();
|
||||
|
||||
} elseif ( is_404() ) {
|
||||
$content = __( 'Ikke funnet', 'neuf-web' );
|
||||
|
||||
} else {
|
||||
$content = get_bloginfo( 'description' );
|
||||
}
|
||||
|
||||
if ( get_query_var( 'paged' ) ) {
|
||||
$content .= ' ' .$separator. ' ';
|
||||
$content .= 'side';
|
||||
$content .= ' ';
|
||||
$content .= get_query_var('paged');
|
||||
}
|
||||
|
||||
if($content) {
|
||||
if ( is_home() || is_front_page() ) {
|
||||
$elements = array(
|
||||
'site_name' => $site_name,
|
||||
'separator' => $separator,
|
||||
'content' => $content
|
||||
);
|
||||
} else {
|
||||
$elements = array(
|
||||
'content' => $content,
|
||||
'separator' => $separator,
|
||||
'site_name' => $site_name
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$elements = array(
|
||||
'site_name' => $site_name
|
||||
);
|
||||
}
|
||||
|
||||
$doctitle = implode(' ', $elements);
|
||||
|
||||
$doctitle = "\t" . "<title>" . $doctitle . "</title>" . "\n\n";
|
||||
|
||||
echo $doctitle;
|
||||
} // end neuf_doctitle
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Display social sharing buttons
|
||||
*/
|
||||
function display_social_sharing_buttons() { ?>
|
||||
<div id="social-sharing">
|
||||
<div class="share-twitter">
|
||||
<a href="https://twitter.com/share" class="twitter-share-button" data-lang="no">Tweet</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
||||
</div> <!-- .share-twitter -->
|
||||
<div class="share-facebook">
|
||||
<div class="fb-like" data-send="true" data-layout="button_count" data-width="450" data-show-faces="true" data-action="recommend"></div>
|
||||
</div> <!-- .share-facebook -->
|
||||
</div> <!-- #social-sharing -->
|
||||
<?php }
|
||||
|
||||
/**
|
||||
* Count attachments to a post.
|
||||
*
|
||||
* Stolen from misund's blog theme.
|
||||
*
|
||||
* @author misund
|
||||
*/
|
||||
function neuf_get_attachment_count() {
|
||||
global $post;
|
||||
|
||||
$attachments = get_children( array(
|
||||
'post_parent' => $post->ID,
|
||||
'post_type' => 'any',
|
||||
'numberposts' => -1,
|
||||
'post_status' => 'any'
|
||||
) );
|
||||
|
||||
return count( $attachments );
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a gallery if suitable (Template Tag).
|
||||
*
|
||||
* If a post has more than two attachments, we should probably display them in
|
||||
* single view. This particularly applies to events. Photos of concerts etc.
|
||||
* can this way easily be added after the event, without much hassle.
|
||||
*
|
||||
* @author misund
|
||||
*/
|
||||
function neuf_maybe_display_gallery() {
|
||||
if ( 2 < neuf_get_attachment_count() )
|
||||
echo do_shortcode( '[gallery]' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Trims $text down to $length words.
|
||||
* If $text is truncated, then "[..]" is appended.
|
||||
*/
|
||||
function trim_excerpt($text, $length) {
|
||||
$org_length = strlen($text);
|
||||
$text = explode(" ", $text); // word boundary
|
||||
$text = array_slice($text, 0, $length);
|
||||
$text = implode(" ", $text);
|
||||
$shorter = $org_length != strlen($text) ? " [...]" : "";
|
||||
return $text . $shorter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the matching $pattern with $replacement in the string $subject.
|
||||
*/
|
||||
function linkify($subject, $pattern, $link) {
|
||||
$replacement = '<a href="'.$link.'">[...]</a>';
|
||||
$output = preg_replace($pattern, $replacement, $subject);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds and displays suitable page titles.
|
||||
*
|
||||
* Original author: Ian Stewart (theme Thematic).
|
||||
*/
|
||||
function neuf_page_title() {
|
||||
|
||||
global $post;
|
||||
|
||||
$content = '';
|
||||
if (is_attachment()) {
|
||||
$content .= '<h1 class="page-title"><a href="';
|
||||
$content .= apply_filters('the_permalink',get_permalink($post->post_parent));
|
||||
$content .= '" rev="attachment"><span class="meta-nav">Tilbake til </span>';
|
||||
$content .= get_the_title($post->post_parent);
|
||||
$content .= '</a></h1>';
|
||||
} elseif (is_author()) {
|
||||
$content .= '<h1 class="page-title author">';
|
||||
$author = get_the_author_meta( 'display_name' );
|
||||
$content .= __('Innhold skrevet av', 'neuf');
|
||||
$content .= ' <span>';
|
||||
$content .= $author;
|
||||
$content .= '</span></h1>';
|
||||
} elseif (is_category()) {
|
||||
$content .= '<h1 class="page-title">';
|
||||
$content .= __('Innhold i kategorien', 'neuf');
|
||||
$content .= ' <span>';
|
||||
$content .= single_cat_title('', FALSE);
|
||||
$content .= '</span></h1>' . "\n";
|
||||
$content .= '<div class="archive-meta">';
|
||||
if ( !(''== category_description()) ) : $content .= apply_filters('archive_meta', category_description()); endif;
|
||||
$content .= '</div>';
|
||||
} elseif (is_search()) {
|
||||
$content .= '<h1 class="page-title">';
|
||||
$content .= __('Søkeresultater for:', 'neuf');
|
||||
$content .= ' <span id="search-terms">';
|
||||
$content .= esc_html(stripslashes($_GET['s']));
|
||||
$content .= '</span></h1>';
|
||||
} elseif (is_tag()) {
|
||||
$content .= '<h1 class="page-title">';
|
||||
$content .= __('Innhold merket med', 'neuf');
|
||||
$content .= ' <span>';
|
||||
$content .= __(neuf_tag_query());
|
||||
$content .= '</span></h1>';
|
||||
} elseif (is_tax()) {
|
||||
global $taxonomy;
|
||||
$content .= '<h1 class="page-title">';
|
||||
$tax = get_taxonomy($taxonomy);
|
||||
$content .= $tax->labels->name . ' ';
|
||||
$content .= __('Arkiv:', 'neuf');
|
||||
$content .= ' <span>';
|
||||
$content .= neuf_get_term_name();
|
||||
$content .= '</span></h1>';
|
||||
} elseif (is_day()) {
|
||||
$content .= '<h1 class="page-title">';
|
||||
$content .= sprintf(__('Innhold fra dagen <span>%s</span>', 'neuf'), get_the_time(get_option('date_format')));
|
||||
$content .= '</h1>';
|
||||
} elseif (is_month()) {
|
||||
$content .= '<h1 class="page-title">';
|
||||
$content .= sprintf(__('Innhold fra måneden <span>%s</span>', 'neuf'), get_the_time('F Y'));
|
||||
$content .= '</h1>';
|
||||
} elseif (is_year()) {
|
||||
$content .= '<h1 class="page-title">';
|
||||
$content .= sprintf(__('Innhold fra året <span>%s</span>', 'neuf'), get_the_time('Y'));
|
||||
$content .= '</h1>';
|
||||
} elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
|
||||
$content .= '<h1 class="page-title">';
|
||||
$content .= __('Arkiv', 'neuf');
|
||||
$content .= '</h1>';
|
||||
}
|
||||
$content .= "\n";
|
||||
echo( $content );
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates nice multi_tag_title.
|
||||
*
|
||||
* Original author: Martin Kopischke.
|
||||
*/
|
||||
|
||||
function neuf_tag_query() {
|
||||
$nice_tag_query = get_query_var('tag'); // tags in current query
|
||||
$nice_tag_query = str_replace(' ', '+', $nice_tag_query); // get_query_var returns ' ' for AND, replace by +
|
||||
$tag_slugs = preg_split('%[,+]%', $nice_tag_query, -1, PREG_SPLIT_NO_EMPTY); // create array of tag slugs
|
||||
$tag_ops = preg_split('%[^,+]*%', $nice_tag_query, -1, PREG_SPLIT_NO_EMPTY); // create array of operators
|
||||
|
||||
$tag_ops_counter = 0;
|
||||
$nice_tag_query = '';
|
||||
|
||||
foreach ($tag_slugs as $tag_slug) {
|
||||
$tag = get_term_by('slug', $tag_slug ,'post_tag');
|
||||
// prettify tag operator, if any
|
||||
if ($tag_ops[$tag_ops_counter] == ',') {
|
||||
$tag_ops[$tag_ops_counter] = ', ';
|
||||
} elseif ($tag_ops[$tag_ops_counter] == '+') {
|
||||
$tag_ops[$tag_ops_counter] = ' + ';
|
||||
}
|
||||
// concatenate display name and prettified operators
|
||||
$nice_tag_query = $nice_tag_query.$tag->name.$tag_ops[$tag_ops_counter];
|
||||
$tag_ops_counter += 1;
|
||||
}
|
||||
return $nice_tag_query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of a term.
|
||||
*
|
||||
* Original author: Justin Tadlock (theme Hybrid).
|
||||
*/
|
||||
function neuf_get_term_name() {
|
||||
$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
|
||||
return $term->name;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="no" lang="no">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="robots" content="index,follow" />
|
||||
<meta name="x-stylesheet-directory" content="<?php bloginfo( 'stylesheet_directory' ); ?>" />
|
||||
<?php neuf_doctitle(); ?>
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
<link rel="alternate" type="application/rss+xml" href="<?php bloginfo('url'); ?>/feed/" title="Aktiv-nyheter" />
|
||||
|
||||
<link href="<?php bloginfo( 'stylesheet_directory' ); ?>/dist/styles/main.css" rel="stylesheet" type="text/css" />
|
||||
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,700,800,600' rel='stylesheet' type='text/css'>
|
||||
<?php wp_head(); ?>
|
||||
<script src="<?php bloginfo( 'stylesheet_directory' ); ?>/dist/scripts/main.js"></script>
|
||||
|
||||
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
</head>
|
||||
|
||||
<body <?php neuf_body_class(); ?>>
|
||||
<script>(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/nb_NO/all.js#xfbml=1&appId=220213643760";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));</script>
|
||||
<div id="fb-root"></div>
|
||||
<header id="site-header">
|
||||
<div id="header-container">
|
||||
<div class="site-title">
|
||||
<a href="<?php bloginfo('url') ?>/" title="<?php bloginfo('name') ?>" rel="home" class="logo"><?php bloginfo('name') ?></a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<?php get_template_part( 'menu' ); ?>
|
||||
|
||||
</div>
|
||||
</header><!-- #site-header -->
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
@@ -0,0 +1,32 @@
|
||||
<?php get_header(); ?>
|
||||
<div id="content">
|
||||
<h1 class="page-title"><?php wp_title("", true); ?></h1>
|
||||
|
||||
LOL2
|
||||
<?php if( have_posts() ) : while( have_posts() ) : the_post(); ?>
|
||||
|
||||
<article <?php neuf_post_class(); ?>>
|
||||
<div class="text-body">
|
||||
<?php if( !is_single() && !is_page() ): ?>
|
||||
<h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if( !is_page() ): ?>
|
||||
<div class="entry-meta byline"><span class="meta-prep meta-prep-author">av </span><span class="author vcard"><?php the_author_link(); ?></span>, <span class="entry-date"><?php the_date('l d. M Y'); ?> kl <?php the_time('H.i'); ?></span></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if( is_single() || is_page() ): ?>
|
||||
<div class="entry-content"><?php the_content(); ?></div> <!-- .entry-content -->
|
||||
<?php else: ?>
|
||||
<div class="entry-content"><?php the_excerpt(); ?></div> <!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</div>
|
||||
</article> <!-- .post -->
|
||||
|
||||
<?php endwhile; endif; ?>
|
||||
|
||||
</div> <!-- #content -->
|
||||
|
||||
<?php get_footer(); ?>
|
||||
@@ -0,0 +1,7 @@
|
||||
<nav id="menu">
|
||||
<a href="#" class="menu-toggle" data-toggle-menu><img src="<?php bloginfo( 'stylesheet_directory' ); ?>/app/images/icon-menu.svg" class="icon-menu" /></a>
|
||||
<?php wp_nav_menu( array(
|
||||
'theme_location' => 'main-menu',
|
||||
'container' => 'false',
|
||||
'menu_class' => 'main-menu') ); ?>
|
||||
</nav> <!-- #menu -->
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/*
|
||||
* Template Name: Front page
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php get_header(); ?>
|
||||
|
||||
<?php get_template_part( 'cover' ); ?>
|
||||
|
||||
<div id="content">
|
||||
<div class="introduction"><?php the_post(); ?></div>
|
||||
<?php the_content(); ?>
|
||||
<?php get_template_part( 'program' , 'upcoming' ); ?>
|
||||
<?php get_template_part( 'digest' ); ?>
|
||||
|
||||
</div> <!-- #content -->
|
||||
|
||||
<?php get_footer(); ?>
|
||||
@@ -1 +1 @@
|
||||
console.log('\'Allo \'Allo!');
|
||||
console.log('\'Allo \'Allo!');
|
||||
@@ -0,0 +1,4 @@
|
||||
<div id="primary" class="sidebar">
|
||||
<?php // TODO widget area ?>
|
||||
</div> <!-- #primary.sidebar -->
|
||||
|
||||
@@ -1,28 +1,95 @@
|
||||
@import 'normalize';
|
||||
|
||||
//$primary-color: #ff0;
|
||||
//$secondary-color: #0f0;
|
||||
|
||||
@import "foundation/components/grid";
|
||||
@import "foundation/components/block-grid";
|
||||
@import "foundation/components/visibility";
|
||||
@import "foundation/components/type";
|
||||
|
||||
body {
|
||||
background: #fafafa;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: #444;
|
||||
font-family: "Open Sans", sans-serif;
|
||||
color: #000;
|
||||
}
|
||||
#site-header {
|
||||
padding-top: rem-calc(16);
|
||||
padding-bottom: rem-calc(16);
|
||||
background-color: #111;
|
||||
|
||||
.hero-unit {
|
||||
margin: 50px auto 0 auto;
|
||||
width: 300px;
|
||||
font-size: 18px;
|
||||
font-weight: 200;
|
||||
line-height: 30px;
|
||||
background-color: #eee;
|
||||
border-radius: 6px;
|
||||
padding: 60px;
|
||||
h1 {
|
||||
font-size: 60px;
|
||||
#header-container {
|
||||
@include grid-row();
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
.site-title {
|
||||
float: left;
|
||||
padding-left: rem-calc(16);
|
||||
}
|
||||
#menu {
|
||||
float: right;
|
||||
padding-right: rem-calc(50);
|
||||
|
||||
.menu-toggle {
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: rem-calc(16);
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
line-height: 1;
|
||||
letter-spacing: -1px;
|
||||
li {
|
||||
display: block;
|
||||
float: left;
|
||||
padding-right: rem-calc(20);
|
||||
|
||||
&:last-child {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.browsehappy {
|
||||
margin: 0.2em 0;
|
||||
background: #ccc;
|
||||
color: #000;
|
||||
padding: 0.2em 0;
|
||||
#content {
|
||||
@include grid-row();
|
||||
margin-top: rem-calc(16);
|
||||
.introduction {
|
||||
padding-left: rem-calc(16);
|
||||
}
|
||||
}
|
||||
.love {
|
||||
color: #faafba;
|
||||
}
|
||||
.credits-wrap {
|
||||
@include grid-row();
|
||||
|
||||
.credits {
|
||||
margin-top: 25px;
|
||||
margin-bottom: 25px;
|
||||
@include grid-column(12);
|
||||
text-align: center;
|
||||
color: #666;
|
||||
font-size: rem-calc(12);
|
||||
}
|
||||
}
|
||||
/* Single */
|
||||
#content {
|
||||
.page-title,
|
||||
.page,
|
||||
.post {
|
||||
padding-left: rem-calc(16);
|
||||
}
|
||||
}
|
||||
.entry-meta {
|
||||
margin-bottom: rem-calc(10);
|
||||
}
|
||||
|
||||
/* Overrides */
|
||||
.vcard {
|
||||
margin: 0;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
@@ -3,7 +3,12 @@
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"modernizr": "~2.6.2",
|
||||
"jquery": "~1.11.0"
|
||||
"jquery": "~1.11.0",
|
||||
"foundation": "~5.3.0"
|
||||
},
|
||||
"devDependencies": {}
|
||||
"devDependencies": {},
|
||||
"resolutions": {
|
||||
"modernizr": ">= 2.7.2",
|
||||
"jquery": ">= 2.1.0"
|
||||
}
|
||||
}
|
||||
@@ -3,17 +3,37 @@
|
||||
|
||||
var gulp = require('gulp');
|
||||
|
||||
|
||||
// load plugins
|
||||
var $ = require('gulp-load-plugins')();
|
||||
var gutil = require('gulp-util');
|
||||
|
||||
var onError = function (err) {
|
||||
gutil.beep();
|
||||
gutil.log( gutil.colors.red(err));
|
||||
};
|
||||
|
||||
gulp.task('styles', function () {
|
||||
return gulp.src('app/styles/main.scss')
|
||||
.pipe($.rubySass({
|
||||
style: 'expanded',
|
||||
precision: 10
|
||||
//.pipe($.plumber(onError))
|
||||
.pipe($.sass({
|
||||
includePaths: ['app/bower_components/foundation/scss'],
|
||||
errLogToConsole: true
|
||||
}))
|
||||
.pipe($.autoprefixer('last 1 version'))
|
||||
.pipe(gulp.dest('.tmp/styles'))
|
||||
.pipe($.plumber.stop())
|
||||
.pipe(gulp.dest('dist/styles'))
|
||||
.pipe($.size());
|
||||
});
|
||||
|
||||
gulp.task('diststyles', function () {
|
||||
return gulp.src('app/styles/main.scss')
|
||||
.pipe($.sass({
|
||||
includePaths: ['bower_components/foundation/scss']
|
||||
}))
|
||||
.pipe($.autoprefixer('last 1 version'))
|
||||
.pipe($.csso())
|
||||
.pipe(gulp.dest('dist/styles'))
|
||||
.pipe($.size());
|
||||
});
|
||||
|
||||
@@ -24,21 +44,12 @@ gulp.task('scripts', function () {
|
||||
.pipe($.size());
|
||||
});
|
||||
|
||||
gulp.task('html', ['styles', 'scripts'], function () {
|
||||
var jsFilter = $.filter('**/*.js');
|
||||
var cssFilter = $.filter('**/*.css');
|
||||
|
||||
return gulp.src('app/*.php')
|
||||
.pipe($.useref.assets({searchPath: '{.tmp,app}'}))
|
||||
.pipe(jsFilter)
|
||||
gulp.task('distscripts', function () {
|
||||
return gulp.src('app/scripts/**/*.js')
|
||||
.pipe($.jshint())
|
||||
.pipe($.jshint.reporter(require('jshint-stylish')))
|
||||
.pipe($.uglify())
|
||||
.pipe(jsFilter.restore())
|
||||
.pipe(cssFilter)
|
||||
.pipe($.csso())
|
||||
.pipe(cssFilter.restore())
|
||||
.pipe($.useref.restore())
|
||||
.pipe($.useref())
|
||||
.pipe(gulp.dest('dist'))
|
||||
.pipe(gulp.dest('dist/scripts'))
|
||||
.pipe($.size());
|
||||
});
|
||||
|
||||
@@ -70,7 +81,7 @@ gulp.task('clean', function () {
|
||||
return gulp.src(['.tmp', 'dist'], { read: false }).pipe($.clean());
|
||||
});
|
||||
|
||||
gulp.task('build', ['html', 'images', 'fonts', 'extras']);
|
||||
gulp.task('build', ['distscripts', 'diststyles', 'images', 'fonts', 'extras']);
|
||||
|
||||
gulp.task('default', ['clean'], function () {
|
||||
gulp.start('build');
|
||||
@@ -90,7 +101,7 @@ gulp.task('wiredep', function () {
|
||||
}))
|
||||
.pipe(gulp.dest('app/styles'));
|
||||
|
||||
gulp.src('app/*.php')
|
||||
gulp.src('*.php')
|
||||
.pipe(wiredep({
|
||||
directory: 'app/bower_components'
|
||||
}))
|
||||
@@ -103,10 +114,10 @@ gulp.task('watch', ['serve'], function () {
|
||||
// watch for changes
|
||||
|
||||
gulp.watch([
|
||||
'app/*.php',
|
||||
'.tmp/styles/**/*.css',
|
||||
'app/scripts/**/*.js',
|
||||
'app/images/**/*'
|
||||
'*.php',
|
||||
'dist/styles/**/*.css',
|
||||
'dist/scripts/**/*.js',
|
||||
'dist/images/**/*'
|
||||
]).on('change', function (file) {
|
||||
server.changed(file.path);
|
||||
});
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
<link rel="alternate" type="application/rss+xml" href="<?php bloginfo('url'); ?>/feed/" title="Aktiv-nyheter" />
|
||||
|
||||
<link href="<?php bloginfo( 'stylesheet_directory' ); ?>/app/styles/main.css" rel="stylesheet" type="text/css" />
|
||||
<link href="<?php bloginfo( 'stylesheet_directory' ); ?>/dist/styles/main.css" rel="stylesheet" type="text/css" />
|
||||
<link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,700,800,600' rel='stylesheet' type='text/css'>
|
||||
<?php wp_head(); ?>
|
||||
<script src="<?php bloginfo( 'stylesheet_directory' ); ?>/app/scripts/main.js"></script>
|
||||
<script src="<?php bloginfo( 'stylesheet_directory' ); ?>/dist/scripts/main.js"></script>
|
||||
|
||||
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
</head>
|
||||
|
||||
@@ -1,24 +1,33 @@
|
||||
<?php get_header(); ?>
|
||||
|
||||
<div id="content">
|
||||
<h1 class="page-title"><?php wp_title("", true); ?></h1>
|
||||
<h1 class="page-title"><?php wp_title("", true); ?></h1>
|
||||
|
||||
<?php if( have_posts() ) : while( have_posts() ) : the_post(); ?>
|
||||
<?php if( have_posts() ) : while( have_posts() ) : the_post(); ?>
|
||||
|
||||
<article <?php neuf_post_class(); ?>>
|
||||
<div class="text-body">
|
||||
<h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
|
||||
<div class="text-body">
|
||||
<?php if( !is_single() && !is_page() ): ?>
|
||||
<h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="entry-meta byline"><span class="meta-prep meta-prep-author">av </span><span class="author vcard"><?php the_author_link(); ?></span>, <span class="entry-date"><?php the_date('l d. M Y'); ?> kl <?php the_time('H.i'); ?></span></div>
|
||||
<?php if( !is_page() ): ?>
|
||||
<div class="entry-meta byline"><span class="meta-prep meta-prep-author">av </span><span class="author vcard"><?php the_author_link(); ?></span>, <span class="entry-date"><?php the_date('l d. M Y'); ?> kl <?php the_time('H.i'); ?></span></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="entry-content"><?php the_excerpt(); ?></div> <!-- .entry-content -->
|
||||
<?php if( is_single() || is_page() ): ?>
|
||||
<div class="entry-content"><?php the_content(); ?></div> <!-- .entry-content -->
|
||||
<?php else: ?>
|
||||
<div class="entry-content"><?php the_excerpt(); ?></div> <!-- .entry-content -->
|
||||
<?php endif; ?>
|
||||
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</div>
|
||||
<?php the_post_thumbnail(); ?>
|
||||
</div>
|
||||
</article> <!-- .post -->
|
||||
|
||||
<?php endwhile; endif; ?>
|
||||
<?php endwhile; endif; ?>
|
||||
|
||||
</div> <!-- #content -->
|
||||
|
||||
<?php get_template_part( 'sidebar' ); ?>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
@@ -23,7 +23,10 @@
|
||||
"gulp-useref": "^0.4.2",
|
||||
"jshint-stylish": "^0.2.0",
|
||||
"opn": "^0.1.1",
|
||||
"wiredep": "^1.4.3"
|
||||
"wiredep": "^1.4.3",
|
||||
"gulp-plumber": "~0.6.3",
|
||||
"gulp-sass": "~0.7.2",
|
||||
"gulp-util": "~2.2.19"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
<?php get_template_part( 'cover' ); ?>
|
||||
|
||||
<div id="content">
|
||||
<?php the_content(); ?>
|
||||
<div class="introduction">
|
||||
<?php the_post(); the_content(); ?>
|
||||
</div>
|
||||
|
||||
<?php get_template_part( 'program' , 'upcoming' ); ?>
|
||||
<?php get_template_part( 'digest' ); ?>
|
||||
|
||||
|
||||
Reference in new issue
Block a user