[#773,website][xs]: fix datopian logo in dark mode
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { siteConfig } from '@/config/siteConfig';
|
import { siteConfig } from '@/config/siteConfig';
|
||||||
import { NextSeo } from 'next-seo';
|
import { NextSeo } from 'next-seo';
|
||||||
|
import { useTheme } from 'next-themes';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
|
|
||||||
@@ -58,6 +59,7 @@ export default function Layout({
|
|||||||
tableOfContents?;
|
tableOfContents?;
|
||||||
}) {
|
}) {
|
||||||
// const { toc } = children.props;
|
// const { toc } = children.props;
|
||||||
|
const { theme, setTheme } = useTheme();
|
||||||
|
|
||||||
const currentSection = useTableOfContents(tableOfContents);
|
const currentSection = useTableOfContents(tableOfContents);
|
||||||
|
|
||||||
@@ -87,14 +89,18 @@ export default function Layout({
|
|||||||
>
|
>
|
||||||
Built by{' '}
|
Built by{' '}
|
||||||
<img
|
<img
|
||||||
src="/datopian-logo.png"
|
src={
|
||||||
|
theme === 'dark'
|
||||||
|
? '/images/datopian-light-logotype.svg'
|
||||||
|
: '/images/datopian-dark-logotype.svg'
|
||||||
|
}
|
||||||
alt="Datopian Logo"
|
alt="Datopian Logo"
|
||||||
className="h-6 ml-2"
|
className="h-6 ml-2"
|
||||||
/>
|
/>
|
||||||
</a>
|
</a>
|
||||||
</footer>
|
</footer>
|
||||||
{/** TABLE OF CONTENTS */}
|
{/** TABLE OF CONTENTS */}
|
||||||
{tableOfContents.length > 0 && (siteConfig.tableOfContents) && (
|
{tableOfContents.length > 0 && siteConfig.tableOfContents && (
|
||||||
<div className="hidden xl:fixed xl:right-0 xl:top-[4.5rem] xl:block xl:w-1/5 xl:h-[calc(100vh-4.5rem)] xl:flex-none xl:overflow-y-auto xl:py-16 xl:pr-6 xl:mb-16">
|
<div className="hidden xl:fixed xl:right-0 xl:top-[4.5rem] xl:block xl:w-1/5 xl:h-[calc(100vh-4.5rem)] xl:flex-none xl:overflow-y-auto xl:py-16 xl:pr-6 xl:mb-16">
|
||||||
<nav aria-labelledby="on-this-page-title" className="w-56">
|
<nav aria-labelledby="on-this-page-title" className="w-56">
|
||||||
<h2 className="font-display text-md font-medium text-slate-900 dark:text-white">
|
<h2 className="font-display text-md font-medium text-slate-900 dark:text-white">
|
||||||
|
|||||||
1
site/public/images/datopian-dark-logotype.svg
Normal file
1
site/public/images/datopian-dark-logotype.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 59 KiB |
1
site/public/images/datopian-light-logotype.svg
Normal file
1
site/public/images/datopian-light-logotype.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 59 KiB |
Reference in New Issue
Block a user