diff --git a/.gitignore b/.gitignore index 28cde21f..3996e833 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ node_modules + .env -.DS_Store \ No newline at end of file +.DS_Store + diff --git a/frontend/app/src/components/ChallengeGrid/ChallengeItem.js b/frontend/app/src/components/ChallengeGrid/ChallengeItem.js index 861e9a61..fa446ea2 100644 --- a/frontend/app/src/components/ChallengeGrid/ChallengeItem.js +++ b/frontend/app/src/components/ChallengeGrid/ChallengeItem.js @@ -5,129 +5,127 @@ import Markdown from '../Markdown' import { requirePropFactory } from '@material-ui/core' const ChallengeItem = ({ item }) => { - //Animation duration - const aDur = 0.6 - const { - name, - company, - shorttext, - long_text, - thechallenge, - insights, - price, - judging, - aboutcompany, - insightimage, - tags, - key, - } = item - var { cardbackground, icon } = item - if (!cardbackground) { - cardbackground = { url: '' } - } - if (!icon) { - icon = { url: '' } - } - const [open, toggleOpen] = useState(false) - const [clicable, toggleClicable] = useState(true) - - const flipStyle = (e, state) => { - e.currentTarget.classList.toggle('flip', state) - e.currentTarget.doneAnimating = !state - } - const flipCard = (e) => { - console.log('===', clicable) - if (!clicable) { - return + //Animation duration + const aDur = 0.6 + const { + name, + company, + shorttext, + long_text, + thechallenge, + insights, + price, + judging, + aboutcompany, + insightimage, + tags, + key, + } = item + var { cardbackground, icon } = item + if (!cardbackground) { + cardbackground = { url: '' } + } + if (!icon) { + icon = { url: '' } } - let duration = aDur * 1000 - flipStyle(e, true) - setTimeout(() => toggleOpen(!open), duration / 2) - } + const [open, toggleOpen] = useState(false) + const [clicable, toggleClicable] = useState(true) + var blurStyle = "" + var isFirefox = typeof InstallTrigger !== 'undefined' - if (open) { + const flipStyle = (e, state) => { + e.currentTarget.classList.toggle('flip', state) + e.currentTarget.doneAnimating = !state + } + const flipCard = (e) => { + console.log('===', clicable) + if (!clicable) { + return + } + let duration = aDur * 1000 + flipStyle(e, true) + setTimeout(() => toggleOpen(!open), duration / 2) + } + if (isFirefox) { + blurStyle = "FirefoxBlur" + } else { + blurStyle = "Blur" + } + console.log(blurStyle) + if (open) { + return ( +
{shorttext}
+{long_text}
+The Challenge
+{thechallenge}
+Insights
+{insights}
+The Prize
+{price}
+Judging Criteria
+{judging}
+About the company
+{aboutcompany}
+{shorttext}
-The Challenge
-Insights
-The Prize
-Judging Criteria
-About the company
-{shorttext}
{shorttext}
-