Skip to content

Commit

Permalink
Adding tours card excerpt
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Moraes committed Sep 18, 2018
1 parent 6c9fd94 commit 179fdc2
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 22 deletions.
2 changes: 1 addition & 1 deletion app/config/wp/custom-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function create_tour_cpt() {
'description' => __( 'Tours', 'base-camp' ),
'labels' => $labels,
'menu_icon' => 'dashicons-location-alt',
'supports' => array('title', 'editor', 'thumbnail', 'revisions', 'trackbacks', 'page-attributes', ),
'supports' => array('title', 'editor', 'thumbnail', 'revisions', 'trackbacks', 'page-attributes'),
'taxonomies' => array(),
'public' => true,
'show_ui' => true,
Expand Down
6 changes: 6 additions & 0 deletions resources/assets/sass/sections/_section-tours.sass
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
-moz-box-shadow: 1px 1px 5px 0px rgba(0,0,0,0.15)
box-shadow: 1px 1px 5px 0px rgba(0,0,0,0.15)

a
&:hover,
&:active,
&:focus
outline: none

&-title
font-family: $font-text
font-size: 22px
Expand Down
14 changes: 7 additions & 7 deletions resources/views/partials/tours-carousel.twig
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
{% set tour_featured_image = TimberImage(tour.thumbnail) %}

<div class="column">
<a href="{{ tour.link }}">
<div class="section-tours__card">
<div class="section-tours__card">
<a href="{{ tour.link }}">
<div class="section-tours__header"
style="background-image: url('{{ tour_featured_image.src|resize(640)}}')">
<div class="section-tours__card-title">{{ tour.title }}</div>
</div>
<div class="section-tours__footer">
<div class="section-tours__card-copy">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</div>
<a href="{{ tour.link }}" class=" section-tours__card-cta">Read More</a>
</div>
</a>
<div class="section-tours__footer">
<div class="section-tours__card-copy">{{ tour.tour_excerpt }}</div>
<a href="{{ tour.link }}" class=" section-tours__card-cta">Read More</a>
</div>
</a>
</div>
</div>

{% endfor %}
Expand Down
8 changes: 3 additions & 5 deletions single.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?php

$context = Timber::get_context();
$post = new TimberPost();
$context['post'] = $post;
$context = Timber::get_context();
$post = new TimberPost();
$context['post'] = $post;
$context['cancel_link'] = get_cancel_comment_reply_link(__('Cancel reply', 'base-camp'));
$context['tour_gallery'] = get_field('tour_gallery');
$cover_image_id = $post->cover_image;
$context['tours']['cover_image'] = new TimberImage($cover_image_id);

if (post_password_required($post->ID)) {
Timber::render('single-password.twig', $context);
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7458,6 +7458,8 @@ nav.navbar .navbar-menu {
-webkit-box-shadow: 1px 1px 5px 0px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 1px 1px 5px 0px rgba(0, 0, 0, 0.15);
box-shadow: 1px 1px 5px 0px rgba(0, 0, 0, 0.15); }
.section-tours__card a:hover, .section-tours__card a:active, .section-tours__card a:focus {
outline: none; }
.section-tours__card-title {
font-family: "Cabin", sans-serif;
font-size: 22px;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 10 additions & 9 deletions static/manifest.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"admin.css": "css/admin.3e9ac7714c1d128be36f.css",
"admin.js": "js/admin.3e9ac7714c1d128be36f.js",
"app.css": "css/app.3e9ac7714c1d128be36f.css",
"app.js": "js/app.3e9ac7714c1d128be36f.js",
"login.css": "css/login.3e9ac7714c1d128be36f.css",
"login.js": "js/login.3e9ac7714c1d128be36f.js",
"vendor.js": "js/vendor.3e9ac7714c1d128be36f.js",
"images/icon-cart-white.png": "images/icon-cart-white.png",
"admin.css": "css/admin.b35303f0c0b727d089ff.css",
"admin.js": "js/admin.b35303f0c0b727d089ff.js",
"app.css": "css/app.b35303f0c0b727d089ff.css",
"app.js": "js/app.b35303f0c0b727d089ff.js",
"login.css": "css/login.b35303f0c0b727d089ff.css",
"login.js": "js/login.b35303f0c0b727d089ff.js",
"vendor.js": "js/vendor.b35303f0c0b727d089ff.js",
"images/logo.png": "images/logo.png",
"images/texture-blue-carnival.jpg": "images/texture-blue-carnival.jpg",
"images/base-camp-logo.png": "images/base-camp-logo.png"
"images/base-camp-logo.png": "images/base-camp-logo.png",
"images/icon-cart-white.png": "images/icon-cart-white.png"
}

0 comments on commit 179fdc2

Please sign in to comment.