Skip to content

Commit

Permalink
fix fonts & some styles
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlanglen committed Oct 27, 2023
1 parent 422ab4c commit f314fb6
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 28 deletions.
2 changes: 1 addition & 1 deletion apps/potlock/widget/Buttons/ActionButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Button = styled.button`
flex-direction: row;
justify-content: center;
align-items: center;
padding: 8px 24px 12px 24px;
padding: 8px 24px;
background: ${getButtonBackground()};
overflow: hidden;
box-shadow: 0px -2.700000047683716px 0px #4a4a4a inset;
Expand Down
9 changes: 7 additions & 2 deletions apps/potlock/widget/Buttons/NavigationButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Button = styled.a`
flex-direction: row;
justify-content: center;
align-items: center;
padding: 8px 24px 12px 24px;
padding: 8px 24px;
background: ${getButtonBackground()};
overflow: hidden;
box-shadow: 0px -2.700000047683716px 0px #4a4a4a inset;
Expand All @@ -47,7 +47,12 @@ const Button = styled.a`
`;

return (
<Button href={props.href} onClick={props.onClick} disabled={props.disabled}>
<Button
href={props.href}
onClick={props.onClick}
disabled={props.disabled}
style={{ ...props.style }}
>
{props.text}
</Button>
);
35 changes: 30 additions & 5 deletions apps/potlock/widget/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,40 @@ const EDIT_PROJECT_TAB = "editproject";
const PROJECTS_LIST_TAB = "projects";
const PROJECT_DETAIL_TAB = "project";

const monaSansCss = fetch("https://fonts.cdnfonts.com/css/mona-sans").body;

if (!monaSansCss) return "";

const Theme = styled.div`
* {
font-family: "Mona-Sans";
font-style: normal;
font-weight: 400;
}
@font-face {
font-family: mona-sans;
font-style: normal;
font-weight: 400;
src: local("Mona-Sans"),
url(https://fonts.cdnfonts.com/s/91271/Mona-Sans-Regular.woff) format("woff");
}
@font-face {
font-family: mona-sans;
font-style: normal;
font-weight: 500;
src: local("Mona-Sans"),
url(https://fonts.cdnfonts.com/s/91271/Mona-Sans-Medium.woff) format("woff");
}
@font-face {
font-family: mona-sans;
font-style: normal;
font-weight: 600;
src: local("Mona-Sans"),
url(https://fonts.cdnfonts.com/s/91271/Mona-Sans-SemiBold.woff) format("woff");
}
@font-face {
font-family: mona-sans;
font-style: normal;
font-weight: 700;
src: local("Mona-Sans"),
url(https://fonts.cdnfonts.com/s/91271/Mona-Sans-Bold.woff) format("woff");
}
${monaSansCss}
`;

State.init({
Expand Down
2 changes: 1 addition & 1 deletion apps/potlock/widget/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const NavTab = styled.a`

const tabOptions = [
{ text: "Projects", link: "projects", disabled: false },
{ text: "Pot", link: "pot", disabled: true },
{ text: "Pots", link: "pots", disabled: true },
{ text: "Feed", link: "feed", disabled: true },
];

Expand Down
9 changes: 6 additions & 3 deletions apps/potlock/widget/Project/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ const IPFS_BASE_URL = "https://nftstorage.link/ipfs/";

const profile = props.profile;

if (!profile) return "Loading PROFILE...";
if (!profile) return "Loading...";

const loraCss = fetch("https://fonts.cdnfonts.com/css/lora").body;

const tags = Object.keys(profile.tags ?? {});

Expand All @@ -26,8 +28,9 @@ const Name = styled.div`
font-size: 48px;
font-weight: 500;
color: #2e2e2e;
line-height: 48px;
// font-family: Lora
line-height: 56px;
font-family: "Lora";
${loraCss}
`;

const AccountId = styled.div`
Expand Down
8 changes: 6 additions & 2 deletions apps/potlock/widget/Project/FollowStats.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ return (
href={`#/mob.near/widget/FollowPage?accountId=${accountId}&tab=following`}
className="text-dark"
>
<span className="fw-bolder me-2">Following</span>
<span style={{ fontWeight: 500 }} className="me-2">
Following
</span>
{numFollowing !== null ? <span className="text-muted">{numFollowing}</span> : "?"}
</a>
</div>
Expand All @@ -34,7 +36,9 @@ return (
href={`#/mob.near/widget/FollowPage?accountId=${accountId}&tab=followers`}
className="text-dark"
>
<span className="fw-bolder me-2">Follower{numFollowers !== 1 && "s"}</span>
<span style={{ fontWeight: 500 }} className="me-2">
Follower{numFollowers !== 1 && "s"}
</span>
{numFollowers !== null ? <span className="text-muted">{numFollowers}</span> : "?"}
</a>
</div>
Expand Down
2 changes: 2 additions & 0 deletions apps/potlock/widget/Project/ListPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ return (
type: "primary",
text: "Explore projects",
disabled: false,
style: { padding: "16px 24px" },
}}
/>
),
Expand All @@ -171,6 +172,7 @@ return (
text: "Create project",
disabled: false,
href: `?tab=createproject`,
style: { padding: "16px 24px" },
}}
/>
),
Expand Down
2 changes: 1 addition & 1 deletion build/potlock/src/Buttons/ActionButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Button = styled.button`
flex-direction: row;
justify-content: center;
align-items: center;
padding: 8px 24px 12px 24px;
padding: 8px 24px;
background: ${getButtonBackground()};
overflow: hidden;
box-shadow: 0px -2.700000047683716px 0px #4a4a4a inset;
Expand Down
9 changes: 7 additions & 2 deletions build/potlock/src/Buttons/NavigationButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Button = styled.a`
flex-direction: row;
justify-content: center;
align-items: center;
padding: 8px 24px 12px 24px;
padding: 8px 24px;
background: ${getButtonBackground()};
overflow: hidden;
box-shadow: 0px -2.700000047683716px 0px #4a4a4a inset;
Expand All @@ -47,7 +47,12 @@ const Button = styled.a`
`;

return (
<Button href={props.href} onClick={props.onClick} disabled={props.disabled}>
<Button
href={props.href}
onClick={props.onClick}
disabled={props.disabled}
style={{ ...props.style }}
>
{props.text}
</Button>
);
35 changes: 30 additions & 5 deletions build/potlock/src/Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,40 @@ const EDIT_PROJECT_TAB = "editproject";
const PROJECTS_LIST_TAB = "projects";
const PROJECT_DETAIL_TAB = "project";

const monaSansCss = fetch("https://fonts.cdnfonts.com/css/mona-sans").body;

if (!monaSansCss) return "";

const Theme = styled.div`
* {
font-family: "Mona-Sans";
font-style: normal;
font-weight: 400;
}
@font-face {
font-family: mona-sans;
font-style: normal;
font-weight: 400;
src: local("Mona-Sans"),
url(https://fonts.cdnfonts.com/s/91271/Mona-Sans-Regular.woff) format("woff");
}
@font-face {
font-family: mona-sans;
font-style: normal;
font-weight: 500;
src: local("Mona-Sans"),
url(https://fonts.cdnfonts.com/s/91271/Mona-Sans-Medium.woff) format("woff");
}
@font-face {
font-family: mona-sans;
font-style: normal;
font-weight: 600;
src: local("Mona-Sans"),
url(https://fonts.cdnfonts.com/s/91271/Mona-Sans-SemiBold.woff) format("woff");
}
@font-face {
font-family: mona-sans;
font-style: normal;
font-weight: 700;
src: local("Mona-Sans"),
url(https://fonts.cdnfonts.com/s/91271/Mona-Sans-Bold.woff) format("woff");
}
${monaSansCss}
`;

State.init({
Expand Down
2 changes: 1 addition & 1 deletion build/potlock/src/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const NavTab = styled.a`

const tabOptions = [
{ text: "Projects", link: "projects", disabled: false },
{ text: "Pot", link: "pot", disabled: true },
{ text: "Pots", link: "pots", disabled: true },
{ text: "Feed", link: "feed", disabled: true },
];

Expand Down
9 changes: 6 additions & 3 deletions build/potlock/src/Project/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ const IPFS_BASE_URL = "https://nftstorage.link/ipfs/";

const profile = props.profile;

if (!profile) return "Loading PROFILE...";
if (!profile) return "Loading...";

const loraCss = fetch("https://fonts.cdnfonts.com/css/lora").body;

const tags = Object.keys(profile.tags ?? {});

Expand All @@ -26,8 +28,9 @@ const Name = styled.div`
font-size: 48px;
font-weight: 500;
color: #2e2e2e;
line-height: 48px;
// font-family: Lora
line-height: 56px;
font-family: "Lora";
${loraCss}
`;

const AccountId = styled.div`
Expand Down
8 changes: 6 additions & 2 deletions build/potlock/src/Project/FollowStats.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ return (
href={`#/mob.near/widget/FollowPage?accountId=${accountId}&tab=following`}
className="text-dark"
>
<span className="fw-bolder me-2">Following</span>
<span style={{ fontWeight: 500 }} className="me-2">
Following
</span>
{numFollowing !== null ? <span className="text-muted">{numFollowing}</span> : "?"}
</a>
</div>
Expand All @@ -34,7 +36,9 @@ return (
href={`#/mob.near/widget/FollowPage?accountId=${accountId}&tab=followers`}
className="text-dark"
>
<span className="fw-bolder me-2">Follower{numFollowers !== 1 && "s"}</span>
<span style={{ fontWeight: 500 }} className="me-2">
Follower{numFollowers !== 1 && "s"}
</span>
{numFollowers !== null ? <span className="text-muted">{numFollowers}</span> : "?"}
</a>
</div>
Expand Down
2 changes: 2 additions & 0 deletions build/potlock/src/Project/ListPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ return (
type: "primary",
text: "Explore projects",
disabled: false,
style: { padding: "16px 24px" },
}}
/>
),
Expand All @@ -171,6 +172,7 @@ return (
text: "Create project",
disabled: false,
href: `?tab=createproject`,
style: { padding: "16px 24px" },
}}
/>
),
Expand Down

0 comments on commit f314fb6

Please sign in to comment.