Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'http://rubygems.org'
ruby "~> 3.3"

gem 'jekyll', '~> 3.10.0'
gem 'jekyll', '~> 4.4'

# liquid former stdlibs
gem 'base64'
Expand All @@ -16,7 +16,6 @@ group :jekyll_plugins do
gem 'jekyll-redirect-from'
gem 'jekyll-relative-links'
gem 'jekyll-titles-from-headings'
gem 'kramdown-parser-gfm'
end

group :development, :test do
Expand Down
2 changes: 0 additions & 2 deletions _ci/fingerprints.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ for data in "${files[@]}"; do
echo "$id: $(md5sum "_site/$file" | cut -c1-8)" >> $fingerprints
done

sed -i'' "s/fingerprints = '[^']*'/fingerprints = '$(grep -vF . $fingerprints | tr '\n' ',' | sed 's/,$//')'/" _includes/v.html

git add $fingerprints _includes/v.html
2 changes: 0 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ include:

exclude:
- CNAME
- Gemfile
- LICENCE
- LICENCE-CODE
- README.md
Expand All @@ -29,7 +28,6 @@ exclude:
- package.json
- staticman.yml
- vendor
- node_modules

plugins:
- jekyll-github-metadata
Expand Down
2 changes: 1 addition & 1 deletion _data/fingerprints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ icons: 715715b9
maths: 5414f235
scripts: 5220ed99
search: b74b56ab
style: 1fcbb8ed
style: 45dfbcc2
1 change: 0 additions & 1 deletion _data/global/navigation.yml

This file was deleted.

12 changes: 12 additions & 0 deletions _data/global/navigation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- title: Home
url: /
- title: CV
url: /cv/
- title: Contact
url: /contact/
- title: Blog
url: /blog/
- title: Interests
url: /interests/
- title: Projects
url: /projects/
1 change: 0 additions & 1 deletion _data/global/social.yml

This file was deleted.

13 changes: 13 additions & 0 deletions _data/global/social.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pgp: 2A57 C8E4 6506 FABA
keybase: cmbuckley
hackerone: cmbuckley
github: cmbuckley
linkedin: cmbuckley
email: chris@cmbuckley.co.uk
x: _cmbuckley
facebook: cmbuckley
fbid: 61201039
instagram: c.m.buckley
amazon: https://bux.re/amzn
mastodon: cmbuckley@mastodon.social
bsky: cmbuckley.co.uk
20 changes: 1 addition & 19 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,12 @@
</{{ tag }}>
<nav class="nav-collapse" aria-label="Menu">
<ul class="list--inline">
{%- if site.data.global.navigation -%}
{%- assign navigation = site.data.global.navigation -%}
{%- else -%}
{%- assign navigation = '' | split: ',' -%}

{%- capture nav_data -%}
{%- include navigation.yml -%}
{%- endcapture -%}

{%- assign nav_array = nav_data | split: ' - ' %}
{%- for nav_item in nav_array -%}
{%- if nav_item != '' -%}
{%- assign nav_cleaned = nav_item | strip | replace: 'title: ', '' | replace: ' url: ', '' -%}
{%- assign navigation = navigation | push: nav_cleaned -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}

{%- if layout.nav_current or site.nav_current -%}
{%- assign url_prefix = layout.nav_current | default: site.nav_current | prepend: '/' -%}
{%- endif -%}
{%- assign page_url = page.url | relative_url | prepend: url_prefix -%}

{%- for link in navigation -%}
{%- for link in site.data.global.navigation -%}
{%- assign current = false -%}
{%- if link.url -%}
{%- assign title = link.title -%}
Expand Down
12 changes: 0 additions & 12 deletions _includes/navigation.yml

This file was deleted.

14 changes: 2 additions & 12 deletions _includes/social.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
{%- if site.data.global.social -%}
{{ site.data.global.social[include.id] }}
{%- else -%}
{%- capture social -%}
{%- include social.yml -%}
{%- endcapture -%}
{%- capture newline %}
{% endcapture -%}

{%- assign item = social | split: newline | where_exp: 'i', 'i contains include.id' | first -%}
{{ item | split: ': ' | last | strip }}
{%- endif -%}
{{ site.data.global.social[include.id] }}
{%- comment -%}avoid trailing newline{%- endcomment -%}
13 changes: 0 additions & 13 deletions _includes/social.yml

This file was deleted.

3 changes: 1 addition & 2 deletions _includes/v.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{%- unless site.suppress_fingerprints -%}
?v=

{%- assign fingerprints = 'icons: 715715b9,maths: 5414f235,scripts: 5220ed99,search: b74b56ab,style: 1fcbb8ed' | split: ',' -%}
{%- assign found = false -%}

{%- unless jekyll.environment == 'development' -%}
{%- for fingerprint in fingerprints -%}
{%- for fingerprint in site.data.fingerprints -%}
{%- assign info = fingerprint | split: ': ' -%}
{%- if info[0] == include.id -%}
{%- assign found = true -%}
Expand Down
76 changes: 33 additions & 43 deletions _sass/_config.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@use "sass:color";
@use "sass:map";
@use "sass:meta";

/***************
COLOR VARIABLES
***************/
Expand Down Expand Up @@ -47,21 +51,21 @@ $theme: (
caption: $grey,

btn-fg: $white,
btn-fg-hover: darken($white, 20%),
btn-fg-hover: color.scale($white, $lightness: -20%),
overlay-fg: $white,
overlay-shadow: black,
nav-active: change-color($white, $alpha: 0.4),
nav-separator: lighten($primary-color, 5%),
separator: darken($white, 15%),
nav-active: color.change($white, $alpha: 0.4),
nav-separator: color.scale($primary-color, $lightness: 5%),
separator: color.scale($white, $lightness: -15%),

input-bg: #e6e6e6,
input-fg: #333,
loading: #e6e6e6,

comments-bg: $offwhite,
comments-border: $tertiary-color,
comments-target: scale-color($primary-color, $lightness: 75%),
comments-author-bg: scale-color($primary-color, $lightness: 95%),
comments-target: color.scale($primary-color, $lightness: 75%),
comments-author-bg: color.scale($primary-color, $lightness: 95%),
comments-author-meta: $grey,

table-bg-alt: $offwhite,
Expand Down Expand Up @@ -90,26 +94,26 @@ $theme: (
),
dark: (
bg: $blackish,
fg: darken($offwhite, 15%),
meta: lighten($silver, 10%),
fg: color.scale($offwhite, $lightness: -15%),
meta: color.scale($silver, $lightness: 20%),
caption: #a1a1a1,

btn-fg: $blackish,
btn-fg-hover: black,
nav-separator: darken($dark-primary-color, 5%),
nav-separator: color.scale($dark-primary-color, $lightness: -10%),

input-bg: #333,
input-fg: #999,
loading: #222,

comments-bg: #191a1c,
comments-border: $dark-tertiary-color,
comments-target: scale-color($dark-primary-color, $lightness: 75%),
comments-author-bg: scale-color($dark-primary-color, $lightness: -80%),
comments-author-meta: lighten($silver, 10%),
comments-target: color.scale($dark-primary-color, $lightness: 75%),
comments-author-bg: color.scale($dark-primary-color, $lightness: -80%),
comments-author-meta: color.scale($silver, $lightness: 20%),

table-bg-alt: #191a1c,
mark: change-color($dark-primary-color, $alpha: 0.3),
mark: color.change($dark-primary-color, $alpha: 0.3),
kbd-border: #555,
kbd-shadow: (0 1px 1px rgba(127, 127, 127, 0.4),
0 1px 0 0 rgba(255, 255, 255, 0.3) inset),
Expand All @@ -120,42 +124,28 @@ $theme: (
),
);

// recursive merge from https://pentzzsolt.medium.com/f91637f87b2e
@function map-deep-merge($map1, $map2) {
$result: $map1;

@each $key, $value in $map2 {
@if (not map-has-key($result, $key)) or (type-of(map-get($result, $key)) != type-of($value)) or (not (type-of(map-get($result, $key)) == map and type-of($value) == map)) {
$result: map-merge($result, ($key: $value));
}
@else {
$result: map-merge($result, ($key: map-deep-merge(map-get($result, $key), $value)));
}
}

@return $result;
}

@each $message-type in 'error', 'warning', 'info', 'ok' {
$default-theme: map-get($theme, default);
$default-theme: map.get($theme, default);

$theme: map-deep-merge($theme, (default: (
#{$message-type}-bg: change-color(map-get($default-theme, $message-type), $alpha: 0.08),
#{$message-type}-highlight: change-color(map-get($default-theme, $message-type), $alpha: 0.5),
#{$message-type}-fg-hover: darken(map-get($default-theme, $message-type), 15%),
$theme: map.deep-merge($theme, (default: (
#{$message-type}-bg: color.change(map.get($default-theme, $message-type), $alpha: 0.08),
#{$message-type}-highlight: color.change(map.get($default-theme, $message-type), $alpha: 0.5),
#{$message-type}-fg-hover: color.scale(map.get($default-theme, $message-type), $lightness: -30%),
), dark: (
#{$message-type}-fg-hover: color.scale(map.get($default-theme, $message-type), $lightness: 20%),
)));
}

@each $button-type in 'primary', 'secondary', 'tertiary' {
$default-theme: map-get($theme, default);
$dark-theme: map-get($theme, dark);
$default-theme: map.get($theme, default);
$dark-theme: map.get($theme, dark);

$theme: map-deep-merge($theme, (default: (
#{$button-type}-fg: darken(map-get($default-theme, $button-type), 10%),
#{$button-type}-hover: darken(map-get($default-theme, $button-type), 10%),
$theme: map.deep-merge($theme, (default: (
#{$button-type}-fg: color.scale(map.get($default-theme, $button-type), $lightness: -30%),
#{$button-type}-hover: color.scale(map.get($default-theme, $button-type), $lightness: -30%),
), dark: (
#{$button-type}-fg: lighten(map-get($dark-theme, $button-type), 10%),
#{$button-type}-hover: lighten(map-get($dark-theme, $button-type), 10%),
#{$button-type}-fg: color.scale(map.get($dark-theme, $button-type), $lightness: 20%),
#{$button-type}-hover: color.scale(map.get($dark-theme, $button-type), $lightness: 20%),
)));
}

Expand Down Expand Up @@ -183,14 +173,14 @@ ROOT VARIABLES
***************/

:root {
@each $key, $value in map-get($theme, default) {
@each $key, $value in map.get($theme, default) {
--color-#{$key}: #{$value};
}
}

@media (prefers-color-scheme: dark) {
:root {
@each $key, $value in map-get($theme, dark) {
@each $key, $value in map.get($theme, dark) {
--color-#{$key}: #{$value};
}
}
Expand Down
33 changes: 0 additions & 33 deletions _sass/_custom.scss

This file was deleted.

11 changes: 0 additions & 11 deletions _sass/breakpoints/_1200up.scss

This file was deleted.

Loading