193 lines
6.7 KiB
Plaintext
193 lines
6.7 KiB
Plaintext
---
|
|
title: Eric's Journal
|
|
path: /journal/index.html
|
|
---
|
|
<% const MAX_POSTS = 6; -%>
|
|
<% const cwd = (process && process.cwd) ? process.cwd() : ''; -%>
|
|
<% const titleLink = (site && site.base_uri) ? site.base_uri : '/'; -%>
|
|
<%- include('../../layouts/partials/top') %>
|
|
<body class='postMainIndex'>
|
|
<a name="top" id="topAnchor" class="topAnchor"></a>
|
|
<div class="page">
|
|
<header id="header" class="pageHeader pageSection">
|
|
<div class="pageHeader-titleBlock clearfix">
|
|
<h1 class="siteTitle"><a href="<%= titleLink %>" class="siteTitle-link"><%= site.title %></a></h1>
|
|
</div>
|
|
|
|
<%- include('../../layouts/partials/navmain') %>
|
|
|
|
</header>
|
|
|
|
<main id="content" class="pageMain pageSection">
|
|
<div class="pageMain-inner">
|
|
|
|
<%- include('../../layouts/partials/embed_switch') %>
|
|
|
|
<%- include('../../layouts/functions') %>
|
|
|
|
<% if (page?.title && (page?.render_opts || '').indexOf('no_title') == -1) { -%>
|
|
|
|
<h2>
|
|
<a
|
|
class="titleLink"
|
|
href="<%= page.path %>"
|
|
id="<%= snakeCase(page.title) %>"
|
|
name="<%= snakeCase(page.title) %>"
|
|
><%= page.title %></a>
|
|
</h2>
|
|
|
|
<p>
|
|
Below you'll find some of my most recent Journal entries.
|
|
</p>
|
|
|
|
<hr class="feedLine">
|
|
|
|
<p>
|
|
|
|
<% } -%>
|
|
<% if (site && site.pages) { -%>
|
|
<%
|
|
let
|
|
curr_post_num = 0,
|
|
pages = site.pages.sort((a, b) => {
|
|
if (a.date_pub && b.date_pub) {
|
|
let
|
|
a_dt = (new Date(a.date_pub)).getTime(),
|
|
b_dt = (new Date(b.date_pub)).getTime();
|
|
if (a_dt < b_dt) {
|
|
return 1;
|
|
}
|
|
if (b_dt < a_dt) {
|
|
return -1;
|
|
}
|
|
return 0;
|
|
}
|
|
});
|
|
-%>
|
|
|
|
<% pages.forEach(function(page) { -%>
|
|
<% if (page.content_type && page.content_type === 'journal' && curr_post_num < MAX_POSTS) { -%>
|
|
<% curr_post_num++; -%>
|
|
<article class="update journal h-entry js-update">
|
|
<div class="p-author author h-card vcard authorHidden">
|
|
<% if (page.author && page.author.site && page.author.name) { %>
|
|
<% if (page.author.photo) { %>
|
|
<a href="<%= page.author.site %>"><img class="u-photo" src="<%= page.author.photo %>"></a>
|
|
<% } %>
|
|
<a class="p-name fn u-url url" rel="author" href="<%= page.author.site %>"><%= page.author.name %></a>
|
|
<% } else if (site.author && site.author.site && site.author.name) { %>
|
|
<% if (site.author.photo) { %>
|
|
<a href="<%= site.author.site %>"><img class="u-photo" src="<%= site.author.photo %>"></a>
|
|
<% } %>
|
|
<a class="p-name fn u-url url" rel="author" href="<%= site.author.site %>"><%= site.author.name %></a>
|
|
<% } %>
|
|
</div>
|
|
|
|
<h3 id="<%= snakeCase(page.title) %>" >
|
|
<a class="p-name u-url" href="/<%= page.path %>"><%= page.title %></a>
|
|
</h3>
|
|
|
|
<% if (page.tldr || page.description) { -%>
|
|
<p><i>TL;DR — <%- page.tldr || page.description %></i></p>
|
|
<% } -%>
|
|
|
|
<% if (page.readTime) { -%>
|
|
<p class="journal readTime">
|
|
<span class="icon glasses-icon">👓</span> <%= page.readTime %>
|
|
</p>
|
|
<% } -%>
|
|
|
|
<% if (page.content) { -%>
|
|
<div class="e-content">
|
|
<%- page.content %>
|
|
</div>
|
|
<% } -%>
|
|
|
|
<footer class="update-footer clearfix">
|
|
|
|
<% if (Array.isArray(page?.tags) && page.tags.length) { -%>
|
|
|
|
<div class="update-tags">
|
|
|
|
<span class="icon folder-icon">📁</span>
|
|
|
|
<% page.tags.forEach((tag, index) => { -%>
|
|
<span class="p-category category"><%= tag %></span><%= (index < (page.tags.length - 1)) ? ', ' : '' %>
|
|
<% }) -%>
|
|
|
|
</div>
|
|
|
|
<% } -%>
|
|
|
|
<!--
|
|
<span class="update-citation">[iew.us q/1g0k2]
|
|
<a class="u-shortlink" type="text/html" rel="shortlink" href="https://iew.us/q/1g0k2">🔗</a>
|
|
</span>
|
|
-->
|
|
|
|
<a rel="bookmark" href="/<%= page.path %>" class="u-url update-footer-link update-footer-time">
|
|
<time datetime="<%= page.date_pub %>"
|
|
class="dt-published published js-pubDate pubDate"
|
|
><%= prettyDate(page.date_pub) %></time>
|
|
</a>
|
|
|
|
</footer>
|
|
|
|
</article>
|
|
|
|
<p class="backLink">
|
|
<a class="backLink-link" href="#top">Top</a>
|
|
</p>
|
|
<hr class="feedLine">
|
|
|
|
<% } -%>
|
|
<% }); -%>
|
|
<% } -%>
|
|
</div>
|
|
|
|
<div class="postMenu">
|
|
<h4 class="postMenu-title">
|
|
<a href="/journal/" class="postMenu-title-link">All Entries By Year</a>
|
|
</h4>
|
|
<ul class="postMenu-list">
|
|
<%
|
|
if (site && site.pages) {
|
|
let
|
|
years = [];
|
|
site.pages.forEach(function(page) {
|
|
if (page.content_type && page.content_type === 'journal' && page.date_pub) {
|
|
let the_year = (new Date(page.date_pub)).getFullYear();
|
|
if (years.indexOf(the_year) === -1) {
|
|
years.push(the_year);
|
|
}
|
|
}
|
|
});
|
|
years = years.sort().reverse();
|
|
years.forEach((year) => {
|
|
-%>
|
|
<li class="postMenu-item">
|
|
<a class="postMenu-link <%= page.path.indexOf(year) > -1 ? 'isCurrent' : '' %>"
|
|
href="/journal/<%= year %>/index.html">
|
|
<%= year %>
|
|
</a>
|
|
</li>
|
|
|
|
<%
|
|
})
|
|
}
|
|
-%>
|
|
|
|
</ul>
|
|
</div>
|
|
</main>
|
|
|
|
<%- include('../../layouts/partials/journal/menusub') %>
|
|
|
|
<%- include('../../layouts/partials/bio') %>
|
|
|
|
<%- include('../../layouts/partials/footer') %>
|
|
|
|
</div>
|
|
|
|
<%- include('../../layouts/partials/bottom') %>
|