Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 222fcca

Browse files
authored
Merge pull request #57 from pbteja1998/master
Resolved Issue #53
2 parents 5605543 + 9d7cc95 commit 222fcca

File tree

2 files changed

+51
-39
lines changed

2 files changed

+51
-39
lines changed

components/subscribe.js

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
import { Form, Message } from 'semantic-ui-react';
2+
import { Form, Message, Grid } from 'semantic-ui-react';
33
import { baseEventsURL, subscribeURL } from '../utils/urls';
44

55
class Subscribe extends Component {
@@ -65,7 +65,7 @@ class Subscribe extends Component {
6565
return (
6666
<div>
6767
<section className="update">
68-
<div className="container update_container">
68+
<div>
6969
<h3 className="taglines">
7070
We are constanly updating our platform.<br />If you would like to
7171
stay informed about our updates, drop you email.
@@ -76,18 +76,24 @@ class Subscribe extends Component {
7676
) : (
7777
<Form onSubmit={this.handleSubmit} error={hasError}>
7878
<Form.Group>
79-
<Form.Input
80-
placeholder="Enter email address"
81-
name="email"
82-
value={this.state.subscribersEmail}
83-
onChange={this.handleChange}
84-
disabled={this.state.submittingEmail}
85-
/>
86-
<Form.Button
87-
loading={this.state.submittingEmail}
88-
color="pink"
89-
content="Subscribe"
90-
/>
79+
<Grid stackable columns={2}>
80+
<Grid.Column width={12}>
81+
<Form.Input
82+
placeholder="Enter email address"
83+
name="email"
84+
value={this.state.subscribersEmail}
85+
onChange={this.handleChange}
86+
disabled={this.state.submittingEmail}
87+
/>
88+
</Grid.Column>
89+
<Grid.Column width={4}>
90+
<Form.Button
91+
loading={this.state.submittingEmail}
92+
color="pink"
93+
content="Subscribe"
94+
/>
95+
</Grid.Column>
96+
</Grid>
9197
</Form.Group>
9298
<Message
9399
error
@@ -103,9 +109,6 @@ class Subscribe extends Component {
103109
.taglines {
104110
padding-bottom: 20px;
105111
}
106-
.update_container {
107-
background-color: #f6f6f6 !important;
108-
}
109112
.update_content {
110113
display: flex;
111114
flex-direction: row;
@@ -114,11 +117,6 @@ class Subscribe extends Component {
114117
align-content: center;
115118
align-items: center;
116119
}
117-
.container {
118-
background-color: #ffffff;
119-
text-align: center;
120-
padding: 60px;
121-
}
122120
`}</style>
123121
</div>
124122
);

pages/index.js

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import Link from 'next/link';
3-
import { Card, Button, Divider } from 'semantic-ui-react';
4-
3+
import { Card, Button, Divider, Grid, Segment } from 'semantic-ui-react';
54
import { baseEventsURL, indexPageEventURL } from '../utils/urls';
65
import RowEvent from '../components/row-events';
76
import publicPage from '../hocs/public-page';
@@ -170,23 +169,38 @@ class Home extends React.Component {
170169
</div>
171170
</section>
172171
<Divider hidden />
173-
<section className="discord">
172+
<section className="discord-subscribe">
174173
<div className="container">
175-
<h3 className="taglines">
176-
Join our Discord server, and say Hello World!
177-
</h3>
178-
<Button.Group basic>
179-
<Button
180-
content="Join Chat"
181-
icon="discussions"
182-
labelPosition="left"
183-
onClick={() =>
184-
window.open('https://discord.gg/dVnQ2Gf', '_blank')}
185-
/>
186-
</Button.Group>
174+
<Grid stackable columns={2} divided>
175+
<Grid.Column>
176+
<Segment basic>
177+
<section className="discord">
178+
<div>
179+
<h3 className="taglines">
180+
Join our Discord server, and say Hello World!
181+
</h3>
182+
<Button.Group basic>
183+
<Button
184+
content="Join Chat"
185+
icon="discussions"
186+
labelPosition="left"
187+
onClick={() =>
188+
window.open(
189+
'https://discord.gg/dVnQ2Gf',
190+
'_blank',
191+
)}
192+
/>
193+
</Button.Group>
194+
</div>
195+
</section>
196+
</Segment>
197+
</Grid.Column>
198+
<Grid.Column>
199+
<Subscribe />
200+
</Grid.Column>
201+
</Grid>
187202
</div>
188203
</section>
189-
<Subscribe />
190204
</main>
191205
<style jsx>{`
192206
main {
@@ -239,7 +253,7 @@ class Home extends React.Component {
239253
padding-left: 30px;
240254
padding-right: 30px;
241255
}
242-
.discord .container {
256+
.discord-subscribe .container {
243257
background: #FAFAFA;
244258
}
245259

0 commit comments

Comments
 (0)