Skip to content

Commit

Permalink
feat:#27 添加fork me on Github
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 6, 2022
1 parent f3d8c20 commit be4920a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/themes/default/css/header.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.forkMe{
position: fixed;
right: 8%;
z-index: 99;
}
4 changes: 4 additions & 0 deletions components/themes/default/css/layout.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.main {
padding-top: 10px;
word-break: break-all;
}
.main p{
word-break: break-all;
}

.sKeywordInfo {
Expand Down
10 changes: 10 additions & 0 deletions components/themes/default/defaultHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import Head from "next/head";
import DefaultNavbar from "./defaultNavbar";
import SiteConfig from "../../../lib/common/siteconfig";
import Image from "next/image";
import headerStyles from "./css/header.module.css"

export default function DefaultHeader({props,keyword}: { props: SiteConfig,keyword?:string }) {
return (
Expand All @@ -11,6 +13,14 @@ export default function DefaultHeader({props,keyword}: { props: SiteConfig,keywo
<meta name="description" content={props?.description}/>
</Head>
<header>
<div className={headerStyles.forkMe}>
<a href="https://github.com/you">
<Image loading="lazy" width="149" height="149"
src="https://github.blog/wp-content/uploads/2008/12/forkme_right_green_007200.png?resize=149%2C149"
className="attachment-full size-full" alt="Fork me on GitHub"
data-recalc-dims="1"/>
</a>
</div>
<DefaultNavbar props={props}/>
</header>
</>
Expand Down
3 changes: 3 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
images: {
domains: ['github.blog'],
},
}

module.exports = nextConfig

0 comments on commit be4920a

Please sign in to comment.