Browse Source

fix styling

master
Christian Ziermann 4 years ago
parent
commit
7987e18fd5
11 changed files with 58 additions and 19 deletions
  1. +12
    -0
      components/link-list.tsx
  2. +6
    -4
      components/misc/header.tsx
  3. +1
    -2
      components/misc/logo.tsx
  4. +13
    -0
      package-lock.json
  5. +2
    -0
      package.json
  6. +4
    -5
      pages/_app.tsx
  7. +3
    -1
      pages/index.tsx
  8. BIN
      public/img/background-mobile.png
  9. BIN
      public/img/background.png
  10. +5
    -1
      styles/globals.css
  11. +12
    -6
      tailwind.config.js

+ 12
- 0
components/link-list.tsx View File

import { FaItunes, FaSpotify, FaTwitter } from 'react-icons/fa';

export default function LinkList() {
return (
<span className="flex flex-row justify-evenly w-1/3 bg-blue-900 bg-gradient-to-t top-1 bottom-1 rounded">
<FaTwitter color="#1DA1F2" />
<FaSpotify color="#1DB954" />
<FaItunes color="white" />
</span>

)
}

+ 6
- 4
components/misc/header.tsx View File

import { SUB_TITLE } from "../../misc/globals";
import { SUB_TITLE } from "../../misc/globals";
import LinkList from "../link-list";
import SvgLogo from "./logo"; import SvgLogo from "./logo";
export default function Header() { export default function Header() {
return ( return (
<header className="flex justify-center h-screen w-auto items-center md:items-baseline ">
<div className="flex flex-col w-full">
<SvgLogo className="object-fill w-full h-auto" />
<header className="bg-cover bg-no-repeat bg-film-background h-full w-auto">
<div className="flex justify-center items-center flex-col w-full h-full md:space-y-7 ">
<SvgLogo className="object-fill md:w-auto w-full h-auto md:h-2/3" />
<h2 className="capitalize text-white font-bold text-center md:text-3xl"> <h2 className="capitalize text-white font-bold text-center md:text-3xl">
{SUB_TITLE} {SUB_TITLE}
</h2> </h2>
<LinkList />
</div> </div>
</header> </header>
) )

+ 1
- 2
components/misc/logo.tsx View File

return ( return (
<svg <svg
viewBox="0 0 1500 750" viewBox="0 0 1500 750"
height="100%"
width="100%"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink" xmlnsXlink="http://www.w3.org/1999/xlink"
{...props} {...props}
style={{width: '100%'}}
> >
<defs> <defs>
<symbol overflow="visible" id="logo_svg__e"> <symbol overflow="visible" id="logo_svg__e">

+ 13
- 0
package-lock.json View File

"csstype": "^3.0.2" "csstype": "^3.0.2"
} }
}, },
"@types/react-icons": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/react-icons/-/react-icons-3.0.0.tgz",
"integrity": "sha512-Vefs6LkLqF61vfV7AiAqls+vpR94q67gunhMueDznG+msAkrYgRxl7gYjNem/kZ+as2l2mNChmF1jRZzzQQtMg==",
"requires": {
"react-icons": "*"
}
},
"@webassemblyjs/ast": { "@webassemblyjs/ast": {
"version": "1.9.0", "version": "1.9.0",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz",
"scheduler": "^0.20.1" "scheduler": "^0.20.1"
} }
}, },
"react-icons": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.1.0.tgz",
"integrity": "sha512-FCXBg1JbbR0vWALXIxmFAfozHdVIJmmwCD81Jk0EKOt7Ax4AdBNcaRkWhR0NaKy9ugJgoY3fFvo0PHpte55pXg=="
},
"react-is": { "react-is": {
"version": "16.13.1", "version": "16.13.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",

+ 2
- 0
package.json View File

"start": "next start" "start": "next start"
}, },
"dependencies": { "dependencies": {
"@types/react-icons": "^3.0.0",
"autoprefixer": "^10.2.1", "autoprefixer": "^10.2.1",
"next": "10.0.5", "next": "10.0.5",
"postcss": "^8.2.4", "postcss": "^8.2.4",
"react": "17.0.1", "react": "17.0.1",
"react-dom": "17.0.1", "react-dom": "17.0.1",
"react-icons": "^4.1.0",
"tailwindcss": "^2.0.2" "tailwindcss": "^2.0.2"
}, },
"devDependencies": { "devDependencies": {

+ 4
- 5
pages/_app.tsx View File



function MyApp({ Component, pageProps }) { function MyApp({ Component, pageProps }) {
return ( return (
<div style={{ backgroundColor: '#ad4932' }}>
<div className="bg-primary">
<Head> <Head>
<title>Nerdbrawl</title> <title>Nerdbrawl</title>
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<link href="https://fonts.googleapis.com/css2?family=Comic+Neue:wght@300&display=swap" rel="stylesheet"></link> <link href="https://fonts.googleapis.com/css2?family=Comic+Neue:wght@300&display=swap" rel="stylesheet"></link>
</Head> </Head>


<Header />

<main className="flex flex-col justify-around items-center">
<main className="h-screen w-screen">
<Header />
<Component {...pageProps} /> <Component {...pageProps} />
<Footer />
</main> </main>
<Footer />




</div> </div>

+ 3
- 1
pages/index.tsx View File

import Head from 'next/head' import Head from 'next/head'
export default function Home() { export default function Home() {
return ( return (
<div>test</div>
<div className="grid grid-flow-row gap-3">
<article></article>
</div>
) )
} }

BIN
public/img/background-mobile.png View File

Before After
Width: 363  |  Height: 583  |  Size: 73KB

BIN
public/img/background.png View File

Before After
Width: 1680  |  Height: 945  |  Size: 165KB

+ 5
- 1
styles/globals.css View File

@tailwind base; @tailwind base;
@tailwind components; @tailwind components;
@tailwind utilities;
@tailwind utilities;

body {
width: 100%;
}

+ 12
- 6
tailwind.config.js View File

module.exports = { module.exports = {
purge: ['./pages/**/*.tsx', './components/**/*.tsx'], purge: ['./pages/**/*.tsx', './components/**/*.tsx'],
darkMode: 'media', // or 'media' or 'class'
backgroundColor: theme => ({
...theme('colors'),
'primary': '#e76143',
}),
darkMode: 'class', // or 'media' or 'class'
theme: { theme: {
extend: {
backgroundColor: theme => ({
...theme('colors'),
'primary': '#ad4932',
}),
backgroundImage: theme => ({
'film-background': "url('/img/background.png')",
'mb-film-background': "url('/img/background-mobile.png')",
}),
},
fontFamily: { fontFamily: {
'diplay': ['Comic Neue'], 'diplay': ['Comic Neue'],
'body': ['Comic Neue'],
'body': ['Comic Neue'],
'sans': ['Comic Neue'] 'sans': ['Comic Neue']
} }
}, },

Loading…
Cancel
Save