Files
my-links/components/Links/links.module.scss
Sonny 45f5455f94 feat/fix/chore: refactor project structure + add favicon
- Changement de structure de fichier
- Ajout des favicons des sites
- Suppression et mise à jour de dépendances
- Ajout React-Icons pour gérer les icons
- Amélioration du l'UI
2023-04-20 18:18:03 +02:00

175 lines
2.9 KiB
SCSS

.no-link,
.no-category {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
flex-direction: column;
animation: fadein 0.3s both;
}
.links-wrapper {
height: 100%;
padding: 10px;
display: flex;
flex: 1;
flex-direction: column;
overflow-x: hidden;
overflow-y: scroll;
& h2 {
color: #3f88c5;
margin-bottom: 15px;
font-weight: 500;
& .links-count {
color: #bbb;
font-weight: 300;
font-size: 0.8em;
}
}
}
.links {
width: 100%;
display: flex;
flex: 1;
flex-direction: column;
animation: fadein 0.3s both; // bug on drag start
}
.link {
user-select: none;
cursor: pointer;
height: fit-content;
width: 100%;
color: #3f88c5;
background-color: #fff;
padding: 10px 15px;
border: 1px solid #dadce0;
border-radius: 3px;
margin-bottom: 10px;
outline: 3px solid transparent;
display: flex;
align-items: center;
transition: 0.15s;
&:hover {
border: 1px solid transparent;
outline: 3px solid #82c5fede;
& .url-pathname {
animation: fadein 0.3s both;
}
& .controls {
display: flex;
animation: fadein 0.3s both;
}
}
}
.link > a {
height: 100%;
max-width: calc(100% - 50px);
text-decoration: none;
display: flex;
flex: 1;
flex-direction: column;
transition: 0.1s;
&,
&:hover {
border: 0;
}
& .link-name {
display: flex;
align-items: center;
gap: 0.5em;
}
& .link-name .link-category {
color: #bbb;
font-size: 0.9em;
}
& .link-url {
width: 100%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: #bbb;
font-size: 0.8em;
& .url-pathname {
opacity: 0;
}
}
}
.link .controls {
display: none;
align-items: center;
justify-content: center;
gap: 10px;
& > * {
border: 0;
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
transition: 0.1s;
&:hover {
transform: scale(1.3);
}
& svg {
height: 20px;
width: 20px;
}
}
}
.favicon {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.favicon-loader {
position: absolute;
top: 0;
left: 0;
background-color: #fff;
& > * {
animation: rotate 1s both reverse infinite linear;
}
}
@keyframes rotate {
to {
transform: rotate(0deg);
}
from {
transform: rotate(360deg);
}
}
@keyframes fadein {
0% {
transform: translateX(-15px);
opacity: 0;
}
100% {
transform: translateX(0);
opacity: 1;
}
}