Skip to content

Commit f396f0e

Browse files
author
Daniel Wikar
committed
Updated theme and layout
1 parent 0a1d0c7 commit f396f0e

15 files changed

Lines changed: 1530 additions & 120 deletions

File tree

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ _gh_pages
33
_site
44
.ruby-version
55

6+
# Jekyll
7+
.jekyll-cache
8+
.jekyll-metadata
9+
.sass-cache
10+
Gemfile
11+
Gemfile.lock
12+
613
# Numerous always-ignore extensions
714
*.diff
815
*.err

404.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
---
22
layout: default
3-
title: "404: Page not found"
3+
title: "404 - Page Not Found"
4+
permalink: /404.html
45
---
56

6-
<div class="page">
7-
<h1 class="page-title">404: Page not found</h1>
8-
<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="/">Head back home</a> to try finding it again.</p>
7+
<div class="error-page">
8+
<div class="error-code">404</div>
9+
<h1 class="error-message">Page not found</h1>
10+
<p class="text-muted">Sorry, the page you're looking for doesn't exist or has been moved.</p>
11+
<a href="/" class="read-more mt-lg" style="display: inline-flex;">
12+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="transform: rotate(180deg);">
13+
<path fill-rule="evenodd" d="M12.97 3.97a.75.75 0 011.06 0l7.5 7.5a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 11-1.06-1.06l6.22-6.22H3a.75.75 0 010-1.5h16.19l-6.22-6.22a.75.75 0 010-1.06z" clip-rule="evenodd" />
14+
</svg>
15+
Back to Home
16+
</a>
917
</div>

_config.yml

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,43 @@
1-
excerpt_separator: ""
2-
highlighter: rouge
3-
markdown: kramdown
4-
url: http://wikar.se
1+
# Site settings
52
title: Daniel Wikar
6-
tagline: Personal blog about Analytics, Big Data, Microsoft and IT
7-
description: This is where I blog.
8-
paginate: 5
3+
tagline: Analytics, Big Data, Microsoft and IT
4+
description: Personal blog about Analytics, Big Data, Microsoft and IT
5+
url: https://wikar.se
6+
baseurl: ""
7+
8+
# Author
9+
author:
10+
name: Daniel Wikar
11+
bio: Head of Business Intelligence & Analytics, passionate about data and technology.
12+
avatar: /assets/images/avatar.png
13+
14+
# Social links (leave empty to hide)
15+
social:
16+
linkedin: danielwikar
17+
github: wikar
18+
twitter: ""
19+
email: ""
20+
21+
# Build settings
22+
markdown: kramdown
23+
highlighter: rouge
24+
excerpt_separator: "\n\n"
25+
paginate: 5
26+
27+
# Plugins
28+
plugins:
29+
- jekyll-paginate
30+
- jekyll-feed
31+
- jekyll-seo-tag
32+
33+
# Disqus
34+
disqus:
35+
shortname: dwikar
36+
37+
# Exclude from build
38+
exclude:
39+
- Gemfile
40+
- Gemfile.lock
41+
- node_modules
42+
- vendor
43+
- README.md

_includes/footer.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<footer class="site-footer">
2+
<div class="footer-content">
3+
<p class="footer-copyright">
4+
{{ site.time | date: '%Y' }} © {{ site.title }}
5+
</p>
6+
</div>
7+
</footer>

_includes/head.html

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,48 @@
11
<head>
2-
<link href="http://gmpg.org/xfn/11" rel="profile">
3-
<meta http-equiv="content-type" content="text/html; charset=utf-8">
4-
5-
<!-- Enable responsiveness on mobile devices-->
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
7-
2+
<meta charset="utf-8">
3+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5+
86
<title>
97
{% if page.title == "Home" %}
108
{{ site.title }} &middot; {{ site.tagline }}
119
{% else %}
1210
{{ page.title }} &middot; {{ site.title }}
1311
{% endif %}
1412
</title>
15-
13+
14+
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | truncate: 160 }}">
15+
<meta name="author" content="{{ site.author.name }}">
16+
17+
<!-- Open Graph -->
18+
<meta property="og:title" content="{{ page.title | default: site.title }}">
19+
<meta property="og:description" content="{{ page.excerpt | default: site.description | strip_html | truncate: 160 }}">
20+
<meta property="og:url" content="{{ page.url | absolute_url }}">
21+
<meta property="og:site_name" content="{{ site.title }}">
22+
<meta property="og:type" content="{% if page.layout == 'post' %}article{% else %}website{% endif %}">
23+
24+
<!-- Fonts -->
25+
<link rel="preconnect" href="https://fonts.googleapis.com">
26+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
27+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
28+
1629
<!-- CSS -->
17-
<link rel="stylesheet" href="/public/css/poole.css">
30+
<link rel="stylesheet" href="/assets/css/main.css">
1831
<link rel="stylesheet" href="/public/css/syntax.css">
19-
<link rel="stylesheet" href="/public/css/lanyon.css">
20-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=PT+Serif:400,400italic,700|PT+Sans:400">
21-
<style>img { max-width: 100%; }</style>
22-
32+
2333
<!-- Icons -->
24-
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/public/apple-touch-icon-144-precomposed.png">
25-
<link rel="shortcut icon" href="/public/favicon.ico">
26-
34+
<link rel="apple-touch-icon" sizes="180x180" href="/assets/images/apple-touch-icon.png">
35+
<link rel="icon" type="image/png" sizes="32x32" href="/assets/images/favicon-32x32.png">
36+
<link rel="icon" type="image/png" sizes="16x16" href="/assets/images/favicon-16x16.png">
37+
2738
<!-- RSS -->
28-
<link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">
29-
30-
<!-- highlight.js -->
31-
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/github-dark.min.css">
32-
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js"></script>
33-
<script>hljs.highlightAll();</script>
34-
35-
<!-- Global site tag (gtag.js) - Google Analytics -->
39+
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | relative_url }}">
40+
41+
<!-- SEO Plugin -->
42+
{% if site.plugins contains 'jekyll-seo-tag' %}
43+
{% seo %}
44+
{% endif %}
45+
46+
<!-- Analytics -->
3647
{% include analytics.html %}
3748
</head>

_includes/header.html

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<header class="site-header">
2+
<div class="header-content">
3+
<a href="/" class="site-logo">{{ site.title }}</a>
4+
5+
<button class="nav-toggle" aria-label="Toggle navigation" onclick="document.querySelector('.site-nav').classList.toggle('active')">
6+
<span></span>
7+
<span></span>
8+
<span></span>
9+
</button>
10+
11+
<nav class="site-nav">
12+
<a href="/" {% if page.url == '/' or page.url == '/index.html' %}class="active"{% endif %}>Home</a>
13+
14+
{% assign pages_list = site.pages | sort: 'title' %}
15+
{% for node in pages_list %}
16+
{% if node.title != null and node.layout == "page" %}
17+
<a href="{{ node.url }}" {% if page.url == node.url %}class="active"{% endif %}>{{ node.title }}</a>
18+
{% endif %}
19+
{% endfor %}
20+
21+
{% if site.social.github and site.social.github != "" %}
22+
<a href="https://github.com/{{ site.social.github }}" target="_blank" rel="noopener" aria-label="GitHub" class="header-social-link">
23+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="20" height="20">
24+
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/>
25+
</svg>
26+
</a>
27+
{% endif %}
28+
29+
{% if site.social.linkedin and site.social.linkedin != "" %}
30+
<a href="https://linkedin.com/in/{{ site.social.linkedin }}" target="_blank" rel="noopener" aria-label="LinkedIn" class="header-social-link">
31+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="20" height="20">
32+
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
33+
</svg>
34+
</a>
35+
{% endif %}
36+
37+
<a href="{{ '/feed.xml' | relative_url }}" target="_blank" rel="noopener" aria-label="RSS Feed" class="header-social-link">
38+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="20" height="20">
39+
<path d="M6.18 15.64a2.18 2.18 0 0 1 2.18 2.18C8.36 19 7.38 20 6.18 20C5 20 4 19 4 17.82a2.18 2.18 0 0 1 2.18-2.18M4 4.44A15.56 15.56 0 0 1 19.56 20h-2.83A12.73 12.73 0 0 0 4 7.27V4.44m0 5.66a9.9 9.9 0 0 1 9.9 9.9h-2.83A7.07 7.07 0 0 0 4 12.93V10.1Z"/>
40+
</svg>
41+
</a>
42+
43+
<button class="theme-toggle" id="theme-toggle" aria-label="Toggle dark/light mode" title="Toggle theme">
44+
<svg class="icon-sun" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="20" height="20">
45+
<path d="M12 2.25a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0V3a.75.75 0 01.75-.75zM7.5 12a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM18.894 6.166a.75.75 0 00-1.06-1.06l-1.591 1.59a.75.75 0 101.06 1.061l1.591-1.59zM21.75 12a.75.75 0 01-.75.75h-2.25a.75.75 0 010-1.5H21a.75.75 0 01.75.75zM17.834 18.894a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 10-1.061 1.06l1.59 1.591zM12 18a.75.75 0 01.75.75V21a.75.75 0 01-1.5 0v-2.25A.75.75 0 0112 18zM7.758 17.303a.75.75 0 00-1.061-1.06l-1.591 1.59a.75.75 0 001.06 1.061l1.591-1.59zM6 12a.75.75 0 01-.75.75H3a.75.75 0 010-1.5h2.25A.75.75 0 016 12zM6.697 7.757a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 00-1.061 1.06l1.59 1.591z" />
46+
</svg>
47+
<svg class="icon-moon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="20" height="20">
48+
<path fill-rule="evenodd" d="M9.528 1.718a.75.75 0 01.162.819A8.97 8.97 0 009 6a9 9 0 009 9 8.97 8.97 0 003.463-.69.75.75 0 01.981.98 10.503 10.503 0 01-9.694 6.46c-5.799 0-10.5-4.701-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 01.818.162z" clip-rule="evenodd" />
49+
</svg>
50+
</button>
51+
</nav>
52+
</div>
53+
</header>
54+
55+
<script>
56+
(function() {
57+
const toggle = document.getElementById('theme-toggle');
58+
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)');
59+
60+
function getTheme() {
61+
const stored = localStorage.getItem('theme');
62+
if (stored) return stored;
63+
return prefersDark.matches ? 'dark' : 'light';
64+
}
65+
66+
function setTheme(theme) {
67+
document.documentElement.setAttribute('data-theme', theme);
68+
localStorage.setItem('theme', theme);
69+
}
70+
71+
// Set initial theme (light is default in CSS, only apply if dark)
72+
const initialTheme = getTheme();
73+
if (initialTheme === 'dark') {
74+
setTheme('dark');
75+
}
76+
77+
// Toggle on click
78+
toggle.addEventListener('click', () => {
79+
const current = document.documentElement.getAttribute('data-theme') || 'light';
80+
setTheme(current === 'dark' ? 'light' : 'dark');
81+
});
82+
83+
// Listen for system preference changes
84+
prefersDark.addEventListener('change', (e) => {
85+
if (!localStorage.getItem('theme')) {
86+
setTheme(e.matches ? 'dark' : 'light');
87+
}
88+
});
89+
})();
90+
</script>

_includes/tag-color.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{%- comment -%}
2+
Assigns a consistent color to a tag based on its name.
3+
Usage: {% include tag-color.html tag=tag_name %}
4+
Returns: assigns 'tag_color' variable
5+
{%- endcomment -%}
6+
{%- assign tag_colors = "mauve,pink,red,peach,yellow,green,teal,sky,sapphire,blue,lavender" | split: "," -%}
7+
{%- assign tag_name = include.tag | downcase -%}
8+
{%- assign tag_length = tag_name | size -%}
9+
{%- assign first_char = tag_name | slice: 0 -%}
10+
{%- assign alphabet = "abcdefghijklmnopqrstuvwxyz" | split: "" -%}
11+
{%- assign char_value = 0 -%}
12+
{%- for letter in alphabet -%}
13+
{%- if letter == first_char -%}
14+
{%- assign char_value = forloop.index -%}
15+
{%- break -%}
16+
{%- endif -%}
17+
{%- endfor -%}
18+
{%- assign hash_value = char_value | plus: tag_length -%}
19+
{%- assign color_index = hash_value | modulo: 11 -%}
20+
{%- assign tag_color = tag_colors[color_index] -%}

_includes/twitter.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a class="twitter-timeline" href="https://twitter.com/danielwikar?ref_src=twsrc%5Etfw">Tweets by danielwikar</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
1+
<!-- Twitter integration removed -->

_layouts/default.html

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,16 @@
11
<!DOCTYPE html>
2-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
3-
2+
<html lang="en">
43
{% include head.html %}
54

65
<body>
6+
{% include header.html %}
77

8-
{% include sidebar.html %}
9-
10-
<!-- Wrap is the content to shift when toggling the sidebar. We wrap the
11-
content to avoid any CSS collisions with our real content. -->
12-
<div class="wrap">
13-
<div class="masthead">
14-
<div class="container">
15-
<h3 class="masthead-title">
16-
<a href="/" title="Home">{{ site.title }}</a>
17-
<small>{{ site.tagline }}</small>
18-
</h3>
19-
</div>
20-
</div>
21-
22-
<div class="container content">
8+
<main class="site-main">
9+
<div class="container">
2310
{{ content }}
2411
</div>
25-
</div>
26-
27-
<label for="sidebar-checkbox" class="sidebar-toggle"></label>
12+
</main>
2813

14+
{% include footer.html %}
2915
</body>
3016
</html>

_layouts/page.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
layout: default
33
---
44

5-
<div class="page">
6-
<h1 class="page-title">{{ page.title }}</h1>
7-
{{ content }}
8-
</div>
5+
<article class="page">
6+
<header class="page-header">
7+
<h1 class="page-title">{{ page.title }}</h1>
8+
</header>
99

10-
{% include disqus.html %}
10+
<div class="page-content">
11+
{{ content }}
12+
</div>
13+
</article>

0 commit comments

Comments
 (0)