Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
about-us start
  • Loading branch information
tsm15002 committed Jul 11, 2016
1 parent 5af3b68 commit 536701b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
17 changes: 17 additions & 0 deletions page-aboutUs.php
@@ -0,0 +1,17 @@

<?php

//change post_type and $context[]

$context = Timber::get_context();
$post = new TimberPost();

$query = array(
'post_type' => 'aboutUs',
'orderby' => 'date',
'order' => 'ASC'
);
query_posts($query);
$context['about-us'] = Timber::get_posts();
$context['post'] = $post;
Timber::render( array( 'page-' . $post->post_name . '.twig', 'page.twig' ), $context );
27 changes: 27 additions & 0 deletions templates/page-aboutUs.twig
@@ -0,0 +1,27 @@
{% extends "base.twig" %}

{% block content %}
<main class="u-container">
<section class="aboutUsTiles">
<figure class="aboutUsTile aboutUsTile--large">
<a href="#" class="aboutUsTile__inner">
<img src="dist/img/about-us/student-experience.jpg" alt="Student Experience" />
<div class="aboutUsTile__caption">
<img src="dist/img/about-us/play-button.png" alt="Play Video">
<p class="aboutUsTile__captionText">WATCH OUR STUDENTS SHARE THEIR EXPERIENCE</p>
</div>
</a>
</figure>
{% for tile in aboutUsTiles %}
<figure class="aboutUsTile aboutUsTile--small">
<a href="{{tile.permalink}}" class="aboutUsTile__inner">
<img src="{{tile.thumbnail.src}}" alt="{{tile.slug}}">
<div class="aboutUsTile__caption">
<p class="aboutUsTile__captionText">{{tile.title}}</p>
</div>
</a>
</figure>
{% endfor %}
</section>
</main>
{% endblock %}

0 comments on commit 536701b

Please sign in to comment.