mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-07-27 12:42:28 +02:00
fixed pagination, fixed cookiebar dark mode, fixed rendering issues during ssr, moved all test blog code to a test folder
This commit is contained in:
@@ -4,14 +4,14 @@ $shadow: 0px -1px 5px rgba(50, 50, 50, 0.75);
|
||||
|
||||
.cookieBar {
|
||||
align-items: baseline;
|
||||
background: #fff;
|
||||
border-top: 1px solid #808080;
|
||||
background: $color-bg;
|
||||
border-top: 1px solid $color-gray-border;
|
||||
bottom: 0px;
|
||||
|
||||
-webkit-box-shadow: $shadow;
|
||||
-moz-box-shadow: $shadow;
|
||||
box-shadow: $shadow;
|
||||
color: #000;
|
||||
color: $color-base;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
@@ -27,7 +27,7 @@ $shadow: 0px -1px 5px rgba(50, 50, 50, 0.75);
|
||||
}
|
||||
|
||||
.button {
|
||||
background: #fff;
|
||||
background: $color-bg;
|
||||
border: 1px solid $color-gray-border;
|
||||
border-radius: $button-border-radius;
|
||||
color: $color-base;
|
||||
|
@@ -19,7 +19,7 @@ exports[`Pagination renders correctly 1`] = `
|
||||
href="/typography/page/3"
|
||||
rel="next"
|
||||
>
|
||||
→ NEXT
|
||||
NEXT →
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -12,7 +12,11 @@ const Author = () => {
|
||||
<a href="/pages/about">
|
||||
<strong>{author.name}</strong>
|
||||
</a>
|
||||
<span className="showInPrintView"> {`@ ${window.location}`}</span>
|
||||
{typeof window !== "undefined" ? (
|
||||
<span className="showInPrintView"> {window ? `@ ${window.location}` : ""}</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
@@ -9,6 +9,9 @@ import { Themes } from "./Themes";
|
||||
type Props = { showLabel: boolean };
|
||||
|
||||
export const ThemeSwitcher: FunctionComponent<Props> = ({ showLabel }) => {
|
||||
if (typeof document === "undefined") {
|
||||
return null;
|
||||
}
|
||||
const initTheme = document.documentElement.dataset.theme;
|
||||
const [theme, setTheme] = useState(initTheme);
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
const PAGINATION = {
|
||||
PREV_PAGE: "← PREV",
|
||||
NEXT_PAGE: "→ NEXT",
|
||||
NEXT_PAGE: "NEXT →",
|
||||
};
|
||||
|
||||
export default PAGINATION;
|
||||
|
@@ -336,7 +336,7 @@ exports[`CategoryTemplate renders correctly 1`] = `
|
||||
href="/typography/page/3"
|
||||
rel="next"
|
||||
>
|
||||
→ NEXT
|
||||
NEXT →
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -19,14 +19,11 @@ interface Props {
|
||||
|
||||
const IndexTemplate: React.FC<Props> = ({ data, pageContext }: Props) => {
|
||||
const { title: siteTitle, subtitle: siteSubtitle } = useSiteMetadata();
|
||||
|
||||
const { pagination } = pageContext;
|
||||
const { currentPage, hasNextPage, hasPrevPage, prevPagePath, nextPagePath } =
|
||||
pagination;
|
||||
const { currentPage, hasNextPage, hasPrevPage, prevPagePath, nextPagePath } = pagination;
|
||||
|
||||
const { edges } = data.allMarkdownRemark;
|
||||
const pageTitle =
|
||||
currentPage > 0 ? `Posts - Page ${currentPage} - ${siteTitle}` : siteTitle;
|
||||
const pageTitle = currentPage > 0 ? `Posts - Page ${currentPage} - ${siteTitle}` : siteTitle;
|
||||
|
||||
return (
|
||||
<Layout title={pageTitle} description={siteSubtitle}>
|
||||
|
@@ -333,7 +333,7 @@ exports[`IndexTemplate renders correctly 1`] = `
|
||||
href="/typography/page/3"
|
||||
rel="next"
|
||||
>
|
||||
→ NEXT
|
||||
NEXT →
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -336,7 +336,7 @@ exports[`TagTemplate renders correctly 1`] = `
|
||||
href="/typography/page/3"
|
||||
rel="next"
|
||||
>
|
||||
→ NEXT
|
||||
NEXT →
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user