From e2910c24ebfcc0675590b056dc59171744f7c8fd Mon Sep 17 00:00:00 2001 From: ThyeeZz Date: Tue, 6 Sep 2022 16:47:21 +0800 Subject: [PATCH 1/6] update github buttons --- .../commonComponents/githubButton/icons.jsx | 33 +++++++++ .../commonComponents/githubButton/index.jsx | 70 +++++++++---------- .../githubButton/index.module.less | 52 +++++++------- .../commonComponents/header/index.jsx | 2 +- 4 files changed, 95 insertions(+), 62 deletions(-) create mode 100644 src/components/commonComponents/githubButton/icons.jsx diff --git a/src/components/commonComponents/githubButton/icons.jsx b/src/components/commonComponents/githubButton/icons.jsx new file mode 100644 index 0000000..b4db648 --- /dev/null +++ b/src/components/commonComponents/githubButton/icons.jsx @@ -0,0 +1,33 @@ +import React from 'react'; + +export const Fork = () => ( + +); + +export const Star = () => ( + +); diff --git a/src/components/commonComponents/githubButton/index.jsx b/src/components/commonComponents/githubButton/index.jsx index 66f2ce4..61e96c8 100644 --- a/src/components/commonComponents/githubButton/index.jsx +++ b/src/components/commonComponents/githubButton/index.jsx @@ -1,32 +1,8 @@ import React from 'react'; -import Divider from '@mui/material/Divider'; import * as styles from './index.module.less'; - -const ForkIcon = () => ( - - - -); - -const GitHubIcon = () => ( - - - -); +import { useMemo } from 'react'; +import { Star, Fork } from './icons'; +import clsx from 'clsx'; const GitHubButton = ({ type = 'star', // star or fork @@ -36,23 +12,43 @@ const GitHubButton = ({ stat, }) => { const isStar = type === 'star'; + const link = isStar ? href : `${href}/fork`; + + const Icon = isStar ? Star : Fork; + + const formatNum = num => { + return num >= 1000 ? `${Math.round(num / 100) / 10}k` : num; + }; - const sublink = isStar ? `${href}/stargazers` : `${href}/network/members`; + const stats = useMemo(() => { + const stars = stat.star; + const forks = stat.forks; + + return { + star: formatNum(stars), + fork: formatNum(forks), + }; + }, [stat]); return (
- - {isStar ? : } - {children} - - - {isStar ? stat.star : stat.forks} + + + + + {children} + + {isStar ? stats.star : stats.fork}
); diff --git a/src/components/commonComponents/githubButton/index.module.less b/src/components/commonComponents/githubButton/index.module.less index bbe6afc..8eb0695 100644 --- a/src/components/commonComponents/githubButton/index.module.less +++ b/src/components/commonComponents/githubButton/index.module.less @@ -2,53 +2,57 @@ .gitBtnWrapper { color: #000; - background: linear-gradient(0deg, #f8f8f8, #f8f8f8); - border: 1px solid #f2f2f2; - border-radius: 4px; + background: #fff; + border: 1px solid rgba(27, 31, 36, 0.15); + border-radius: 6px; display: flex; height: 30px; margin-right: 20px; - font-family: 'Inter'; - - svg { - width: 20px; - height: 20px; - } + padding: 3px 12px; + display: flex; + align-items: center; + box-sizing: border-box; .link { align-items: center; border-radius: 4px; color: #000; display: flex; - font-size: 16px; + font-size: 12px; line-height: 20px; - padding: 10px; text-decoration: none; - font-family: 'Inter'; + .hover; .iconWrapper { - font-size: 20px; margin-right: 8px; + display: inline-block; + font-size: 0; + line-height: 0; + } + + .starIcon > svg > path { + fill: #eac54f; + // background-color: #eac54f; } .iconText { + font-weight: 600; + @media @desktop1024, @tablet { display: none; } } - - line-height: 18px; - font-size: 14px; } - .num { - font-weight: bold; - justify-content: center; - - .stat { - min-width: 40px; - text-align: center; - } + .stat { + font-weight: 600; + margin-left: 6px; + min-width: 20px; + text-align: center; + padding: 0 6px; + display: inline-block; + background: rgba(27, 31, 36, 0.08); + border-radius: 2em; } } diff --git a/src/components/commonComponents/header/index.jsx b/src/components/commonComponents/header/index.jsx index 86967ea..0769f29 100644 --- a/src/components/commonComponents/header/index.jsx +++ b/src/components/commonComponents/header/index.jsx @@ -179,7 +179,7 @@ const Header = ({ darkMode = false, className = '' }) => { type="fork" href="https://github.com/milvus-io/milvus/fork" > - Forks + Fork From 432cf5cf2e718dd4d1691feaa4e7adf77be47979 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 09:15:45 +0000 Subject: [PATCH 2/6] Generate codelabs' PDF --- ...ector-databases-introduction-to-milvus.pdf | Bin 290140 -> 290140 bytes ...ases-introduction-to-unstructured-data.pdf | Bin 301234 -> 301234 bytes ...troduction-to-vector-similarity-search.pdf | Bin 380595 -> 380595 bytes ...ith-vector-databases-milvus-quickstart.pdf | Bin 256569 -> 256569 bytes ...or-databases-what-is-a-vector-database.pdf | Bin 298154 -> 298154 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/pdf/getting-started-with-vector-databases-introduction-to-milvus.pdf b/pdf/getting-started-with-vector-databases-introduction-to-milvus.pdf index 65398c5ae6588b5cebbd3b39cf8a2ff1076c514e..7b4aab4211e0a678ca7f8bb7af71931bd2644b20 100644 GIT binary patch delta 136 zcmca}OYqJu!G;#b7N!>FEiCKP)GQ6m3@i;zO$?(nx%7SWQ(O{DQWZ2@tc(ndj11tC z+pngvOk{C(b9J>ac5}6`G&HnyGO{!kp delta 136 zcmca}OYqJu!G;#b7N!>FEiCKP)GQ244U7!TO^l;7x%7SWQ(O{DQWZ2@tc(ndj11tC z+pngvOk{C(axpV;HMKOcG%_-Fvv9RAH!?GFGcq+Zb2BnFFtjwVQ?MbVWc$i&md%U+ DXoMs& diff --git a/pdf/getting-started-with-vector-databases-introduction-to-unstructured-data.pdf b/pdf/getting-started-with-vector-databases-introduction-to-unstructured-data.pdf index 9142835286273efe06cd6f55015da4cd0477f2e6..aa2f3edbdfa106c990990753143352de4aba1d3e 100644 GIT binary patch delta 136 zcmdnAQE1afp@tU57N!>FEiA0PYL*6O29}1V#->r4T>8HGDK3d6sR|k{Rz?O!Mh0-n z?b^L8{+!Nkj;02dMix#cX3i!iPG(MKmd+sT>f~x};bLZJYNudBNXhoS(^$ST0sy)F BBb@*M delta 136 zcmdnAQE1afp@tU57N!>FEiA0PY8D2j21W+v#zs+^T>8HGDK3d6sR|k{Rz?O!Mh0-n z?b^L8{+!NEE@l>PCKj$P28I?!K*G@6(ag!h&D_|)(8SHc$lOlBhLDo&d#AB{Wds1D C-6IVE diff --git a/pdf/getting-started-with-vector-databases-introduction-to-vector-similarity-search.pdf b/pdf/getting-started-with-vector-databases-introduction-to-vector-similarity-search.pdf index dc01349cf9b36500d7afc02ade0dc7118a6e1a2b..12772010db0ef82faa173a650ac3bb9735d698e5 100644 GIT binary patch delta 138 zcmdlySA6qa@rD-07N!>F7M3lndv>T<8kiYa8k(AzL}_yA`{t*(B$lKqXt-Dz85kKE zz$Ldo+QIr!$l1)&+1$j@)!Ed=)z#e5($&$?)yT}!($d+&(b&bp&D2i8hLDo&VrN+A GG64YXu_iA7 delta 138 zcmdlySA6qa@rD-07N!>F7M3lndv>T<7?>Iu8JL?GL}_yA`{t*(B$lKqXt-Dz85kKE zz$Ldo+QIr!$l27{+|tO*%-PV$#n95t!pzas%+1`*#n{=>!pYUy$jMH@hLDo&VrN+A GG64Y0U?rsh diff --git a/pdf/getting-started-with-vector-databases-milvus-quickstart.pdf b/pdf/getting-started-with-vector-databases-milvus-quickstart.pdf index 52593dce2ff329d4cbe81966da8f33e6087b3936..48712453203254c9cee213b96d798d66858e2820 100644 GIT binary patch delta 134 zcmdmag@5N2{)QID7N#xC#ZS~M4a^KI4NZ-Wqcpknee+XX5=&AQG+eBV42+Bn;F8;C zK4E^tSknMVQgq>;p}SS>}GCkVdP|H=47W}LrBT?6VI6onE+2Z BB?FEi9L+)GQ6m3@i;zjV+=yx%7SWQ(O{DQWZ2@tc(ndj11tC z+kaHC=FEi9L+)GQ244U7!Tjm@Jpx%7SWQ(O{DQWZ2@tc(ndj11tC z+kaHC= Date: Fri, 9 Sep 2022 10:55:35 +0800 Subject: [PATCH 3/6] fix buttons --- src/components/commonComponents/header/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/commonComponents/header/index.jsx b/src/components/commonComponents/header/index.jsx index 0769f29..dcc83d6 100644 --- a/src/components/commonComponents/header/index.jsx +++ b/src/components/commonComponents/header/index.jsx @@ -177,7 +177,7 @@ const Header = ({ darkMode = false, className = '' }) => { Fork From 40d69af77e1f57579d894d3425c4b7380a91bd4d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 03:00:50 +0000 Subject: [PATCH 4/6] Generate codelabs' PDF --- ...ector-databases-introduction-to-milvus.pdf | Bin 290140 -> 290140 bytes ...ases-introduction-to-unstructured-data.pdf | Bin 301234 -> 301234 bytes ...troduction-to-vector-similarity-search.pdf | Bin 380595 -> 380595 bytes ...ith-vector-databases-milvus-quickstart.pdf | Bin 256569 -> 256569 bytes ...or-databases-what-is-a-vector-database.pdf | Bin 298154 -> 298154 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/pdf/getting-started-with-vector-databases-introduction-to-milvus.pdf b/pdf/getting-started-with-vector-databases-introduction-to-milvus.pdf index 7b4aab4211e0a678ca7f8bb7af71931bd2644b20..9c0bbe76fb687cbd59c2ca100d80caf5fa757db3 100644 GIT binary patch delta 134 zcmca}OYqJu!G;#b7N!>FEi4<;R4fgQ4Gc_7qcpknee+XX5=&AQG+eBV42+BnEP)U# zx&3My%S0Au6EjB(M<+)k3pZyMGZ#ZAV+%_+3riCdS91e1Q%6SwI|Um;O17`eX4%XL E07B^`b^rhX delta 134 zcmca}OYqJu!G;#b7N!>FEi4<;RLl%44NXl9qcpknee+XX5=&AQG+eBV42+BnEDfNN z+pngvOk{C(b9J>ac5}6`G&HnyGO{!FEiCN4?3M<`1_s6!)A@Q?#9*B5+Py6PoX(c6PEJlPmacAw mMlKe{My{qVW~P?T7KUcdCeE&AE+%#gHiVRH-#d-vDw delta 118 zcmdnAQE1afp@tU57N!>FEiCN4>}Cd*hNi}*)A@Q?#9*B5+Py6PoX&2JrUsTq7EUH+ k&L$>KW=>|7&LHgS08A<#>i_@% diff --git a/pdf/getting-started-with-vector-databases-introduction-to-vector-similarity-search.pdf b/pdf/getting-started-with-vector-databases-introduction-to-vector-similarity-search.pdf index 12772010db0ef82faa173a650ac3bb9735d698e5..37a8a49746f74fadf74f53a225de3b9d19e78281 100644 GIT binary patch delta 136 zcmdlySA6qa@rD-07N!>F7M3ln`*x^U8W$ GE)xKPWhAly delta 136 zcmdlySA6qa@rD-07N!>F7M3ln`*x_98CV*cnwUgsa_Rf#r?@1Rq$+5*SQ!}@85vj_ zKqa?7+QIr!$l1)&+1$j@)!Ed=)z#e5($&$?)yT}!($d+&(b&bp&D2i8hLDo&VrN+A GG64Xt2PMV; diff --git a/pdf/getting-started-with-vector-databases-milvus-quickstart.pdf b/pdf/getting-started-with-vector-databases-milvus-quickstart.pdf index 48712453203254c9cee213b96d798d66858e2820..8fe48a197d0739bd35ab9b3134fca51f8139644b 100644 GIT binary patch delta 132 zcmdmag@5N2{)QID7N#xCrB75W4U7#8j7_67x%7SWQ(O{DQWZ2@tc(ndj0`M+5G=WU z<`d>OOwLY*PA0C#hK^3orX~i4CPo&{W@e7&hNcE)&W6q|7Up&eHiVRHKk=NokO=?; Cfh1P| delta 132 zcmdmag@5N2{)QID7N#xCrB77M3@i;zjg6x;x%7SWQ(O{DQWZ2@tc(ndj0`Ldppx5X zK4E^tSknMVQgq>;p}SS>}GCkVdP|H=47W}LrBT?6VI6onE(+O BB%uHR diff --git a/pdf/getting-started-with-vector-databases-what-is-a-vector-database.pdf b/pdf/getting-started-with-vector-databases-what-is-a-vector-database.pdf index 4291ac25d4bcf1e717c95f270922273d2680aef9..fe17389ed533a1944c9596235c400b0ddca5517f 100644 GIT binary patch delta 134 zcmZ2AQ)typp@tU57N!>FEi6~6R4fgQ4Gc^Sqcpknee+XX5=&AQG+eBV42+BnEP)U# zx&22Kiw?iDo1wXdsk57@xwD0#iJ_Z`lcSrFo4K>4n~ABJo0+qjoq`P^CEL@xSe%&v D*={2+ delta 134 zcmZ2AQ)typp@tU57N!>FEi6~6RLl%44NZ+LqBObmee+XX5=&AQG+eBV42+BnEDfNN z+kaHC= From dc05e4368497e15d6c9d1581126058981b670a15 Mon Sep 17 00:00:00 2001 From: ThyeeZz Date: Fri, 9 Sep 2022 11:55:49 +0800 Subject: [PATCH 5/6] remove useless token --- src/components/commonComponents/http/index.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/commonComponents/http/index.js b/src/components/commonComponents/http/index.js index 4658359..fa09e8a 100644 --- a/src/components/commonComponents/http/index.js +++ b/src/components/commonComponents/http/index.js @@ -1,8 +1,6 @@ import axios from 'axios'; import { decode } from 'js-base64'; -const encryptedToken = 'Z2hwX3VhVlZqSXo2eUlPcWd1S0hDT2lwQk10dkZtYjhFVzFBeTAyWQ=='; - const axiosInstance = axios.create({ baseURL: 'https://api.github.com/repos', timeout: 10000, @@ -18,14 +16,9 @@ axiosInstance.interceptors.request.use( } ); - export const getGithubStatis = async () => { try { - const res = await axiosInstance.get(`/milvus-io/milvus`, { - headers: { - Authorization: decode(encryptedToken) - } - }); + const res = await axiosInstance.get(`/milvus-io/milvus`); return res.data; } catch (error) { console.log(error); From 9c93b5f62fbab6e8deca350464be59201514f296 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 05:55:55 +0000 Subject: [PATCH 6/6] Generate codelabs' PDF --- ...ector-databases-introduction-to-milvus.pdf | Bin 290140 -> 290140 bytes ...ases-introduction-to-unstructured-data.pdf | Bin 301234 -> 301234 bytes ...troduction-to-vector-similarity-search.pdf | Bin 380595 -> 380595 bytes ...ith-vector-databases-milvus-quickstart.pdf | Bin 256569 -> 256569 bytes ...or-databases-what-is-a-vector-database.pdf | Bin 298154 -> 298154 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/pdf/getting-started-with-vector-databases-introduction-to-milvus.pdf b/pdf/getting-started-with-vector-databases-introduction-to-milvus.pdf index 9c0bbe76fb687cbd59c2ca100d80caf5fa757db3..b9f491f7b47c5245c96c35405d8cc822794654eb 100644 GIT binary patch delta 132 zcmca}OYqJu!G;#b7N!>FEi9YUluUuZAWD-<-#0(SC9xz`LBqw$$iT?Rz!C_-lH0GQ zu}oxfHgj=y1d5oL8aW#nI-9z<85kQonmJioI-0tfSvnipDcBHFvVCPX%VtIZ{;4DD delta 132 zcmca}OYqJu!G;#b7N!>FEi9YUl#C4wOiZIRx%7SWQ(O{DQWZ2@tc(ndj0`M+5G=X< zY8uN#7H1PPM+-+MMFEi9b9tfr=>CMMJQdRZhO%FEi9b9ti}cg#un50dRZhO%ftmd+N2X3i$gu4XPKb_zE5m2BTVjpaKd0J5YV(*OVf diff --git a/pdf/getting-started-with-vector-databases-introduction-to-vector-similarity-search.pdf b/pdf/getting-started-with-vector-databases-introduction-to-vector-similarity-search.pdf index 37a8a49746f74fadf74f53a225de3b9d19e78281..61612fd76401dc83e60956c72f1aa30261b31458 100644 GIT binary patch delta 134 zcmdlySA6qa@rD-07N!>F7M3ln2X-i#0)cUqCYQc%eu_(CNveW|iF7M3ln2X-hK8yJ{aL}_yA`{t*(B$lKqXt-Dz85kKESOOtf za{HqltRID(%}rdK&CD%LTujW3oGcs-3|uUn3@uF!EnFO33=Iqo?G$VXDcLS|hIK9z E07H!=NdN!< diff --git a/pdf/getting-started-with-vector-databases-milvus-quickstart.pdf b/pdf/getting-started-with-vector-databases-milvus-quickstart.pdf index 8fe48a197d0739bd35ab9b3134fca51f8139644b..002e9adb34988217386b43d580e87d1a4374f95e 100644 GIT binary patch delta 112 zcmdmag@5N2{)QID7N#xC)Y8D%#njQv!o<+P+0@cb!G@5M?I)fy7cv0=sU{!( delta 112 zcmdmag@5N2{)QID7N#xCFEiBinluS)cP0XV-x%7SWQ(O{DQWZ2@tc(ndj0`M+5G=X< zM-__>zq7N2rIE9ni-nP)p@p%5iKC^Ni-n_!xv7h#si7s1v{SGlq-1+~7mG6!0GMDR AYXATM delta 132 zcmZ2AQ)typp@tU57N!>FEiBinl#C4wObnwmx%7SWQ(O{DQWZ2@tc(ndj0`M+5G=X< zM-__>zq6a6xrM2-o2j|8g`tU|n~9U7n~|Hjv!$DfshOLZvzeWO4Iw4l)4N!lnE;$X BBF6v#