Archived
Artists
This commit is contained in:
1 parent
dbc009a4e9
commit
fd751e4608
7 files changed
+121
-66
No files matched your search
@@ -614,3 +614,6 @@ article .article-footer { text-align: right; margin-bottom: 2em; }
|
||||
.wavetop { position: relative; bottom: 12px; height: 12px; background-image: url("../images/wave_top.png"); background-size: 48px 12px; background-repeat: repeat-x; width: 100%; }
|
||||
|
||||
.row { /* FIXME: responsive */ width: 1000px; max-width: 1000px; }
|
||||
|
||||
/* Template styles */
|
||||
.template-artists .artists { font-size: 1.5em; text-transform: uppercase; }
|
||||
@@ -39,7 +39,9 @@
|
||||
<div class="row tweets-and-blog">
|
||||
<div class="small-6 columns">
|
||||
<a href="http://twitter.com/studiofestival" class="tweets-image">Tweets tagget med #studiofestivalen</a>
|
||||
<ul class="twitter-feed"></ul>
|
||||
<a class="twitter-timeline" href="https://twitter.com/studiofestival" data-widget-id="332811736338022400" data-tweet-limit="1" data-border-color="#ffffff" data-chrome="nofooter transparent noheader noscrollbar noborders">Tweets by @studiofestival</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
||||
|
||||
</div>
|
||||
<div class="bluebordered text-center small-6 columns">
|
||||
<a href="/blogg" class="blog-image">Blogg</a>
|
||||
|
||||
@@ -53,4 +53,50 @@ function new_excerpt_more($more) {
|
||||
}
|
||||
add_filter('excerpt_more', 'new_excerpt_more');
|
||||
|
||||
/* post type */
|
||||
// Register Custom Post Type
|
||||
function studio_artists_post_type() {
|
||||
$labels = array(
|
||||
'name' => _x( 'Artists', 'Post Type General Name', 'studio' ),
|
||||
'singular_name' => _x( 'Artist', 'Post Type Singular Name', 'studio' ),
|
||||
'menu_name' => __( 'Artist', 'studio' ),
|
||||
'parent_item_colon' => __( 'Parent Artist:', 'studio' ),
|
||||
'all_items' => __( 'All Artists', 'studio' ),
|
||||
'view_item' => __( 'View Artist', 'studio' ),
|
||||
'add_new_item' => __( 'Add New Artist', 'studio' ),
|
||||
'add_new' => __( 'New Artist', 'studio' ),
|
||||
'edit_item' => __( 'Edit Artist', 'studio' ),
|
||||
'update_item' => __( 'Update Artist', 'studio' ),
|
||||
'search_items' => __( 'Search Artists', 'studio' ),
|
||||
'not_found' => __( 'No artists found', 'studio' ),
|
||||
'not_found_in_trash' => __( 'No artists found in Trash', 'studio' ),
|
||||
);
|
||||
|
||||
$args = array(
|
||||
'label' => __( 'artist', 'studio' ),
|
||||
'description' => __( 'Artist information pagews', 'studio' ),
|
||||
'labels' => $labels,
|
||||
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ),
|
||||
'taxonomies' => array( 'post_tag' ),
|
||||
'hierarchical' => false,
|
||||
'public' => true,
|
||||
'show_ui' => true,
|
||||
'show_in_menu' => true,
|
||||
'show_in_nav_menus' => true,
|
||||
'show_in_admin_bar' => true,
|
||||
'menu_position' => 5,
|
||||
//'menu_icon' => '',
|
||||
'can_export' => true,
|
||||
'has_archive' => true,
|
||||
'exclude_from_search' => false,
|
||||
'publicly_queryable' => true,
|
||||
'capability_type' => 'page',
|
||||
);
|
||||
|
||||
register_post_type( 'artist', $args );
|
||||
}
|
||||
|
||||
// Hook into the 'init' action
|
||||
add_action( 'init', 'studio_artists_post_type', 0 );
|
||||
|
||||
?>
|
||||
@@ -4,25 +4,6 @@ function format_image(img) {
|
||||
jQuery(document).foundation();
|
||||
|
||||
jQuery(function($) {
|
||||
/* Twitter feed */
|
||||
//var feed = "http://search.twitter.com/search.json?q=studiofestivalen&result_type=recent&callback=?";
|
||||
var feed = "http://search.twitter.com/search.json?q=studio2012&result_type=recent&callback=?";
|
||||
$.getJSON(feed, function(results) {
|
||||
$.each(results, function(i) {
|
||||
console.log(results[i]);
|
||||
var id = results[i].id_str;
|
||||
|
||||
/* relative tweet time */
|
||||
var time = time_str.slice(4); // without weekday
|
||||
moment.lang('en'); // parse english month name
|
||||
var when = moment(time, "DD MMM YYYY HH:mm:ss Z");
|
||||
moment.lang('nb'); // format in norwegian locale
|
||||
var rel_when = when.fromNow();
|
||||
|
||||
/* Format tweet */
|
||||
$('.twitter-feed').append('<li><a href="" class="tweet">' + results[i].text + '</a></li>');
|
||||
});
|
||||
});
|
||||
|
||||
/* Instagram feed
|
||||
* Ref: http://instafeedjs.com/ */
|
||||
|
||||
@@ -439,3 +439,13 @@ article {
|
||||
width: 1000px;
|
||||
max-width: 1000px;
|
||||
}
|
||||
/* Template styles */
|
||||
.template-artists {
|
||||
|
||||
.artists {
|
||||
font-size: 1.5em;
|
||||
text-transform: uppercase;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,55 +1,30 @@
|
||||
<div id="sidebar1" class="sidebar small-4 columns" role="complementary">
|
||||
<?php if ( is_active_sidebar( 'sidebar-one' ) ) : ?>
|
||||
<?php dynamic_sidebar( 'sidebar-one' ); ?>
|
||||
<?php else : ?>
|
||||
<!-- This content shows up if there are no widgets defined in the backend. -->
|
||||
<!-- FIXME: template-tag -->
|
||||
<div class="lineup">
|
||||
<a href="/artister/" class="artists-image">Artister</a>
|
||||
<ul class="artists headliners">
|
||||
<li><a href="">obama</a></li>
|
||||
<li><a href="">THE ETTES</a></li>
|
||||
<li><a href="">THE KNIFE</a></li>
|
||||
<li><a href="">BOB GELDOF</a></li>
|
||||
<li><a href="">HONNINGBARNA</a></li>
|
||||
<li><a href="">OSCAR WILDE</a></li>
|
||||
<li><a href="">gandhi</a></li>
|
||||
<li><a href="">MEGADEATH</a></li>
|
||||
<li><a href="">DARKTHRONE</a></li>
|
||||
<li><a href="">hussein bolt</a></li>
|
||||
<li><a href="">kent</a></li>
|
||||
<li><a href="">frodo</a></li>
|
||||
<li><a href="">gandalf</a></li>
|
||||
<li><a href="">withnail</a></li>
|
||||
<li><a href="">julenissen</a></li>
|
||||
<li><a href="">lana del rey</a></li>
|
||||
<li><a href="">fyrstekake</a></li>
|
||||
<?php
|
||||
/* Print our custom post type */
|
||||
$query = new WP_Query( array ( 'post_type' => 'artist', 'tag' => 'headliner' ) );
|
||||
while ( $query->have_posts() ):
|
||||
$query->the_post();
|
||||
echo '<li><a href="'.get_permalink().'">' . get_the_title() . '</a></li>';
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
</ul>
|
||||
<ul class="artists">
|
||||
<li><a href="">BØLLEFRØ</a></li>
|
||||
<li><a href="">KANELBOLLE</a></li>
|
||||
<li><a href="">KJØLESKAP</a></li>
|
||||
<li><a href="">KAFFE</a></li>
|
||||
<li><a href="">ALTINN ER DUST</a></li>
|
||||
<li><a href="">SKATTEETATEN</a></li>
|
||||
<li><a href="">KJØTTBOLLER</a></li>
|
||||
<li><a href="">BØLLEBIRGER</a></li>
|
||||
<li><a href="">DE LILLOS</a></li>
|
||||
<li><a href="">HAMBURGER</a></li>
|
||||
<li><a href="">TACO</a></li>
|
||||
<li><a href="">EPLEKAKE</a></li>
|
||||
<li><a href="">BØLLEFRØ</a></li>
|
||||
<li><a href="">KANELBOLLE</a></li>
|
||||
<li><a href="">KJØLESKAP</a></li>
|
||||
<li><a href="">KAFFE</a></li>
|
||||
<li><a href="">ALTINN ER DUST</a></li>
|
||||
<li><a href="">SKATTEETATEN</a></li>
|
||||
<li><a href="">KJØTTBOLLER</a></li>
|
||||
<li><a href="">BØLLEBIRGER</a></li>
|
||||
<li><a href="">DE LILLOS</a></li>
|
||||
<li><a href="">TACO</a></li>
|
||||
<li><a href="">EPLEKAKE</a></li>
|
||||
<?php
|
||||
/* exclude all the headliners */
|
||||
$headline_tag_id = get_term_by( 'slug', 'headliner', 'post_tag')->term_id;
|
||||
$query = new WP_Query(array(
|
||||
'post_type' => 'artist',
|
||||
'tag__not_in' => array($headline_tag_id)));
|
||||
while ( $query->have_posts() ):
|
||||
$query->the_post();
|
||||
echo '<li><a href="'.get_permalink().'">' . get_the_title() . '</a></li>';
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/*
|
||||
Template Name: Artists page
|
||||
*/
|
||||
?>
|
||||
<?php get_header(); ?>
|
||||
<div id="content" class="template-artists">
|
||||
<div id="inner-content" class="row">
|
||||
<div id="main" role="main" class="small-12 columns">
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" role="article">
|
||||
<header class="article-header row">
|
||||
<div class="small-12 columns">
|
||||
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
|
||||
</div>
|
||||
</header> <!-- end article header -->
|
||||
<section class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
<ul class="artists headliners small-block-grid-4">
|
||||
<?php
|
||||
/* Print our custom post type */
|
||||
$query = new WP_Query( array ( 'post_type' => 'artist', 'orderby' => 'title', 'order' => 'asc') );
|
||||
while ( $query->have_posts() ):
|
||||
$query->the_post();
|
||||
echo '<li><a href="'.get_permalink().'">'.get_the_post_thumbnail('four-columns') . get_the_title() . '</a></li>';
|
||||
endwhile;
|
||||
wp_reset_postdata();?>
|
||||
</ul>
|
||||
</section> <!-- end article section -->
|
||||
<footer class="article-footer">
|
||||
<a href="" class="btn-tiny primary"><i class="icon-facebook"></i></a>
|
||||
<a href="" class="btn-tiny secondary"><i class="icon-twitter"></i></a>
|
||||
</footer> <!-- end article footer -->
|
||||
</article> <!-- end article -->
|
||||
</div> <!-- end #main -->
|
||||
</div> <!-- end #inner-content -->
|
||||
</div> <!-- end #content -->
|
||||
<?php get_footer();?>
|
||||
Reference in new issue
Block a user