MainLayer.js 4.58 KB
Newer Older
Spark's avatar
layout    
Spark committed
1
2
3
4
5
import React from 'react'
import { useState } from 'react';
import { Button, Form, Image, Row, ButtonGroup, Modal, Dropdown, Col } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import '../App.css'
Spark's avatar
Spark committed
6
7
import SignUp from '../pages/SignUp'
import LoginwithSocial from '../pages/LoginwithSocial';
Spark's avatar
layout    
Spark committed
8
9
10
11
12
13
14
15
16
17

function MainLayer() {

    const boxstyled = {
        border: 'solid',
        color: 'rgba(195, 195, 195, 0.753)',
        borderRadius: '20px',
        marginBottom: '1em',
        width: '100%',
        backgroundSize: 'contain',
18
19
        margin: 'auto',
        textDecorationColor: 'none'
Spark's avatar
layout    
Spark committed
20
21
22
23
24
25
26
27
28
29
30
31
    }

    const btnstyled = {
        background: 'rgb(110, 189, 142)',
        margin: '1px',
        display: 'flex',
        justifyContent: 'center',
        maxWidth: '100%',
        borderWidth: '2px',
        fontSize: '10px',
        borderColor: 'rgba(195, 195, 195, 0.753)',
        borderRadius: '20px',
32
33
        textDecorationColor: 'none',
        color: 'white'
Spark's avatar
layout    
Spark committed
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
    }

    const loginstyled = {
        margin: 'auto',
        padding: '2px',
        diplay: 'flex',
        justifyContent: 'center',
        borderRadius: '20px'
    }

    const titlesty = {
        display: 'flex',
        justifyContent: 'center',
        background: 'rgb(110, 189, 142)',
        text: 'center'
    }

    const [logshow, setLogshow] = useState(false);
    const [signshow, setSignshow] = useState(false);
53
    const [isLogin, setIsLogin] = useState(false)
Spark's avatar
layout    
Spark committed
54
55
56
57
58
59
60
61
62
63


    return (
        <>
            <Row className='d-flex align-items-center m-auto w-100'>
                <Col className='m-auto '>
                    <Link to='/' className=' m-auto'>
                        <Image src='/images/EUE11.jpg' alt='EUE' style={boxstyled} />
                    </Link>
                </Col>
64
65
                <Dropdown className='d-sm-block d-md-none' style={{ fontSize: '1em' }}
                >
Spark's avatar
layout    
Spark committed
66
67
68
69
                    <Dropdown.Toggle style={btnstyled} id="dropdown-basic">
                    </Dropdown.Toggle>
                    <Dropdown.Menu className='z-index-10'>
                        <Dropdown.Item href="#/action-1">
70
                            <Button variant='light' className='w-100 m-auto' style={btnstyled} onClick={() => setLogshow(true)}>
Spark's avatar
layout    
Spark committed
71
72
73
74
75
76
77
78
                                LOGIN
                            </Button>
                            <Modal
                                size="sm"
                                show={logshow}
                                onHide={() => setLogshow(false)}
                                aria-labelledby="example-modal-sizes-title-sm"
                            >
Spark's avatar
Spark committed
79
                                <LoginwithSocial />
Spark's avatar
layout    
Spark committed
80
81
82
83
                            </Modal>
                        </Dropdown.Item>
                        <Dropdown.Item href="#/action-2">

84
                            <Button variant='light' className='w-100 m-auto' style={btnstyled} onClick={() => setSignshow(true)}>
Spark's avatar
Spark committed
85
86
                                SIGN UP
                            </Button>
Spark's avatar
layout    
Spark committed
87
88
89
90
91
92
                            <Modal
                                size="md"
                                show={signshow}
                                onHide={() => setSignshow(false)}
                                aria-labelledby="example-modal-sizes-title-sm"
                            >
Spark's avatar
Spark committed
93
                                <SignUp />
Spark's avatar
layout    
Spark committed
94
95
96
97
98
99
100
101
                            </Modal>
                        </Dropdown.Item>
                    </Dropdown.Menu>
                </Dropdown>
            </Row>

            <Row className='d-none d-md-flex justify-content-center align-items-center my-3 mx-auto w-100'>
                <ButtonGroup vertical className='m-auto' style={{ width: '100%' }}>
102
                    <Button variant='light' style={btnstyled} onClick={() => setLogshow(true)}>LOGIN</Button>
Spark's avatar
layout    
Spark committed
103
104
105
106
107
108
                    <Modal
                        size="sm"
                        show={logshow}
                        onHide={() => setLogshow(false)}
                        aria-labelledby="example-modal-sizes-title-sm"
                    >
Spark's avatar
Spark committed
109
                        <LoginwithSocial />
Spark's avatar
layout    
Spark committed
110
111
112

                    </Modal>

113
                    <Button variant='light' style={btnstyled} onClick={() => setSignshow(true)}>SIGN UP</Button>
Spark's avatar
layout    
Spark committed
114
115
116
117
118
119
                    <Modal
                        size="md"
                        show={signshow}
                        onHide={() => setSignshow(false)}
                        aria-labelledby="example-modal-sizes-title-sm"
                    >
Spark's avatar
Spark committed
120
121
                        <SignUp />

Spark's avatar
layout    
Spark committed
122
123
124
125
126
127
128
129
130
                    </Modal>

                </ButtonGroup>
            </Row>
        </>
    );
}

export default MainLayer