Skip to content

Free, simple, and intuitive online database diagram editor and SQL generator.

Clean up public folder

1ilit8a265831edd6
diff --git a/index.html b/index.html
index 97a8ce3a..3ce36e32 100644
--- a/index.html
+++ b/index.html
@@ -2,28 +2,46 @@
<html lang="en">
<head>
<meta charset="utf-8" />
- <link rel="icon" href="src/assets/favicon.ico" />
+ <link rel="icon" href="/favicon.ico" />
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Online database entity-realtionship diagram editor and SQL generator. Design, visualize, and export scripts without an account and completely free of charge."
/>
+
+ <meta name="robots" content="index,follow,max-image-preview:large" />
+
<meta property="og:type" content="website" />
<meta property="og:url" content="https://drawdb.vercel.app/" />
- <meta property="og:title" content="drawDB | Online database diagram editor and SQL generator" />
- <meta property="og:description" content="Online database entity-realtionship diagram editor and SQL generator. Design, visualize, and export scripts without an account and completely free of charge." />
+ <meta
+ property="og:title"
+ content="drawDB | Online database diagram editor and SQL generator"
+ />
+ <meta
+ property="og:description"
+ content="Online database entity-realtionship diagram editor and SQL generator. Design, visualize, and export scripts without an account and completely free of charge."
+ />
<meta property="og:image" content="https://drawdb.vercel.app/hero_ss.png" />
- <meta name="robots" content="index,follow,max-image-preview:large"/>
- <meta name="twitter:image:src" content="https://drawdb.vercel.app/hero_ss.png">
- <meta name="twitter:tile:image" content="https://drawdb.vercel.app/hero_ss.png">
- <meta name="twitter:card" content="summary_large_image">
- <link rel="apple-touch-icon" href="src/assets/favicon.ico" />
+
+ <meta
+ name="twitter:image:src"
+ content="https://drawdb.vercel.app/hero_ss.png"
+ />
+ <meta
+ name="twitter:tile:image"
+ content="https://drawdb.vercel.app/hero_ss.png"
+ />
+ <meta name="twitter:card" content="summary_large_image" />
+
+ <link rel="apple-touch-icon" href="/favicon.ico" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"
crossorigin="anonymous"
/>
+
<title>drawDB | Online database diagram editor and SQL generator</title>
</head>
<body theme-mode="light">
diff --git a/src/assets/favicon.ico b/public/favicon.ico
similarity index 100%
rename from src/assets/favicon.ico
rename to public/favicon.ico
diff --git a/public/images/icons/LICENSE.md b/public/images/icons/LICENSE.md
deleted file mode 100644
index ce74f6ab..00000000
--- a/public/images/icons/LICENSE.md
+++ /dev/null
@@ -1,5 +0,0 @@
-Bootstrap Icons
-https://icons.getbootstrap.com
-
-Licensed under MIT license
-https://github.com/twbs/icons/blob/main/LICENSE.md
diff --git a/public/images/icons/pencil-fill-dark.svg b/public/images/icons/pencil-fill-dark.svg
deleted file mode 100644
index 53f72424..00000000
--- a/public/images/icons/pencil-fill-dark.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="lightgrey" class="bi bi-pencil-fill" viewBox="0 0 16 16">
- <path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
-</svg>
\ No newline at end of file
diff --git a/public/images/icons/pencil-fill.svg b/public/images/icons/pencil-fill.svg
deleted file mode 100644
index bb2dbea4..00000000
--- a/public/images/icons/pencil-fill.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="rgb(51 65 85)" class="bi bi-pencil-fill" viewBox="0 0 16 16">
- <path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/>
-</svg>
\ No newline at end of file
diff --git a/src/plugins/ToolbarPlugin.jsx b/src/plugins/ToolbarPlugin.jsx
index dc9dc08e..079a6e8c 100644
--- a/src/plugins/ToolbarPlugin.jsx
+++ b/src/plugins/ToolbarPlugin.jsx
@@ -82,7 +82,7 @@ function positionEditorElement(editor, rect) {
}
}
-function FloatingLinkEditor({ editor, theme }) {
+function FloatingLinkEditor({ editor }) {
const editorRef = useRef(null);
const inputRef = useRef(null);
const mouseDownRef = useRef(false);
@@ -206,15 +206,6 @@ function FloatingLinkEditor({ editor, theme }) {
<a href={linkUrl} target="_blank" rel="noopener noreferrer">
{linkUrl}
</a>
- <div
- className={`link-edit${theme === "dark" ? "-dark" : ""}`}
- role="button"
- tabIndex={0}
- onMouseDown={(event) => event.preventDefault()}
- onClick={() => {
- setEditMode(true);
- }}
- />
</div>
</>
)}
@@ -386,8 +377,7 @@ function BlockOptionsDropdownList({ editor, blockType }) {
);
}
-export default function ToolbarPlugin(props) {
- const { theme } = props;
+export default function ToolbarPlugin() {
const [editor] = useLexicalComposerContext();
const toolbarRef = useRef(null);
const [canUndo, setCanUndo] = useState(false);
@@ -527,10 +517,7 @@ export default function ToolbarPlugin(props) {
<i className={`bi bi-arrow-clockwise ${canRedo ? "" : "opacity-30"}`} />
</button>
<Divider />
- <BlockOptionsDropdownList
- editor={editor}
- blockType={blockType}
- />
+ <BlockOptionsDropdownList editor={editor} blockType={blockType} />
<Divider />
{blockType === "code" ? (
<div className="flex items-center">
@@ -596,7 +583,7 @@ export default function ToolbarPlugin(props) {
</button>
{isLink &&
createPortal(
- <FloatingLinkEditor editor={editor} theme={theme} />,
+ <FloatingLinkEditor editor={editor} />,
document.body
)}
<Divider />
diff --git a/src/styles/richeditor.css b/src/styles/richeditor.css
index cff7573b..09d0c9e2 100644
--- a/src/styles/richeditor.css
+++ b/src/styles/richeditor.css
@@ -350,34 +350,6 @@ pre::-webkit-scrollbar-thumb {
font-family: inherit;
}
-.link-edit {
- background-image: url(/images/icons/pencil-fill.svg);
- background-size: 16px;
- background-position: center;
- background-repeat: no-repeat;
- width: 35px;
- vertical-align: -0.25em;
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- cursor: pointer;
-}
-
-.link-edit-dark {
- background-image: url(/images/icons/pencil-fill-dark.svg);
- background-size: 16px;
- background-position: center;
- background-repeat: no-repeat;
- width: 35px;
- vertical-align: -0.25em;
- position: absolute;
- right: 0;
- top: 0;
- bottom: 0;
- cursor: pointer;
-}
-
.link-editor .link-input a {
color: rgb(33, 111, 219);
text-decoration: none;