<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<FotbalPortal.Models.Video>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Videopříspěvky
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Videopříspěvky</h2>


<% foreach (var item in Model) { %>
    <div>
        <h3><%: Html.DisplayFor(modelItem => item.name) %></h3>
        <% 
            Uri myUri = new Uri(item.videoLink);
            string videoId = HttpUtility.ParseQueryString(myUri.Query).Get("v");
        %>
        <iframe title="YouTube video player" class="youtube-player" type="text/html" 
        width="640" height="390" src="http://www.youtube.com/embed/<%: Html.Raw(videoId) %>"
        frameborder="0" allowFullScreen></iframe>   
    </div>
<% } %>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptsSection" runat="server">
</asp:Content>
