Skip to content

Instantly share code, notes, and snippets.

@bilal68
Forked from danielkwood/index.ejs
Created May 27, 2025 03:36
Show Gist options
  • Select an option

  • Save bilal68/44cc1457e3513b60e2bc6c60d670ee69 to your computer and use it in GitHub Desktop.

Select an option

Save bilal68/44cc1457e3513b60e2bc6c60d670ee69 to your computer and use it in GitHub Desktop.
Home page for movies app (HTML template code)
<html>
<head>
<title>My Movies</title>
<link rel="stylesheet" type="text/css" href="/css/style.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300" rel="stylesheet" type="text/css">
</head>
<body>
<div class="container">
<h1>My Movies</h1>
<p><a class="card-button" href="/add">+ Add new movie</a></p>
<div class="row">
<% moviesList.forEach(function(movie) { %>
<div class="card">
<a href="/movie/<%= movie.movie_id %>"><img src="/images/<%= movie.thumbnail_image %>" style="height: 180px"></a>
<div>
<p class="card-title"><%= movie.title %></p>
<p class="card-text"><%= movie.genre %> (<%= movie.release_year %>)</p>
<% for(var i=0; i < movie.rating; i++){ %>
<img src="/images/star.png" style="height: 20px;">
<% } %>
<p><a class="card-button" href="/movie/<%= movie.movie_id %>">View Movie</a></p>
</div>
<% }); %>
</div>
</div>
<p><br></p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment