Design improvements.

This commit is contained in:
Daniel 2022-06-06 19:07:33 +04:30
parent 9fddd7ab5b
commit 91d72e0c0f
7 changed files with 27 additions and 12 deletions

View File

@ -83,15 +83,16 @@ function App() {
return ( return (
<div className="App"> <div className="App">
<div className='content'>
<div className="head"> <div className="head">
<input className="search" type="search" placeholder="&#xf002; Search" onChange={search}/> <input className="search" type="search" placeholder="&#xf002; Search" onChange={search}/>
<button className="btn" onClick={() => setNewBox(true)}>&#xf067;</button> <button className="add-btn btn" onClick={() => setNewBox(true)}>&#xf067;</button>
</div> </div>
<p className="results">{numberOfResults > 0 ? numberOfResults + ' Bookmarks found' : null}</p> <p className="results">{numberOfResults > 0 ? numberOfResults + ' Bookmarks found' : null}</p>
<button className='btn' onClick={() => setFilterBox(true)}>&#xf0b0;</button> <button className='btn' onClick={() => setFilterBox(true)}>&#xf0b0;</button>
<button className='btn' onClick={() => setSortBox(true)}>&#xf0dc;</button> <button className='btn' style={{marginLeft: '10px'}} onClick={() => setSortBox(true)}>&#xf0dc;</button>
<List SetLoader={SetLoader} data={filteredData} tags={tags} reFetch={fetchData} /> <List SetLoader={SetLoader} data={filteredData} tags={tags} reFetch={fetchData} />
{numberOfResults === 0 ? <NoResults /> : null} {numberOfResults === 0 ? <NoResults /> : null}
@ -120,6 +121,7 @@ function App() {
{loader ? <Loader /> : null} {loader ? <Loader /> : null}
</div> </div>
</div>
); );
} }

View File

@ -36,7 +36,7 @@ const AddItem = ({onExit, reFetch, tags, SetLoader}) => {
<> <>
<div className='add-overlay' onClick={abort}></div> <div className='add-overlay' onClick={abort}></div>
<fieldset className='box'> <fieldset className='box'>
<legend >New bookmark</legend> <legend>New bookmark</legend>
<div className='AddItem-content'> <div className='AddItem-content'>
<h3><span style={{color:"red"}}>* </span>Link:</h3> <h3><span style={{color:"red"}}>* </span>Link:</h3>
<input onChange={SetLink} className="AddItem-input" type="search" placeholder="e.g. https://example.com/"/> <input onChange={SetLink} className="AddItem-input" type="search" placeholder="e.g. https://example.com/"/>

View File

@ -2,6 +2,15 @@
min-height: 100vh; min-height: 100vh;
background-color: #1f2c38; background-color: #1f2c38;
color: white; color: white;
display: flex;
}
.content {
width: 100%;
padding: 20px;
max-width: 1200px;
margin-left: auto;
margin-right: auto;
} }
.head { .head {
@ -9,13 +18,12 @@
} }
.search { .search {
margin: 20px 20px 0px 20px;
padding: 10px; padding: 10px;
font-family: 'Font Awesome 5 Free'; font-family: 'Font Awesome 5 Free';
font-size: 1.2rem; font-size: 1.2rem;
padding-left: 10px; padding-left: 10px;
border: none; border: none;
width: 20%; width: 35%;
min-width: 300px; min-width: 300px;
color: white; color: white;
background-color:#273949; background-color:#273949;
@ -29,7 +37,6 @@
.btn { .btn {
position: relative; position: relative;
border-radius: 100%; border-radius: 100%;
margin: 20px 20px 0px auto;
font-family: 'Font Awesome 5 Free'; font-family: 'Font Awesome 5 Free';
width: 40px; width: 40px;
height: 40px; height: 40px;
@ -43,6 +50,10 @@
transition: background-color 0.1s; transition: background-color 0.1s;
} }
.add-btn {
margin-left: auto;
}
.btn:hover { .btn:hover {
background-color: rgb(76, 117, 170); background-color: rgb(76, 117, 170);
} }
@ -56,7 +67,7 @@ textarea:focus, input:focus{
} }
.results { .results {
margin: 20px 20px 0px 30px; margin: 20px 20px 0px 5px;
display: inline-block; display: inline-block;
} }

View File

@ -48,7 +48,7 @@
} }
.filter label:active { .filter label:active {
box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px; box-shadow: 0px 0px 10px rgb(83, 143, 255);
} }
@keyframes fadein { @keyframes fadein {

View File

@ -24,12 +24,12 @@
} }
.list-row { .list-row {
margin-top: 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background-color:#273949; background-color:#273949;
box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset; box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
margin: 20px;
} }
.list-row:hover img { .list-row:hover img {
@ -110,7 +110,9 @@
} }
.tags div::before { .tags div::before {
content: "#";
color: rgb(35, 112, 156);
content: "# ";
} }
.num { .num {

View File

@ -52,7 +52,7 @@
} }
.sort-by-btn:active { .sort-by-btn:active {
box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px; box-shadow: 0px 0px 10px rgb(83, 143, 255);
} }
@keyframes fadein { @keyframes fadein {

View File

@ -10,5 +10,5 @@ body {
} }
*::selection { *::selection {
background-color: rgba(255, 255, 0, 0.6); background-color: rgba(115, 192, 255, 0.9);
} }