Skip to content

Commit

Permalink
feat: added description metadata, image width/height
Browse files Browse the repository at this point in the history
  • Loading branch information
zeim839 committed Jan 13, 2024
1 parent acdcc54 commit 7e39790
Show file tree
Hide file tree
Showing 3 changed files with 301 additions and 271 deletions.
86 changes: 45 additions & 41 deletions views/article.ejs
Original file line number Diff line number Diff line change
@@ -1,44 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>UF Open Source Club | <%= locals.title %></title>
<link rel="icon" type="image/x-icon" href="/assets/favicon.png" />
<link rel="stylesheet" href="/css/common.css" />
<link rel="stylesheet" href="/css/article.css" />
<script src="/js/navbar.js" defer async></script>
</head>
<body>
<%- include('./components/navbar.ejs') %>
<section id="article-section">
<% if (locals.previewImg) { %>
<div id="banner"><img src="<%= previewImg %>" alt="<%= title %>"></div>
<% } %>
<div id="article-content">
<h1 id="article-title"><%= title %></h1>
<div id="date-author">
<h3>Date: <%= date.toLocaleDateString('en-us', { month: "long", day: "numeric", year: "numeric" }) %></h3>
<% if (locals.author) { %>
<h3>Author: <% for(var i=0; i < author.length; i++) { %>
<%= author[i] %>
<% } %>
</h3>
<% } %>
</div>
<% if (locals.subtitle) { %>
<h2 id="article-subheading">
<%- subtitle %>
</h2>
<% } %>
<% if (locals.content) { %>
<p id="article-body">
<%- content %>
</p>
<% } %>
</div>
</section>
<%- include('./components/footer.ejs') %>
</body>
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="keywords"
content="University of Florida, UF, OSC, Open Source,
Computer Science, Data Science, Programming"
>
<title>UF Open Source Club | <%= locals.title %></title>
<link rel="icon" type="image/x-icon" href="/assets/favicon.png" />
<link rel="stylesheet" href="/css/common.css" />
<link rel="stylesheet" href="/css/article.css" />
<script src="/js/navbar.js" defer async></script>
</head>
<body>
<%- include('./components/navbar.ejs') %>
<section id="article-section">
<% if (locals.previewImg) { %>
<div id="banner"><img src="<%= previewImg %>" alt="<%= title %>"></div>
<% } %>
<div id="article-content">
<h1 id="article-title"><%= title %></h1>
<div id="date-author">
<h3>Date: <%= date.toLocaleDateString('en-us', { month: "long", day: "numeric", year: "numeric" }) %></h3>
<% if (locals.author) { %>
<h3>Author: <% for(var i=0; i < author.length; i++) { %>
<%= author[i] %>
<% } %>
</h3>
<% } %>
</div>
<% if (locals.subtitle) { %>
<h2 id="article-subheading">
<%- subtitle %>
</h2>
<% } %>
<% if (locals.content) { %>
<p id="article-body">
<%- content %>
</p>
<% } %>
</div>
</section>
<%- include('./components/footer.ejs') %>
</body>
</html>
2 changes: 1 addition & 1 deletion views/components/blog-grid.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"blog__posts-large" } %> <% if (!locals.maxItems || index < locals.maxItems) {
%>
<div onClick="goNavigateToPost('<%=elem._id.toString()%>')" class="<%= styleName %>" id="second-post">
<img src="<%= elem.previewImg %>" />
<img src="<%= elem.previewImg %>" width="448" height="300" alt="blog preview image"/>
<h2>
<% if ( styleName == "blog__posts-small" && elem.title.toString().length > 20) { %>
<%= elem.title.toString().substring(0, 17) + "..." %>
Expand Down
Loading

0 comments on commit 7e39790

Please sign in to comment.