small fixes; some cleaning up
This commit is contained in:
parent
0eb2416df0
commit
2b86182bbb
@ -12,7 +12,7 @@ export class ChangelogHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getRecentChangelog() {
|
getRecentChangelog() {
|
||||||
const result: LogItem[] = data.entries.slice(0, 4);
|
const result: LogItem[] = data.entries.slice(0, 5);
|
||||||
|
|
||||||
// console.log(result);
|
// console.log(result);
|
||||||
return result;
|
return result;
|
@ -1,5 +1,13 @@
|
|||||||
{
|
{
|
||||||
"entries": [
|
"entries": [
|
||||||
|
{
|
||||||
|
"id": "5",
|
||||||
|
"date": "23-07-03",
|
||||||
|
"title": "import test",
|
||||||
|
"description": "this is a test",
|
||||||
|
"linkName": "blog",
|
||||||
|
"link": "/blog"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "4",
|
"id": "4",
|
||||||
"date": "23-07-03",
|
"date": "23-07-03",
|
||||||
|
@ -4,7 +4,7 @@ import Introduction from "@/components/home/Introduction";
|
|||||||
import Blogs from "@/components/home/Blogs";
|
import Blogs from "@/components/home/Blogs";
|
||||||
import Changelog from "@/components/home/Changelog";
|
import Changelog from "@/components/home/Changelog";
|
||||||
import Contact from "@/components/home/Contact";
|
import Contact from "@/components/home/Contact";
|
||||||
import { ChangelogHandler } from "../../lib/changelog";
|
import { ChangelogHandler } from "../../lib/obtain-changelog";
|
||||||
import { LogItem } from "../../lib/log-item";
|
import { LogItem } from "../../lib/log-item";
|
||||||
|
|
||||||
const changelogHandler = new ChangelogHandler();
|
const changelogHandler = new ChangelogHandler();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import ContentCard from "@/components/ContentCard";
|
import ContentCard from "@/components/ContentCard";
|
||||||
import NewsItem from "@/components/home/NewsItem";
|
import NewsItem from "@/components/home/NewsItem";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
export default function Blogs() {
|
export default function Blogs() {
|
||||||
return (
|
return (
|
||||||
@ -28,7 +29,7 @@ export default function Blogs() {
|
|||||||
<div>
|
<div>
|
||||||
<hr />
|
<hr />
|
||||||
<div>
|
<div>
|
||||||
{'//'} For more, head over to the <a href="">blog</a>
|
{'//'} For more, head over to the <Link href="/blog">blog</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,6 +3,13 @@ import NewsItem from "@/components/home/NewsItem";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { LogItem } from "../../../lib/log-item";
|
import { LogItem } from "../../../lib/log-item";
|
||||||
|
|
||||||
|
const newsItemColors = [
|
||||||
|
'text-white',
|
||||||
|
'text-red-300',
|
||||||
|
'text-red-400',
|
||||||
|
'text-red-500',
|
||||||
|
'text-red-600',
|
||||||
|
]
|
||||||
|
|
||||||
export default function Changelog(props: { changelogData: LogItem[] }) {
|
export default function Changelog(props: { changelogData: LogItem[] }) {
|
||||||
return (
|
return (
|
||||||
@ -15,7 +22,6 @@ export default function Changelog(props: { changelogData: LogItem[] }) {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<ul className="list-disc list-inside mr-7 marker:font-ibm marker:text-red-400 ">
|
<ul className="list-disc list-inside mr-7 marker:font-ibm marker:text-red-400 ">
|
||||||
|
|
||||||
{
|
{
|
||||||
props.changelogData.map((log, index) => {
|
props.changelogData.map((log, index) => {
|
||||||
let mostRecent = index == 0 ? true : false;
|
let mostRecent = index == 0 ? true : false;
|
||||||
@ -25,31 +31,20 @@ export default function Changelog(props: { changelogData: LogItem[] }) {
|
|||||||
<NewsItem
|
<NewsItem
|
||||||
date={log.date}
|
date={log.date}
|
||||||
title={log.title}
|
title={log.title}
|
||||||
color={mostRecent ? 'text-white' : 'text-red-300'}
|
color={newsItemColors[index]}
|
||||||
link={[log.link, log.linkName]}
|
link={[log.link, log.linkName]}
|
||||||
mostRecent={mostRecent} />
|
mostRecent={mostRecent} />
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
{/* <li><NewsItem date={"'23-06-30"} title={"Test Title"} color={"text-white"} */}
|
|
||||||
{/* link={["", "link"]} mostRecent /></li> */}
|
|
||||||
{/* <li><NewsItem date={"'23-06-27"} title={"Test Title Something"} color={"text-red-300"} */}
|
|
||||||
{/* link={["", "link"]} /></li> */}
|
|
||||||
{/* <li><NewsItem date={"'23-06-25"} title={"Test Title Lorum"} color={"text-red-400"} */}
|
|
||||||
{/* link={["", "link"]} /></li> */}
|
|
||||||
{/* <li><NewsItem date={"'23-06-23"} title={"Test Title Ipsum"} color={"text-red-500"} */}
|
|
||||||
{/* link={["", "link"]} /></li> */}
|
|
||||||
{/* <li><NewsItem date={"'23-06-21"} title={"Test Title Weird, really"} color={"text-red-600"} */}
|
|
||||||
{/* link={["", "link"]} /></li> */}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<hr />
|
<hr />
|
||||||
<div>
|
<div>
|
||||||
{'//'} For more, head over to the <Link href="">changelog</Link>
|
{'//'} For more, head over to the <Link href="/changelog">changelog</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user