Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
91300fd
Implement blog snippet system and new landing page
Cnnb01 Jul 25, 2025
d737f6a
Adding additional styling to the blog pages
Cnnb01 Jul 28, 2025
db70c24
Adding additional styling to the blog pages
Cnnb01 Jul 28, 2025
347fea9
Add email subscription form integration and responsive media queries
Cnnb01 Jul 30, 2025
a3a55ed
Removing initial media queries
Cnnb01 Aug 6, 2025
e5271ed
Adding media queries for blogs snippet page
Cnnb01 Aug 7, 2025
24924f5
Adding media queries for individual blogs display pages
Cnnb01 Aug 8, 2025
065b9f0
Debbugging a responsivity error
Cnnb01 Aug 12, 2025
8b863fd
format document
Ericgacoki Aug 6, 2025
f1a5592
add initial resp... mobile first
Ericgacoki Aug 14, 2025
4eae751
fill vh, adjust font and spacing
Ericgacoki Aug 14, 2025
9f5f6ab
add text over image
Ericgacoki Aug 14, 2025
3d560e9
adjust text/image for large screen
Ericgacoki Aug 14, 2025
10242ed
fix mystery gap
Ericgacoki Aug 14, 2025
f74f774
add css for larger screens keeping it DRY
Ericgacoki Aug 15, 2025
5dd1241
Keep updated landing page and new css
Cnnb01 Aug 15, 2025
6b35f55
Set up [slug].astro to render blog details dynamically
Cnnb01 Aug 18, 2025
4ca5a91
Adding utf-8 encoding to [slug].astro page
Cnnb01 Aug 19, 2025
565bf1e
Fixing a typescript error
Cnnb01 Aug 19, 2025
7b74943
Fix multiple issues in project
Cnnb01 Aug 22, 2025
1c36fad
add navigation links to next and previous blog
Ericgacoki Aug 22, 2025
447ed49
Merge branch 'landing_page' into links
Ericgacoki Aug 22, 2025
b32ab4e
Corrected styling that differed from the original wordpress site
Cnnb01 Sep 8, 2025
e36c150
add link to blog titles and fix kit form style
Ericgacoki Sep 11, 2025
a8f408a
update X logo
Ericgacoki Sep 11, 2025
ca454b8
update X logo
Ericgacoki Sep 11, 2025
0a1eee3
fix style for blogs an fix other minor issues
Ericgacoki Sep 11, 2025
92ba828
fix page titles to handle special characters
Ericgacoki Sep 11, 2025
37bb713
Merge pull request #4 from AkongaLabs/minor_fixes
Cnnb01 Sep 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion landing-panda/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// @ts-check
import { defineConfig } from 'astro/config';

import react from '@astrojs/react';

// https://astro.build/config
export default defineConfig({});
export default defineConfig({
integrations: [react()]
});
7 changes: 6 additions & 1 deletion landing-panda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"astro": "astro"
},
"dependencies": {
"astro": "^5.9.2"
"@astrojs/react": "^4.3.0",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"astro": "^5.9.2",
"react": "^19.1.0",
"react-dom": "^19.1.0"
}
}
Binary file added landing-panda/public/images/blog1.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added landing-panda/public/images/blog2.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added landing-panda/public/images/blog3.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added landing-panda/public/images/blog4.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
183 changes: 183 additions & 0 deletions landing-panda/public/styles/mylanding.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque&display=swap');

:root {
--bg-color: #1a1f2e;
--text-color: #e2e8f0;
--font-family:'Bricolage Grotesque', sans-serif;
--blue-color:#7091ff;
--lblue-color:#538cd3;
}
/* general */
html {
background-color: var(--bg-color);
color: var(--text-color);
}
body {
font-family: var(--font-family);
}

/* body content */
div{
/* border: 1px solid white; */
}

.container{
display: flex;
flex-direction: row;
height: auto;
}
/* container 1 */
.content{
display: flex;
flex-direction: column;
justify-content: center;
padding-left: 60px;
/* padding-right: 25px; */
height: auto;
}

.first_links{
display: flex;
flex-direction: column;
font-size: 25px;
margin-top: 80px;
}

/* paragraph title */
.title{
font-size: 41px;
font-weight: 400;
}
.about{
margin-top: 100px;
padding-right: 90px;
}

.last_links{
display: flex;
flex-direction: row;
gap: 16px;
font-size: 20px;
font-weight: 700;
margin-top: 130px;
}

/* container 2: image */
.image_container{
width: auto;
height: auto;
}
.header_image{
margin-top: 0px;
width: 700px;
height: 710px;
border-radius: 4px;
}

/* all links */
a,
a:visited,
a:hover,
a:active,
a:focus {
color: white;
}


/* Blogs specific page */
.blogs_container{
/* border: 1px solid white; */
display: flex;
flex-direction: column;
margin-top: 10px;
margin-left: 28%;
width: 700px;
gap: 60px;
}

/* date and read more colors */
.bluecolor{
color: var(--blue-color);
}
a.readmore{
color: var(--blue-color);
text-decoration: none;
}
a.readmore:hover{
color: var(--lblue-color);
text-decoration: underline;
}

.para_space{
line-height: 22px;
}

/* blogs styling */
.blog-body {
border: 1px solid pink;
display: flex;
flex-direction: column;
margin-left: 359px;
font-size: 120%;
/* align-items: center; */
justify-content: center;
background-color:var(--bg-color);
font-family: var(--font-family);
line-height: 1.6;
padding: 9px;
color:var(--text-color);
width: 710px;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Blog body width should be fluid with a max

Prevents clipping and reliance on overflow-x: hidden.

-    width: 710px;
+    width: 100%;
+    max-width: 710px;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
width: 710px;
}
width: 100%;
max-width: 710px;
}
🤖 Prompt for AI Agents
In landing-panda/public/styles/mylanding.css around lines 137 to 138, the blog
body uses a fixed width (width: 710px) which can cause clipping and relies on
overflow-x: hidden; change this to a fluid layout by replacing the fixed width
with width: 100% and adding max-width: 710px so the content scales on small
viewports while capping at 710px on large screens; ensure any unnecessary
overflow-x: hidden is removed or reevaluated if present.

.blog-post img {
max-width: 700px; /* or whatever width you prefer */
height: auto;
display: block;
/* margin-top: 1px; */
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Images should scale with container

Use responsive image sizing to avoid overflow.

-.blog-post img {
-  max-width: 700px;  /* or whatever width you prefer */
-  height: auto;
-  display: block;
-  /* margin-top: 1px; */
-}
+.blog-post img {
+  display: block;
+  max-width: 100%;
+  width: 100%;
+  height: auto;
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.blog-post img {
max-width: 700px; /* or whatever width you prefer */
height: auto;
display: block;
/* margin-top: 1px; */
}
.blog-post img {
display: block;
max-width: 100%;
width: 100%;
height: auto;
}
🤖 Prompt for AI Agents
In landing-panda/public/styles/mylanding.css around lines 139 to 144, the
.blog-post img rule uses a fixed max-width which can still overflow on smaller
containers; change it to be responsive by setting width: 100% and max-width:
700px with height: auto (keep display: block) so images scale down with their
container while capping their maximum size.

.blog-post title{
align-content: center;
align-self: center;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Selector does nothing – title is not a valid HTML element

If you intended to target a .title class inside .blog-post, the selector needs a dot; otherwise the rule is ignored.

-.blog-post title{
+.blog-post .title{
🤖 Prompt for AI Agents
In landing-panda/public/styles/mylanding.css around lines 136 to 139, the
selector ".blog-post title" is invalid because "title" is not an HTML element.
To fix this, change the selector to ".blog-post .title" to target elements with
the class "title" inside elements with the class "blog-post". This will ensure
the CSS rules are applied correctly.


.blog-post h1,h2,h3 {
margin-top: 1.5rem;
margin-bottom: 0.75rem;
font-size: 40px;
font-weight: 200;
/* margin-left: 3rem; */
}
.blog-post{
border: 1px solid red;
}
.blog-post p {
margin-bottom: 0.5rem;
}

.blog-meta {
display: flex;
gap: 1rem;
font-size: 0.9rem;
margin-top: 0.5rem;
margin-bottom: 1.5rem;
}

.blog-post a {
color: inherit;
text-decoration: underline;
}

.blog-post blockquote {
border-left: 2px solid #ccc;
padding-left: 1rem;
}

/* .blog-body > p > em:nth-of-type(1){
font-size: 15px;
margin-left: 50%;
color:var(--blue-color)
} */

/* actual blogdiv */
.actualblog_divh1{
/* border: 1px solid pink; */
}
21 changes: 21 additions & 0 deletions landing-panda/src/components/BlogCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import '../../public/styles/mylanding.css'

type BlogCardProps = {
title: string;
date: string;
snippet: string;
link: string;
};

const BlogCard = ({ title, date, snippet, link }: BlogCardProps) => {
return (
<div>
<p className="bluecolor" >{date}</p>
<h1><a href={link}>{title}</a></h1>
<p className="para_space">{snippet}</p>
<a className="bluecolor readmore" href={link}>Read more→</a>
</div>
);
};

export default BlogCard;
33 changes: 33 additions & 0 deletions landing-panda/src/data/blogsnippets.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
export type BlogSnippet = {
date: string;
title: string;
snippet: string;
link: string;
};

export const blogPosts: BlogSnippet[] = [
{
date: "June 28, 2025",
title: "The Power of Honest Communication in Teams",
snippet: "Honesty without clarity Charity, joined the team recently. In one of our internal discussions, we stumbled on the concept of “brutal honesty“. Her interpretation of brutal honesty was focused on the word “brutal”. This led to a very very spirited discussion on whether one needs to be brutal to be honest. She questioned whether brutal…",
link: "/blogs/blog4",
},
{
date: "June 28, 2025",
title: "Solve, Build, Get Paid: Open Source Bounties at Akong’a",
snippet: "You don’t have to be on payroll to earn money. Akong’a Labs wants you to earn by solving real problems. How? Open source bounties. To be clear, this isn’t the vague “open-source contributions look good on your CV” stuff. Bounties, requirements, and payouts. Open to those willing to build. That’s it. That’s the blog post.…",
link: "/blogs/blog3",
},
{
date: "June 18, 2025",
title: "Understanding Remote Onboarding: Lessons from Akonga Labs",
snippet: "“Are you readyyyyyy?!?!” That was the message I got from my manager on the morning of my onboarding and even though I was genuinely feeling a little anxious, I replied confidently: “Very ready!” Onboarding into a new company is always a mixed bag of emotions: excitement, nerves, hope, and curiosity. For me, joining Akonga Labs…",
link: "/blogs/blog2",
},
{
date: "June 18, 2025",
title: "Why I’m starting this company",
snippet: "Outsized returns You’re going to be somewhere in your career in ten years, why not in your absolute ideal role, doing the kind of work you’d find most rewarding and having the kind of impact that you’re capable of? If you don’t believe that this is possible, you will surely fail. If you do believe it’s possible,…",
link: "/blogs/blog1",
}
];
32 changes: 32 additions & 0 deletions landing-panda/src/pages/blogLayout.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
import "../../public/styles/mylanding.css"
import "../../public/images/blog1.webp"
import "../../public/images/blog2.webp"
import "../../public/images/blog3.webp"
import "../../public/images/blog4.webp"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Remove unnecessary image imports.

The image imports in the frontmatter appear unused in this layout component. These should only be imported where they're actually referenced.

Apply this diff to remove unused imports:

---
import "../../public/styles/mylanding.css"
-import "../../public/images/blog1.webp"
-import "../../public/images/blog2.webp"
-import "../../public/images/blog3.webp"
-import "../../public/images/blog4.webp"
---
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import "../../public/images/blog1.webp"
import "../../public/images/blog2.webp"
import "../../public/images/blog3.webp"
import "../../public/images/blog4.webp"
import "../../public/styles/mylanding.css"
🤖 Prompt for AI Agents
In landing-panda/src/pages/blogLayout.astro around lines 3 to 6, the image
imports are unused in this layout component. Remove all four import statements
for the blog images to clean up the code and avoid unnecessary imports.

---

<html lang="en">
<head>
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width" />
<title>Blog layout</title>
</head>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix duplicate head tags.

There are nested <head> tags which creates invalid HTML structure that can cause rendering issues and prevent proper meta tag processing.

Apply this diff to fix the structure:

  <head>
-      <head>
-        <meta charset="utf-8" />
-        <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
-        <meta name="viewport" content="width=device-width" />
-        <title>Blog layout</title>
+    <meta charset="utf-8" />
+    <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
+    <meta name="viewport" content="width=device-width" />
+    <title>Blog layout</title>
  </head>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<head>
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width" />
<title>Blog layout</title>
</head>
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width" />
<title>Blog layout</title>
</head>
🤖 Prompt for AI Agents
In landing-panda/src/pages/blogLayout.astro around lines 10 to 16, there are
nested <head> tags causing invalid HTML structure. Remove the inner <head> tag
so that only one <head> tag wraps all the meta and link elements, ensuring
proper HTML structure and correct meta tag processing.

<body >
<article class="blog-post">
<div class="blog-body">
<div class="first_links">
<a href="/newLanding">Akong'a Labs</a>
<a href="/blogSnippets">Blogs</a>
</div>
<slot /> <!-- where the blog content goes -->
<div class="last_links">
<p> <a href="https://x.com/adrianmurage">X</a> </p>
<p> <a href="https://github.com/AkongaLabs">GitHub</a></p>
</div>
</div>
</article>
</body>
</html>
36 changes: 36 additions & 0 deletions landing-panda/src/pages/blogSnippets.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
import "../../public/styles/mylanding.css"
import BlogCard from "../components/BlogCard.tsx";
import {blogPosts} from '../data/blogsnippets';
---
Comment on lines +1 to +7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Sanitize HTML, avoid unnecessary set:html, and improve heading semantics

  • Excerpt is injected as HTML; sanitize it.
  • Date doesn’t need set:html; render as text.
  • Prefer H2 for each post card to keep a single H1 per page.

Apply these diffs:

 ---
-import "../../src/styles/mylanding.css";
+import "../styles/mylanding.css";
 import type { BlogPost } from "../data/types";
+import sanitizeHtml from "sanitize-html";
 
-const res = await fetch("https://akongalabs.com/wp-json/wp/v2/posts");
-const posts: BlogPost[] = await res.json();
+const res = await fetch("https://akongalabs.com/wp-json/wp/v2/posts?per_page=10");
+let posts: BlogPost[] = [];
+if (res.ok) {
+  posts = (await res.json()) as BlogPost[];
+} else {
+  console.warn("Failed to fetch posts:", res.status, res.statusText);
+}
 ---
-              <p class="bluecolor" set:html={formattedDate}></p>
-              <h1 class="blog-title" set:html={post.title.rendered}></h1>
-              <div class="para_space" set:html={cleanedExcerpt}></div>
+              <p class="bluecolor">{formattedDate}</p>
+              <h2 class="blog-title">
+                {post.title.rendered.replace(/<[^>]*>/g, "")}
+              </h2>
+              <div
+                class="para_space"
+                set:html={sanitizeHtml(cleanedExcerpt, {
+                  allowedTags: ["p", "em", "strong", "a", "code", "pre", "ul", "ol", "li", "span", "br"],
+                  allowedAttributes: { a: ["href", "rel", "target"] },
+                  allowedSchemes: ["http", "https", "mailto"],
+                })}
+              ></div>

Also applies to: 34-38

🤖 Prompt for AI Agents
In landing-panda/src/pages/blogSnippets.astro lines 1-7 (and also apply same
fixes to lines 34-38), the excerpt is being injected unsanitized with set:html,
the post date is rendered using set:html unnecessarily, and headings use H1 per
post; fix by sanitizing the excerpt HTML before rendering (use a sanitizer
library or a safe-html utility and pass the sanitized HTML to set:html), stop
using set:html for the date and render it as plain text (e.g., interpolate the
formatted date string), and change per-post headings from H1 to H2 to preserve a
single page H1; ensure imports include the sanitizer and update markup
accordingly.


<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width" />
<title>Charity's landing page 🐼</title>
</head>
<body>
<div class="blogs_container">
<div class="first_links">
<a href="/newLanding">Akong'a Labs</a>
<a href="/blogSnippets">Blogs</a>
</div>
{
blogPosts.map(post => (
<BlogCard
date={post.date}
title={post.title}
snippet={post.snippet}
link={post.link}
/>
))
}
<div class="last_links">
<p> <a href="https://x.com/adrianmurage">X</a> </p>
<p> <a href="https://github.com/AkongaLabs">GitHub</a></p>
</div>
</div>
</body>
</html>
Loading
Loading