Compare commits

..

1 Commits

Author SHA1 Message Date
Jakub
03ee9e48c2 WOrk on Colorescheme rework 2024-03-08 00:22:36 -05:00
4 changed files with 61 additions and 113 deletions

View File

@ -35,41 +35,27 @@
{{ end }} {{ end }}
{{ range seq 1 $daysInMonth }} {{ range seq 1 $daysInMonth }}
<div class="day" onclick="simulateLinkClick()" > <div class="day">
{{ $startDate := time.AsTime ( printf "%4d-%02d-%02dT00:00:00" $year $month . ) }} {{ $startDate := time.AsTime ( printf "%4d-%02d-%02dT00:00:00" $year $month . ) }}
{{ $endDate := time.AsTime ( printf "%4d-%02d-%02dT23:59:59" $year $month . ) }} {{ $endDate := time.AsTime ( printf "%4d-%02d-%02dT23:59:59" $year $month . ) }}
<h3 class="day-num">{{ . }}</h3> <h3 class="day-num">{{ . }}</h3>
<h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3> <h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3>
{{ $eventCount := 0 }}
{{ range where $.Site.RegularPages "Section" "eq" "events" }} {{ range where $.Site.RegularPages "Section" "eq" "events" }}
{{ $eventStart := time.AsTime .Params.start_date }} {{ $eventStart := time.AsTime .Params.start_date }}
{{ $eventEnd := time.AsTime .Params.end_date }} {{ $eventEnd := time.AsTime .Params.end_date }}
{{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }} {{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }}
{{ $eventCount = add $eventCount 1 }}
<div class="event" > <div class="event" >
<a href="{{ .RelPermalink }}">{{.Title}}</a> <a href="{{ .RelPermalink }}">{{.Title}}</a>
</div> </div>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if gt $eventCount 1 }}
{{ errorf "Error: Multiple events per day currently unsuported"}}
{{ end }}
</div> </div>
{{ end }} {{ end }}
</div> </div>
</div> </div>
<script>
function simulateLinkClick() {
var link = document.querySelector('.div a');
if (link) {
link.click();
}
}
</script>
{{ $date := $date.AddDate 0 1 0 }} {{ $date := $date.AddDate 0 1 0 }}
@ -114,22 +100,16 @@ function simulateLinkClick() {
<h3 class="day-num">{{ . }}</h3> <h3 class="day-num">{{ . }}</h3>
<h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3> <h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3>
{{ $eventCount := 0 }}
{{ range where $.Site.RegularPages "Section" "eq" "events" }} {{ range where $.Site.RegularPages "Section" "eq" "events" }}
{{ $eventStart := time.AsTime .Params.start_date }} {{ $eventStart := time.AsTime .Params.start_date }}
{{ $eventEnd := time.AsTime .Params.end_date }} {{ $eventEnd := time.AsTime .Params.end_date }}
{{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }} {{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }}
{{ $eventCount = add $eventCount 1 }}
<div class="event" > <div class="event" >
<a href="{{ .RelPermalink }}">{{.Title}}</a> <a href="{{ .RelPermalink }}">{{.Title}}</a>
</div> </div>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if gt $eventCount 1 }}
{{ errorf "Error: Multiple events per day currently unsuported"}}
{{ end }}
</div> </div>
{{ end }} {{ end }}
</div> </div>
@ -172,28 +152,22 @@ function simulateLinkClick() {
{{ end }} {{ end }}
{{ range seq 1 $daysInMonth }} {{ range seq 1 $daysInMonth }}
<div class="day" onclick="simulateLinkClick()" > <div class="day">
{{ $startDate := time.AsTime ( printf "%4d-%02d-%02dT00:00:00" $year $month . ) }} {{ $startDate := time.AsTime ( printf "%4d-%02d-%02dT00:00:00" $year $month . ) }}
{{ $endDate := time.AsTime ( printf "%4d-%02d-%02dT23:59:59" $year $month . ) }} {{ $endDate := time.AsTime ( printf "%4d-%02d-%02dT23:59:59" $year $month . ) }}
<h3 class="day-num">{{ . }}</h3> <h3 class="day-num">{{ . }}</h3>
<h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3> <h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3>
{{ $eventCount := 0 }}
{{ range where $.Site.RegularPages "Section" "eq" "events" }} {{ range where $.Site.RegularPages "Section" "eq" "events" }}
{{ $eventStart := time.AsTime .Params.start_date }} {{ $eventStart := time.AsTime .Params.start_date }}
{{ $eventEnd := time.AsTime .Params.end_date }} {{ $eventEnd := time.AsTime .Params.end_date }}
{{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }} {{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }}
{{ $eventCount = add $eventCount 1 }}
<div class="event" > <div class="event" >
<a href="{{ .RelPermalink }}">{{.Title}}</a> <a href="{{ .RelPermalink }}">{{.Title}}</a>
</div> </div>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if gt $eventCount 1 }}
{{ errorf "Error: Multiple events per day currently unsuported"}}
{{ end }}
</div> </div>
{{ end }} {{ end }}
</div> </div>

View File

@ -1,12 +1,3 @@
<script>
function simulateLinkClick() {
var link = document.querySelector('.day a');
if (link) {
link.click();
}
}
</script>
{{ $date:= .Get "date" }} {{ $date:= .Get "date" }}
{{ if not $date }} {{ if not $date }}
{{ errorf "Error: 'date' is a required parameter." }} {{ errorf "Error: 'date' is a required parameter." }}
@ -48,27 +39,22 @@ function simulateLinkClick() {
{{ end }} {{ end }}
{{ range seq 1 $daysInMonth }} {{ range seq 1 $daysInMonth }}
<div class="day" onclick="simulateLinkClick()" > <div class="day">
{{ $startDate := time.AsTime ( printf "%4d-%02d-%02dT00:00:00" $year $month . ) }} {{ $startDate := time.AsTime ( printf "%4d-%02d-%02dT00:00:00" $year $month . ) }}
{{ $endDate := time.AsTime ( printf "%4d-%02d-%02dT23:59:59" $year $month . ) }} {{ $endDate := time.AsTime ( printf "%4d-%02d-%02dT23:59:59" $year $month . ) }}
<h3 class="day-num">{{ . }}</h3> <h3 class="day-num">{{ . }}</h3>
<h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3> <h3 class="mobile-date">{{ $startDate | time.Format ":date_long" }} </h3>
{{ $eventCount := 0 }}
{{ range where $.Site.RegularPages "Section" "eq" "events" }} {{ range where $.Site.RegularPages "Section" "eq" "events" }}
{{ $eventStart := time.AsTime .Params.start_date }} {{ $eventStart := time.AsTime .Params.start_date }}
{{ $eventEnd := time.AsTime .Params.end_date }} {{ $eventEnd := time.AsTime .Params.end_date }}
{{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }} {{ if and ( or ($eventEnd.After $startDate) ($eventEnd.Equal $startDate)) (or ( $eventStart.Before $endDate ) ( $eventStart.Equal $endDate )) }}
{{ $eventCount = add $eventCount 1 }}
<div class="event" > <div class="event" >
<a href="{{ .RelPermalink }}">{{.Title}}</a> <a href="{{ .RelPermalink }}">{{.Title}}</a>
</div> </div>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if gt $eventCount 1 }}
{{ errorf "Error: Multiple events per day currently unsuported" }}
{{ end }}
</div> </div>
{{ end }} {{ end }}
</div> </div>

View File

@ -1,27 +1,25 @@
/* Mostly based off of gruvbox */
:root { :root {
/* Colors */ --bg: #D4D8ED;
--fg: #06080E; --fg: #06080E;
--alt-fg: #F1F2F9; --alt-fg: #F1F2F9;
--bg: #D4D8ED;
--alt-bg: #C5CCE8;
--dark-alt-bg: #A9B2DB;
--acc: #3C5197; --acc: #3C5197;
--dark-acc: #12182B; --dark-acc: #12182B;
--light-acc: #5F75BF; --light-acc: #5F75BF;
--alt-bg: #C5CCE8;
--dark-alt-bg: #A9B2DB;
/* Color Sheme linking */ /* Color Sheme linking */
/* Body Colors */
--body-bg: var(--bg); --body-bg: var(--bg);
--body-fg: var(--fg); --body-fg: var(--fg);
--link-fg: var(--acc); --link-fg: var(--acc);
/* Navbar Colors */
--header-bg: var(--alt-bg); --header-bg: var(--alt-bg);
--header-bg-hov: var(--acc); --header-bg-hov: var(--acc);
--header-fg: var(--fg); --header-fg: var(--fg);
--header-fg-hov: var(--alt-fg); --header-fg-hov: var(--alt-fg);
--header-shadow: var(--dark-acc); --header-shadow: var(--dark-acc);
--header-shadow-hov: var(--header-shadow); --header-shadow-hov: var(--header-shadow);
@ -33,7 +31,6 @@
--langs-bg-hov: var(--header-bg-hov); --langs-bg-hov: var(--header-bg-hov);
--langs-fg-hov: var(--header-fg-hov); --langs-fg-hov: var(--header-fg-hov);
/* Content Colors */
--blockquote-border: var(--alt-bg); --blockquote-border: var(--alt-bg);
--table-bg: var(--dark-alt-bg); --table-bg: var(--dark-alt-bg);
@ -46,61 +43,57 @@
--button-bg: var(--acc); --button-bg: var(--acc);
--button-fg: var(--alt-fg); --button-fg: var(--alt-fg);
/* Calendar Colors */
--cal-bg: var(--alt-bg);
--cal-fg: var(--fg);
--cal-month-bg: var(--alt-bg);
--cal-month-fg: var(--fg);
--cal-weekdays-bg: var(--light-acc); --cal-bg: var(--alt-bg);
--cal-weekdays-fg: var(--alt-fg); --cal-fg: var(--fg);
--cal-day-empty-fg: var(--alt-fg); --cal-month-bg: var(--alt-bg);
--cal-day-empty-bg: var(--dark-alt-bg); --cal-month-fg: var(--fg);
--cal-day-busy-fg: var(--alt-fg); --cal-weekdays-bg: var(--light-acc);
--cal-day-busy-bg: var(--acc); --cal-weekdays-fg: var(--alt-fg);
--cal-day-hover-fg: var(--cal-day-busy-fg);
--cal-day-hover-bg: var(--cal-day-busy-bg);
--cal-event-fg: var(--alt-fg); --cal-day-empty-fg: var(--alt-fg);
--cal-event-bg: var(--light-acc) ; --cal-day-empty-bg: var(--dark-alt-bg);
--cal-mobile-bg: var(--alt-bg); --cal-day-busy-fg: var(--alt-fg);
--cal-mobile-fg: var(--fg); --cal-day-busy-bg: var(--acc);
--cal-day-hover-fg: var(--cal-day-busy-fg);
--cal-day-hover-bg: var(--cal-day-busy-bg);
--cal-event-fg: var(--alt-fg);
--cal-event-bg: var(--light-acc) ;
--cal-mobile-bg: var(--cal-day-busy-bg);
--cal-mobile-fg: var(--cal-fg);
--cal-mobile-border: var(--col-2);
--cal-mobile-link: var(--link-fg);
--cal-mobile-border: var(--acc);
--cal-mobile-link: var(--light-acc);
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
/* Dark Mode Colors */
--bg: #06080E; --bg: #06080E;
--fg: #F0F2F9; --fg: #F0F2F9;
--dark-acc: #0C101D; --dark-acc: #0C101D;
--alt-bg: #18203A; --alt-bg: #18203A;
--dark-alt-bg: #12182B; --dark-alt-bg: #12182B;
/* Dark Mode Colorscheme Changes */
--link-fg: var(--light-acc); --link-fg: var(--light-acc);
--table-bg: var(--dark-acc); --table-bg: var(--dark-acc);
--table-bg-alt: var(----alt-bg); --table-bg-alt: var(----alt-bg);
--button-fg: var(--body-fg); --button-fg: var(--body-fg);
--cal-bg: var(--dark-acc); --cal-bg: var(--dark-acc);
--cal-weekdays-fg: var(--fg); --cal-weekdays-fg: var(--fg);
--cal-day-empty-fg: var(--dark-acc); --cal-day-empty-fg: var(--dark-acc);
--cal-day-busy-fg: var(--acc); --cal-day-busy-fg: var(--acc);
--cal-day-busy-bg: var(--alt-bg); --cal-day-busy-bg: var(--alt-bg);
--cal-event-fg: var(--fg); --cal-event-fg: var(--fg);
--cal-event-bg: var(--acc) ; --cal-event-bg: var(--acc) ;
} }
} }

View File

@ -229,7 +229,7 @@ table tr { background-color: var(--table-bg-alt); }
table tr:nth-child(2n) { background-color: var(--table-bg); } table tr:nth-child(2n) { background-color: var(--table-bg); }
table thead tr th:empty { display: none; }
/* Markdown Blockquote styles */ /* Markdown Blockquote styles */
@ -521,7 +521,6 @@ blockquote.location p { padding: inherit; }
transition: 400ms; transition: 400ms;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
@ -529,7 +528,7 @@ blockquote.location p { padding: inherit; }
.day:has(>.event) { .day:has(>.event) {
/* display: block; */ display: block;
color: var(--cal-day-busy-fg); color: var(--cal-day-busy-fg);
background-color: var(--cal-day-busy-bg); background-color: var(--cal-day-busy-bg);
} }
@ -538,25 +537,21 @@ blockquote.location p { padding: inherit; }
transform: scale(1.2); transform: scale(1.2);
background-color: var(--cal-day-hover-bg); background-color: var(--cal-day-hover-bg);
color: var(--cal-day-hover-fg); color: var(--cal-day-hover-fg);
cursor: pointer;
} }
.day-num { .day-num {
font-size: 6.5vh; font-size: 8vh;
line-height: 1;
pointer-events: none; pointer-events: none;
margin: 0;
} }
.day:has(>.event) .day-num { .day:has(>.event) .day-num {
font-size: 3vh; font-size: 4vh;
margin-bottom: 1vh;
} }
.event, .event a { .event, .event a {
font-size: 1.5vh; font-size: 1.5vh;
color: var(--cal-event-fg); color: var(--cal-event-fg);
/* background-color: var(--cal-event-bg); */ background-color: var(--cal-event-bg);
} }
.mobile-date { display: none;} .mobile-date { display: none;}