Skip to content

Commit

Permalink
improvement on templates and styles
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelpeixe committed Oct 1, 2014
1 parent 7cd2208 commit 65da7d8
Show file tree
Hide file tree
Showing 13 changed files with 170 additions and 87 deletions.
31 changes: 14 additions & 17 deletions card-glossary.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<div class="row">
<div class="twelve columns">
<article id="<?php echo sanitize_title(get_the_title()); ?>" <?php post_class(); ?>>
<div class="clearfix">
<div class="three columns alpha">
<header class="post-header">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</header>
</div>
<div class="nine columns omega">
<section class="post-content">
<?php the_field('meaning'); ?>
</section>
</div>
</div>
</article>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="container">
<div class="three columns">&nbsp;</div>
<div class="four columns">
<header class="post-header">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</header>
</div>
<div class="five columns">
<section class="post-excerpt">
<?php the_field('meaning'); ?>
</section>
</div>
</div>
</div>
</article>
21 changes: 16 additions & 5 deletions card-pick.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
<div class="three columns">
<div class="row">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="container">
<div class="three columns">
<?php if(has_post_thumbnail()) : ?>
<div class="thumbnail">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(); ?></a>
</div>
<?php else : ?>
&nbsp;
<?php endif; ?>
</div>
<div class="four columns">
<header class="post-header">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</header>
</div>
<div class="five columns">
<section class="post-excerpt">
<?php the_excerpt(); ?>
</section>
</article>
</div>
</div>
</div>
</article>
26 changes: 16 additions & 10 deletions card-tool.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
<div class="three columns">
<div class="row">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="container">
<div class="three columns">
<?php if(has_post_thumbnail()) : ?>
<div class="thumbnail">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(); ?></a>
</div>
<?php else : ?>
&nbsp;
<?php endif; ?>
</div>
<div class="four columns">
<header class="post-header">
<?php if(has_post_thumbnail()) : ?>
<div class="tool-thumbnail">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail('tool-thumbnail', array('class' => 'scale-with-grid')); ?></a>
</div>
<?php endif; ?>
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</header>
</div>
<div class="five columns">
<section class="post-excerpt">
<?php the_excerpt(); ?>
</section>
</article>
</div>
</div>
</div>
</article>
23 changes: 23 additions & 0 deletions card-track.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="container">
<div class="three columns">
<?php if(has_post_thumbnail()) : ?>
<div class="thumbnail">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_post_thumbnail(); ?></a>
</div>
<?php else : ?>
&nbsp;
<?php endif; ?>
</div>
<div class="four columns">
<header class="post-header">
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</header>
</div>
<div class="five columns">
<section class="post-excerpt">
<?php the_excerpt(); ?>
</section>
</div>
</div>
</article>
2 changes: 1 addition & 1 deletion css/main.css

Large diffs are not rendered by default.

74 changes: 46 additions & 28 deletions css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@

@link: #5F83B3;

@tracks: #3C4E96;
@tracks: #f0f0f0;

@boxbg: #eef0e3;

Expand Down Expand Up @@ -436,7 +436,8 @@ header#masthead {
.sub-header {
padding-bottom: 40px;
h3,
h2 {
h2,
h1 {
float: left;
font-size: 20px;
line-height: 40px;
Expand All @@ -445,14 +446,27 @@ header#masthead {
font-weight: 600;
color: #666;
}
input[type="text"] {
display: inline-block;
margin: 0 0 0 10px;
padding: 0;
border: 0;
font-size: 16px;
font-family: "Open Sans";
background: transparent;
&:focus {
border-bottom: 1px solid #eee;
}
}
}

.eyecandy {
background: #111;
color: #f0f0f0;
padding: 40px 0;
margin: -40px 0 40px;
h2 {
h2,
h1 {
font-weight: 200;
font-size: 52px;
line-height: 80px;
Expand Down Expand Up @@ -517,12 +531,11 @@ header#masthead {
#tracks {
background: @tracks;
padding: 60px 0;
color: rgba(255,255,255,0.7);
color: rgba(0,0,0,0.7);
border-bottom: 10px solid darken(@tracks, 10%);
::-webkit-scrollbar {
width: 10px;
}

::-webkit-scrollbar-thumb {
background: rgba(0,0,0,0.1);
border-left: 5px solid @tracks;
Expand All @@ -531,15 +544,24 @@ header#masthead {
color: inherit;
}
a {
color: #fff;
color: #000;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
.pre-title {
margin: 0;
color: #999;
text-transform: uppercase;
font-size: 14px;
line-height: 14px;
margin-bottom: -7px;
margin-top: -7px;
}
h2.htitle,
h3.htitle {
color: #fff;
color: #111;
font-weight: 200;
border-bottom: 1px dashed darken(@tracks, 10%);
line-height: 80px;
Expand All @@ -550,7 +572,8 @@ header#masthead {
height: 101px;
}
h2.htitle {
font-size: 40px;
font-size: 60px;
color: #111;
}
h3.htitle {
font-size: 16px;
Expand Down Expand Up @@ -584,7 +607,7 @@ header#masthead {
font-size: 14px;
text-transform: uppercase;
font-weight: 600;
color: #fff;
color: #000;
margin: 0 0 5px;
}
p {
Expand Down Expand Up @@ -652,14 +675,17 @@ header#masthead {
padding-top: 60px;
background: @tracks;
h1 {
color: #fff;
color: #000;
font-weight: 200;
}
p {
color: #fff;
color: #333;
font-size: 18px;
line-height: 28px;
}
a {
color: #000;
}
}
#track-nav {
height: 60px;
Expand Down Expand Up @@ -695,7 +721,7 @@ header#masthead {
margin-left: 5px;
line-height: 14px;
background: @tracks;
color: #fff;
color: #999;
font-size: 10px;
}
}
Expand Down Expand Up @@ -839,17 +865,6 @@ nav#category-nav {
background: #fff;
z-index: 2;
}
&.glossary {
background: transparent;
border: 0;
padding: 0;
min-height: 0;
.post-content {
border-left: 2px dotted #e0e0e0;
padding: 0 0 0 20px;
width: auto;
}
}
.post-header {
margin: -15px 0 10px;
padding: 0 0 40px;
Expand Down Expand Up @@ -903,11 +918,10 @@ nav#category-nav {
line-height: 24px;
}
}
.tool-thumbnail {
margin: -20px -20px 20px;
img {
display: block;
}
.wp-post-image {
display: block;
margin: -20px auto 40px;
height: auto;
}
&:hover {
.tutorial-specs {
Expand Down Expand Up @@ -1205,6 +1219,10 @@ nav#category-nav {
}
}

.page #content .post-content {
font-size: 20px;
}

.single-tool {
#content {
.post-content {
Expand Down
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function toolkit_home_slider() {

function toolkit_category_header() {
?>
<div class="cat-header eyecandy">
<div class="cat-header sub-header">
<div class="container">
<div class="twelve columns">
<h2><?php single_cat_title(); ?></h2>
Expand All @@ -134,7 +134,7 @@ function toolkit_category_header() {

function toolkit_archive_header() {
?>
<div class="archive-header eyecandy">
<div class="archive-header sub-header">
<div class="container">
<div class="twelve columns">
<?php if(is_post_type_archive()) { ?>
Expand Down
2 changes: 1 addition & 1 deletion inc/tracks.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function register_post_type() {
'labels' => $labels,
'hierarchical' => false,
'description' => __('Toolkit tracks', 'toolkit'),
'supports' => array('title', 'editor', 'author', 'excerpt', 'thumbnail'),
'supports' => array('title', 'editor', 'author', 'excerpt', 'thumbnail', 'comments'),
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
Expand Down
16 changes: 16 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@
</div>
<?php get_template_part('loop'); ?>
</section>
<?php elseif(is_search()) : ?>
<section id="latest-tutorials">
<div class="container">
<div class="twelve columns">
<header class="sub-header">
<div class="clearfix">
<form>
<h3><?php _e('Search results for', 'toolkit'); ?>
<input type="text" name="s" value="<?php echo $_GET['s']; ?>" /></h3>
</form>
</div>
</header>
</div>
</div>
<?php get_template_part('loop'); ?>
</section>
<?php else : ?>
<?php get_template_part('loop'); ?>
<?php endif; ?>
Expand Down
28 changes: 15 additions & 13 deletions page.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@

<?php if(have_posts()) : the_post(); ?>
<section id="content">
<div class="container">
<div class="row">
<div class="ten columns offset-by-one">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="post-header row">
<h1><?php the_title(); ?></h1>
</header>
<section class="post-content row">
<?php the_content(); ?>
</section>
</article>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="sub-header row">
<div class="container">
<div class="twelve columns">
<h1><?php the_title(); ?></h1>
</div>
</div>
</div>
</div>
</header>
<section class="post-content row">
<div class="container">
<div class="twelve columns">
<?php the_content(); ?>
</div>
</div>
</section>
</article>
</section>
<?php endif; ?>

Expand Down
Loading

0 comments on commit 65da7d8

Please sign in to comment.