Skip to content

Commit

Permalink
remove blog from home page and sync colors
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperJura committed Nov 27, 2024
1 parent ccf6a4b commit 317914d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 27 deletions.
25 changes: 0 additions & 25 deletions src/components/HomepageFeatures/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,6 @@ function HeroSmall({ image, title, url }) {


export function HomepageHeros() {
const [imageUrl, setImageUrl] = useState("");
const [loading, setLoading] = useState(true);

useEffect(() => {
const urlMetadata = require('url-metadata');
const lastBlogPost = recentPosts.items[0]; // Define lastBlogPost here

urlMetadata(lastBlogPost.permalink)
.then((metadata) => {
var url = metadata.image.replace(/([^:]\/)\/+/g, '$1');
const urlObject = new URL(url);
setImageUrl(urlObject.pathname);
setLoading(false);
})
.catch((err) => {
console.log(err);
setLoading(false);
});
}, []);

if (loading) {
return <div>Loading...</div>;
} else {
const lastBlogPost = recentPosts.items[0]; // Define lastBlogPost here as well
return (
<>
Expand All @@ -73,7 +50,6 @@ export function HomepageHeros() {
{HeroList.map((props, idx) => (
<Hero key={idx} {...props} />
))}
<Hero image={imageUrl} title={"Blog: " + lastBlogPost.title} url={lastBlogPost.permalink} />
</div>
</section>
<section className={styles.features}>
Expand All @@ -86,5 +62,4 @@ export function HomepageHeros() {
</section>
</>
);
}
}
3 changes: 2 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
}

.banner{
background-color: #962625;
background: var(--highlight-box-color);
}


.dateLabel {
color: var(--ifm-color-primary)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function HomepageHeader() {
return (
<header className={clsx('hero banner', styles.heroBanner)}>
<div className="container">
<img src='./img/logo.png' height={200} />
<img src='./img/logo.png' height={100} />
</div>
</header>
);
Expand Down

0 comments on commit 317914d

Please sign in to comment.