Skip to content

Commit

Permalink
rework activity +added 2
Browse files Browse the repository at this point in the history
-less repeating code
+added playstation & cruncyroll background
+fixed background wave
+using :has checks for background
  • Loading branch information
Metro420yt committed Oct 23, 2024
1 parent 2f8e7ed commit f8c5fde
Showing 1 changed file with 36 additions and 59 deletions.
95 changes: 36 additions & 59 deletions stuff/_activity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@
.details_c1d9fd,
.name_c1d9fd,
.nameNormal_c1d9fd,
.nameWrap_c1d9fd {
color: var(--header-primary);
.nameWrap_c1d9fd,
[style^="color: var(--text-"] {
color: var(--header-primary) !important;
}

.platformIcon_ae1fa2 {
background-color: var(--header-primary);
.contextMenu_ae1fa2 > svg > path, //3 dots
.badgeContainer_d60c6d:not(:has(.timestamp_c5d1c1)) > svg > path {
//icons other than time played (hopefully)
fill: var(--header-primary);
}

.contextMenu_ae1fa2 > svg > path {
fill: var(--header-primary);
.platformIcon_ae1fa2 {
background-color: var(--header-primary);
}

.button_dd4f85 {
Expand All @@ -48,7 +51,7 @@
}

// Waves are back :D
.headerTextNormal_c1d9fd::before {
.header_ae1fa2::before {
content: "";
position: absolute;
height: 25px;
Expand All @@ -73,30 +76,29 @@
}
}

// Playing
&::before {
// Wave
&::before,
&::after {
content: "";
position: absolute;
width: 100%;
height: 100%;
z-index: -2;
left: 0;
top: 0;

background: #7289da;
background: var(--playing);
}

&::before {
height: 100%;
z-index: -2;
top: 0;
border-radius: 0 0 10px 10px;
}

&::after {
content: "";
position: absolute;
height: 25px;
z-index: 2;
width: 100%;
top: -24px;
left: 0;
background: #7289da;
background: var(--playing);
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="284" height="25" viewBox="0 0 284 25"><path d="M283.999 15.2776C228.798 15.2776 211.243 -0.0317305 140.048 -0.000164877C69.0475 -0.000164877 51.2975 15.2776 8.58307e-06 15.2776V24.9998H284C284 24.9998 283.999 18.9392 283.999 15.2776Z"/></svg>');
animation: animate 6s linear infinite;
animation-delay: 0s;
Expand All @@ -113,64 +115,39 @@
}

// Spotify
.bar_b5cd55 {
&:has(.bar_b5cd55) {
&::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
left: 0;
top: 0;
background: #1db954;
background: var(--listening);
border-radius: 0 0 10px 10px;
}

&::after {
content: "";
position: absolute;
height: 25px;
width: 100%;
top: -24px;
left: 0;
z-index: 3;
background: #1db653;
background: var(--listening);
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="284" height="25" viewBox="0 0 284 25"><path d="M283.999 15.2776C228.798 15.2776 211.243 -0.0317305 140.048 -0.000164877C69.0475 -0.000164877 51.2975 15.2776 8.58307e-06 15.2776V24.9998H284C284 24.9998 283.999 18.9392 283.999 15.2776Z"/></svg>');
animation: animate 6s linear infinite;
animation-delay: 0s;
}
}

//twitch
&:has([src*="/previews-ttv/"]) {
&::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
left: 0;
top: 0;
&::before,
&::after {
background: #6441a5;
background: var(--streaming);
border-radius: 0 0 10px 10px;
}
}

//playstation
&:has(.platformIcon_ae1fa2[style*="/assets/8fca7fcefaac64787658.svg"]) {
&::before,
&::after {
content: "";
position: absolute;
height: 25px;
width: 100%;
top: -24px;
left: 0;
z-index: 3;
background: #6441a5;
background: var(--streaming);
-webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="284" height="25" viewBox="0 0 284 25"><path d="M283.999 15.2776C228.798 15.2776 211.243 -0.0317305 140.048 -0.000164877C69.0475 -0.000164877 51.2975 15.2776 8.58307e-06 15.2776V24.9998H284C284 24.9998 283.999 18.9392 283.999 15.2776Z"/></svg>');
animation: animate 6s linear infinite;
animation-delay: 0s;
background: #0070d1;
}
}

//crunchyroll
&:has(.platformIcon_ae1fa2[style*="/assets/24ff5d6c720b110d2792.svg"]) {
&::before,
&::after {
background: #f37521;
}
}
}
Expand Down

0 comments on commit f8c5fde

Please sign in to comment.