Browse Source

[CodeFactor] Apply fixes

pull/414/head
codefactor-io 4 months ago
parent
commit
5647b7411e
No known key found for this signature in database
GPG Key ID: B66B2D63282C190F
  1. 4
      lib/posts.ts
  2. 4
      styles/components/page.scss
  3. 4
      styles/index.scss

4
lib/posts.ts

@ -19,7 +19,7 @@ export interface Post {
export const isPublicPost = (post: Post) => !post.slug.startsWith("_");
export const getPosts = async (
includeBody: Boolean = false
includeBody: boolean = false
): Promise<Post[]> => {
const files = await glob("content/posts/*.md");
const postPromises = files.map(async (filepath): Promise<Post> => {
@ -57,7 +57,7 @@ export const getPosts = async (
};
export const getPublishedPosts = async (
includeBody: Boolean = false
includeBody: boolean = false
): Promise<Post[]> => {
return (await getPosts(includeBody)).filter(isPublicPost);
};

4
styles/components/page.scss

@ -117,7 +117,7 @@
.page__info {
text-align: center;
h1 {
margin: 0 auto 0.66rem auto;
margin: 0 auto 0.66rem;
}
}
.page__footer {
@ -132,6 +132,6 @@
padding: 3rem 0;
}
.page__footer {
padding: 2rem 2rem 3rem 2rem;
padding: 2rem 2rem 3rem;
}
}

4
styles/index.scss

@ -84,7 +84,7 @@ body > header {
background-color: var(--accent-bg);
border-bottom: 1px solid var(--border);
text-align: center;
padding: 0 0.5rem 2rem 0.5rem;
padding: 0 0.5rem 2rem;
grid-column: 1 / -1;
}
@ -105,7 +105,7 @@ main {
body > footer {
margin-top: 4rem;
padding: 2rem 1rem 1.5rem 1rem;
padding: 2rem 1rem 1.5rem;
color: var(--text-light);
font-size: 0.9rem;
text-align: center;

Loading…
Cancel
Save