Skip to content

Commit

Permalink
Add ebi survey banner (#657)
Browse files Browse the repository at this point in the history
* - Add survey banner

* - Change banner type to info
  • Loading branch information
haideriqbal authored May 14, 2024
1 parent 7067ffb commit adeba9c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions frontend/dist/banner.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Do data resources managed by EMBL-EBI and our collaborators make a difference to your work? <br><br>
Please take 10 minutes to fill in our annual user survey, and help us make the case for why sustaining open data resources is critical for life sciences research.<br><br>
Survey link: <a href='https://www.surveymonkey.com/r/HJKYKTT?channel=[webpage]' target='_blank'>https://www.surveymonkey.com/r/HJKYKTT?channel=[webpage]</a>
3 changes: 3 additions & 0 deletions frontend/src/banner.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Do data resources managed by EMBL-EBI and our collaborators make a difference to your work? <br><br>
Please take 10 minutes to fill in our annual user survey, and help us make the case for why sustaining open data resources is critical for life sciences research.<br><br>
Survey link: <a href='https://www.surveymonkey.com/r/HJKYKTT?channel=[webpage]' target='_blank'>https://www.surveymonkey.com/r/HJKYKTT?channel=[webpage]</a>
12 changes: 6 additions & 6 deletions frontend/src/components/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ export function Banner({
: ""
}`}
>
<span>
<div style={{display: 'flex', alignItems: 'center'}}>
{type === "info" && (
<i className="icon icon-common icon-info text-2xl text-blue-500 mr-2" />
<i className="icon icon-common icon-info text-2xl text-blue-500 mr-2"/>
)}
{type === "warning" && (
<i className="icon icon-common icon-exclamation-triangle text-2xl text-yellow-800 mr-2" />
<i className="icon icon-common icon-exclamation-triangle text-2xl text-yellow-800 mr-2"/>
)}
{type === "error" && (
<i className="icon icon-common icon-exclamation-circle text-2xl text-red-500 mr-2" />
<i className="icon icon-common icon-exclamation-circle text-2xl text-red-500 mr-2"/>
)}
</span>
{children}
<div dangerouslySetInnerHTML={{__html: children}}/>
</div>
</div>
);
}
2 changes: 1 addition & 1 deletion frontend/src/pages/home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function Home() {
<main className="container mx-auto px-4 h-fit">
{banner !== "" && (
<div className="mt-4">
<Banner type="warning">{banner}</Banner>
<Banner type="info">{banner}</Banner>
</div>
)}
<div className="grid grid-cols-1 lg:grid-cols-4 lg:gap-8">
Expand Down

0 comments on commit adeba9c

Please sign in to comment.