Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#72: Added list of AmsterdamPHP videos #82

Merged
merged 1 commit into from
May 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions app/Resources/less/amsterdamphp.less
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,27 @@ 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;
}
}

.blog-post {

margin-bottom: 20px;
Expand Down Expand Up @@ -392,12 +413,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,19 @@
<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>
<span>
<a href="https://www.youtube.com/watch?v={{ video.snippet.resourceId.videoId }}"
target="_blank">{{ video.snippet.title }}</a>
</span>
</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
2 changes: 1 addition & 1 deletion web/css/amsterdamphp.css

Large diffs are not rendered by default.