1- import { isEmpty } from "../lib/side" ;
1+ import { isEmpty , isHex } from "../lib/side" ;
22// import Image from "next/image";
33
44export default function Home ( {
@@ -27,6 +27,10 @@ export default function Home({
2727 linktreeWidth,
2828 preview = false ,
2929} ) {
30+ let linkPaddingLowWidth = isEmpty ( linkPadding )
31+ ? "2em"
32+ : `${ linkPadding * 0.5 } em` ;
33+
3034 accentColor = isEmpty ( accentColor ) ? "#BDD7FF" : accentColor ;
3135 avatarwidth = isEmpty ( avatarwidth ) ? "50" : avatarwidth ;
3236 avatarBorderColor = isEmpty ( avatarBorderColor ) ? "#fff" : avatarBorderColor ;
@@ -38,7 +42,7 @@ export default function Home({
3842 ? "https://fonts.googleapis.com/css2?family=Roboto&display=swap"
3943 : fontUrl ;
4044 footerTextSize = isEmpty ( footerTextSize ) ? 12 : footerTextSize ;
41- footerBgColor = isEmpty ( footerBgColor ) ? "#000000 " : footerBgColor ;
45+ footerBgColor = isEmpty ( footerBgColor ) ? "" : footerBgColor ;
4246 footerTextColor = isEmpty ( footerTextColor ) ? "#ffffff" : footerTextColor ;
4347 linkPadding = isEmpty ( linkPadding ) ? "2em" : `${ linkPadding } em` ;
4448 linktreeWidth = isEmpty ( linktreeWidth ) ? "320px" : `${ linktreeWidth } px` ;
@@ -49,13 +53,16 @@ export default function Home({
4953 < div className = "wrap" >
5054 < div className = "profile" >
5155 { ! isEmpty ( avatarUrl ) && < img src = { avatarUrl } className = "photo" /> }
52- < a
53- className = "handlerLink"
54- href = { `${ handlerLink || "#" } ` }
55- target = "_blank"
56- >
57- < span className = "handlerText" > { handlerText } </ span >
58- </ a >
56+ < span className = "handlerText" >
57+ < a
58+ className = "handlerLink"
59+ href = { `${ handlerLink || "#" } ` }
60+ target = "_blank"
61+ >
62+ { handlerText } { " " }
63+ </ a >
64+ </ span >
65+
5966 < p className = "handlerDescription" > { handlerDescription } </ p >
6067 </ div >
6168 < div className = "social" >
@@ -74,7 +81,9 @@ export default function Home({
7481 } }
7582 >
7683 { link . iconClass && (
77- < i className = { `${ link . iconClass } single_icon fa-fw` } > </ i >
84+ < i
85+ className = { `${ link . iconClass } single_icon fa-fw` }
86+ > </ i >
7887 ) }
7988 </ a >
8089 </ li >
@@ -110,13 +119,13 @@ export default function Home({
110119 </ ul >
111120 </ div >
112121 </ div >
122+ { footerEnabled && (
123+ < div className = "footer d-flex align-items-center justify-content-center" >
124+ { /* Copyright © 2021 All Rights Reserved by. */ }
125+ { footerText }
126+ </ div >
127+ ) }
113128 </ div >
114- { footerEnabled && (
115- < div className = "footer d-flex align-items-center justify-content-center" >
116- { /* Copyright © 2021 All Rights Reserved by. */ }
117- { footerText }
118- </ div >
119- ) }
120129
121130 < style
122131 jsx
@@ -130,9 +139,11 @@ export default function Home({
130139
131140 .outterwrap {
132141 margin: 0;
133- padding: 15px;
142+ // padding: 15px;
143+ padding-top:2vh ;
134144 height: 100%;
135- min-height: ${ footerEnabled ? "96vh" : "100vh" } ;
145+ min-height: "100vh";
146+ // min-height: ${ footerEnabled ? "96vh" : "100vh" } ;
136147 width: 100%;
137148 font-family: ${ fontFamily } ;
138149 background: ${ bgColor } ;
@@ -143,8 +154,11 @@ export default function Home({
143154 }
144155
145156 .wrap {
157+ min-height: ${ footerEnabled ? "94vh" : "100vh" } ;
158+ height: 100%;
146159 width: 100%;
147160 max-width: ${ linktreeWidth } ;
161+ padding: 0 1em 0 1em;
148162 margin: 0 auto;
149163 }
150164
@@ -164,7 +178,7 @@ export default function Home({
164178 }
165179
166180 .footer {
167- position: absolute;
181+ // position: absolute;
168182 right: 0;
169183 // bottom: 0;
170184 height: 4vh;
@@ -175,7 +189,7 @@ export default function Home({
175189 text-align: center;
176190 color: ${ footerTextColor } ;
177191 font-size: ${ footerTextSize } px;
178- width: ${ preview ? "40%" : "100%" } ;
192+ // width: ${ preview ? "40%" : "100%" } ;
179193 }
180194
181195 a {
@@ -206,7 +220,7 @@ export default function Home({
206220 }
207221
208222 .social {
209- margin: 0 -2rem 0 -2rem;
223+ // margin: 0 -2rem 0 -2rem;
210224 }
211225 .social ul {
212226 list-style: none;
@@ -270,7 +284,8 @@ export default function Home({
270284
271285 @media (max-width: 768px) {
272286 .link {
273- padding: 1.2rem;
287+ padding : ${ linkPaddingLowWidth } ;
288+ // padding: 1.2rem;
274289 }
275290 ` } </ style >
276291 </ div >
0 commit comments