[Fix] Align social icons to the left

This commit is contained in:
Sarbik Betal
2020-09-25 15:37:39 +05:30
parent f3e7277048
commit a74802d33a
2 changed files with 19 additions and 3 deletions
+17 -2
View File
@@ -26,6 +26,18 @@ const Markdown = props => {
} }
return "" return ""
} }
const SectionTitle = props => {
if (props.label) {
return (
<>
{`<h3 align="left">${props.label}</h3>`}
<br />
<br />
</>
)
}
return ""
}
const DisplayWork = props => { const DisplayWork = props => {
if (props.prefix && props.project) { if (props.prefix && props.project) {
if (props.link) { if (props.link) {
@@ -61,7 +73,7 @@ const Markdown = props => {
if (props.username) { if (props.username) {
return ( return (
<> <>
{`<a href="${props.base}/${props.username}" target="blank"><img align="center" src="${props.icon}" alt="${props.username}" height="30" width="30" /></a>`} {`<a href="${props.base}/${props.username}" target="blank" style="margin:0.5rem"><img align="center" src="${props.icon}" alt="${props.username}" height="30" width="30" /></a>`}
<br /> <br />
</> </>
) )
@@ -273,7 +285,10 @@ const Markdown = props => {
github={props.social.github} github={props.social.github}
/> />
</> </>
{isSocial(props.social) ? `<p align="center">` : ""} <br /> {isSocial(props.social) ? `<p align="left">` : ""} <br />
<>
<SectionTitle label="Connect with me:" />
</>
<> <>
<DisplaySocial <DisplaySocial
base="https://codepen.io" base="https://codepen.io"
+2 -1
View File
@@ -104,7 +104,8 @@ const MarkdownPreview = props => {
} }
const SocialPreview = props => { const SocialPreview = props => {
return ( return (
<div className="flex justify-center items-end"> <div className="flex justify-start items-end flex-wrap">
<h3 className="w-full text-lg sm:text-xl">Connect with me:</h3>
<DisplaySocial <DisplaySocial
base="https://codepen.io" base="https://codepen.io"
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg" icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"