Skip to content

Commit

Permalink
explorer: enable markdown for any type of answer in round applications (
Browse files Browse the repository at this point in the history
#2886)

* explorer: enable markdown for any type of answer in round applications

* update global css to use regular weight

* add full URL to github/twitter links in application page
  • Loading branch information
gravityblast authored Feb 6, 2024
1 parent 5f37f96 commit 14b6c47
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 23 deletions.
53 changes: 32 additions & 21 deletions packages/grant-explorer/src/features/round/ViewProjectDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ export default function ViewProjectDetails() {
onChange={handleTabChange}
tabs={projectDetailsTabs.map((tab) => tab.name)}
/>
<div>{projectDetailsTabs[selectedTab].content}</div>
<div className="[&_a]:underline">
{projectDetailsTabs[selectedTab].content}
</div>
</div>
</div>
</DefaultLayout>
Expand Down Expand Up @@ -309,23 +311,29 @@ function ProjectLinks({ project }: { project?: Project }) {
<ProjectLink url={website} icon={GlobeIcon}>
{website}
</ProjectLink>
<ProjectLink
url={projectTwitter}
icon={TwitterIcon}
isVerified={verified.data?.twitter}
>
{projectTwitter}
</ProjectLink>
<ProjectLink
url={projectGithub}
icon={GithubIcon}
isVerified={verified.data?.github}
>
{projectGithub}
</ProjectLink>
<ProjectLink url={userGithub} icon={GithubIcon}>
{userGithub}
</ProjectLink>
{projectTwitter !== undefined && (
<ProjectLink
url={`https://twitter.com/${projectTwitter}`}
icon={TwitterIcon}
isVerified={verified.data?.twitter}
>
{projectTwitter}
</ProjectLink>
)}
{projectGithub !== undefined && (
<ProjectLink
url={`https://github.com/${projectGithub}`}
icon={GithubIcon}
isVerified={verified.data?.github}
>
{projectGithub}
</ProjectLink>
)}
{userGithub !== undefined && (
<ProjectLink url={`https://github.com/${userGithub}`} icon={GithubIcon}>
{userGithub}
</ProjectLink>
)}
</div>
);
}
Expand Down Expand Up @@ -412,9 +420,12 @@ function ApplicationFormAnswers(props: {
className="text-md prose prose-h1:text-lg prose-h2:text-base prose-h3:text-base prose-a:text-blue-600"
></p>
) : (
<p className="text-base text-black">
{answerText.replace(/\n/g, "<br/>")}
</p>
<p
className="text-base text-black"
dangerouslySetInnerHTML={{
__html: renderToHTML(answerText.replace(/\n/g, "\n\n")),
}}
></p>
)}
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions packages/grant-explorer/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&display=swap');

@font-face {
font-family: "Modern Era Regular";
font-family: "Modern Era";
font-weight: 400;
src: local("ModernEraRegular"),
url("../public/modern-era-regular.otf") format('opentype');
Expand All @@ -16,7 +16,7 @@
}

@font-face {
font-family: "Modern Era";
font-family: "Modern Era Bold";
font-weight: 600;
src: local("ModernEraBold"),
url("../public/modern-era-bold.otf") format('opentype');
Expand Down

0 comments on commit 14b6c47

Please sign in to comment.