Clean up styling classes with tailwind @apply
This commit is contained in:
@@ -15,30 +15,21 @@
|
|||||||
import { Avatar } from '@skeletonlabs/skeleton-svelte';
|
import { Avatar } from '@skeletonlabs/skeleton-svelte';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="postcss">
|
||||||
.card{
|
@reference '../app.css';
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
.card {
|
||||||
gap: 1rem;
|
@apply flex items-center gap-4 bg-transparent rounded-2xl p-6 text-ecsess-800 border-transparent max-w-[450px] h-[250px];
|
||||||
background-color:transparent;
|
|
||||||
border-radius: 20px;
|
|
||||||
padding:1.5rem;
|
|
||||||
color: #0A3D2A;
|
|
||||||
border-color:transparent;
|
|
||||||
background-image: linear-gradient(to bottom right, #E8FFD9, #97C583);
|
background-image: linear-gradient(to bottom right, #E8FFD9, #97C583);
|
||||||
max-width: 450px;
|
|
||||||
height: 250px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-img{
|
.profile-img {
|
||||||
border-radius: 10%;
|
@apply rounded-[10%] overflow-hidden;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-img :global(img) {
|
.profile-img :global(img) {
|
||||||
object-fit: cover;
|
@apply object-cover max-w-full;
|
||||||
max-width: 100%;
|
}
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@@ -56,11 +47,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p class="pb-2 text-xl font-bold">{name} </p>
|
<p class="pb-2 text-xl font-bold">{name} </p>
|
||||||
<hr />
|
|
||||||
<p class="py-2 text-base">{position}</p>
|
<p class="py-2 text-base">{position}</p>
|
||||||
<p class="pb-2 text-xs">{positionDescription}</p>
|
<p class="pb-2 text-xs">{positionDescription}</p>
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a href="mailto:{email}" class="py-2 text-sm underline">{email}</a>
|
<a href="mailto:{email}" class="py-2 text-sm underline">{email}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,59 +2,35 @@
|
|||||||
let { onViewProfile, name, position, image } = $props();
|
let { onViewProfile, name, position, image } = $props();
|
||||||
import placeholder from 'assets/placeholderAvatar.png';
|
import placeholder from 'assets/placeholderAvatar.png';
|
||||||
import { Avatar } from '@skeletonlabs/skeleton-svelte';
|
import { Avatar } from '@skeletonlabs/skeleton-svelte';
|
||||||
|
import Button from 'components/Button.svelte';
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="postcss">
|
||||||
|
@reference '../app.css';
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
display: flex;
|
@apply flex items-center gap-4 bg-transparent p-6 rounded-lg text-ecsess-200 max-w-[400px];
|
||||||
align-items: center;
|
|
||||||
gap: 1rem;
|
|
||||||
background-color:transparent;
|
|
||||||
padding: 1.5rem;
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
color: #A9B7A0;
|
|
||||||
max-width: 400px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-img {
|
.profile-img {
|
||||||
width: 100px;
|
@apply size-[100px] rounded-full overflow-hidden;
|
||||||
height: 100px;
|
|
||||||
border-radius: 50%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile-img :global(img) {
|
.profile-img :global(img) {
|
||||||
object-fit: cover;
|
@apply object-cover size-full;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.info {
|
.info {
|
||||||
flex: 1;
|
@apply flex-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
font-size: 1.25rem;
|
@apply text-xl font-bold;
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.role {
|
.role {
|
||||||
color: #828282;
|
@apply text-ecsess-200 mb-2;
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button {
|
|
||||||
background-color: #2C2C2C;
|
|
||||||
color: white;
|
|
||||||
padding: 0.5rem 1rem;
|
|
||||||
border-radius: 0.375rem;
|
|
||||||
text-decoration: none;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button:hover {
|
|
||||||
background-color: #1E1E1E;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@@ -69,7 +45,8 @@
|
|||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="name">{name}</div>
|
<div class="name">{name}</div>
|
||||||
<div class="role">{position}</div>
|
<div class="role">{position}</div>
|
||||||
<button class="button" onclick={onViewProfile}>View Profile</button>
|
<!-- <button class="button" onclick={onViewProfile}>View Profile</button> -->
|
||||||
|
<Button onclick={onViewProfile}>View Profile</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user