repl.it
@lachlanjc/

nextjs_dashboard-2

Next.js

No description

fork
loading
Files
  • pages
    • index.js
  • components
  • yarn-error.log
  • yarn.lock
  • Packager files
  • package.json
pages/index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import React from 'react'
import Weather from '../components/Weather'
import News from '../components/News'

export default () => (
  <>
    <h1>Welcome, Lachlan!</h1>
    <p>
      It’s{' '}
      {new Date().toLocaleDateString('en-us', { weekday: 'long' })}
      {'. '}
      You’re doing great.
    </p>
    <Weather />
    <News />
    <footer>
      Powered by <a href="https://newsapi.org/">NewsAPI</a> and <a href="https://darksky.net/poweredby/">Dark Sky</a>
    </footer>
    <style jsx>{`
      p {
        margin-top: 0.25rem;
        font-size: 1.5rem;
        color: #555;
      }
      a {
        color: #555;
      }
      footer {
        color: gray;
        font-size: 0.75rem;
      }
    `}</style>
    <style jsx global>{`
      body {
        font-family: system-ui, Roboto, sans-serif;
        line-height: 1.5;
        max-width: 48rem;
        margin: auto;
        padding: 2rem 1rem;
      }
      h1 {
        color: magenta;
        font-size: 3rem;
        font-weight: 800;
        margin: 0;
      }
      h2 {
        font-size: 2rem;
        font-weight: 800;
        margin-bottom: 0;
      }
    `}</style>
  </>
)
?