1502shivam-singh commented on a change in pull request #414:
URL: https://github.com/apache/apisix-website/pull/414#discussion_r670771341



##########
File path: website/src/pages/index.js
##########
@@ -258,9 +258,46 @@ const NewsletterSection = () => {
   );
 };
 
+const PicPoster = () => {
+  const [display, setDisplay] = useState(true);
+  const [theme, setTheme] = useState('light');
+
+  useEffect(() => {
+    addEventListener('click', () => {
+      if (localStorage.getItem('theme') !== theme) {
+        setTheme(localStorage.getItem('theme'));
+      };
+    });
+  }, [theme]);
+
+  if (!display || localStorage.getItem('SHOW_200_CONTRIBUTOR_EVENT_ENTRY')) {
+    return false;
+  };
+
+  const onClose = () => {
+    setDisplay(false);
+    localStorage.setItem('SHOW_200_CONTRIBUTOR_EVENT_ENTRY', 'read');
+  };
+
+  return (
+    <div className="pic-wrapper">
+      <button className="pic-wrapper-close" onClick={onClose}>
+        <svg aria-hidden="true" focusable="false" data-prefix="fas" 
data-icon="times" class="svg-inline--fa fa-times fa-w-11" role="img" 
xmlns="http://www.w3.org/2000/svg"; viewBox="0 0 352 512">
+          <path fill="currentColor" d="M242.72 256l100.07-100.07c12.28-12.28 
12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 
75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 
32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 
22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 
12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"></path>
+        </svg>
+      </button>
+      <a href="/blog/2021/07/06/celebrate-200-contributors" onClick={onClose}>
+        {theme === "light" && <img 
src="/static/img/pic_poster/200_mark_light.jpg" alt="" />}
+        {theme === "dark" && <img 
src="/static/img/pic_poster/200_mark_dark.jpg" alt="" />}

Review comment:
       For this one too.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to