-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60beb88
commit 532d74e
Showing
15 changed files
with
572 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const BackGround = () => { | ||
return <div className="background"> | ||
<style jsx>{` | ||
.background{ | ||
position: relative; | ||
background: url('../static/img/blog.jpg') center center/cover no-repeat; | ||
min-height: 200px; | ||
max-height: 400px; | ||
} | ||
.background:after{ | ||
content: ''; | ||
display: block; | ||
padding-top:21%; | ||
} | ||
`}</style> | ||
</div> | ||
} | ||
export default BackGround |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import Link from 'next/link'; | ||
const CopyRight = () => { | ||
return ( | ||
<footer className="footer"> | ||
<div className="w1500"> | ||
<div className="list"> | ||
<div className="item"> | ||
<h3>关于Blog</h3> | ||
<p>此Blog诞生的原因是想记录一些日常踩到的坑,也希望借此可以结交到其他的小伙伴啦,分享技术,一起进步.</p> | ||
</div> | ||
<div className="item"> | ||
<h3>友情链接</h3> | ||
<div className="links"> | ||
<Link href="/blog"><a className="blog">博文</a></Link> | ||
<Link href="/"><a className="dev">实验室</a></Link> | ||
<Link href="/"><a className="message">留言</a></Link> | ||
<Link href="/"><a className="about">关于</a></Link> | ||
</div> | ||
</div> | ||
</div> | ||
<p>Design & Code by Blue.use Mongodb + Next.js</p> | ||
</div> | ||
<style jsx>{` | ||
.footer{ | ||
padding: 20px 0; | ||
color: #ccc; | ||
background: #333; | ||
font-size: 14px; | ||
} | ||
.list{ | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
h3{ | ||
font-size: 20px; | ||
padding-bottom: 10px; | ||
white-space: nowrap; | ||
} | ||
p{ | ||
padding-bottom: 10px; | ||
} | ||
.links{ | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
.links a{ | ||
line-height: 1.8; | ||
transition: 0.3s; | ||
} | ||
.links a:hover{ | ||
color: #1890ff; | ||
} | ||
@media(max-width:500px){ | ||
.list{ | ||
flex-direction: column; | ||
} | ||
.w1500{ | ||
width: 100%; | ||
} | ||
.links{ | ||
align-items: flex-start; | ||
} | ||
.footer{ | ||
padding: 20px 15px; | ||
} | ||
} | ||
`}</style> | ||
</footer> | ||
) | ||
} | ||
export default CopyRight |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react' | ||
import App, { Container } from 'next/app' | ||
import '../css/reset.styl'; | ||
import Head from 'next/head' | ||
|
||
class MyApp extends App { | ||
// Only uncomment this method if you have blocking data requirements for | ||
// every single page in your application. This disables the ability to | ||
// perform automatic static optimization, causing every page in your app to | ||
// be server-side rendered. | ||
// | ||
// static async getInitialProps(appContext) { | ||
// // calls page's `getInitialProps` and fills `appProps.pageProps` | ||
// const appProps = await App.getInitialProps(appContext); | ||
// | ||
// return { ...appProps } | ||
// } | ||
|
||
render() { | ||
const { Component, pageProps } = this.props | ||
return <Container> | ||
<Head> | ||
<title>Blog</title> | ||
</Head> | ||
<Component {...pageProps} /> | ||
</Container> | ||
} | ||
} | ||
|
||
export default MyApp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import Document, { Head, Main, NextScript } from 'next/document' | ||
export default class MyDocument extends Document { | ||
static async getInitialProps(ctx) { | ||
const initialProps = await Document.getInitialProps(ctx) | ||
return { ...initialProps } | ||
} | ||
render() { | ||
return ( | ||
<html lang="zh-cmn-Hans"> | ||
<Head> | ||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/> | ||
</Head> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</html> | ||
) | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.