jekyll-any-theme 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +52 -0
- data/_includes/api/example.html +23 -0
- data/_includes/api/get.html +11 -0
- data/_includes/api/save.html +1 -0
- data/_includes/components/alert.html +7 -0
- data/_includes/components/blockquote.html +23 -0
- data/_includes/components/bootstrap.html +245 -0
- data/_includes/components/card.html +85 -0
- data/_includes/components/lead.html +1 -0
- data/_includes/components/login.html +28 -0
- data/_includes/components/navbar_link.html +3 -0
- data/_includes/components/navbar_text.html +3 -0
- data/_includes/components/page_info.html +48 -0
- data/_includes/components/toc.html +18 -0
- data/_includes/filters/link_to_file.html +26 -0
- data/_includes/filters/unslug.html +17 -0
- data/_includes/page/end.html +2 -0
- data/_includes/page/footer.html +26 -0
- data/_includes/page/head.html +28 -0
- data/_includes/page/header.html +7 -0
- data/_includes/page/init.html +17 -0
- data/_includes/page/main.html +44 -0
- data/_includes/page/navbar.html +69 -0
- data/_includes/page/sidebar.html +6 -0
- data/_includes/page/top.html +27 -0
- data/_includes/tempus/calendar.html +26 -0
- data/_includes/tempus/events.html +72 -0
- data/_includes/tempus/next.html +73 -0
- data/_includes/widgets/libros.html +183 -0
- data/_includes/widgets/themes.html +11 -0
- data/_includes/widgets/toc.html +18 -0
- data/_layouts/default.html +8 -0
- data/_layouts/page.html +5 -0
- data/_layouts/post.html +5 -0
- data/_sass/_any_theme.sass +54 -0
- data/_sass/any_theme/_corrections.sass +71 -0
- data/_sass/any_theme/_headings.sass +13 -0
- data/_sass/any_theme/_mixins.sass +11 -0
- data/_sass/any_theme/_syntax_blood.scss +310 -0
- data/_sass/any_theme/_syntax_dark.scss +63 -0
- data/_sass/any_theme/_syntax_default.scss +310 -0
- data/_sass/any_theme/_toc.sass +4 -0
- data/_sass/any_theme/_widgets.sass +48 -0
- data/_sass/bootstrap/_alert.scss +51 -0
- data/_sass/bootstrap/_badge.scss +47 -0
- data/_sass/bootstrap/_breadcrumb.scss +38 -0
- data/_sass/bootstrap/_button-group.scss +166 -0
- data/_sass/bootstrap/_buttons.scss +143 -0
- data/_sass/bootstrap/_card.scss +270 -0
- data/_sass/bootstrap/_carousel.scss +191 -0
- data/_sass/bootstrap/_close.scss +34 -0
- data/_sass/bootstrap/_code.scss +56 -0
- data/_sass/bootstrap/_custom-forms.scss +297 -0
- data/_sass/bootstrap/_dropdown.scss +131 -0
- data/_sass/bootstrap/_forms.scss +333 -0
- data/_sass/bootstrap/_functions.scss +86 -0
- data/_sass/bootstrap/_grid.scss +52 -0
- data/_sass/bootstrap/_images.scss +42 -0
- data/_sass/bootstrap/_input-group.scss +159 -0
- data/_sass/bootstrap/_jumbotron.scss +16 -0
- data/_sass/bootstrap/_list-group.scss +115 -0
- data/_sass/bootstrap/_media.scss +8 -0
- data/_sass/bootstrap/_mixins.scss +42 -0
- data/_sass/bootstrap/_modal.scss +168 -0
- data/_sass/bootstrap/_nav.scss +118 -0
- data/_sass/bootstrap/_navbar.scss +311 -0
- data/_sass/bootstrap/_pagination.scss +77 -0
- data/_sass/bootstrap/_popover.scss +183 -0
- data/_sass/bootstrap/_print.scss +124 -0
- data/_sass/bootstrap/_progress.scss +33 -0
- data/_sass/bootstrap/_reboot.scss +482 -0
- data/_sass/bootstrap/_root.scss +19 -0
- data/_sass/bootstrap/_tables.scss +180 -0
- data/_sass/bootstrap/_tooltip.scss +115 -0
- data/_sass/bootstrap/_transitions.scss +36 -0
- data/_sass/bootstrap/_type.scss +125 -0
- data/_sass/bootstrap/_utilities.scss +14 -0
- data/_sass/bootstrap/_variables.scss +894 -0
- data/_sass/bootstrap/bootstrap-grid.scss +32 -0
- data/_sass/bootstrap/bootstrap-reboot.scss +12 -0
- data/_sass/bootstrap/bootstrap.scss +42 -0
- data/_sass/bootstrap/mixins/_alert.scss +13 -0
- data/_sass/bootstrap/mixins/_background-variant.scss +21 -0
- data/_sass/bootstrap/mixins/_badge.scss +12 -0
- data/_sass/bootstrap/mixins/_border-radius.scss +35 -0
- data/_sass/bootstrap/mixins/_box-shadow.scss +5 -0
- data/_sass/bootstrap/mixins/_breakpoints.scss +123 -0
- data/_sass/bootstrap/mixins/_buttons.scss +109 -0
- data/_sass/bootstrap/mixins/_caret.scss +65 -0
- data/_sass/bootstrap/mixins/_clearfix.scss +7 -0
- data/_sass/bootstrap/mixins/_float.scss +11 -0
- data/_sass/bootstrap/mixins/_forms.scss +137 -0
- data/_sass/bootstrap/mixins/_gradients.scss +45 -0
- data/_sass/bootstrap/mixins/_grid-framework.scss +67 -0
- data/_sass/bootstrap/mixins/_grid.scss +52 -0
- data/_sass/bootstrap/mixins/_hover.scss +39 -0
- data/_sass/bootstrap/mixins/_image.scss +36 -0
- data/_sass/bootstrap/mixins/_list-group.scss +21 -0
- data/_sass/bootstrap/mixins/_lists.scss +7 -0
- data/_sass/bootstrap/mixins/_nav-divider.scss +10 -0
- data/_sass/bootstrap/mixins/_navbar-align.scss +10 -0
- data/_sass/bootstrap/mixins/_pagination.scss +22 -0
- data/_sass/bootstrap/mixins/_reset-text.scss +17 -0
- data/_sass/bootstrap/mixins/_resize.scss +6 -0
- data/_sass/bootstrap/mixins/_screen-reader.scss +35 -0
- data/_sass/bootstrap/mixins/_size.scss +6 -0
- data/_sass/bootstrap/mixins/_table-row.scss +30 -0
- data/_sass/bootstrap/mixins/_text-emphasis.scss +14 -0
- data/_sass/bootstrap/mixins/_text-hide.scss +9 -0
- data/_sass/bootstrap/mixins/_text-truncate.scss +8 -0
- data/_sass/bootstrap/mixins/_transition.scss +9 -0
- data/_sass/bootstrap/mixins/_visibility.scss +7 -0
- data/_sass/bootstrap/utilities/_align.scss +8 -0
- data/_sass/bootstrap/utilities/_background.scss +19 -0
- data/_sass/bootstrap/utilities/_borders.scss +59 -0
- data/_sass/bootstrap/utilities/_clearfix.scss +3 -0
- data/_sass/bootstrap/utilities/_display.scss +38 -0
- data/_sass/bootstrap/utilities/_embed.scss +52 -0
- data/_sass/bootstrap/utilities/_flex.scss +46 -0
- data/_sass/bootstrap/utilities/_float.scss +9 -0
- data/_sass/bootstrap/utilities/_position.scss +36 -0
- data/_sass/bootstrap/utilities/_screenreaders.scss +11 -0
- data/_sass/bootstrap/utilities/_sizing.scss +12 -0
- data/_sass/bootstrap/utilities/_spacing.scss +51 -0
- data/_sass/bootstrap/utilities/_text.scss +52 -0
- data/_sass/bootstrap/utilities/_visibility.scss +11 -0
- data/assets/css/basic_light_sans.sass +71 -0
- data/assets/css_no/basic_dark_sans.sass +114 -0
- data/assets/css_no/basic_dark_serif.sass +114 -0
- data/assets/css_no/basic_light_serif.sass +69 -0
- data/assets/css_no/bootstrap.sass +44 -0
- data/assets/css_no/dark_additions.sass +74 -0
- data/assets/css_no/dnd.sass +188 -0
- data/assets/css_no/gurps.sass +70 -0
- data/assets/css_no/minidark.sass +177 -0
- data/assets/css_no/minimal.sass +139 -0
- data/assets/css_no/roboto_dark.sass +324 -0
- data/assets/css_no/roboto_light.sass +275 -0
- data/assets/fonts/scala/fonts.scss +59 -0
- data/assets/fonts/scala/scala-bold-webfont.eot +0 -0
- data/assets/fonts/scala/scala-bold-webfont.svg +873 -0
- data/assets/fonts/scala/scala-bold-webfont.ttf +0 -0
- data/assets/fonts/scala/scala-bold-webfont.woff +0 -0
- data/assets/fonts/scala/scala-italic-webfont.eot +0 -0
- data/assets/fonts/scala/scala-italic-webfont.svg +235 -0
- data/assets/fonts/scala/scala-italic-webfont.ttf +0 -0
- data/assets/fonts/scala/scala-italic-webfont.woff +0 -0
- data/assets/fonts/scala/scala-webfont.eot +0 -0
- data/assets/fonts/scala/scala-webfont.svg +234 -0
- data/assets/fonts/scala/scala-webfont.ttf +0 -0
- data/assets/fonts/scala/scala-webfont.woff +0 -0
- data/assets/fonts/scala/scalasans-bold-webfont.eot +0 -0
- data/assets/fonts/scala/scalasans-bold-webfont.svg +244 -0
- data/assets/fonts/scala/scalasans-bold-webfont.ttf +0 -0
- data/assets/fonts/scala/scalasans-bold-webfont.woff +0 -0
- data/assets/fonts/scala/scalasans-webfont.eot +0 -0
- data/assets/fonts/scala/scalasans-webfont.svg +238 -0
- data/assets/fonts/scala/scalasans-webfont.ttf +0 -0
- data/assets/fonts/scala/scalasans-webfont.woff +0 -0
- data/assets/images/dnd-bg.jpg +0 -0
- data/assets/js/any-theme.coffee +33 -0
- data/assets/js/any_theme/libros.coffee +113 -0
- data/assets/js/any_theme/login.coffee +90 -0
- data/assets/js/any_theme/storage.coffee +49 -0
- data/assets/js/any_theme/themes.coffee +10 -0
- data/assets/pages/about.md +17 -0
- data/assets/pages/customize/css.md +22 -0
- data/assets/pages/customize/themes.md +17 -0
- data/assets/pages/docs/libros.md +17 -0
- data/assets/pages/docs/tempus.md +66 -0
- data/assets/pages/index.md +21 -0
- metadata +258 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
<footer>
|
2
|
+
<!-- Navbar -->
|
3
|
+
<nav class="navbar navbar-expand-md">
|
4
|
+
<div class="container{{ fluid }}">
|
5
|
+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarFooter" aria-controls="navbarFooter" aria-expanded="false" aria-label="Toggle navigation">
|
6
|
+
<span class="navbar-toggler-icon"></span>
|
7
|
+
</button>
|
8
|
+
|
9
|
+
<div class="collapse navbar-collapse" id="navbarFooter">
|
10
|
+
<ul class="navbar-nav mr-auto">
|
11
|
+
<li class="nav-item">
|
12
|
+
<a class="nav-link" href="{{ site.github.url }}">GitHub</a>
|
13
|
+
</li>
|
14
|
+
<li class="nav-item">
|
15
|
+
<a class="nav-link" href="Page info">Page info</a>
|
16
|
+
</li>
|
17
|
+
</ul>
|
18
|
+
<ul class="navbar-nav my-lg-0">
|
19
|
+
<li class="nav-item">
|
20
|
+
<a class="nav-link" href="#top">Top</a>
|
21
|
+
</li>
|
22
|
+
</ul>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</nav>
|
26
|
+
</footer>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>{{ site.title }}{% if page.title %} | {{ page.title }}{% endif %}</title>
|
5
|
+
|
6
|
+
<!-- Required meta tags -->
|
7
|
+
<meta charset="utf-8">
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
9
|
+
|
10
|
+
<!-- CSS -->
|
11
|
+
<!-- Datepicker -->
|
12
|
+
<link rel="stylesheet"
|
13
|
+
href="https://cdnjs.cloudflare.com/ajax/libs/datepicker/0.6.4/datepicker.css"
|
14
|
+
integrity="sha256-zozDkxLZ4hXQxKEFI8DTVkwNRd0J2KW0LxrN+/2RJVQ="
|
15
|
+
crossorigin="anonymous" />
|
16
|
+
|
17
|
+
{% if font_face %}<link rel="stylesheet" href="/assets/{{ font_face }}">{% endif %}
|
18
|
+
<link rel="stylesheet" href="/assets/css/{{ theme }}.css" id="main-css">
|
19
|
+
|
20
|
+
<!-- Javascripts CDN -->
|
21
|
+
{% for script in site.scripts %}
|
22
|
+
<script src="{{ script.url }}"></script>
|
23
|
+
{% endfor %}
|
24
|
+
|
25
|
+
<!-- any-theme.js is deferred -->
|
26
|
+
<script src="/assets/js/any-theme.js" defer></script>
|
27
|
+
</head>
|
28
|
+
<body>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{%- assign api_stack = site.emptyArray -%}
|
2
|
+
{%- capture api -%}
|
3
|
+
Load page's `collection`, `fluid` liquid variabiles and `theme`. Are checked in `collection` or `page` scope.
|
4
|
+
{%- endcapture -%}
|
5
|
+
{%- include api/save.html -%}
|
6
|
+
{%- comment -%} Load collection {%- endcomment -%}
|
7
|
+
{%- assign collection = site.collections | where: "label", page.collection | first -%}
|
8
|
+
{%- comment -%} Load fluid {%- endcomment -%}
|
9
|
+
{%- if collection.fluid or page.fluid -%}
|
10
|
+
{%- assign fluid = "-fluid" -%}
|
11
|
+
{%- endif -%}
|
12
|
+
{%- comment -%} Load theme {%- endcomment -%}
|
13
|
+
{%- assign theme = collection.theme | default: page.theme | default: 'basic_light_sans' -%}
|
14
|
+
{%- comment -%} Load sidebar {%- endcomment -%}
|
15
|
+
{%- assign sidebar = collection.sidebar | default: page.sidebar -%}
|
16
|
+
{%- comment -%} Load font-face {%- endcomment -%}
|
17
|
+
{%- assign font_face = collection.font_face | default: page.font_face -%}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
{% capture api %}
|
2
|
+
Render `<main>` content and eventually the sidebar.
|
3
|
+
Split content by `<!--row-->` and `<!--column-->` and loop to render.
|
4
|
+
|
5
|
+
- **Called by** `_layouts/default.html`
|
6
|
+
- **Call** `_includes/page/sidebar.html`
|
7
|
+
{% endcapture %}
|
8
|
+
{%- include api/save.html -%}
|
9
|
+
<main class="container{{ fluid }}">
|
10
|
+
{%- comment -%} Check sidebar left {%- endcomment -%}
|
11
|
+
{% if sidebar.side == 'left' %}
|
12
|
+
<div class="row">
|
13
|
+
{% include page/sidebar.html %}
|
14
|
+
<div class="col">
|
15
|
+
{% elsif sidebar.side == 'right' %}
|
16
|
+
<div class="row">
|
17
|
+
<div class="col">
|
18
|
+
{% endif %}
|
19
|
+
{%- comment -%} Loop rows {%- endcomment -%}
|
20
|
+
{% assign rows = content | split: "<!--row-->" %}
|
21
|
+
{%- for row in rows -%}
|
22
|
+
<div class="row">
|
23
|
+
{% assign j = forloop.index0 %}
|
24
|
+
{%- comment -%} Loop columns {%- endcomment -%}
|
25
|
+
{%- assign columns = row | split: "<!--column-->" -%}
|
26
|
+
{%- for column in columns -%}
|
27
|
+
<div class="col">
|
28
|
+
{%- comment -%} Render column {%- endcomment -%}
|
29
|
+
{% assign column_live = rows[j] | split: "<!--column-->" %}
|
30
|
+
{{ column_live[forloop.index0] | strip }}
|
31
|
+
</div>
|
32
|
+
{% endfor %}
|
33
|
+
</div>
|
34
|
+
{%- endfor -%}
|
35
|
+
{%- comment -%} Check sidebar right {%- endcomment -%}
|
36
|
+
{% if sidebar.side == 'right' %}
|
37
|
+
</div>
|
38
|
+
{% include page/sidebar.html %}
|
39
|
+
</div>
|
40
|
+
{% elsif sidebar.side == 'left' %}
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
{% endif %}
|
44
|
+
</main>
|
@@ -0,0 +1,69 @@
|
|
1
|
+
{% capture api %}
|
2
|
+
Return the HTML Bootstrap 4 navbar given in liquid as `include.nav` or `site.nav`. Expected are `right` and `left` arrays with the page title. Array elements containing an array are rendered as dropdowns.
|
3
|
+
|
4
|
+
``` yml
|
5
|
+
left:
|
6
|
+
- Home
|
7
|
+
- Docs:
|
8
|
+
- Tempus
|
9
|
+
- Libros
|
10
|
+
- Customize:
|
11
|
+
- Css
|
12
|
+
- Themes
|
13
|
+
- About
|
14
|
+
right:
|
15
|
+
- Login
|
16
|
+
```
|
17
|
+
|
18
|
+
- **Usage**
|
19
|
+
|
20
|
+
```liquid
|
21
|
+
{% raw %}{% include page/navbar.html nav=site.data.navbar %}{% endraw %}
|
22
|
+
```
|
23
|
+
|
24
|
+
- **Called by** `_includes/page/top.html` to render main navigation
|
25
|
+
- **Call** `_includes/components/navbar_link.html` to render singular links
|
26
|
+
{% endcapture %}
|
27
|
+
{% include api/save.html %}
|
28
|
+
{%- assign navigation = include.nav | default: site.navbar -%}
|
29
|
+
<!-- Navbar -->
|
30
|
+
<nav class="navbar navbar-expand-md">
|
31
|
+
<div class="container{{ fluid }}">
|
32
|
+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarHeader" aria-controls="navbarHeader" aria-expanded="false" aria-label="Toggle navigation">
|
33
|
+
<span class="navbar-toggler-icon"></span>
|
34
|
+
</button>
|
35
|
+
|
36
|
+
<div class="collapse navbar-collapse" id="navbarHeader">
|
37
|
+
<ul class="navbar-nav mr-auto">
|
38
|
+
{%- for nav in navigation.left -%}
|
39
|
+
{%- if nav.first == nil -%}
|
40
|
+
{% assign link = site.pages | where:'title', nav | default: [url: nav] %}
|
41
|
+
{% include components/navbar_link.html %}
|
42
|
+
{%- else -%}
|
43
|
+
{%- assign list_title = nav | first | first -%}
|
44
|
+
{%- assign list_title_slug = list_title | slugify -%}
|
45
|
+
{%- assign list = nav.first[1] -%}
|
46
|
+
<!-- Dropdown -->
|
47
|
+
<li class="nav-item dropdown">
|
48
|
+
<a class="nav-link dropdown-toggle" href="#" id="{{ list_title_slug }}_dropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
49
|
+
{{ list_title }}
|
50
|
+
</a>
|
51
|
+
<div class="dropdown-menu" aria-labelledby="{{ list_title_slug }}_dropdown">
|
52
|
+
{% for item in list %}
|
53
|
+
{%- assign link = site.pages | where:'title', item | default: nil -%}
|
54
|
+
<a class="dropdown-item{% if page.url == link[0].url %} active{% endif %}" href="{{ link[0].url }}">{{ item }}{% if page.url == link[0].url %} <span class="sr-only">(current)</span>{% endif %}</a>
|
55
|
+
{% endfor %}
|
56
|
+
</div>
|
57
|
+
</li>
|
58
|
+
{%- endif -%}
|
59
|
+
{%- endfor -%}
|
60
|
+
</ul>
|
61
|
+
<ul class="navbar-nav my-lg-0">
|
62
|
+
{% for nav in navigation.right %}
|
63
|
+
{%- assign link = site.pages | where:'title', nav -%}
|
64
|
+
{% include components/navbar_link.html %}
|
65
|
+
{% endfor %}
|
66
|
+
</ul>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
</nav>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
{% capture api %}
|
2
|
+
Swap `<header>` and `<navbar>` order by setting liquid `navbar: "top"` or `"bottom"` for pages or collections, in front matter or config defaults.
|
3
|
+
|
4
|
+
- **Usage**
|
5
|
+
|
6
|
+
`navbar: "bottom"` or `nil`
|
7
|
+
|
8
|
+
1. `<header>`
|
9
|
+
1. `<navbar>`
|
10
|
+
|
11
|
+
`navbar: "top"`
|
12
|
+
|
13
|
+
1. `<navbar>`
|
14
|
+
1. `<header>`
|
15
|
+
|
16
|
+
- **Called by** `_layouts/default.html`
|
17
|
+
- **Call** `_includes/page/navbar.html`, `_includes/page/header.html`
|
18
|
+
{% endcapture %}
|
19
|
+
{%- include api/save.html -%}
|
20
|
+
{%- if page.navbar == 'top' or collection.navbar == 'top' -%}
|
21
|
+
{% include page/navbar.html nav=site.data.navbar %}
|
22
|
+
{%- endif -%}
|
23
|
+
{% include page/header.html %}
|
24
|
+
{%- assign navbar_bottom = page.navbar | default: collection.navbar | default: 'bottom' -%}
|
25
|
+
{%- if navbar_bottom == 'bottom' -%}
|
26
|
+
{% include page/navbar.html nav=site.data.navbar %}
|
27
|
+
{%- endif -%}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{%- assign calendar = include.calendar -%}
|
2
|
+
{%- assign cal = site.emptyArray -%}
|
3
|
+
{%- assign day_seconds = 86400 -%}
|
4
|
+
{%- assign starts = calendar.starts | default: 'now' -%}
|
5
|
+
{%- assign start_date = starts | date: "%s" -%}
|
6
|
+
{%- assign year_day = 0 -%}
|
7
|
+
{%- assign year_day_seconds = 0 -%}
|
8
|
+
{%- for month in include.calendar.months.list -%}
|
9
|
+
{%- assign week_day_name = '' -%}
|
10
|
+
{%- assign days = calendar.months.days | default: month.days | default: 30 -%}
|
11
|
+
{%- for day in (1..days) -%}
|
12
|
+
{%- unless month.leap -%}
|
13
|
+
{%- assign week_day = year_day | modulo: calendar.week.size -%}
|
14
|
+
{%- unless month.no_week -%}
|
15
|
+
{%- assign week_day_name = calendar.week[week_day].name -%}
|
16
|
+
{%- assign year_day = year_day | plus: 1 -%}
|
17
|
+
{%- endunless -%}
|
18
|
+
{%- capture new_day -%}- {% if calendar.week[week_day].holiday %}<span class="text-success">{% endif %}{% if month.holiday %}<span class="text-danger">{% endif %}{{ day }}, **{{ month.name }}**, <em>{{ week_day_name }}</em> ({{ year_day_seconds | plus: start_date | date_to_string }}){% if month.holiday %}</span>{% endif %}{% if calendar.week[week_day].holiday %}</span>{% endif %}{%- endcapture -%}
|
19
|
+
{%- assign cal = cal | push: new_day -%}
|
20
|
+
{%- assign year_day_seconds = year_day_seconds | plus: 86400 -%}
|
21
|
+
{%- endunless -%}
|
22
|
+
{%- endfor -%}
|
23
|
+
{%- endfor -%}
|
24
|
+
Year days: {{ year_day_seconds | divided_by: day_seconds }}
|
25
|
+
{% for c in cal %}{{ c }}
|
26
|
+
{% endfor %}
|
@@ -0,0 +1,72 @@
|
|
1
|
+
{%- capture api -%}
|
2
|
+
events
|
3
|
+
|
4
|
+
- ok
|
5
|
+
{%- endcapture -%}
|
6
|
+
{%- include api/save.html -%}
|
7
|
+
{%- assign now = "now" | date: "%s" | plus: 0 -%}
|
8
|
+
{%- assign format = include.format | default: "%B %-d %A" -%}
|
9
|
+
{%- assign day_seconds = 86400 -%}
|
10
|
+
{%- assign year_seconds = day_seconds | times: 364 -%}
|
11
|
+
{%- comment -%} LOOP CALENDARS {%- endcomment -%}
|
12
|
+
{%- for calendar in site.data.tempus.events -%}
|
13
|
+
{% if include.calendar == nil or include.calendar == calendar.title %}
|
14
|
+
|
15
|
+
**{{ calendar.title }}**
|
16
|
+
{%- if include.from or calendar.from or include.past == false -%}
|
17
|
+
{%- assign start = include.from | default: calendar.from | date: "%s" | plus: 0 -%}
|
18
|
+
{%- else -%}
|
19
|
+
{%- assign start = "now" | date: "%s" | plus: 0 -%}
|
20
|
+
{%- endif -%}
|
21
|
+
{%- if include.to or calendar.to -%}
|
22
|
+
{%- assign end = include.to | default: calendar.to | date: "%s" -%}
|
23
|
+
{%- else -%}
|
24
|
+
{%- comment -%} ADD ONE YEAR FROM THE START {%- endcomment -%}
|
25
|
+
{%- assign end = start | plus: year_seconds -%}
|
26
|
+
{%- endif -%}
|
27
|
+
{%- comment -%} CALCULATE DAYS {%- endcomment -%}
|
28
|
+
{%- assign days = end | minus: start | divided_by: day_seconds | round -%}
|
29
|
+
{%- comment -%} LOOP DAYS {%- endcomment -%}
|
30
|
+
{%- for d in (0..days) -%}
|
31
|
+
{%- assign increment = d | times: day_seconds -%}
|
32
|
+
{%- assign day = start | plus: increment -%}
|
33
|
+
{%- assign week_day = day | date: "%A" -%}
|
34
|
+
{%- assign loop_day = day | date: "%Y-%m-%d" -%}
|
35
|
+
{%- assign found = false -%}
|
36
|
+
{%- for e in calendar.events -%}
|
37
|
+
{% if include.event == nil or include.event == e.title %}
|
38
|
+
{%- comment -%} DAY EVENT {%- endcomment -%}
|
39
|
+
{%- if e.day -%}
|
40
|
+
{%- assign event_date = e.day | date: "%Y-%m-%d" -%}
|
41
|
+
{%- if loop_day == event_date -%}
|
42
|
+
{%- assign found = true -%}
|
43
|
+
{%- assign unix = e.day | date: "%s" | plus: 0 -%}
|
44
|
+
{%- assign difference = unix | plus: day_seconds | minus: now | divided_by: day_seconds | ceil | times: -1 -%}
|
45
|
+
{% if difference == 0 %}{%- assign difference = "today" -%}{% endif %}
|
46
|
+
- {% if unix <= now %}<span class="tempus-past">{% endif %}{{ e.day | date: format }}{% if e.title %}: {% if e.color %}<span style="color: {{ e.color }}">{% endif %}**{{ e.title }}**{% endif %} <span class="tempus-difference">{{ difference }}
|
47
|
+
{%- endif -%}
|
48
|
+
{%- comment -%} WEEKLY EVENT {%- endcomment -%}
|
49
|
+
{%- elsif e.weekly.day -%}
|
50
|
+
{%- assign week_offset = e.weekly.offset | default: 0 -%}
|
51
|
+
{%- assign week_jump = e.weekly.jump | default: 1 -%}
|
52
|
+
{%- assign week = day | date: "%U" | minus: week_offset | modulo: week_jump -%}
|
53
|
+
{%- assign split = e.weekly.day | split: "," -%}
|
54
|
+
{%- for weekly_day in split -%}
|
55
|
+
{%- assign weekly_day_stripped = weekly_day | strip -%}
|
56
|
+
{%- if weekly_day_stripped == week_day and week == 0 -%}
|
57
|
+
{%- assign found = true -%}
|
58
|
+
{%- assign difference = day | minus: now | divided_by: day_seconds | ceil | times: -1 -%}
|
59
|
+
{% if difference == 0 %}{%- assign difference = "today" -%}{% endif %}
|
60
|
+
- {% if day <= now %}<span class="tempus-past">{% endif %}{{ day | date: format }}{% if e.title %}: {% if e.color %}<span style="color: {{ e.color }}">{% endif %}**{{ e.title }}**{% endif %} <span class="tempus-difference">{{ difference }}
|
61
|
+
{%- endif -%}
|
62
|
+
{%- endfor -%}
|
63
|
+
{%- endif -%}
|
64
|
+
{%- endif -%}
|
65
|
+
{%- endfor -%}
|
66
|
+
{%- comment -%} SHOW EMPTY DAYS {%- endcomment -%}
|
67
|
+
{% if include.empty and found == false %}
|
68
|
+
- <span class="tempus-empty">{{ day | date: format }}
|
69
|
+
{% endif %}
|
70
|
+
{%- endfor -%}
|
71
|
+
{%- endif -%}
|
72
|
+
{%- endfor -%}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
{%- capture api -%}
|
2
|
+
Next events
|
3
|
+
|
4
|
+
{%- endcapture -%}
|
5
|
+
{%- include api/save.html -%}
|
6
|
+
{%- assign now = "now" | date: "%s" | plus: 0 -%}
|
7
|
+
{%- assign format = include.format | default: "%B %-d %A" -%}
|
8
|
+
{%- assign day_seconds = 86400 -%}
|
9
|
+
{%- assign span_days = include.days | default: 2 -%}
|
10
|
+
{%- assign span_seconds = day_seconds | times: span_days | plus: 1 -%}
|
11
|
+
{%- comment -%} LOOP CALENDARS {%- endcomment -%}
|
12
|
+
{%- for calendar in site.data.tempus.events -%}
|
13
|
+
{%- if include.calendar == nil or include.calendar == calendar.title -%}
|
14
|
+
{%- assign start = now | minus: span_seconds -%}
|
15
|
+
{%- if include.past == false or include.past == "false" -%}{%- assign start = now | plus: 1 -%}{%- endif -%}
|
16
|
+
{%- assign end = now | plus: span_seconds -%}
|
17
|
+
{%- comment -%} CALCULATE DAYS {%- endcomment -%}
|
18
|
+
{%- assign days = end | minus: start | divided_by: day_seconds | round -%}
|
19
|
+
{%- comment -%} LOOP DAYS {%- endcomment -%}
|
20
|
+
{%- assign present = false -%}
|
21
|
+
{%- for d in (0..days) -%}
|
22
|
+
{%- assign increment = d | times: day_seconds -%}
|
23
|
+
{%- assign day = start | plus: increment -%}
|
24
|
+
{%- assign week_day = day | date: "%A" -%}
|
25
|
+
{%- assign loop_day = day | date: "%Y-%m-%d" -%}
|
26
|
+
{%- assign found = false -%}
|
27
|
+
{%- for e in calendar.events -%}
|
28
|
+
{% if include.event == nil or include.event == e.title %}
|
29
|
+
{%- comment -%} DAY EVENT {%- endcomment -%}
|
30
|
+
{%- if e.day -%}
|
31
|
+
{%- assign event_date = e.day | date: "%Y-%m-%d" -%}
|
32
|
+
{% if loop_day == event_date %}
|
33
|
+
{%- assign unix = e.day | date: "%s" | plus: 0 -%}
|
34
|
+
{%- assign difference = unix | plus: day_seconds | minus: now | divided_by: day_seconds | ceil | times: -1 -%}
|
35
|
+
{%- if difference == 0 -%}{%- assign difference = "today" -%}{%- endif -%}
|
36
|
+
{%- if present == false -%}
|
37
|
+
{% assign present = true %}
|
38
|
+
|
39
|
+
**{{ calendar.title }}**
|
40
|
+
{%- endif -%}
|
41
|
+
{% assign found = true %}
|
42
|
+
- {{ e.day | date: format }}{% if e.title %}: {% if e.color %}<span style="color: {{ e.color }}">{% endif %}**{{ e.title }}**{% endif %} <span class="tempus-difference">{{ difference }}
|
43
|
+
{% endif %}
|
44
|
+
{%- comment -%} WEEKLY EVENT {%- endcomment -%}
|
45
|
+
{%- elsif e.weekly.day -%}
|
46
|
+
{%- assign week_offset = e.weekly.offset | default: 0 -%}
|
47
|
+
{%- assign week_jump = e.weekly.jump | default: 1 -%}
|
48
|
+
{%- assign week = day | date: "%U" | minus: week_offset | modulo: week_jump -%}
|
49
|
+
{%- assign split = e.weekly.day | split: "," -%}
|
50
|
+
{%- for weekly_day in split -%}
|
51
|
+
{%- assign weekly_day_stripped = weekly_day | strip -%}
|
52
|
+
{%- if weekly_day_stripped == week_day and week == 0 -%}
|
53
|
+
{%- if present == false -%}
|
54
|
+
{% assign present = true %}
|
55
|
+
|
56
|
+
**{{ calendar.title }}**
|
57
|
+
{%- endif -%}
|
58
|
+
{%- assign found = true -%}
|
59
|
+
{%- assign difference = day | minus: now | divided_by: day_seconds | ceil | times: -1 -%}
|
60
|
+
{% if difference == 0 %}{%- assign difference = "today" -%}{% endif %}
|
61
|
+
- {% if day <= now %}<span class="tempus-past">{% endif %}{{ day | date: format }}{% if e.title %}: {% if e.color %}<span style="color: {{ e.color }}">{% endif %}**{{ e.title }}**{% endif %} <span class="tempus-difference">{{ difference }}
|
62
|
+
{%- endif -%}
|
63
|
+
{%- endfor -%}
|
64
|
+
{%- endif -%}
|
65
|
+
{%- endif -%}
|
66
|
+
{%- endfor -%}
|
67
|
+
{%- comment -%} SHOW EMPTY DAYS {%- endcomment -%}
|
68
|
+
{% if include.empty and found == false %}
|
69
|
+
- <span class="tempus-empty">{{ day | date: format }}
|
70
|
+
{% endif %}
|
71
|
+
{%- endfor -%}
|
72
|
+
{%- endif -%}
|
73
|
+
{%- endfor -%}
|
@@ -0,0 +1,183 @@
|
|
1
|
+
<form id="widget-libros">
|
2
|
+
<fieldset>
|
3
|
+
<div class="form-group">
|
4
|
+
<input type="text" id="libros-title" class="form-control" placeholder="Title">
|
5
|
+
</div>
|
6
|
+
<div class="form-group">
|
7
|
+
<input type="text" id="libros-author" class="form-control" placeholder="Author(s)">
|
8
|
+
</div>
|
9
|
+
<div class="form-group">
|
10
|
+
<button type="submit">
|
11
|
+
Search Openlibrary
|
12
|
+
</button>
|
13
|
+
<input type="reset" value="Reset">
|
14
|
+
</div>
|
15
|
+
<!-- Open Library results -->
|
16
|
+
<div id="libros-results" class="list-group">
|
17
|
+
<template id="template-book">
|
18
|
+
<div class="row">
|
19
|
+
<div class="libros-image-container pr-0">
|
20
|
+
</div>
|
21
|
+
<div class="col">
|
22
|
+
<div class="libros-header">
|
23
|
+
<h5 class="libros-title"></h5>
|
24
|
+
<small class="libros-year"></small>
|
25
|
+
</div>
|
26
|
+
<p class="libros-author"></p>
|
27
|
+
<small class="libros-publisher"></small>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</template>
|
31
|
+
</div>
|
32
|
+
<div class="form-group">
|
33
|
+
<input type="text" id="libros-year" class="form-control" placeholder="Year">
|
34
|
+
</div>
|
35
|
+
<div class="form-group">
|
36
|
+
<input type="text" id="libros-publisher" class="form-control" placeholder="Publisher(s)">
|
37
|
+
</div>
|
38
|
+
<div class="form-group">
|
39
|
+
<input type="text" id="libros-image_url" class="form-control" placeholder="Image URL">
|
40
|
+
</div>
|
41
|
+
<div class="form-group">
|
42
|
+
<input type="date" id="start_reading" class="form-control" placeholder="Start reading" data-toggle="datepicker">
|
43
|
+
</div>
|
44
|
+
<div class="form-group">
|
45
|
+
<input type="date" id="end_reading" class="form-control" placeholder="End reading" data-toggle="datepicker">
|
46
|
+
</div>
|
47
|
+
<pre class="highlight"><code class="language-txt" id="libros-yml"></code></pre>
|
48
|
+
<div class="form-group">
|
49
|
+
<button type="button" class="btn btn-sm btn-outline-secondary" data-clipboard-target="#libros-yml">
|
50
|
+
Copy to clipboard
|
51
|
+
</button>
|
52
|
+
</div>
|
53
|
+
</fieldset>
|
54
|
+
</form>
|
55
|
+
|
56
|
+
|
57
|
+
<!-- <form id="input-form">
|
58
|
+
<h3>BOOK</h3>
|
59
|
+
<div class="form-row">
|
60
|
+
<div class="form-group col-md-6">
|
61
|
+
<input type="text" id="input-title" class="form-control" placeholder="Title">
|
62
|
+
</div>
|
63
|
+
<div class="form-group col-md-6">
|
64
|
+
<input type="text" id="input-author" class="form-control" placeholder="Author(s)">
|
65
|
+
<small>Author name or comma separated list</small>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
<div class="form-row">
|
69
|
+
<div class="form-group col-md-12">
|
70
|
+
<button type="button" id="ol-search" class="btn btn-secondary">
|
71
|
+
Search Openlibrary
|
72
|
+
</button>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
<div class="form-row" id="ol-results">
|
76
|
+
</div>
|
77
|
+
<h3>DETAILS</h3>
|
78
|
+
<div class="form-row">
|
79
|
+
<div class="form-group col-md-6">
|
80
|
+
<input type="text" class="form-control" id="input-publishers" placeholder="Publisher(s)">
|
81
|
+
<small>Publisher or comma separated list</small>
|
82
|
+
</div>
|
83
|
+
<div class="form-group col-md-6">
|
84
|
+
<input type="text" class="form-control" id="input-publish_year" placeholder="Publish year">
|
85
|
+
</div>
|
86
|
+
</div>
|
87
|
+
<div class="form-row">
|
88
|
+
<div class="form-group col-md-6">
|
89
|
+
<input type="text" class="form-control" id="input-cover" placeholder="Cover URL">
|
90
|
+
</div>
|
91
|
+
<div class="form-group col-md-6">
|
92
|
+
<input type="text" class="form-control" placeholder="Subjects">
|
93
|
+
<small>Comma separated list</small>
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="form-row">
|
97
|
+
<div class="form-group col-md-6">
|
98
|
+
<input type="text" class="form-control" id="input-isbn" placeholder="ISBN">
|
99
|
+
</div>
|
100
|
+
<div class="form-group col-md-6">
|
101
|
+
<input type="text" class="form-control" id="input-edition_key" placeholder="Open Library key">
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
<div class="form-row">
|
105
|
+
<div class="form-group col-md-6">
|
106
|
+
<select class="form-control" id="Support">
|
107
|
+
<option>Book</option>
|
108
|
+
<option>Ebook</option>
|
109
|
+
<option>Audiobook</option>
|
110
|
+
</select>
|
111
|
+
<small class="form-text text-muted">Book support</small>
|
112
|
+
</div>
|
113
|
+
<div class="form-group col-md-6">
|
114
|
+
<div class="input-group">
|
115
|
+
<input type="text" class="form-control" aria-label="Text input with segmented button dropdown" placeholder="Price">
|
116
|
+
<div class="input-group-btn">
|
117
|
+
<button type="button" id="button-currency" class="btn btn-outline-secondary">Currency $</button>
|
118
|
+
<button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
119
|
+
<span class="sr-only">Toggle Dropdown</span>
|
120
|
+
</button>
|
121
|
+
<div class="dropdown-menu dropdown-menu-right">
|
122
|
+
<a class="dropdown-item" data-currency="$" href="#">USD $</a>
|
123
|
+
<a class="dropdown-item" data-currency="€" href="#">Euro €</a>
|
124
|
+
<a class="dropdown-item" data-currency="£" href="#">Pound £</a>
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
<h3>READING</h3>
|
131
|
+
<div class="form-row">
|
132
|
+
<div class="form-group col-md-6">
|
133
|
+
<input type="text" class="form-control" placeholder="Date" data-toggle="datepicker">
|
134
|
+
<small>Start reading</small>
|
135
|
+
</div>
|
136
|
+
<div class="form-group col-md-6">
|
137
|
+
<input type="text" class="form-control" placeholder="Date" data-toggle="datepicker">
|
138
|
+
<small>End reading</small>
|
139
|
+
</div>
|
140
|
+
</div>
|
141
|
+
<div class="form-row">
|
142
|
+
<div class="form-group col-md-6">
|
143
|
+
<input type="text" class="form-control" placeholder="Category">
|
144
|
+
<small>Your categories, manage from <a href="#">Categories</a> page</small>
|
145
|
+
</div>
|
146
|
+
<div class="form-group col-md-6">
|
147
|
+
<div class="dropdown show">
|
148
|
+
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
149
|
+
Not rated yet
|
150
|
+
</a>
|
151
|
+
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
|
152
|
+
<a class="dropdown-item" href="#">☆☆☆☆☆</a>
|
153
|
+
<a class="dropdown-item" href="#">★☆☆☆☆</a>
|
154
|
+
<a class="dropdown-item" href="#">★★☆☆☆</a>
|
155
|
+
<a class="dropdown-item" href="#">★★★☆☆</a>
|
156
|
+
<a class="dropdown-item" href="#">★★★★☆</a>
|
157
|
+
<a class="dropdown-item" href="#">★★★★★</a>
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
<div class="form-row">
|
163
|
+
<div class="form-group col-md-12">
|
164
|
+
<textarea class="form-control" placeholder="Review" rows="3"></textarea>
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
<div class="form-row">
|
168
|
+
<div class="form-group col-md-6">
|
169
|
+
<div class="form-check">
|
170
|
+
<label class="form-check-label">
|
171
|
+
<input type="checkbox" class="form-check-input"> Recommended
|
172
|
+
</label>
|
173
|
+
</div>
|
174
|
+
</div>
|
175
|
+
<div class="form-group col-md-6">
|
176
|
+
<div class="form-check">
|
177
|
+
<label class="form-check-label">
|
178
|
+
<input type="checkbox" class="form-check-input"> Difficult
|
179
|
+
</label>
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
</form> -->
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div class="card widget-themes">
|
2
|
+
<div class="card-header">
|
3
|
+
<strong>Themes switcher</strong>
|
4
|
+
</div>
|
5
|
+
<div class="list-group list-group-flush">
|
6
|
+
{%- for t in page.themes -%}
|
7
|
+
{%- assign t_slug = t | slugify | replace: '-', '_' -%}
|
8
|
+
<a href="#" class="list-group-item list-group-item-action{% if t_slug == theme %} active{% endif %}" data-theme="{{ t_slug }}">{{ t }}</a>
|
9
|
+
{%- endfor -%}
|
10
|
+
</div>
|
11
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{% assign title = include.title | default: "Table of Contents" %}{% assign show_title = include.show_title | default: true %}{% if include.collapse %}
|
2
|
+
<div id="toc-accordion" role="tablist">
|
3
|
+
<div class="card">
|
4
|
+
<div class="card-header" role="tab" id="toc-headingOne">
|
5
|
+
<p class="mb-0">
|
6
|
+
<a data-toggle="collapse" href="#toc-collapseOne" aria-expanded="false" aria-controls="toc-collapseOne">{{ title }}</a>
|
7
|
+
</p>
|
8
|
+
</div>
|
9
|
+
<div id="toc-collapseOne" class="collapse " role="tabpanel" aria-labelledby="toc-headingOne" data-parent="#toc-accordion">
|
10
|
+
<div></div>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
{% else %}
|
15
|
+
<h4 id="toc-title">{{ title }}</h4>
|
16
|
+
{% endif %}
|
17
|
+
* toc
|
18
|
+
{:toc}
|
data/_layouts/page.html
ADDED