From ee384459bc1307f8674758ed76a31d68a8589205 Mon Sep 17 00:00:00 2001 From: Faisal N Date: Sat, 19 Oct 2024 17:20:00 -0400 Subject: [PATCH] Improve performance --- frontend/pages/about.ejs | 5 ++--- frontend/pages/article.ejs | 8 ++------ frontend/pages/articles.ejs | 3 +-- frontend/pages/artwork.ejs | 6 ++---- frontend/pages/artworks.ejs | 4 +--- frontend/pages/index.ejs | 6 ++---- frontend/pages/newspaper.ejs | 12 +++++------- frontend/pages/newspapers.ejs | 4 +--- frontend/pages/poll.ejs | 1 - frontend/pages/polls.ejs | 1 - frontend/pages/search.ejs | 8 ++------ frontend/pages/tag.ejs | 4 +--- frontend/pages/tags.ejs | 1 - frontend/partials/head.ejs | 3 ++- 14 files changed, 21 insertions(+), 45 deletions(-) diff --git a/frontend/pages/about.ejs b/frontend/pages/about.ejs index 5a5333b..8875e56 100644 --- a/frontend/pages/about.ejs +++ b/frontend/pages/about.ejs @@ -2,19 +2,18 @@ <%- include('../partials/head.ejs'); %> - <%- include('../partials/header.ejs'); %>
- <% if (cms.about[0].image != null) { %>alt="<%= cms.about[0].image.description %>" <% } %> /><% } %> + <% if (cms.about[0].image != null) { %>alt="<%= cms.about[0].image.description %>" <% } %> /><% } %>
<%- cms.about[0].content %>
- <% if (cms.about[0].image-2 != null) { %>alt="<%= cms.about[0]['image-2'].description %>" <% } %> /><% } %> + <% if (cms.about[0].image-2 != null) { %>alt="<%= cms.about[0]['image-2'].description %>" <% } %> /><% } %>
<%- include('../partials/footer.ejs'); %> diff --git a/frontend/pages/article.ejs b/frontend/pages/article.ejs index 05ae6be..ba44719 100644 --- a/frontend/pages/article.ejs +++ b/frontend/pages/article.ejs @@ -12,10 +12,6 @@ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); }); }; %> - <% if (article.images[0] != null) { for (image of article.images) { %> - <%= cms.siteDetails[0].unknown.path %><% } else { %><%= cms.siteDetails[0].favicon.path %><% } %>"><% }} %> - <% if (article.images[0] != null) { for (image of article.images) { %> - <% }} %> @@ -54,7 +50,7 @@