Skip to content

Commit

Permalink
Merge pull request #83 from AmsterdamPHP/pascaldevink-feature/videos
Browse files Browse the repository at this point in the history
Extra work on videos
  • Loading branch information
Pascal de Vink committed May 6, 2015
2 parents 7773665 + 8aad201 commit 1b0df0f
Show file tree
Hide file tree
Showing 7 changed files with 20,676 additions and 82 deletions.
40 changes: 37 additions & 3 deletions app/Resources/less/amsterdamphp.less
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,36 @@ footer {
background-image: url('../images/speaker-call-bg.png');
}

.videos {
margin-bottom: 15px;
.text-center;

.more {
.more-button;
}
}

.video {
height: 110px;
position: relative;
padding-left: 140px;
.text-left;

.thumbnail {
position: absolute;
left: 0;
}

ul {
.title { font-weight: bolder; font-size: 125% }
.date {
font-size: 90%;

a { color: #393939; }
}
}
}

.blog-post {

margin-bottom: 20px;
Expand Down Expand Up @@ -392,12 +422,16 @@ footer {
.blog-posts {
.text-center;
.more {
border: 1px solid @amsRed;
font-size: 14px;
padding: 5px;
.more-button;
}
}

.more-button {
border: 1px solid @amsRed;
font-size: 14px;
padding: 5px;
}

.sponsor-box {

background-color: #ffffff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ public function indexAction()
$nextEvents = $eventService->getUpcomingEvents(true)->toArray();
$pastEvents = $eventService->getPastEvents(true)->toArray();

$blogService = $this->get('amsterdamphp_site.integration.blog');
$posts = $blogService->getLatestBlogPosts();

$youtubeService = $this->get('amsterdamphp_site.integration.youtube');
$videos = $youtubeService->getLatestVideos();

return [
'header_photo' => $headerPhoto,
'next_event' => array_shift($nextEvents),
'past_events' => array_splice($pastEvents, 0, 2),
'blog_posts' => $posts,
'sponsors' => $sponsors,
'videos' => $videos,
];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<div class="videos">
{% for video in videos|slice(0, 4) %}
<div class="video">
<span>
<a href="https://www.youtube.com/watch?v={{ video.snippet.resourceId.videoId }}"
target="_blank"><img
class="thumbnail"
src="{{ video.snippet.thumbnails.default.url }}" /></a>
</span>

{% set title = video.snippet.title|split(':') %}
<ul class="list-unstyled">
<li class="date">
<a href="https://www.youtube.com/watch?v={{ video.snippet.resourceId.videoId }}"
target="_blank">{{ title[0] }}</a>
</li>
<li class="title">
<a href="https://www.youtube.com/watch?v={{ video.snippet.resourceId.videoId }}"
target="_blank">{{ title[1] }}</a>
</li>
</ul>
</div>
{% endfor %}
<a class="more"
href="https://www.youtube.com/user/AmsterdamPHP/videos"
target="_blank">OLDER VIDEOS</a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<p>Share your knowledge with the community!</p>
</a>

{% include 'AmsterdamPHPSiteBundle:Default:_blog_posts.html.twig' %}
{% include 'AmsterdamPHPSiteBundle:Default:_videos.html.twig' %}
</div>
<div class="col-md-8 col-lg-8">
<div class="row">
Expand Down
8,222 changes: 8,197 additions & 25 deletions web/css/amsterdamphp.css

Large diffs are not rendered by default.

11,802 changes: 11,776 additions & 26 deletions web/js/amsterdamphp.js

Large diffs are not rendered by default.

661 changes: 638 additions & 23 deletions web/js/ie8.js

Large diffs are not rendered by default.

0 comments on commit 1b0df0f

Please sign in to comment.