-
Notifications
You must be signed in to change notification settings - Fork 0
Implement blog snippet system and new landing page #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
91300fd
d737f6a
db70c24
347fea9
a3a55ed
e5271ed
24924f5
065b9f0
8b863fd
f1a5592
4eae751
9f5f6ab
3d560e9
10242ed
f74f774
5dd1241
6b35f55
4ca5a91
565bf1e
7b74943
1c36fad
447ed49
b32ab4e
e36c150
a8f408a
ca454b8
0a1eee3
92ba828
37bb713
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| 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()] | ||
| }); |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,299 @@ | ||||||||||||||||||||||||||
| @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; | ||||||||||||||||||||||||||
| padding: 0 15px; | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| /* container 1 */ | ||||||||||||||||||||||||||
| .content{ | ||||||||||||||||||||||||||
| display: flex; | ||||||||||||||||||||||||||
| flex-direction: column; | ||||||||||||||||||||||||||
| justify-content: center; | ||||||||||||||||||||||||||
| padding-left: 60px; | ||||||||||||||||||||||||||
| align-content: left; | ||||||||||||||||||||||||||
| /* 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 red; */ | ||||||||||||||||||||||||||
| display: flex; | ||||||||||||||||||||||||||
| flex-direction: column; | ||||||||||||||||||||||||||
| margin: 10px auto; | ||||||||||||||||||||||||||
| 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: 25px; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| /* blogs styling */ | ||||||||||||||||||||||||||
| .blog-body { | ||||||||||||||||||||||||||
| /* border: 1px solid pink; */ | ||||||||||||||||||||||||||
| display: flex; | ||||||||||||||||||||||||||
| flex-direction: column; | ||||||||||||||||||||||||||
| margin: 10px auto; | ||||||||||||||||||||||||||
| 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; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 - width: 710px;
+ width: 100%;
+ max-width: 710px;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| .blog-post img { | ||||||||||||||||||||||||||
| max-width: 700px; /* or whatever width you prefer */ | ||||||||||||||||||||||||||
| height: auto; | ||||||||||||||||||||||||||
| display: block; | ||||||||||||||||||||||||||
| /* margin-top: 1px; */ | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| .blog-post title{ | ||||||||||||||||||||||||||
| align-content: center; | ||||||||||||||||||||||||||
| align-self: center; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Selector does nothing – If you intended to target a -.blog-post title{
+.blog-post .title{🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .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; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| /* ========== MEDIA QUERIES FOR HOMEPAGE ========== */ | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| /* Screens up to 781px (phones + small tablets) */ | ||||||||||||||||||||||||||
| @media (max-width: 781px) { | ||||||||||||||||||||||||||
| .container { | ||||||||||||||||||||||||||
| flex-direction: column; | ||||||||||||||||||||||||||
| align-items: left; | ||||||||||||||||||||||||||
| padding: 0 20px; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .content { | ||||||||||||||||||||||||||
| padding-left: 0; | ||||||||||||||||||||||||||
| padding-right: 0; | ||||||||||||||||||||||||||
| align-items: left; | ||||||||||||||||||||||||||
| text-align: left; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .about { | ||||||||||||||||||||||||||
| margin-top: 60px; | ||||||||||||||||||||||||||
| padding-right: 0; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .first_links { | ||||||||||||||||||||||||||
| margin-top: 40px; | ||||||||||||||||||||||||||
| font-size: 20px; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .last_links { | ||||||||||||||||||||||||||
| flex-direction: column; | ||||||||||||||||||||||||||
| align-items: center; | ||||||||||||||||||||||||||
| font-size: 18px; | ||||||||||||||||||||||||||
| margin-top: 60px; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .header_image { | ||||||||||||||||||||||||||
| width: 90%; | ||||||||||||||||||||||||||
| height: auto; | ||||||||||||||||||||||||||
| max-width: 600px; | ||||||||||||||||||||||||||
| margin-top: 30px; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| /* Media Queries - Blog Snippets Page */ | ||||||||||||||||||||||||||
| @media (max-width: 768px) { | ||||||||||||||||||||||||||
| .blogs_container { | ||||||||||||||||||||||||||
| padding: 1rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .first_links, | ||||||||||||||||||||||||||
| .last_links { | ||||||||||||||||||||||||||
| flex-direction: column; | ||||||||||||||||||||||||||
| align-items: left; | ||||||||||||||||||||||||||
| gap: 0.5rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .blog_card { | ||||||||||||||||||||||||||
| width: 100%; | ||||||||||||||||||||||||||
| margin-bottom: 1.5rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .blog_card h2 { | ||||||||||||||||||||||||||
| font-size: 1.2rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .blog_card p { | ||||||||||||||||||||||||||
| font-size: 1rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @media (max-width: 480px) { | ||||||||||||||||||||||||||
| .blogs_container { | ||||||||||||||||||||||||||
| padding: 0.5rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .blog_card h2 { | ||||||||||||||||||||||||||
| font-size: 1rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .blog_card p { | ||||||||||||||||||||||||||
| font-size: 0.9rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| /* ==================================== */ | ||||||||||||||||||||||||||
| /* Media Queries - Individual Blog Pages */ | ||||||||||||||||||||||||||
| /* ==================================== */ | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @media (max-width: 768px) { | ||||||||||||||||||||||||||
| .blog-body { | ||||||||||||||||||||||||||
| padding: 1rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .first_links, | ||||||||||||||||||||||||||
| .last_links { | ||||||||||||||||||||||||||
| flex-direction: column; | ||||||||||||||||||||||||||
| align-items: center; | ||||||||||||||||||||||||||
| gap: 0.5rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .blog-post img { | ||||||||||||||||||||||||||
| max-width: 100%; | ||||||||||||||||||||||||||
| height: auto; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .blog-post h1, | ||||||||||||||||||||||||||
| .blog-post h2 { | ||||||||||||||||||||||||||
| font-size: 1.5rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .blog-post p { | ||||||||||||||||||||||||||
| font-size: 1rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| @media (max-width: 480px) { | ||||||||||||||||||||||||||
| .blog-post h1, | ||||||||||||||||||||||||||
| .blog-post h2 { | ||||||||||||||||||||||||||
| font-size: 1.2rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| .blog-post p { | ||||||||||||||||||||||||||
| font-size: 0.95rem; | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Invalid value
leftforalign-content– rule is ignoredalign-contentonly accepts values such asflex-start,flex-end,center,space-between, etc. Becauseleftis not valid, the declaration is dropped and the layout may not behave as intended.📝 Committable suggestion
🤖 Prompt for AI Agents