Skip to content

Commit

Permalink
feat: improve blogLayout style
Browse files Browse the repository at this point in the history
  • Loading branch information
kuizuo committed Dec 26, 2023
1 parent 9e12f2c commit 310a6a0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,10 @@ div[class^='announcementBar_'] {
border-left: 3px solid #ff000080;
}

.blogPost-container {
.blog-card {
border-radius: var(--ifm-pagination-nav-border-radius);
margin-top: 0;

background: var(--blog-item-background-color);
box-shadow: var(--blog-item-shadow);
padding: 1em 1.25em 0.75em;
Expand Down
4 changes: 2 additions & 2 deletions src/theme/BlogLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ export default function BlogLayout(props: Props): JSX.Element {
<main
className={clsx('col', {
'col--8': hasSidebar,
'col--9 col--offset-1': !hasSidebar,
'col--8 col--offset-2': !hasSidebar,
})}
itemScope
itemType="http://schema.org/Blog"
itemType="h ttp://schema.org/Blog"
>
{children}
</main>
Expand Down
2 changes: 1 addition & 1 deletion src/theme/BlogPostItem/Container/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ html[data-theme='dark'] {

.article {
position: relative;
border: 1px solid var(--border-color);
/* border: 1px solid var(--border-color); */
}

.cover {
Expand Down
2 changes: 1 addition & 1 deletion src/theme/BlogPostItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { Props } from '@theme/BlogPostItem'
// apply a bottom margin in list view
function useContainerClassName() {
const { isBlogPostPage } = useBlogPost()
return !isBlogPostPage ? 'blogPost-container margin-bottom--lg' : 'blogPost-container'
return !isBlogPostPage ? 'blog-card margin-bottom--lg' : ''
}

export default function BlogPostItem({ children, className }: Props): JSX.Element {
Expand Down
2 changes: 1 addition & 1 deletion src/theme/BlogPostPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function BlogPostPageContent({

return (
<BlogLayout
sidebar={sidebar}
// sidebar={sidebar}
toc={
!hideTableOfContents && toc.length > 0 ? (
<TOC
Expand Down

0 comments on commit 310a6a0

Please sign in to comment.