apisix-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liuxi...@apache.org
Subject [apisix-website] branch master updated: feat: add shanghai-meetup card (#449)
Date Fri, 13 Aug 2021 15:03:54 GMT
This is an automated email from the ASF dual-hosted git repository.

liuxiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
     new ce05e3f  feat: add shanghai-meetup card (#449)
ce05e3f is described below

commit ce05e3f9fdb1a218a6768c692858b45ff7ac1178
Author: Baoyuan <baoyuan.top@gmail.com>
AuthorDate: Fri Aug 13 10:03:46 2021 -0500

    feat: add shanghai-meetup card (#449)
---
 website/src/pages/index.js            |  23 ++++++-----------------
 website/static/img/200_mark_dark.jpg  | Bin 303462 -> 0 bytes
 website/static/img/200_mark_light.jpg | Bin 146187 -> 0 bytes
 website/static/img/meetup-card.jpg    | Bin 0 -> 427256 bytes
 4 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/website/src/pages/index.js b/website/src/pages/index.js
index eabcee7..45d1c61 100644
--- a/website/src/pages/index.js
+++ b/website/src/pages/index.js
@@ -258,22 +258,11 @@ const NewsletterSection = () => {
   );
 };
 
-// To be reused in the future
-const Contributor200Poster = () => {
+const EventPosterCard = () => {
   const [display, setDisplay] = useState(false);
-  const [theme, setTheme] = useState('light');
 
   useEffect(() => {
-    addEventListener('click', () => {
-      setTheme(localStorage.getItem('theme'));
-    });
-    if (localStorage.getItem("theme")) {
-      setTheme(localStorage.getItem('theme'));
-    };
-    if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
-      setTheme('dark');
-    }
-    if (!localStorage.getItem('SHOW_200_CONTRIBUTOR_EVENT_ENTRY')) {
+    if (!localStorage.getItem('SHOW_EVENT_ENTRY')) {
       setDisplay(true);
     };
   }, []);
@@ -281,7 +270,7 @@ const Contributor200Poster = () => {
   const onClose = () => {
     setDisplay(false);
     if (typeof window !== 'undefined') {
-      localStorage.setItem('SHOW_200_CONTRIBUTOR_EVENT_ENTRY', 'true');
+      localStorage.setItem('SHOW_EVENT_ENTRY', 'true');
     }
   };
 
@@ -296,9 +285,8 @@ const Contributor200Poster = () => {
           <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="/img/200_mark_light.jpg" alt="" />}
-        {theme === "dark" && <img src="/img/200_mark_dark.jpg" alt="" />}
+      <a href="/events/2021/08/21/shanghai-meetup" onClick={onClose}>
+        <img src="/img/meetup-card.jpg" alt="" />
       </a>
     </div>
   )
@@ -313,6 +301,7 @@ const Index = (props) => {
       <Showcase />
       <ContributionSection />
       <NewsletterSection />
+      <EventPosterCard />
     </Layout>
   );
 };
diff --git a/website/static/img/200_mark_dark.jpg b/website/static/img/200_mark_dark.jpg
deleted file mode 100644
index 8b28a86..0000000
Binary files a/website/static/img/200_mark_dark.jpg and /dev/null differ
diff --git a/website/static/img/200_mark_light.jpg b/website/static/img/200_mark_light.jpg
deleted file mode 100644
index c4ba064..0000000
Binary files a/website/static/img/200_mark_light.jpg and /dev/null differ
diff --git a/website/static/img/meetup-card.jpg b/website/static/img/meetup-card.jpg
new file mode 100644
index 0000000..e5097b6
Binary files /dev/null and b/website/static/img/meetup-card.jpg differ

Mime
View raw message