Skip to content

Commit

Permalink
feat: make snippet page way more usable
Browse files Browse the repository at this point in the history
  • Loading branch information
cmgriffing committed Jan 19, 2024
1 parent 1687e2e commit 4d46b09
Show file tree
Hide file tree
Showing 9 changed files with 430 additions and 69 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"@tiptap/react": "^2.1.13",
"@tiptap/starter-kit": "^2.1.13",
"case": "^1.6.3",
"clsx": "^2.1.0",
"dayjs": "^1.11.10",
"debounce": "^2.0.0",
"drizzle-orm": "^0.29.2",
Expand Down Expand Up @@ -52,6 +53,7 @@
"postcss": "^8.4.32",
"postcss-preset-mantine": "^1.12.2",
"postcss-simple-vars": "^7.0.1",
"sass": "^1.70.0",
"ts-node": "^10.9.2",
"tsx": "^4.7.0",
"typescript": "^5.2.2",
Expand Down
79 changes: 76 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
body {
overflow: hidden;
}

#root {
max-width: 1280px;
margin: 0 auto;
Expand Down
9 changes: 6 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ export function App() {
hiddenFrom="sm"
size="sm"
/>
<Text>Orderly</Text>
<Flex>
<Text>Orderly</Text>
<Text c="red" ml={4}>
ALPHA
</Text>
</Flex>
</Group>
<Group>
<Button
Expand Down Expand Up @@ -259,8 +264,6 @@ export function App() {
}}
/>

<div>{currentBook?.title}</div>

<CreateOrUpdateModal
opened={editBookModalOpened}
inputLabel="Book Title"
Expand Down
54 changes: 54 additions & 0 deletions src/components/SnippetForm.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.snippet-form {
color: inherit;
position: relative;
&:hover {
color: inherit;
}

&.disabled {
padding: 1rem;
margin-top: -20%;

.contents {
opacity: 0.84;
transform: scale(0.9);
filter: blur(2px);
pointer-events: none;
}

.other-snippet-label-wrapper {
position: absolute;
bottom: 2rem;
left: 0;
right: 0;
display: none;

.other-snippet-label {
border-radius: 1rem;
background: gray;
margin: 0 auto;
padding: 0.5rem 1rem;
color: white;
width: 10rem;
text-align: center;
}
}

&.below {
margin-top: 0;
margin-bottom: -20%;

.other-snippet-label-wrapper {
bottom: auto;
top: 2rem;
}
}

&:hover,
&:focus {
.other-snippet-label-wrapper {
display: flex;
}
}
}
}
Loading

0 comments on commit 4d46b09

Please sign in to comment.