Update news section with YAML data file (#14612)

* Update news section with April 4 webinar video

* Use YAML data file for news; add webinar registration CTA
This commit is contained in:
Ryon 2017-05-18 11:49:52 -04:00 committed by Paul Stack
parent cc505b2d61
commit adfa7aedfb
4 changed files with 35 additions and 23 deletions

19
website/data/news.yml Normal file
View File

@ -0,0 +1,19 @@
default_link_text: 'Read more'
featured_post:
media_html: <a href="http://hashi.co/2qO6A2H" target="_blank"><img src="assets/images/news/webinar-register-585w.png" alt="Webinar Register Now" srcset="assets/images/news/webinar-register-2000w.png 2x"></a>
title: Controlling Your Organization With HashiCorp Terraform and Google Cloud Platform
body: Register for our upcoming webinar with Google Cloud on May 24th. Learn how to build your entire infrastructure across Google Cloud with one command.
link_url: http://hashi.co/2qO6A2H
link_text: Register
additional_posts:
-
title: Terraform 0.9 Released
body: Terraform 0.9 adds major new functionality to Terraform. Read the highlights from the 0.9 release.
link_url: https://www.hashicorp.com/blog/terraform-0-9/
-
title: 'Webinar: Multi-Cloud, One Command with Terraform'
body: Watch our recent webinar with Mitchell Hashimoto to learn how Terraform provisions infrastructure across different clouds using a consistent workflow.
link_url: https://youtu.be/nLg7fpVcIv4
link_text: Watch Now

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -177,33 +177,26 @@ description: |-
<h2>Latest News</h2> <h2>Latest News</h2>
</div> </div>
<div class="col-md-5 col-sm-12"> <div class="col-md-5 col-sm-12">
<% feature = data.news.featured_post %>
<div class="latest-item"> <div class="latest-item">
<iframe width="560" height="270" src="https://www.youtube.com/embed/nLg7fpVcIv4?color=white&modestbranding=1" frameborder="0" allowfullscreen></iframe> <%= feature.media_html %>
<%#= image_tag 'news/webinar-Terraform-4-4-2017.png', alt: 'Webinar April 4, 2017, 10:00 AM PST' %> <h3><%= feature.title %></h3>
<h3>Webinar: Multi-Cloud, One Command with Terraform</h3> <%= simple_format feature.body %>
<p> <% if feature.link_url %>
Watch our recent webinar with Mitchell Hashimoto to learn how Terraform provisions infrastructure across different clouds using a consistent workflow. <a class="button" href="<%= feature.link_url %>" target="_blank"><%= feature.link_text || data.news.default_link_text %></a>
</p> <% end %>
<a class="button" href="https://youtu.be/nLg7fpVcIv4" target="_blank">Watch Now</a>
</div> </div>
</div> </div>
<div class="col-md-offset-1 col-md-6 col-sm-12"> <div class="col-md-offset-1 col-md-6 col-sm-12">
<% data.news.additional_posts.each do |post| %>
<div class="latest-item"> <div class="latest-item">
<h3>Terraform 0.9 Released</h3> <h3><%= post.title %></h3>
<p> <%= simple_format post.body %>
Terraform 0.9 adds major new functionality to Terraform. Read the <% if post.link_url %>
highlights from the 0.9 release <a class="button" href="<%= post.link_url %>" target="_blank"><%= post.link_text || data.news.default_link_text %></a>
</p> <% end %>
<a class="button" href="https://www.hashicorp.com/blog/terraform-0-9/">Read more</a>
</div>
<div class="latest-item">
<h3>Applying Graph Theory to Infrastructure As Code</h3>
<p>
Watch this talk from HashiConf 2016 where we explore the graph
theory at the heart of Terraform's orchestration engine.
</p>
<a class="button" href="https://www.youtube.com/watch?v=4Pd9NrZSbGU">Watch Video</a>
</div> </div>
<% end %>
</div> </div>
</div> </div>
</div> </div>