mirror of
https://github.com/okiba-org/frontend.git
synced 2025-11-05 19:27:02 +00:00
Compare commits
2 Commits
cc56e17bd4
...
383fa6275e
| Author | SHA1 | Date | |
|---|---|---|---|
| 383fa6275e | |||
| ae4986c091 |
@@ -6,7 +6,6 @@
|
|||||||
"quoteProps": "consistent",
|
"quoteProps": "consistent",
|
||||||
"jsxSingleQuote": false,
|
"jsxSingleQuote": false,
|
||||||
"bracketSpacing": true,
|
"bracketSpacing": true,
|
||||||
"jsxBracketSameLine": true,
|
|
||||||
"arrowParens": "avoid",
|
"arrowParens": "avoid",
|
||||||
"printWidth": 80
|
"printWidth": 80
|
||||||
}
|
}
|
||||||
1148
pnpm-lock.yaml
generated
1148
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,8 @@ function App() {
|
|||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<Home />} />
|
<Route path="/" element={<Home />} />
|
||||||
<Route path="/:id" element={<Paste />} />
|
<Route path="/:id" element={<Paste />} />
|
||||||
|
|||||||
@@ -5,34 +5,43 @@ const BottomBar: FunctionComponent<propTypes> = props => {
|
|||||||
return (
|
return (
|
||||||
<footer
|
<footer
|
||||||
style={{
|
style={{
|
||||||
height: "5vh",
|
height: "2rem",
|
||||||
minHeight: "30px",
|
minHeight: "1rem",
|
||||||
|
position: "relative",
|
||||||
|
left: "0",
|
||||||
|
bottom: "0",
|
||||||
|
width: "100%",
|
||||||
background: "#0B0E14",
|
background: "#0B0E14",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
paddingInline: "15px",
|
paddingInline: "15px",
|
||||||
}}
|
}}
|
||||||
className="BottomBar">
|
className="BottomBar"
|
||||||
|
>
|
||||||
<a
|
<a
|
||||||
style={{
|
style={{
|
||||||
color: "#D9F8C4",
|
color: "#D9F8C4",
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
|
fontSize: "1rem",
|
||||||
}}
|
}}
|
||||||
href="/">
|
href="/"
|
||||||
|
>
|
||||||
<b>Okiba</b> v1.0
|
<b>Okiba</b> v1.0
|
||||||
</a>
|
</a>
|
||||||
<ul
|
<ul
|
||||||
className="controls"
|
className="controls"
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
marginBottom: "2px",
|
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
}}>
|
marginBottom: "2px",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{/* make component of these links some day */}
|
{/* make component of these links some day */}
|
||||||
|
|
||||||
{props.isNewPaste ? (
|
{props.isNewPaste ? (
|
||||||
|
<li style={listStyle}>
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
@@ -40,38 +49,48 @@ const BottomBar: FunctionComponent<propTypes> = props => {
|
|||||||
await props.postCallback();
|
await props.postCallback();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
style={linkStyle}>
|
style={linkStyle}
|
||||||
<li style={listStyle}>save</li>
|
>
|
||||||
|
save
|
||||||
</a>
|
</a>
|
||||||
|
</li>
|
||||||
) : (
|
) : (
|
||||||
|
<li style={listStyle}>
|
||||||
<a href={`/raw/${useParams().id}`} style={linkStyle}>
|
<a href={`/raw/${useParams().id}`} style={linkStyle}>
|
||||||
<li style={listStyle}>raw</li>
|
raw
|
||||||
</a>
|
</a>
|
||||||
|
</li>
|
||||||
)}
|
)}
|
||||||
<Separator />
|
<Separator />
|
||||||
|
<li style={listStyle}>
|
||||||
<a href={"/"} style={linkStyle}>
|
<a href={"/"} style={linkStyle}>
|
||||||
<li style={listStyle}>new</li>
|
new
|
||||||
</a>
|
</a>
|
||||||
|
</li>
|
||||||
<Separator />
|
<Separator />
|
||||||
|
<li style={listStyle}>
|
||||||
<a
|
<a
|
||||||
href={"https://github.com/okiba-org/"}
|
href={"https://github.com/okiba-org/"}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
style={linkStyle}>
|
style={linkStyle}
|
||||||
<li style={listStyle}>source</li>
|
>
|
||||||
|
source
|
||||||
</a>
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</footer>
|
</footer>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const linkStyle = {
|
const linkStyle = {
|
||||||
color: "white",
|
color: "rgba(255, 255, 255, 0.774)",
|
||||||
};
|
};
|
||||||
|
|
||||||
const listStyle = {
|
const listStyle = {
|
||||||
marginInline: "10px",
|
marginInline: "10px",
|
||||||
listStyle: "none",
|
listStyle: "none",
|
||||||
fontSize: "2vh",
|
fontSize: "1rem",
|
||||||
|
height: "100%",
|
||||||
};
|
};
|
||||||
|
|
||||||
const Separator = () => (
|
const Separator = () => (
|
||||||
@@ -79,7 +98,8 @@ const Separator = () => (
|
|||||||
style={{
|
style={{
|
||||||
fontSize: "1rem",
|
fontSize: "1rem",
|
||||||
color: "#839496",
|
color: "#839496",
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
•
|
•
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import Theme from "./EditorTheme";
|
|||||||
|
|
||||||
const Editor: FunctionComponent<propTypes> = props => {
|
const Editor: FunctionComponent<propTypes> = props => {
|
||||||
return (
|
return (
|
||||||
// TODO: custom implementation?
|
|
||||||
<CodeMirror
|
<CodeMirror
|
||||||
className="editor"
|
className="editor"
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
@@ -19,7 +18,7 @@ const Editor: FunctionComponent<propTypes> = props => {
|
|||||||
flex: 1,
|
flex: 1,
|
||||||
overflowY: "auto",
|
overflowY: "auto",
|
||||||
fontFamily: "IBM Plex Mono",
|
fontFamily: "IBM Plex Mono",
|
||||||
fontSize: "1rem",
|
fontSize: "1.2rem",
|
||||||
}}
|
}}
|
||||||
editable={props.editable}
|
editable={props.editable}
|
||||||
readOnly={props.readonly}
|
readOnly={props.readonly}
|
||||||
|
|||||||
@@ -6,9 +6,8 @@ export default createTheme({
|
|||||||
theme: "dark",
|
theme: "dark",
|
||||||
settings: {
|
settings: {
|
||||||
background: "black",
|
background: "black",
|
||||||
// gutterBackground: "#0B0E14",
|
gutterBackground: "black", // line number background
|
||||||
gutterBackground: "black",
|
gutterForeground: "gray", // line number
|
||||||
gutterForeground: "#B8D7A3",
|
|
||||||
foreground: "#c9d1d9",
|
foreground: "#c9d1d9",
|
||||||
caret: "#c9d1d9",
|
caret: "#c9d1d9",
|
||||||
selection: "#003d73",
|
selection: "#003d73",
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&display=swap');
|
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&display=swap");
|
||||||
|
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
font-family: "IBM Plex Mono", monospace;
|
font-family: "IBM Plex Mono", monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: black;
|
background: black;
|
||||||
color: white;
|
color: rgba(255, 255, 255, 0.774);
|
||||||
}
|
}
|
||||||
|
|
||||||
#root {
|
#root {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export const SERVER_URL = import.meta.env.VITE_SERVER_URL
|
export const SERVER_URL = import.meta.env.VITE_SERVER_URL;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from "vite";
|
||||||
import react from '@vitejs/plugin-react'
|
import react from "@vitejs/plugin-react";
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()]
|
plugins: [react()],
|
||||||
})
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user