You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by xi...@apache.org on 2022/06/26 00:08:29 UTC
[incubator-shenyu-website] branch main updated: update news pages (#617)
This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-website.git
The following commit(s) were added to refs/heads/main by this push:
new 9348eb7fde update news pages (#617)
9348eb7fde is described below
commit 9348eb7fdeba5a9be0520d1e62b530327a8ed1f3
Author: gouzixing <44...@users.noreply.github.com>
AuthorDate: Sun Jun 26 08:08:25 2022 +0800
update news pages (#617)
* newsPage
* news page
* bugfix
* news page update
---
docusaurus.config.js | 3 +-
src/data/newsInfo.js | 102 +++++++++++++++++++++++++++++++++++++++++++
src/pages/news.module.css | 76 ++++++++++++++++++++++++++++++++
src/pages/news.tsx | 33 ++++++++++++++
static/img/news/tangzhen.jpg | Bin 0 -> 611100 bytes
5 files changed, 213 insertions(+), 1 deletion(-)
diff --git a/docusaurus.config.js b/docusaurus.config.js
index f0fe0f1171..2d4c72e58a 100755
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -215,7 +215,7 @@ module.exports = {
},
blog: {
showReadingTime: true,
- blogSidebarCount: "ALL",
+ blogSidebarCount: 'ALL',
blogSidebarTitle: 'All Blog Posts',
editLocalizedFiles: true,
// Please change this to your repo.
@@ -287,6 +287,7 @@ module.exports = {
id: "news",
routeBasePath: "news",
path: "news",
+ blogSidebarCount:0,
},
],
]
diff --git a/src/data/newsInfo.js b/src/data/newsInfo.js
new file mode 100644
index 0000000000..689e635f5a
--- /dev/null
+++ b/src/data/newsInfo.js
@@ -0,0 +1,102 @@
+export default [
+ {
+ title: "You can also be an Apache ShenYu Committer",
+ author: "Zicheng Zhang",
+ description: "You can also be an Apache ShenYu Committer",
+ categories: "Apache ShenYu Committers",
+ tags: ["Apache ShenYu"],
+ date: '2022-04-20',
+ cover: "/static/img/logo.svg",
+ src:'Apache-ShenYu-Committer-2022-04-20',
+ },
+ {
+ title: "Apache ShenYu 2.4.3 Version Release",
+ // author: "Liu Liang",
+ description: "Apache ShenYu 2.4.3 Version Release",
+ categories: "Apache ShenYu",
+ tags: ["Apache ShenYu"],
+ date: '2022-04-18',
+ cover: "/static/img/news/helm-ci-pipeline.png",
+ src:'Apache-ShenYu-release-version-2.4.3',
+ },
+ {
+ title: "The way from University Student to Apache Committer",
+ author: "Kunshuai Zhu",
+ description: "The way from College Student to Apache Committer",
+ categories: "Apache ShenYu Committers",
+ tags: ["Apache ShenYu"],
+ date: "2021-12-08",
+ cover: "/static/img/logo.svg",
+ src:"Apache-ShenYu-Committer-2021-12-08",
+ },
+ {
+ title: "From users to Committer, different experiences and gains",
+ author: "qicz",
+ description: "From users to Committer, different experiences and gains",
+ categories: "Apache ShenYu Committers",
+ tags: ["Apache ShenYu"],
+ date: '2021-11-11',
+ cover: "/static/img/logo.svg",
+ src:'Apache-ShenYu-Committer-2021-11-11',
+ },
+ {
+ title: "Apache ShenYu(incubating) newly promoted PPMC",
+ author: "Liu Liang",
+ description: "Apache ShenYu(incubating) newly promoted PPMC",
+ categories: "Apache ShenYu PPMC",
+ tags: ["Apache ShenYu"],
+ date: "2021-11-05",
+ cover: "/static/img/logo.svg",
+ src:'Apache-ShenYu-PPMC-2021-11-05',
+ },
+ {
+ title: "From users to Committer, participation in the Apache ShenYu community is not far away",
+ author: "Tang Zhen",
+ description: "From users to Committer, participation in the Apache ShenYu community is not far away" ,
+ categories: "Apache ShenYu Committers",
+ tags: ["Apache ShenYu"],
+ date: '2021-09-08',
+ cover: "/img/news/tangzhen.jpg",
+ src:'Apache-ShenYu-Committer-2021-09-08'
+ },
+ {
+ title: "Release the first version of Apache ShenYu(Incubating)2.4.0 Make API gateway easy",
+ author: "xiaoyu",
+ description: "【Release the first version of Apache ShenYu(Incubating)2.4.0】 Make API gateway easy",
+ categories: "Apache ShenYu",
+ tags: ["Apache ShenYu"],
+ date: '2021-08-01',
+ cover: "/img/architecture/shenyu-framework.png",
+ src:'Apache-ShenYu-release-milestone-version-2.4.0',
+ },
+ {
+ title: "How I became an Apache ShenYu Committer one year after graduation",
+ author: "Liu Liang",
+ description: "From users to Committer, participation in the Apache ShenYu community is not far away",
+ categories: "Apache ShenYu Committers",
+ tags: ["Apache ShenYu"],
+ date: '2021-09-08',
+ cover: "/static/img/logo.svg",
+ src:'Apache-ShenYu-Committer-2021-07-27',
+ },
+ {
+ title: "The Open Source Path for Tech Veterans",
+ author: "Haibo Duan",
+ description: "The Open Source Path for Tech Veterans",
+ categories: "Apache ShenYu Committers",
+ tags: ["Apache ShenYu"],
+ date: "2021-02-28",
+ cover: "/static/img/logo.svg",
+ src:'Apache-ShenYu-Committer-2022-02-28',
+ },
+ {
+ title: "Soul gateway release milestone version 2.3.0 New support for grpc, tars and sofa protocols!",
+ author: "xiaoyu",
+ description: "Soul gateway release milestone version 2.3.0 New support for grpc, tars and sofa protocols",
+ categories: "Apache ShenYu",
+ tags: ["Apache ShenYu"],
+ date: "2020-07-05",
+ cover: "/static/img/logo.svg",
+ src:'Soul-gateway-release-milestone-version-2.3.0',
+ }
+]
\ No newline at end of file
diff --git a/src/pages/news.module.css b/src/pages/news.module.css
new file mode 100644
index 0000000000..40945c348d
--- /dev/null
+++ b/src/pages/news.module.css
@@ -0,0 +1,76 @@
+.top{
+ height: 140px;
+ line-height: 140px;
+ text-align: center;
+ font-size: 28px;
+ color: var(--ifm-color-primary);
+ font-weight: bold;
+}
+
+.content{
+ background-color: #F2F4F7;
+}
+
+.newsList{
+ padding-top: 30px;
+ padding-bottom: 30px;
+ display: flex;
+ justify-content: center;
+ flex-wrap: wrap;
+}
+
+.cardItem{
+ margin: 5px;
+ display: flex;
+ height: auto;
+ min-height: 200px;
+ width: 50%;
+ background-color: #FFFFFF;
+ border-radius: 10px;
+}
+
+
+
+
+
+.cardInfo{
+ margin: 20px 30px 20px 30px;
+ width: 70%;
+}
+
+.cardDate{
+ font-size: 10px;
+ margin-bottom: 15px;
+}
+
+.cardTitle{
+ font-size: 18px;
+ font-weight: bold;
+}
+
+.cardDesc{
+ font-size: 14px;
+ font-weight: bold;
+ color: #475467;
+}
+
+.cardImage{
+ margin: 20px 0px 20px 30px;
+ /* height: auto;
+ max-height: 180px; */
+ width: 210px;
+}
+
+.readMore:hover{
+ cursor:pointer;
+}
+
+.readMore{
+ font-size: 12px;
+ color: var(--ifm-color-primary);
+ margin-left: 78%;
+ margin-top: 30px;
+ background-color: #FFFFFF;
+ border: #FFFFFF;
+ /* font-weight: bold; */
+}
\ No newline at end of file
diff --git a/src/pages/news.tsx b/src/pages/news.tsx
new file mode 100644
index 0000000000..6b0892941e
--- /dev/null
+++ b/src/pages/news.tsx
@@ -0,0 +1,33 @@
+
+import React from 'react';
+import Layout from '@theme/Layout';
+import styles from './news.module.css';
+import newsInfo from '../data/newsInfo';
+
+
+function News() {
+ return (
+ <Layout title="News">
+ <div className={styles.top}>Recent Posts</div>
+ <div className={styles.content}>
+ <div className={styles.newsList}>
+ {newsInfo.map((newsItem, i) => {
+ return (
+ <div key={i} className={styles.cardItem} >
+ <img className={styles.cardImage} src={newsItem.cover} alt={'Apache Shenyu'} ></img>
+ <div className={styles.cardInfo}>
+ <div className={styles.cardDate}>{newsItem.date}</div>
+ <div className={styles.cardTitle}>{newsItem.title}</div>
+ <div className={styles.cardDesc}>{newsItem.description}</div>
+ <button className={styles.readMore} onClick={() => window.location.href = 'https://shenyu.apache.org/news/' + newsItem.src}> >>Read More </button>
+ </div>
+ </div>
+ )
+ })}
+ </div>
+ </div>
+ </Layout>
+ );
+}
+
+export default News;
\ No newline at end of file
diff --git a/static/img/news/tangzhen.jpg b/static/img/news/tangzhen.jpg
new file mode 100644
index 0000000000..a164fb831b
Binary files /dev/null and b/static/img/news/tangzhen.jpg differ