Small UI changes!
This commit is contained in:
parent
8a6645f560
commit
be33820c15
4 changed files with 85 additions and 68 deletions
9
frontend/package-lock.json
generated
9
frontend/package-lock.json
generated
|
|
@ -13933,8 +13933,7 @@
|
|||
},
|
||||
"ssri": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
|
||||
"integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
|
||||
"resolved": "",
|
||||
"requires": {
|
||||
"figgy-pudding": "^3.5.1"
|
||||
}
|
||||
|
|
@ -14493,9 +14492,9 @@
|
|||
}
|
||||
},
|
||||
"ws": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz",
|
||||
"integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==",
|
||||
"version": "5.2.3",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-5.2.3.tgz",
|
||||
"integrity": "sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA==",
|
||||
"requires": {
|
||||
"async-limiter": "~1.0.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ export default () => {
|
|||
return (
|
||||
<CSSTransition classNames="react-router" appear in timeout={300}>
|
||||
<Container className="text-center m-auto">
|
||||
<h2 className="text-center mt-5 py-3">Pastebin</h2>
|
||||
<h2 className="text-center mt-5 py-3">Codebin</h2>
|
||||
|
||||
<Form onSubmit={submit} className="perfect-width text-center m-auto">
|
||||
{/* Syntax Selection */}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useState } from 'react';
|
||||
import {
|
||||
InputGroup, Container, Form, Button,
|
||||
Container, Form, Button, Col,
|
||||
} from 'react-bootstrap';
|
||||
import { CSSTransition } from 'react-transition-group';
|
||||
import putUrlHandler from '../axios/putUrlHandler';
|
||||
|
|
@ -43,10 +43,10 @@ export default () => {
|
|||
return (
|
||||
<CSSTransition classNames="react-router" appear in timeout={300}>
|
||||
<Container className="perfect-width">
|
||||
<h2 className="text-center mt-10 py-3">Link Shortener</h2>
|
||||
<Form onSubmit={submit} className="perfect-width">
|
||||
<Form.Group>
|
||||
<InputGroup>
|
||||
<h2 className="text-center mt-10 py-3">URL Shortener</h2>
|
||||
<Form onSubmit={submit} className="mb-3">
|
||||
<Form.Row className="align-items-center justify-content-center">
|
||||
<Col xs={12} lg={7} className="mb-osm-3">
|
||||
<Form.Control
|
||||
type="url"
|
||||
value={state.url}
|
||||
|
|
@ -54,23 +54,21 @@ export default () => {
|
|||
onChange={(evt) => setState({ ...state, url: evt.target.value })}
|
||||
required
|
||||
/>
|
||||
<InputGroup.Append>
|
||||
<Form.Control
|
||||
type="text"
|
||||
style={{ width: '8rem', borderRadius: '0' }}
|
||||
value={state.slug}
|
||||
placeholder="Optional Slug"
|
||||
onChange={(evt) => setState({ ...state, slug: evt.target.value })}
|
||||
/>
|
||||
</InputGroup.Append>
|
||||
<InputGroup.Append>
|
||||
<Button type="submit" disabled={state.loading || !state.url}>
|
||||
{state.loading ? 'Loading...' : 'Submit'}
|
||||
</Button>
|
||||
</InputGroup.Append>
|
||||
</InputGroup>
|
||||
<Form.Text className="danger" />
|
||||
</Form.Group>
|
||||
</Col>
|
||||
<Col xs={12} lg={3} className="mb-osm-3">
|
||||
<Form.Control
|
||||
type="text"
|
||||
value={state.slug}
|
||||
placeholder="Optional Slug"
|
||||
onChange={(evt) => setState({ ...state, slug: evt.target.value })}
|
||||
/>
|
||||
</Col>
|
||||
<div className="center-osm">
|
||||
<Button type="submit" disabled={state.loading || !state.url}>
|
||||
{state.loading ? 'Loading...' : 'Submit'}
|
||||
</Button>
|
||||
</div>
|
||||
</Form.Row>
|
||||
</Form>
|
||||
|
||||
{state.error && (
|
||||
|
|
|
|||
|
|
@ -1,67 +1,87 @@
|
|||
@font-face {
|
||||
font-family: 'JetBrainsMono';
|
||||
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Regular.woff2') format('woff2'), url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Regular.woff') format('woff'), url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-family: "JetBrainsMono";
|
||||
src: url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Regular.woff2")
|
||||
format("woff2"),
|
||||
url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Regular.woff")
|
||||
format("woff"),
|
||||
url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/ttf/JetBrainsMono-Regular.ttf")
|
||||
format("truetype");
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.perfect-width {
|
||||
max-width: 768px;
|
||||
width: 100%;
|
||||
max-width: 768px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.v-center {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh !important;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin-top: -3.5em !important;
|
||||
padding-top: 3.5em !important;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh !important;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin-top: -3.5em !important;
|
||||
padding-top: 3.5em !important;
|
||||
}
|
||||
|
||||
.mt-10 {
|
||||
margin-top: 40%;
|
||||
margin-top: 33%;
|
||||
}
|
||||
|
||||
.btn-circle {
|
||||
font-size: 2rem;
|
||||
border-radius: 50%;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 3rem;
|
||||
right: 3rem;
|
||||
font-size: 2rem;
|
||||
border-radius: 50%;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 3rem;
|
||||
right: 3rem;
|
||||
}
|
||||
|
||||
.react-router-appear {
|
||||
opacity: 0;
|
||||
transition: opacity ease-in-out 300ms;
|
||||
opacity: 0;
|
||||
transition: opacity ease-in-out 300ms;
|
||||
}
|
||||
|
||||
.react-router-appear-done {
|
||||
opacity: 1;
|
||||
transition: opacity ease-in-out 300ms;
|
||||
opacity: 1;
|
||||
transition: opacity ease-in-out 300ms;
|
||||
}
|
||||
|
||||
.custom.custom-file *, input.custom-file-input {
|
||||
cursor: pointer;
|
||||
.custom.custom-file *,
|
||||
input.custom-file-input {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.paste-view {
|
||||
height: 75vh !important;
|
||||
width: 100%;
|
||||
max-width: 1024px;
|
||||
height: 75vh !important;
|
||||
width: 100%;
|
||||
max-width: 1024px;
|
||||
}
|
||||
|
||||
.paste-edit {
|
||||
height: 33vh !important;
|
||||
width: 100%;
|
||||
max-width: 1024px;
|
||||
}
|
||||
height: 33vh !important;
|
||||
width: 100%;
|
||||
max-width: 1024px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 992px) {
|
||||
.mt-10 {
|
||||
margin-top: 10%;
|
||||
}
|
||||
|
||||
.mb-osm-3 {
|
||||
margin-bottom: 1rem !important;
|
||||
}
|
||||
|
||||
.center-osm {
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue