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