vrifox/gitea-theme
Archived
1
0
Fork 0

added contribution-heatmap

This commit is contained in:
Vrifox 2020-10-30 18:05:31 +01:00
parent 076ab9a95a
commit 987203c9d8
5 changed files with 70 additions and 10 deletions

View file

@ -21,13 +21,14 @@ $border-radius: 5px;
// //
// //
@import 'import/colors'; @import 'import/_colors.scss';
@import 'import/main'; @import 'import/include.scss';
@import 'import/nav'; @import 'import/_main.scss';
@import 'import/_nav.scss';
@import 'import/repository.scss'; @import 'import/repository.scss';
@import 'import/explore.scss'; @import 'import/explore.scss';
@import 'import/user.scss'; @import 'import/user.scss';
@import 'import/dashboard.scss'; @import 'import/dashboard.scss';
@import 'import/footer'; @import 'import/_footer.scss';

View file

@ -21,12 +21,13 @@ $border-radius: 5px;
// //
// //
@import 'import/colors'; @import 'import/_colors.scss';
@import 'import/main'; @import 'import/include.scss';
@import 'import/nav'; @import 'import/_main.scss';
@import 'import/_nav.scss';
@import 'import/repository.scss'; @import 'import/repository.scss';
@import 'import/explore.scss'; @import 'import/explore.scss';
@import 'import/user.scss'; @import 'import/user.scss';
@import 'import/footer'; @import 'import/_footer.scss';

View file

@ -44,6 +44,7 @@
.container { .container {
.grid { .grid {
.column.ten { .column.ten {
@include contribution-heatmap;
.news { .news {
.grid { .grid {
.column.fourteen { .column.fourteen {

54
scss/import/include.scss Normal file
View file

@ -0,0 +1,54 @@
@mixin contribution-heatmap {
div {
h4.total-contributions {}
svg.vch__wrapper {
g.vch__months__labels__wrapper {
text.vch__month__label {
fill: $white-dark;
}
}
g.vch__days__labels__wrapper {
text.vch__day__label {
fill: $white-dark;
}
}
g.vch__legend__wrapper {
text {
fill: $white-dark;
}
rect {
@include contribution-heatmap-colors;
}
}
g.vch__year__wrapper {
g.vch__month__wrapper {
rect.vch__day__square {
@include contribution-heatmap-colors;
}
}
}
}
}
}
@mixin contribution-heatmap-colors {
&[style*="fill: rgb(244, 244, 244);"] {
fill: $bg50 !important;
}
&[style*="fill: rgb(216, 239, 191);"] {
fill: $bg60 !important;
}
&[style*="fill: rgb(159, 219, 129);"] {
fill: $bg70 !important;
}
&[style*="fill: rgb(102, 199, 75);"] {
fill: $bg80 !important;
}
&[style*="fill: rgb(96, 153, 38);"] {
fill: $red-dark !important;
}
&[style*="fill: rgb(2, 89, 0);"] {
fill: $red !important;
}
}

View file

@ -173,11 +173,14 @@
.container { .container {
.grid { .grid {
.eleven.column { .eleven.column {
#user-heatmap {
@if $nojavascript == true { @if $nojavascript == true {
#user-heatmap {
display: none; display: none;
} }
} }
@if $nojavascript == false {
@include contribution-heatmap;
}
.feeds { .feeds {
.news { .news {
.content { .content {