Home minimal EJS template

This commit is contained in:
Clément GOUIN
2019-06-20 11:42:01 +02:00
parent dcb4e01447
commit e88eb94d78
5 changed files with 72 additions and 20 deletions
+12
View File
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Error <%= error %></title>
</head>
<body>
<main>
<h1>Error <%= error %> at path <%= path %></h1>
</main>
</body>
</html>
+15 -2
View File
@@ -2,9 +2,22 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<title>GitBlog.md - Home</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<main>
<h1>GitBlog.md</h1>
A static blog using Markdown pulled from your git repository
<h2>Articles in this blog :</h2>
<% articles.forEach((article) => { %>
<div class="article">
<h3><%- `<a href="${article.url}">${article.title}</a>`%> (<small><%= `${article.day}/${article.month}/${article.year}`%></small>)</h3>
<% if(article.thumbnail){%>
<%- `<img alt="thumbnail" src=${article.thumbnail}>`%>
<% }%>
</div>
<% }); %>
</main>
</body>
</html>
+18
View File
@@ -0,0 +1,18 @@
main {
max-width: 70ch;
padding: 2ch;
margin: auto;
}
.article a, .article a:visited{
color:black;
}
.article a:visited{
color:black;
}
.article img{
max-width:100%;
max-height:10vh;
}