Skip to content

Commit

Permalink
Update styling
Browse files Browse the repository at this point in the history
  • Loading branch information
vakila committed Apr 11, 2024
1 parent 7a14168 commit 22b2635
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
49 changes: 20 additions & 29 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,17 @@
justify-content: flex-start;
}

.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
header {
text-align: center;
margin-bottom: 2rem;
}

.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}

.logo.react:hover {
filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
from {
transform: rotate(0deg);
}

to {
transform: rotate(360deg);
}
footer {
margin-top: 2rem;
}

@media (prefers-reduced-motion: no-preference) {
a:nth-of-type(2) .logo {
animation: logo-spin infinite 20s linear;
}
#task-list {
width: 100%;
}

.task {
Expand All @@ -46,13 +28,22 @@
justify-content: center;
align-items: center;
gap: 1em;
margin-bottom: 1em;
}

.task input {
margin: 0;
}

.read-the-docs {
color: #888;
.task input[type='text'] {
background-color: var(--pico-secondary-background);
}

footer {
margin-top: 3rem;
.task input[type='checkbox']:not(:checked) {
background-color: var(--pico-secondary-background);
}


.read-the-docs {
color: #888;
}
11 changes: 8 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ function App({ docUrl }: { docUrl: AutomergeUrl }) {
return (
<>
<header>
<h1>
<a href="https://automerge.org" target="_blank">
<img src={automergeLogo} className="logo" alt="Automerge logo" />
</a>
<h1>
Automerge Task List
</h1>
</header>
Expand All @@ -42,6 +42,8 @@ function App({ docUrl }: { docUrl: AutomergeUrl }) {
<b>+</b> New task
</button>

<div id='task-list'>

{doc && doc.tasks?.map(({ title, done }, index) =>
<div className='task' key={index}>
<input
Expand All @@ -52,17 +54,20 @@ function App({ docUrl }: { docUrl: AutomergeUrl }) {
})}
/>

<input type="text" placeholder='What needs doing?' value={title || ''}
<input type="text"
placeholder='What needs doing?' value={title || ''}
onChange={(e) => changeDoc(d => {
d.tasks[index].title = e.target.value;
})} />
</div>)
}

</div>



<footer>
<p className="read-the-docs">Powered by Automerge and Vite + React + TypeScript
<p className="read-the-docs">Powered by Automerge + Vite + React + TypeScript
</p>
</footer>
</>
Expand Down

0 comments on commit 22b2635

Please sign in to comment.