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6DYL,EAAAA,QAAOU,EAACR,WAAA,CAAAC,YAAA,kBAAAC,YAAA,gBAARJ,CAAQ,uCAKpB+C,EAAW/C,EAAAA,QAAOU,EAACR,WAAA,CAAAC,YAAA,iBAAAC,YAAA,gBAARJ,CAAQ,qBA+BnBhC,GA3BWgC,EAAAA,QAAOS,KAAIP,WAAA,CAAAC,YAAA,iBAAAC,YAAA,gBAAXJ,CAAW,MAEXA,EAAAA,QAAOM,IAAGJ,WAAA,CAAAC,YAAA,iBAAAC,YAAA,gBAAVJ,CAAU,wLAOrBb,EAMA4D,GAOgB/C,EAAAA,QAAOM,IAAGJ,WAAA,CAAAC,YAAA,sBAAAC,YAAA,iBAAVJ,CAAU,2DAKdA,EAAAA,QAAOM,IAAGJ,WAAA,CAAAC,YAAA,kBAAAC,YAAA,iBAAVJ,CAAU,6CAKdA,EAAAA,QAAOQ,GAAEN,WAAA,CAAAC,YAAA,cAAAC,YAAA,iBAATJ,CAAS,kHAUVA,EAAAA,QAAOM,IAAGJ,WAAA,CAAAC,YAAA,aAAAC,YAAA,iBAAVJ,CAAU,yJ,kCC7MvB,MAbkBgD,IAEdjF,EAAAA,cAACkF,EAAAA,EAAM,KACLlF,EAAAA,cAACmF,EAAAA,GAAM,MACPnF,EAAAA,cAACoF,EAAAA,EAAgB,CAAC/D,MAAO,WACzBrB,EAAAA,cAACqF,EAAAA,GAAI,KACHrF,EAAAA,cAACsF,EAAI,OAEPtF,EAAAA,cAACuF,EAAAA,GAAM,M,qBChBb,g0I","sources":["webpack://madina-masjid-darwen/./node_modules/@material-ui/core/esm/styles/makeStyles.js","webpack://madina-masjid-darwen/./src/components/Template.jsx","webpack://madina-masjid-darwen/./src/components/News.jsx","webpack://madina-masjid-darwen/./src/pages/news.js","webpack://madina-masjid-darwen/./src/images/news.png"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { makeStyles as makeStylesWithoutDefault } from '@material-ui/styles';\nimport defaultTheme from './defaultTheme';\nfunction makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return makeStylesWithoutDefault(stylesOrCreator, _extends({\n defaultTheme: defaultTheme\n }, options));\n}\nexport default makeStyles;","import React, { useState, useEffect } from \"react\";\nimport styled from \"styled-components\";\nimport Http from \"../helpers/Http\";\nimport newsImage from \"../images/news.png\";\nimport eventImage from \"../images/hadithIcon.png\";\nconst dateFormat = require(\"dateformat\");\n\nconst Template = (props) => {\n return (\n \n \n \n );\n};\n\nexport default Template;\n\nconst Events = ({ data, image, type }) => {\n return (\n \n {data.map((item, key) => (\n \n \n \n \n {item.title.substring(0, 30) + \"...\"}\n {type === \"event\" ? (\n

\n on {dateFormat(item.eventDate, \"mmmm dS, yyyy\")}\n

\n ) : null}\n \n \n \n \n \n \n
\n \n
\n ))}\n
\n );\n};\n\nconst Button = styled.button`\n position: absolute;\n padding: 10px;\n background: var(--base-color);\n border: 0;\n border-radius: 4px;\n color: #fff;\n margin-top: 15px;\n cursor: pointer;\n bottom: 0;\n display: flex;\n justifycontent: center;\n alignitems: center;\n`;\n\nconst LiveSessionContainer = styled.div``;\n\nconst LiveSessionImage = styled.img`\n width: 100%;\n height: 254px;\n object-fit: cover;\n object-position: center;\n`;\n\nconst LiveSessionTitle = styled.h2`\n font-size: 30px;\n text-transform: uppercase;\n margin: 10px 0;\n @media (max-width: 480px) {\n font-size: 24px;\n }\n`;\n\nconst LiveSessionTime = styled.time`\n font-size: 14px;\n`;\n\nconst LiveSessionCard = styled.div`\n &:hover {\n ${LiveSessionTitle} {\n cursor: pointer;\n color: var(--base-color);\n }\n }\n`;\nconst NewsTitle = styled.p`\n font-size: 16px;\n font-weight: bold;\n`;\nconst NewsDate = styled.time``;\n\nconst NewsCard = styled.div`\n min-height: 250px;\n position: relative;\n border-bottom: 1px solid #fff;\n padding: 5px 20px;\n &:last-child {\n border-bottom: 0;\n }\n &:hover {\n ${NewsTitle} {\n cursor: pointer;\n color: var(--base-color);\n }\n }\n`;\n\nconst NewsContainer = styled.div`\n background-color: rgba(0, 0, 0, 0.025);\n padding: 14px 20px;\n`;\n\nconst Container = styled.div`\n background-color: #fff;\n padding: 32px 4%;\n`;\n\nconst Title = styled.h2`\n margin: 0;\n text-align: center;\n text-transform: uppercase;\n font-size: 36px;\n @media (max-width: 480px) {\n font-size: 30px;\n }\n`;\n\nconst Grid = styled.div`\n max-width: 1024px;\n margin: 4% auto;\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n grid-gap: 40px;\n\n @media (max-width: 768px) {\n grid-template-columns: 1fr;\n }\n`;\n","import React, { useState, useEffect } from \"react\";\nimport styled from \"styled-components\";\nimport Http from \"../helpers/Http\";\nimport { makeStyles } from \"@material-ui/core/styles\";\nimport Modal from \"@material-ui/core/Modal\";\nimport CancelIcon from \"@material-ui/icons/Cancel\";\nimport IconButton from \"@material-ui/core/IconButton\";\nimport Template from \"./Template\";\nimport newsIcon from \"../images/news.png\";\n\nfunction rand() {\n return Math.round(Math.random() * 20) - 10;\n}\n\nfunction getModalStyle() {\n const top = 50 + rand();\n const left = 20 + rand();\n\n return {\n top: `${top}%`,\n left: `${left}%`,\n transform: `translate(-${top}%, -${left}%)`,\n };\n}\n\nconst useStyles = makeStyles((theme) => ({\n paper: {\n position: \"absolute\",\n width: \"90%\",\n height: \"100%\",\n backgroundColor: theme.palette.background.paper,\n border: \"2px solid #000\",\n boxShadow: theme.shadows[5],\n padding: theme.spacing(2, 4, 3),\n top: \"50%\",\n left: \"50%\",\n right: \"auto\",\n bottom: \"auto\",\n overflow: \"scroll\",\n\n transform: \"translate(-50%, -50%)\",\n },\n title: {\n display: \"flex\",\n justifyContent: \"space-between\"\n }\n}));\n\nconst NewsContent = () => {\n const [events, setEvents] = useState([]);\n const [news, setNews] = useState([]);\n useEffect(() => {\n try {\n Http.get(\"content/type/3\")\n .then((response) => {\n setNews(response.data.contents);\n })\n .catch((error) => {\n console.log(error);\n });\n Http.get(\"content/type/4\")\n .then((response) => {\n setEvents(response.data.contents);\n })\n .catch((error) => {\n console.log(error);\n });\n } catch (error) {\n console.log(error);\n }\n }, []);\n return (\n \n