mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-16 04:02:15 +00:00
Add modified date to web docs
This commit is contained in:
parent
d45836f14e
commit
2ffc5d67a6
@ -1,13 +1,18 @@
|
|||||||
|
import getConfig from 'next/config'
|
||||||
import CopyleftIcon from './CopyleftIcon'
|
import CopyleftIcon from './CopyleftIcon'
|
||||||
|
|
||||||
const Footer: React.FunctionComponent = () => {
|
const Footer: React.FunctionComponent = () => {
|
||||||
|
const { publicRuntimeConfig } = getConfig()
|
||||||
|
const { modifiedDate, modifiedYear } = publicRuntimeConfig
|
||||||
return (
|
return (
|
||||||
<div className="flex py-4 justify-center items-center">
|
<div className="flex py-4 justify-center items-center">
|
||||||
<div className="px-1">
|
<div className="px-1">
|
||||||
<CopyleftIcon width={20} height={20} />
|
<CopyleftIcon width={20} height={20} />
|
||||||
</div>
|
</div>
|
||||||
<div className="px-1 font-sans text-sm">
|
<div className="px-1 font-sans text-xs">
|
||||||
<p>{new Date().getFullYear()} Conky developers</p>
|
<p>
|
||||||
|
{modifiedYear} Conky developers, updated <code>{modifiedDate}</code>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
12
web/global.d.ts
vendored
Normal file
12
web/global.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
declare module 'next/config' {
|
||||||
|
type ConfigTypes = () => {
|
||||||
|
publicRuntimeConfig: {
|
||||||
|
modifiedDate: string
|
||||||
|
modifiedYear: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare const getConfig: ConfigTypes
|
||||||
|
|
||||||
|
export default getConfig
|
||||||
|
}
|
13
web/next.config.mjs
Normal file
13
web/next.config.mjs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
// @ts-check
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {import('next').NextConfig}
|
||||||
|
*/
|
||||||
|
const nextConfig = {
|
||||||
|
publicRuntimeConfig: {
|
||||||
|
modifiedDate: new Date().toISOString(),
|
||||||
|
modifiedYear: new Date().getFullYear(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
export default nextConfig
|
@ -15,6 +15,6 @@
|
|||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"jsx": "preserve"
|
"jsx": "preserve"
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
"include": ["next-env.d.ts", "global.d.ts", "**/*.ts", "**/*.tsx"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user