You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/02/08 07:55:44 UTC

[GitHub] [apisix-website] guoqqqi commented on a change in pull request #870: chore:add the LTS download button of 'apisix'

guoqqqi commented on a change in pull request #870:
URL: https://github.com/apache/apisix-website/pull/870#discussion_r801345719



##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -46,6 +68,10 @@ const ProjectCard = (props) => {
     githubBranch,
     downloadPath
   } = props;
+
+  const Download=props.name==='APISIX®'?'2.11.0 Current':'Download'
+  
+  

Review comment:
       ```suggestion
   
   ```

##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -13,6 +13,7 @@ import IconStarSolid from "../../assets/icons/star-solid.svg";
 import IconOctagon from "../../assets/icons/octagon.svg";
 import IconShield from "../../assets/icons/shield.svg";
 
+

Review comment:
       ```suggestion
   ```

##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -70,6 +97,23 @@ const ProjectCard = (props) => {
     });
   }, []);
 
+  
+  
+  
+  const LTSButton=()=>{
+    
+    return(
+      <Button
+          style={{display: (name==='APISIX®'? ' ':'NONE')}}
+          onClick={() => setIsLTSDropdownOpen(!isLTSDropdownOpen)}
+          background={color}
+      >
+            <IconDownload /> 2.10.3 LTS
+          </Button>
+    )
+  }
+ 
+  

Review comment:
       Please format the code

##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -258,6 +356,8 @@ const RightSide = styled.div`
     padding-left: 0;
   }
 `;
+

Review comment:
       ditto

##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -46,6 +68,10 @@ const ProjectCard = (props) => {
     githubBranch,
     downloadPath
   } = props;
+
+  const Download=props.name==='APISIX®'?'2.11.0 Current':'Download'

Review comment:
       ```suggestion
     const Download = props.name ==='APISIX®' ? '2.11.0 Current' : 'Download'
   ```

##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -231,6 +311,12 @@ const LeftSideLinks = styled.div`
     margin-right: 4px;
   }
 `;
+const ButtonRow=styled.div`
+  inline-size:auto;
+  display: flex;
+  

Review comment:
       ditto

##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -70,6 +97,23 @@ const ProjectCard = (props) => {
     });
   }, []);
 
+  
+  
+  

Review comment:
       We don't need extra blank lines

##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -32,7 +33,28 @@ const Dropdown = (props) => {
   );
 };
 
+const LTSDropdown = (props) => {
+  const ref = useRef();
+  const { isLTSDropdownOpen, setIsLTSDropdownOpen } = props;
+  useOutsideClick(ref, () => {
+    if (isLTSDropdownOpen) {
+      setIsLTSDropdownOpen(false);
+    }
+  });
+  return (
+    <StyledDropdown
+      className="downloads-dropdown"
+      ref={ref}
+      open={isLTSDropdownOpen}
+    >
+      {props.children}
+    </StyledDropdown>
+  );
+};
+
+

Review comment:
       ```suggestion
   ```

##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -112,12 +156,47 @@ const ProjectCard = (props) => {
           Release Date ·{" "}
           <span className="downloads-versioninfo-span">{releaseDate}</span>
         </VersionInfo>
-        <div>
+        
+         <ButtonRow>
+          <LTSCard>
+          <LTSButton />
+          <LTSDropdown
+            isLTSDropdownOpen={isLTSDropdownOpen}
+            setIsLTSDropdownOpen={setIsLTSDropdownOpen}
+          >
+            <DropdownItem
+              className="download-dropdown-item"
+              href={`https://www.apache.org/dyn/closer.cgi/apisix/2.10.3/apache-apisix-2.10.3-src.tgz`}
+              target="_blank"
+            >
+              Source
+            </DropdownItem>
+            <DropdownItem
+              className="download-dropdown-item"
+              href={`https://www.apache.org/dyn/closer.cgi/apisix/2.10.3/apache-apisix-2.10.3-src.tgz.asc`}
+              target="_blank"
+            >
+              ASC
+            </DropdownItem>
+            <DropdownItem
+              className="download-dropdown-item"
+              href={`https://www.apache.org/dyn/closer.cgi/apisix/2.10.3/apache-apisix-2.10.3-src.tgz.sha512`}
+              target="_blank"
+            >
+              SHA512
+            </DropdownItem>
+          </LTSDropdown>
+        </LTSCard>
+
+        
+      
+        <ButtonCard>
           <Button
+            

Review comment:
       ditto

##########
File path: website/src/pages/downloads/ProjectCard.js
##########
@@ -112,12 +156,47 @@ const ProjectCard = (props) => {
           Release Date ·{" "}
           <span className="downloads-versioninfo-span">{releaseDate}</span>
         </VersionInfo>
-        <div>
+        
+         <ButtonRow>
+          <LTSCard>
+          <LTSButton />
+          <LTSDropdown
+            isLTSDropdownOpen={isLTSDropdownOpen}
+            setIsLTSDropdownOpen={setIsLTSDropdownOpen}
+          >
+            <DropdownItem
+              className="download-dropdown-item"
+              href={`https://www.apache.org/dyn/closer.cgi/apisix/2.10.3/apache-apisix-2.10.3-src.tgz`}
+              target="_blank"
+            >
+              Source
+            </DropdownItem>
+            <DropdownItem
+              className="download-dropdown-item"
+              href={`https://www.apache.org/dyn/closer.cgi/apisix/2.10.3/apache-apisix-2.10.3-src.tgz.asc`}
+              target="_blank"
+            >
+              ASC
+            </DropdownItem>
+            <DropdownItem
+              className="download-dropdown-item"
+              href={`https://www.apache.org/dyn/closer.cgi/apisix/2.10.3/apache-apisix-2.10.3-src.tgz.sha512`}
+              target="_blank"
+            >
+              SHA512
+            </DropdownItem>
+          </LTSDropdown>
+        </LTSCard>
+
+        
+      

Review comment:
       ditto




-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org