mirror of
https://github.com/skidoodle/albert.lol.git
synced 2025-02-15 06:09:15 +01:00
🔥
This commit is contained in:
commit
abfc3e09b9
21 changed files with 553 additions and 0 deletions
17
pages/_app.tsx
Normal file
17
pages/_app.tsx
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { fas } from '@fortawesome/free-solid-svg-icons';
|
||||
import { fab } from '@fortawesome/free-brands-svg-icons';
|
||||
import { config, library } from '@fortawesome/fontawesome-svg-core';
|
||||
|
||||
import type { AppProps } from 'next/app'
|
||||
|
||||
import '../src/styles/globals.scss'
|
||||
import '@fortawesome/fontawesome-svg-core/styles.css'
|
||||
|
||||
library.add(fab, fas)
|
||||
config.autoAddCss = false
|
||||
|
||||
const MyApp = ({ Component, pageProps }: AppProps) => {
|
||||
return <Component {...pageProps} />
|
||||
}
|
||||
|
||||
export default MyApp
|
26
pages/_document.tsx
Normal file
26
pages/_document.tsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { Html, Head, Main, NextScript } from 'next/document'
|
||||
|
||||
const Document = () => {
|
||||
return (
|
||||
<>
|
||||
<Html lang='en'>
|
||||
<Head>
|
||||
<link rel="preconnect" href="https://vitals.vercel-insights.com" />
|
||||
<link rel="preconnect" href="https://ws.audioscrobbler.com" />
|
||||
<meta property="og:url" content="https://albrt.hu" />
|
||||
<meta property="og:site_name" content="albrt.hu" />
|
||||
<meta name='title' content='albert' />
|
||||
<meta name='og:title' content='albert' />
|
||||
<meta name='description' content='system administrator' />
|
||||
<meta name='og:description' content='system administrator' />
|
||||
<meta name='theme-color' content='#000000' />
|
||||
<meta property='og:image' content='/favicon.ico' />
|
||||
</Head>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</Html>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Document
|
45
pages/index.tsx
Normal file
45
pages/index.tsx
Normal file
|
@ -0,0 +1,45 @@
|
|||
import { GetServerSideProps } from 'next'
|
||||
import Head from 'next/head'
|
||||
import Body from '../src/components/Body'
|
||||
import Footer from '../src/components/Footer'
|
||||
import Icon from '../src/components/Icon'
|
||||
import IconLayout from '../src/components/IconLayout'
|
||||
import MainLayout from '../src/components/MainLayout'
|
||||
import Spotify from '../src/components/Spotify'
|
||||
import Time from '../src/components/Time'
|
||||
import Weather from '../src/components/Weather'
|
||||
|
||||
const Home = ({data}: any) => {
|
||||
return(
|
||||
<>
|
||||
<Head>
|
||||
<title>albert</title>
|
||||
</Head>
|
||||
<Body>
|
||||
<MainLayout />
|
||||
<IconLayout>
|
||||
<Icon icon={['fab', 'discord']} reference={'albert#8838'} copy={true} />
|
||||
<Icon icon={['fab', 'steam']} reference={'https://steamcommunity.com/id/_albert'} copy={false} />
|
||||
<Icon icon={['fab', 'github']} reference={'https://github.com/skidoodle'} copy={false} />
|
||||
<Icon icon={['fa', 'envelope']} reference={'hello@albrt.hu'} copy={true} />
|
||||
<Icon icon={['fab', 'instagram']} reference={'https://instagram.com/albertadam_'} copy={false} />
|
||||
</IconLayout>
|
||||
<Time />
|
||||
<Weather data={data}/>
|
||||
<Spotify />
|
||||
</Body>
|
||||
<Footer />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async () => {
|
||||
const response = await fetch('https://api.openweathermap.org/data/2.5/weather?lat=47.51&lon=19.04&appid=1b3c10c18e894eaf1fd63eedde53fa54&units=metric')
|
||||
const data = await response.json()
|
||||
|
||||
return {
|
||||
props: { data }
|
||||
}
|
||||
}
|
||||
|
||||
export default Home
|
Loading…
Add table
Add a link
Reference in a new issue