aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorflu0r1ne <flu0r1ne@flu0r1ne.net>2021-07-21 04:42:31 -0500
committerflu0r1ne <flu0r1ne@flu0r1ne.net>2021-07-21 04:42:58 -0500
commite424680fc013c291bd7eea4dc63b96401e5126a8 (patch)
treeb39227c50b2c365c49694fa4f86b2630d428ebc2 /pages
parent437268370661087dbe31323efb18dfe1a518da33 (diff)
downloadhomepage-e424680fc013c291bd7eea4dc63b96401e5126a8.tar.xz
homepage-e424680fc013c291bd7eea4dc63b96401e5126a8.zip
Added a timestamp and sorts posts by timestamp
Diffstat (limited to 'pages')
-rw-r--r--pages/logs/[directory].tsx4
-rw-r--r--pages/logs/index.module.scss12
-rw-r--r--pages/logs/index.tsx12
-rw-r--r--pages/logs/logs.md2
4 files changed, 22 insertions, 8 deletions
diff --git a/pages/logs/[directory].tsx b/pages/logs/[directory].tsx
index 00fe78d..c3760f7 100644
--- a/pages/logs/[directory].tsx
+++ b/pages/logs/[directory].tsx
@@ -1,4 +1,3 @@
-import path from 'path';
import { GetStaticProps, GetStaticPropsContext } from 'next';
import React, { FC } from 'react';
import { getPosts, getMarkdown, Post, getPostFromDirectory } from '../../utils/Posts';
@@ -11,10 +10,13 @@ interface Props {
}
const Page : FC<Props> = ({ post, markdown }) => {
+ const { lastUpdated } = post.meta;
+
return (
<>
<DefaultPage
path={"/logs/" + post.directory}
+ lastUpdated={lastUpdated}
>
<Markdown
md={markdown}
diff --git a/pages/logs/index.module.scss b/pages/logs/index.module.scss
new file mode 100644
index 0000000..7e79afe
--- /dev/null
+++ b/pages/logs/index.module.scss
@@ -0,0 +1,12 @@
+.logList {
+ margin-top: 1em;
+
+ li {
+ line-height: 1.15;
+ margin-left: 1em;
+ margin-top: 0.3em;
+ list-style-image: none;
+ list-style-position: outside;
+ list-style-type: disc;
+ }
+} \ No newline at end of file
diff --git a/pages/logs/index.tsx b/pages/logs/index.tsx
index ed3c58b..fa74aa4 100644
--- a/pages/logs/index.tsx
+++ b/pages/logs/index.tsx
@@ -1,24 +1,26 @@
import DefaultPage from '../../templates/Default';
import Markdown from '../../components/Markdown';
+import styles from './index.module.scss';
import { GetStaticProps, GetStaticPropsContext } from 'next';
import React, { FC } from 'react';
-import { getPosts, getMetadata, Post, PostMetadata } from '../../utils/Posts';
-//@ts-ignore
+import { getPosts, Post } from '../../utils/Posts';
+// @ts-ignore
import md from './logs.md';
-
interface Props {
posts: Post[]
};
const Logs : FC<Props> = ({ posts }) => {
- console.log(posts);
+
+
return(
<DefaultPage
path={"/logs"}
>
- <ul>
+ <Markdown md={md} />
+ <ul className={styles.logList}>
{
posts.map(({ directory, meta }) => (
<li><a href={'/logs/' + directory}>{meta.name}</a></li>
diff --git a/pages/logs/logs.md b/pages/logs/logs.md
index 5515287..c177646 100644
--- a/pages/logs/logs.md
+++ b/pages/logs/logs.md
@@ -2,5 +2,3 @@
Eclectic thoughts, miscellany, and discursive drivel
-- [Packaging Nebula for Debian](/logs/packaging-nebula-for-debian)
-- [Installing cGit behind NGINX on Ubuntu](/logs/cgit-nginx-ubuntu)