Skip to content

Commit 145a9a1

Browse files
committed
add product page
1 parent 15aa257 commit 145a9a1

22 files changed

+5613
-64
lines changed

docs/static/js/main.1f78fef0.js.map

Lines changed: 5229 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import Footer from '#/Footer';
55
import Homepage from './Homepage';
66
import { Route } from 'react-router';
77
import { Routes } from 'react-router-dom';
8-
import Blog from './Blog';
8+
import ProductList from './ProductList';
99
import Foundation from './Foundation';
10-
import { foundationPathName, blogListPathName } from './const';
10+
import { foundationPathName, productListPathName } from './const';
1111
interface IProps {}
1212

1313
interface IState {}
@@ -23,7 +23,7 @@ class App extends Component<IProps, IState> {
2323
<ResponsiveContainer>
2424
<Routes>
2525
<Route path={foundationPathName} element={<Foundation />}></Route>
26-
<Route path={blogListPathName} element={<Blog />}></Route>
26+
<Route path={productListPathName} element={<ProductList />}></Route>
2727
<Route path="/" element={<Homepage />}></Route>
2828
</Routes>
2929
</ResponsiveContainer>

src/Blog.tsx

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/DesktopContainer.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { Component } from 'react';
22
import {
3-
blogListPathName,
3+
productListPathName,
44
foundationPathName,
55
homePathName,
66
Media,
@@ -17,7 +17,6 @@ import {
1717
import CustomRouter from '#/CustomRouter';
1818
import { history } from '#/const';
1919
import { scrollToTopAndRoute } from '#/utils';
20-
2120
interface IProps {}
2221

2322
interface IState {
@@ -46,6 +45,7 @@ class DesktopContainer extends Component<IProps, IState> {
4645
let pathname = window.location.hash;
4746

4847
if (pathname.length > 1) {
48+
pathname = pathname.split('#')[1];
4949
this.setState({
5050
activeItem: pathname,
5151
});
@@ -142,11 +142,11 @@ class DesktopContainer extends Component<IProps, IState> {
142142
on="hover"
143143
/>
144144
<Menu.Item
145-
name={blogListPathName}
145+
name={productListPathName}
146146
onClick={this.handleMenuItemClick}
147-
active={this.state.activeItem === blogListPathName}
147+
active={this.state.activeItem === productListPathName}
148148
>
149-
BLOG
149+
PRODUCTS
150150
</Menu.Item>
151151

152152
<Menu.Item

src/Foundation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class Foundation extends Component<IProps, IState> {
2020
return (
2121
<div style={{ minHeight: '80vh' }}>
2222
<Segment style={{ padding: '6em 0em' }} vertical>
23-
<Container text>
24-
<Header as="h1" style={{ fontSize: '2.3em' }}>
23+
<Container>
24+
<Header as="h1" style={{ fontSize: '2.3em' }} textAlign="center">
2525
Sustainable Support for ArchLinuxStudio
2626
</Header>
2727
<p style={{ fontSize: '1.33em', padding: '1em 0em 0em 0em' }}>

src/Homepage.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,12 @@ class Homepage extends Component<IProps, IState> {
133133
</Grid.Row>
134134
<Grid.Row>
135135
<Grid.Column textAlign="center">
136-
<Button href="https://www.fsf.org/" target="_blank" size="huge">
136+
<Button
137+
href="https://www.fsf.org/"
138+
target="_blank"
139+
size="huge"
140+
color="teal"
141+
>
137142
Check Them Out
138143
</Button>
139144
</Grid.Column>
@@ -223,6 +228,7 @@ class Homepage extends Component<IProps, IState> {
223228
target="_blank"
224229
size="large"
225230
rel="noreferrer"
231+
color="teal"
226232
>
227233
Read More
228234
</Button>
@@ -231,7 +237,10 @@ class Homepage extends Component<IProps, IState> {
231237
as="h4"
232238
className="header"
233239
horizontal
234-
style={{ margin: '3em 0em', textTransform: 'uppercase' }}
240+
style={{
241+
margin: '3em 0em',
242+
textTransform: 'uppercase',
243+
}}
235244
>
236245
<a
237246
href="https://github.com/ArchLinuxStudio?q=blockchain&type=all&language=&sort="
@@ -255,6 +264,7 @@ class Homepage extends Component<IProps, IState> {
255264
href="https://github.com/ArchLinuxStudio/blockchain-election-sample"
256265
target="_blank"
257266
size="large"
267+
color="teal"
258268
>
259269
Learn More
260270
</Button>
@@ -270,6 +280,7 @@ class Homepage extends Component<IProps, IState> {
270280
href="https://github.com/ArchLinuxStudio/blockchain-election-react"
271281
target="_blank"
272282
size="large"
283+
color="teal"
273284
>
274285
Learn More
275286
</Button>

src/HomepageHeading.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
import React, { Component } from 'react';
2-
import {
3-
Button,
4-
Container,
5-
Divider,
6-
Grid,
7-
Header,
8-
Icon,
9-
Image,
10-
List,
11-
Menu,
12-
Segment,
13-
Sidebar,
14-
} from 'semantic-ui-react';
1+
import { Component } from 'react';
2+
import { Button, Container, Header, Icon } from 'semantic-ui-react';
153

164
interface IProps {
175
mobile: boolean;

src/MobileContainer.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Component } from 'react';
22

33
import {
4-
blogListPathName,
4+
productListPathName,
55
foundationPathName,
66
homePathName,
77
Media,
@@ -41,8 +41,9 @@ class MobileContainer extends Component<IProps, IState> {
4141
handleToggle = () => this.setState({ sidebarOpened: true });
4242

4343
componentDidMount = async () => {
44-
let pathname = window.location.pathname;
44+
let pathname = window.location.hash;
4545
if (pathname.length > 1) {
46+
pathname = pathname.split('#')[1];
4647
this.setState({
4748
activeItem: pathname,
4849
});
@@ -137,13 +138,12 @@ class MobileContainer extends Component<IProps, IState> {
137138
on="hover"
138139
/>
139140
<Menu.Item
140-
name={blogListPathName}
141+
name={productListPathName}
141142
onClick={this.handleMenuItemClick}
142-
active={this.state.activeItem === blogListPathName}
143+
active={this.state.activeItem === productListPathName}
143144
>
144-
BLOG
145+
Products
145146
</Menu.Item>
146-
<Menu.Item as="a">Placeholder_hidden</Menu.Item>
147147
</Sidebar>
148148

149149
<Sidebar.Pusher dimmed={sidebarOpened}>

0 commit comments

Comments
 (0)