Fakultas Ilmu Komputer UI

index.jsx 3.76 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, browserHistory } from 'react-router';
import { Segment, Modal, Button, Icon, Image as ImageComponent, Item, TextArea, Form } from 'semantic-ui-react';
import Dashboard from './dashboard';
import Login from './login';
import Pane from './components/Pane';
import Tabs from './components/Tabs';
import ModalAlert from './components/ModalAlert';

export const Profile = () => (
  <Segment>
    <img src="http://semantic-ui.com/images/wireframe/media-paragraph.png" alt="wire-frame" />
  </Segment>
);

export const Home = () => (
  <div>
    <Tabs selected={0}>
      <Pane label="Semua Lowongan">
        <ItemExampleFloated />
      </Pane>
      <Pane label="Lamaran saya">
        <div>This is my tab 2 contents!</div>
      </Pane>
    </Tabs>
  </div>
);

export const App = () => (
  <Router history={browserHistory}>
    <Route path="/login" component={Login} />
    <Route component={Dashboard}>
      <Route path="/" component={Profile} />
      <Route path="profile" component={Profile} />
      <Route path="home" component={Home} />
      <Route path="users" component={Profile} />
    </Route>
  </Router>
);

const paragraph = <ImageComponent src="http://semantic-ui.com/images/wireframe/short-paragraph.png" />;
const imageWireFrame = <Item.Image size="small" src="http://semantic-ui.com/images/wireframe/image.png" />;

export const ItemExampleFloated = () => (
  <Item.Group relaxed>
    <Item>
      {imageWireFrame}
      <Item.Content verticalAlign="middle">
        <Item.Header>Lowongan 1</Item.Header>
        <Item.Description>{paragraph}</Item.Description>
        <Item.Extra>
          <div className="daftar">
            <ModalExampleMultiple />
          </div>
        </Item.Extra>
      </Item.Content>
    </Item>

    <Item>
      {imageWireFrame}
      <Item.Content verticalAlign="middle">
        <Item.Header>Lowongan 2</Item.Header>
        <Item.Description>{paragraph}</Item.Description>
        <Item.Extra>
          <div className="daftar">
            <ModalExampleMultiple />
          </div>
        </Item.Extra>
      </Item.Content>
    </Item>
    <Item>
      {imageWireFrame}
      <Item.Content verticalAlign="middle">
        <Item.Header>Lowongan 3</Item.Header>
        <Item.Description>{paragraph}</Item.Description>
        <Item.Extra>
          <div className="daftar">
            <ModalExampleMultiple />
          </div>
        </Item.Extra>
      </Item.Content>
    </Item>
  </Item.Group>
  );


export class ModalExampleMultiple extends React.Component {

  state = { modalOpen: false };

  handleOpen = () => this.setState({
    modalOpen: true,
  });

  handleClose = () => this.setState({
    modalOpen: false,
  });

  render = () => (
    <Modal
      trigger={<Button onClick={this.handleOpen} >Daftar</Button>}
      closeIcon="close"
      open={this.state.modalOpen}
      onClose={this.handleClose}
    >

      <Modal.Header>Pendaftaran Lowongan</Modal.Header>
      <Modal.Content image>
        <div className="image">
          <Icon name="right arrow" />
        </div>
        <Modal.Description>
          <Modal.Header> <h3> Deskripsi Lowongan </h3></Modal.Header>
          {paragraph}

          <div className="linkCV">
            <a> your latest CV </a>
          </div>

          <div className="coverLetter">
            <h5> Write your Cover Letter </h5>
            <Form>
              <TextArea placeholder="Tell us more" />
            </Form>
          </div>

        </Modal.Description>
      </Modal.Content>
      <Modal.Actions>
        <ModalAlert onChangeValue={this.handleClose} header="Pendaftaran" content="Terima kasih sudah mendaftar!" />
      </Modal.Actions>
    </Modal>
    )
}

ReactDOM.render(<App />, document.getElementById('react-app'));