jekyll-bear-theme 0.1.6 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +37 -1
- data/_config.yml +3 -2
- data/_data/life-in-weeks.yml +498 -0
- data/_includes/footer-post.html +2 -4
- data/_includes/footer.html +1 -4
- data/_includes/header.html +20 -12
- data/_layouts/life-in-weeks.html +86 -0
- data/assets/images/JBBlog.png +0 -0
- data/assets/images/JBHome.png +0 -0
- data/assets/images/JBLife.png +0 -0
- data/assets/images/JBLongForm.png +0 -0
- data/assets/images/JBPoetry.png +0 -0
- data/assets/style.css +374 -232
- metadata +35 -15
@@ -0,0 +1,86 @@
|
|
1
|
+
---
|
2
|
+
layout: compress
|
3
|
+
---
|
4
|
+
|
5
|
+
{% include head.html %}
|
6
|
+
|
7
|
+
<main>
|
8
|
+
{% include header.html %}
|
9
|
+
|
10
|
+
<article class="life-in-weeks">
|
11
|
+
<h1>{{ page.title }}</h1>
|
12
|
+
|
13
|
+
{{ content }}
|
14
|
+
|
15
|
+
{% assign data = site.data[page.datafile] %}
|
16
|
+
{% assign start_date = page.start_date %}
|
17
|
+
{% assign split_start = start_date | split: "-" %}
|
18
|
+
{% assign start_year = split_start[0] | plus: 0 %}
|
19
|
+
{% assign start_month = split_start[1] %}
|
20
|
+
{% assign start_day = split_start[2] %}
|
21
|
+
{% assign end_year = page.end_year | plus: 0 %}
|
22
|
+
|
23
|
+
<div class="weeks-grid">
|
24
|
+
{% assign total_years = end_year | minus: start_year | plus: 1 %}
|
25
|
+
{% assign total_weeks = total_years | times: 52 %}
|
26
|
+
{% if total_weeks > 0 %}
|
27
|
+
{% assign week_index = 0 %}
|
28
|
+
{% for unused in (1..total_weeks) %}
|
29
|
+
{% assign decade = week_index | divided_by: 520 %}
|
30
|
+
{% assign age = week_index | divided_by: 52 %}
|
31
|
+
{% assign years_since_start = week_index | divided_by: 52 %}
|
32
|
+
{% assign current_year = start_year | plus: years_since_start %}
|
33
|
+
{% assign weeks_since_year = week_index | modulo: 52 %}
|
34
|
+
{% assign current_week = weeks_since_year | plus: 1 %}
|
35
|
+
{% assign week_has_events = false %}
|
36
|
+
{% assign week_events = "" %}
|
37
|
+
{% assign week_tooltip = "" %}
|
38
|
+
{% comment %} Check if this week has any events {% endcomment %}
|
39
|
+
{% for event_date in data %}
|
40
|
+
{% assign event_date_str = event_date[0] %}
|
41
|
+
{% assign event_date_parsed = event_date_str | date: "%s" %}
|
42
|
+
{% assign start_date_parsed = start_date | date: "%s" %}
|
43
|
+
{% assign seconds_diff = event_date_parsed | minus: start_date_parsed %}
|
44
|
+
{% assign weeks_diff = seconds_diff | divided_by: 604800 %}
|
45
|
+
|
46
|
+
{% if weeks_diff == week_index %}
|
47
|
+
{% assign week_has_events = true %}
|
48
|
+
{% for event in event_date[1] %}
|
49
|
+
{% assign week_events = week_events | append: event.name | append: " " %}
|
50
|
+
{% if event.desc %}
|
51
|
+
{% assign week_tooltip = week_tooltip | append: "Week " | append: week_index | append: ": " | append: event.desc %}
|
52
|
+
{% else %}
|
53
|
+
{% assign week_tooltip = week_tooltip | append: "Week " | append: week_index %}
|
54
|
+
{% endif %}
|
55
|
+
{% endfor %}
|
56
|
+
{% endif %}
|
57
|
+
{% endfor %}
|
58
|
+
{% assign today_year = "now" | date: "%Y" | plus: 0 %}
|
59
|
+
{% assign today_week = "now" | date: "%U" | plus: 1 %}
|
60
|
+
{% assign is_future = false %}
|
61
|
+
{% assign is_current = false %}
|
62
|
+
{% if current_year > today_year %}
|
63
|
+
{% assign is_future = true %}
|
64
|
+
{% elsif current_year == today_year and current_week > today_week %}
|
65
|
+
{% assign is_future = true %}
|
66
|
+
{% elsif current_year == today_year and current_week == today_week %}
|
67
|
+
{% assign is_current = true %}
|
68
|
+
{% endif %}
|
69
|
+
{% assign decade_mod = decade | modulo: 2 %}
|
70
|
+
<div class="week decade-{{ decade_mod }}{% if week_has_events %} has-events{% endif %}{% if is_future %} future{% endif %}{% if is_current %} current{% endif %}"
|
71
|
+
{% if week_has_events %}data-event="{{ week_tooltip | strip }}"{% endif %}>
|
72
|
+
{% if week_has_events %}{{ week_events | strip }}{% endif %}
|
73
|
+
</div>
|
74
|
+
{% assign week_index = week_index | plus: 1 %}
|
75
|
+
{% endfor %}
|
76
|
+
{% endif %}
|
77
|
+
</div>
|
78
|
+
|
79
|
+
{% comment %} Event Legend removed as requested {% endcomment %}
|
80
|
+
</article>
|
81
|
+
</main>
|
82
|
+
|
83
|
+
{% include footer.html %}
|
84
|
+
|
85
|
+
</body>
|
86
|
+
</html>
|
data/assets/images/JBBlog.png
CHANGED
Binary file
|
data/assets/images/JBHome.png
CHANGED
Binary file
|
Binary file
|
Binary file
|
data/assets/images/JBPoetry.png
CHANGED
Binary file
|