picata 0.0.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- LICENSE.md +24 -0
- README.md +59 -0
- components/HelloWorld.tsx +11 -0
- entrypoint.tsx +268 -0
- manage.py +15 -0
- picata/__init__.py +1 -0
- picata/apps.py +33 -0
- picata/blocks.py +175 -0
- picata/helpers/__init__.py +70 -0
- picata/helpers/wagtail.py +61 -0
- picata/log_utils.py +47 -0
- picata/middleware.py +54 -0
- picata/migrations/0001_initial.py +264 -0
- picata/migrations/0002_alter_article_content_alter_basicpage_content.py +112 -0
- picata/migrations/0003_alter_article_content_alter_basicpage_content.py +104 -0
- picata/migrations/0004_alter_article_content_alter_basicpage_content.py +105 -0
- picata/migrations/0005_socialsettings.py +48 -0
- picata/migrations/0006_alter_article_content.py +71 -0
- picata/migrations/0007_splitviewpage.py +69 -0
- picata/migrations/0008_alter_splitviewpage_content.py +96 -0
- picata/migrations/0009_alter_splitviewpage_content.py +111 -0
- picata/migrations/0010_alter_splitviewpage_content.py +105 -0
- picata/migrations/0011_alter_splitviewpage_options_and_more.py +113 -0
- picata/migrations/0012_alter_splitviewpage_content.py +109 -0
- picata/migrations/0013_alter_article_content.py +43 -0
- picata/migrations/0014_alter_article_content_alter_article_summary.py +24 -0
- picata/migrations/0015_alter_article_options_article_tagline_and_more.py +28 -0
- picata/migrations/0016_alter_article_options_alter_articletag_options_and_more.py +33 -0
- picata/migrations/0017_articletagrelation_alter_article_tags_and_more.py +35 -0
- picata/migrations/0018_rename_articletag_pagetag_and_more.py +21 -0
- picata/migrations/0019_rename_name_plural_articletype__name_plural.py +18 -0
- picata/migrations/0020_rename__name_plural_articletype__pluralised_name.py +18 -0
- picata/migrations/0021_rename_article_type_article_page_type.py +18 -0
- picata/migrations/0022_homepage.py +28 -0
- picata/migrations/__init__.py +0 -0
- picata/models.py +486 -0
- picata/settings/__init__.py +1 -0
- picata/settings/base.py +345 -0
- picata/settings/dev.py +94 -0
- picata/settings/mypy.py +7 -0
- picata/settings/prod.py +12 -0
- picata/settings/test.py +6 -0
- picata/static/picata/ada-profile.jpg +0 -0
- picata/static/picata/ada-social-bear.jpg +0 -0
- picata/static/picata/favicon.ico +0 -0
- picata/static/picata/fonts/Bitter-Light.ttf +0 -0
- picata/static/picata/fonts/Bitter-LightItalic.ttf +0 -0
- picata/static/picata/fonts/FiraCode-Light.ttf +0 -0
- picata/static/picata/fonts/FiraCode-SemiBold.ttf +0 -0
- picata/static/picata/fonts/Sacramento-Regular.ttf +0 -0
- picata/static/picata/fonts/ZillaSlab-Bold.ttf +0 -0
- picata/static/picata/fonts/ZillaSlab-BoldItalic.ttf +0 -0
- picata/static/picata/fonts/ZillaSlab-Light.ttf +0 -0
- picata/static/picata/fonts/ZillaSlab-LightItalic.ttf +0 -0
- picata/static/picata/fonts/ZillaSlabHighlight-Bold.ttf +0 -0
- picata/static/picata/icons.svg +56 -0
- picata/templates/picata/3_column.html +28 -0
- picata/templates/picata/404.html +11 -0
- picata/templates/picata/500.html +13 -0
- picata/templates/picata/_post_list.html +24 -0
- picata/templates/picata/article.html +20 -0
- picata/templates/picata/base.html +135 -0
- picata/templates/picata/basic_page.html +10 -0
- picata/templates/picata/blocks/icon_link_item.html +7 -0
- picata/templates/picata/blocks/icon_link_list.html +4 -0
- picata/templates/picata/blocks/icon_link_list_stream.html +3 -0
- picata/templates/picata/dl_view.html +18 -0
- picata/templates/picata/home_page.html +21 -0
- picata/templates/picata/post_listing.html +17 -0
- picata/templates/picata/previews/3col.html +73 -0
- picata/templates/picata/previews/dl.html +10 -0
- picata/templates/picata/previews/split.html +10 -0
- picata/templates/picata/previews/theme_gallery.html +158 -0
- picata/templates/picata/search_results.html +28 -0
- picata/templates/picata/split_view.html +15 -0
- picata/templates/picata/tags/site_menu.html +8 -0
- picata/templatetags/__init__.py +1 -0
- picata/templatetags/absolute_static.py +15 -0
- picata/templatetags/menu_tags.py +42 -0
- picata/templatetags/stringify.py +23 -0
- picata/transformers.py +60 -0
- picata/typing/__init__.py +19 -0
- picata/typing/wagtail.py +31 -0
- picata/urls.py +48 -0
- picata/validators.py +36 -0
- picata/views.py +80 -0
- picata/wagtail_hooks.py +43 -0
- picata/wsgi.py +15 -0
- picata-0.0.1.dist-info/METADATA +87 -0
- picata-0.0.1.dist-info/RECORD +94 -0
- picata-0.0.1.dist-info/WHEEL +4 -0
- picata-0.0.1.dist-info/licenses/LICENSE.md +24 -0
- pygments.sass +382 -0
- styles.sass +300 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
{% extends "3_column.html" %}
|
2
|
+
{% load wagtailcore_tags %}
|
3
|
+
|
4
|
+
{% block main_classes %}{{ block.super }} article{% endblock %}
|
5
|
+
|
6
|
+
{% block aside %}
|
7
|
+
{% if tagline %}<div class="tagline">"{{ tagline }}"<hr /></div>{% endif %}
|
8
|
+
{% if published %}<p class="leading-none text-xs">Published <span>{{ published }}</span></p>{% endif %}
|
9
|
+
{% if updated %}<p class="leading-none text-xs">Updated <span>{{ updated }}</span></p>{% endif %}
|
10
|
+
{% comment %} {% if page.tags %}
|
11
|
+
<hr /><p class="text-center">Tagged: {% for tag in page.tags.all %}<span>{{ tag }}{% if not forloop.last %}, {% endif %}</span>{% endfor %}</p>
|
12
|
+
{% endif %} {% endcomment %}
|
13
|
+
{% endblock %}
|
14
|
+
|
15
|
+
{% block article %}
|
16
|
+
<h1>{{ page.title }}</h1>
|
17
|
+
{{ page.content }}
|
18
|
+
{% endblock %}
|
19
|
+
|
20
|
+
{% block nav %}<div class="toc"></div>{% endblock %}
|
@@ -0,0 +1,135 @@
|
|
1
|
+
{% load static menu_tags absolute_static wagtailsettings_tags wagtailimages_tags %}<!doctype html>
|
2
|
+
<html lang="en">{% get_settings as settings %}
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8" />
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover" />
|
6
|
+
<title>{% block document_title %}{% if title %}{{ title }} · {% endif %}hpk.io{% endblock %}</title>
|
7
|
+
|
8
|
+
<style>
|
9
|
+
@font-face { font-family: 'Sacramento'; src: url("{% static 'fonts/Sacramento-Regular.ttf' %}") format("truetype"); font-weight: 400; font-style: normal; }
|
10
|
+
@font-face { font-family: 'Zilla Slab'; src: url("{% static 'fonts/ZillaSlab-Light.ttf' %}") format("truetype"); font-weight: 300; font-style: normal; }
|
11
|
+
@font-face { font-family: 'Zilla Slab'; src: url("{% static 'fonts/ZillaSlab-LightItalic.ttf' %}") format("truetype"); font-weight: 300; font-style: italic; }
|
12
|
+
@font-face { font-family: 'Zilla Slab'; src: url("{% static 'fonts/ZillaSlab-Bold.ttf' %}") format("truetype"); font-weight: 700; font-style: normal; }
|
13
|
+
@font-face { font-family: 'Zilla Slab'; src: url("{% static 'fonts/ZillaSlab-BoldItalic.ttf' %}") format("truetype"); font-weight: 700; font-style: italic; }
|
14
|
+
@font-face { font-family: 'Zilla Slab Highlight'; src: url("{% static 'fonts/ZillaSlabHighlight-Bold.ttf' %}") format("truetype"); font-weight: 700; font-style: normal; }
|
15
|
+
@font-face { font-family: 'Bitter'; src: url("{% static 'fonts/Bitter-Light.ttf' %}") format("truetype"); font-weight: 300; font-style: normal; }
|
16
|
+
@font-face { font-family: 'Bitter'; src: url("{% static 'fonts/Bitter-LightItalic.ttf' %}") format("truetype"); font-weight: 300; font-style: italic; }
|
17
|
+
@font-face { font-family: 'Fira Code'; src: url("{% static 'fonts/FiraCode-Light.ttf' %}") format("truetype"); font-weight: 300; font-style: normal; }
|
18
|
+
@font-face { font-family: 'Fira Code'; src: url("{% static 'fonts/FiraCode-SemiBold.ttf' %}") format("truetype"); font-weight: 600; font-style: normal; }
|
19
|
+
</style>
|
20
|
+
|
21
|
+
{% if debug %}<link rel="stylesheet" href="{% static 'hpk.css' %}"/>
|
22
|
+
{% else %}<link rel="stylesheet" href="{% static 'hpk.min.css' %}" />{% endif %}
|
23
|
+
|
24
|
+
<meta name="description" content="{% block meta_description %}Hpk.io{% endblock %}" />
|
25
|
+
|
26
|
+
<meta property="og:title" content="{% block og_title %}Hpk.io{% endblock %}">
|
27
|
+
<meta property="og:description" content="{% block og_description %}Ada Wrights's website - Hpk.io{% endblock %}">
|
28
|
+
<meta property="og:image" content="{% block og_image %}{% if settings.hpk.SocialSettings.default_social_image %}{{ request.scheme }}://{{ request.get_host }}/{% image_url settings.hpk.SocialSettings.default_social_image 'fill-1200x630' %}{% else %}{% absolute_static 'ada-social-bear.jpg' %}{% endif %}{% endblock %}">
|
29
|
+
<meta property="og:url" content="{{ request.build_absolute_uri }}">
|
30
|
+
<meta property="og:type" content="{% block og_type %}website{% endblock %}">
|
31
|
+
|
32
|
+
<script type="application/ld+json">
|
33
|
+
{
|
34
|
+
"@context": "https://schema.org",
|
35
|
+
"@type": "{% block ld_type %}WebPage{% endblock %}",
|
36
|
+
"name": "{{ page.get_social_title }}",
|
37
|
+
"description": "{{ page.get_social_description }}",
|
38
|
+
"image": "{% block ld_image %}{% if settings.hpk.SocialSettings.default_social_image %}{{ request.scheme }}://{{ request.get_host }}/{% image_url settings.hpk.SocialSettings.default_social_image 'fill-1200x630' %}{% else %}{% absolute_static 'ada-social-bear.jpg' %}{% endif %}{% endblock %}",
|
39
|
+
"url": "{{ request.build_absolute_uri }}"
|
40
|
+
}
|
41
|
+
</script>
|
42
|
+
</head>
|
43
|
+
<body>
|
44
|
+
<header>
|
45
|
+
<div>
|
46
|
+
|
47
|
+
<!-- Top bar spanning the page -->
|
48
|
+
{% if debug %}
|
49
|
+
<div id="top-bar" class="debug">
|
50
|
+
|
51
|
+
<!-- Debug Breakpoint Indicator -->
|
52
|
+
<div id="debug-container" class="flex space-x-2">
|
53
|
+
<div class="sm:hidden bg-gray-700">xs</div>
|
54
|
+
<div class="sm:flex md:hidden bg-blue-700 hidden">sm</div>
|
55
|
+
<div class="md:flex lg:hidden bg-green-700 hidden">md</div>
|
56
|
+
<div class="lg:flex xl:hidden bg-yellow-700 hidden">lg</div>
|
57
|
+
<div class="xl:flex 2xl:hidden bg-red-700 hidden">xl</div>
|
58
|
+
<div class="2xl:flex bg-purple-700 hidden">2xl</div>
|
59
|
+
</div>
|
60
|
+
|
61
|
+
{% else %}
|
62
|
+
<div id="top-bar">
|
63
|
+
{% endif %}
|
64
|
+
|
65
|
+
<div class="flex btn-group">
|
66
|
+
|
67
|
+
<!-- Search controls -->
|
68
|
+
<div id="search-wrapper">
|
69
|
+
<button id="search-toggle" class="!rounded-r-full" aria-label="Toggle search field" aria-expanded="false" aria-controls="search-field" title="Toggle Search">
|
70
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5">
|
71
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z" />
|
72
|
+
</svg>
|
73
|
+
</button>
|
74
|
+
<form action="{% url 'search' %}" method="get">
|
75
|
+
<input id="search-field" name="query" value="{{ search_query }}" type="text" tabIndex="-1" placeholder="Search the site…" class="search-hidden opacity-0" aria-hidden="true" aria-label="Search field" />
|
76
|
+
</form>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<!-- Theme chooser -->
|
80
|
+
<div id="theme-wrapper" class="group">
|
81
|
+
<span id="theme-reset" class="opacity-0 group-hover:opacity-100 indicator-item">
|
82
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
83
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
|
84
|
+
</svg>
|
85
|
+
</span>
|
86
|
+
<div class="flex">
|
87
|
+
<button class="btn btn-sm !rounded-l-full !rounded-r-none border-r-0" data-set-theme="fl" data-act-class="btn-active" aria-label="Switch to light mode" title="Light mode">
|
88
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
89
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z" />
|
90
|
+
</svg>
|
91
|
+
</button>
|
92
|
+
<div class="pill-button-divider"></div>
|
93
|
+
<button class="btn btn-sm !rounded-r-full !rounded-l-none border-l-0" data-set-theme="ad" data-act-class="btn-active" aria-label="Switch to dark mode" title="Dark mode">
|
94
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
95
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z" />
|
96
|
+
</svg>
|
97
|
+
</button>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
<!-- Page title and menu bar -->
|
106
|
+
<div id="menu-block">
|
107
|
+
<!-- Image and title with tagline -->
|
108
|
+
<div class="profile">
|
109
|
+
<img src="{% static 'ada-profile.jpg' %}" alt="Profile picture of Ada Wright" />
|
110
|
+
<h1><span class="name">Ada Wright</span> <span class="tagline">writes here</span></h1>
|
111
|
+
</div>
|
112
|
+
<!-- Menu buttons -->
|
113
|
+
<nav>
|
114
|
+
{% render_site_menu %}
|
115
|
+
</nav>
|
116
|
+
</div>
|
117
|
+
</div>
|
118
|
+
</header>
|
119
|
+
|
120
|
+
<main class="{% block main_classes %}one-column{% endblock %}">
|
121
|
+
{% block content %}{% endblock %}
|
122
|
+
</main>
|
123
|
+
|
124
|
+
<footer>
|
125
|
+
<div>
|
126
|
+
<p>© 2024 Ada Wright</p>
|
127
|
+
</div>
|
128
|
+
</footer>
|
129
|
+
|
130
|
+
{% if debug %}<script src="{% static 'hpk.js' %}"></script>
|
131
|
+
{% else %}<script src="{% static 'hpk.min.js' %}"></script>{% endif %}
|
132
|
+
|
133
|
+
<!-- Optional: Link to your JS file -->
|
134
|
+
</body>
|
135
|
+
</html>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{% load static %}
|
2
|
+
<li>
|
3
|
+
{% if value.href %}<a href="{{ value.href }}" target="_blank" rel="noopener noreferrer">{% endif %}
|
4
|
+
{% if value.icon %}<svg><use href="static/icons.svg#{{ value.icon }}" /></svg>{% endif %}
|
5
|
+
<span>{{ value.label }}</span>
|
6
|
+
{% if value.href %}</a>{% endif %}
|
7
|
+
</li>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{% extends "base.html" %}
|
2
|
+
{% comment %}
|
3
|
+
Two-column layout (25%/75%), with a 2px line between the columns.
|
4
|
+
|
5
|
+
Override the "definitions" block with a series of <dt /><dd /> elements,
|
6
|
+
or just pass in a dictionary named "content".
|
7
|
+
{% endcomment %}
|
8
|
+
|
9
|
+
{% block main_classes %}definition-list{% endblock %}
|
10
|
+
|
11
|
+
{% block content %}
|
12
|
+
<dl>{% block definitions %}
|
13
|
+
{% for key, value in content.items %}
|
14
|
+
<dt>{{ key }}</dt>
|
15
|
+
<dd>{{ value }}</dt>
|
16
|
+
{% endfor %}
|
17
|
+
{% endblock %}</dl>
|
18
|
+
{% endblock%}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
{% extends "split_view.html" %}
|
2
|
+
{% load wagtailcore_tags %}
|
3
|
+
{% comment %}
|
4
|
+
Template for the HomePage class, utilising a split-view page layout.
|
5
|
+
{% endcomment %}
|
6
|
+
|
7
|
+
{% block main_classes %}{{ block.super }} home-page{% endblock %}
|
8
|
+
|
9
|
+
{% block content %}
|
10
|
+
|
11
|
+
{% for div in self.top_content %}<div>{{ div }}</div>{% endfor %}
|
12
|
+
|
13
|
+
{% for post in recent_posts %}<div class="recent-post">
|
14
|
+
{% if forloop.counter == 1 %}<h2>Recent posts</h2>{% endif %}
|
15
|
+
<h3>{{ post.title }}</h3>
|
16
|
+
{{ post.summary|richtext }}
|
17
|
+
</div>{% endfor %}
|
18
|
+
|
19
|
+
{% for div in self.bottom_content %}<div>{{ div }}</div>{% endfor %}
|
20
|
+
|
21
|
+
{% endblock %}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{% extends "dl_view.html" %}
|
2
|
+
{% load wagtailcore_tags %}
|
3
|
+
|
4
|
+
{% block main_classes %}{{ block.super }} post-list{% endblock %}
|
5
|
+
|
6
|
+
{% block content %}
|
7
|
+
<dl>
|
8
|
+
<dt></dt><dd>{{ self.intro|richtext }}
|
9
|
+
{% if filter_description %}{{ filter_description }}{% endif %}
|
10
|
+
</dd>
|
11
|
+
|
12
|
+
{% for year, posts in posts_by_year.items %}
|
13
|
+
{% include "_post_list.html" with posts=posts year=year %}
|
14
|
+
{% endfor %}
|
15
|
+
|
16
|
+
</dl>
|
17
|
+
{% endblock %}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
{% extends "3_column.html" %}
|
2
|
+
|
3
|
+
{% block title %}Home{% endblock %}
|
4
|
+
|
5
|
+
{% block aside %}
|
6
|
+
<ul><li>Published 2024-12-10 at 09:21 AM (AWST)</li>
|
7
|
+
<ul><li>Updated 2024-12-10 at 09:22 AM (AWST)</li>
|
8
|
+
{% endblock %}
|
9
|
+
|
10
|
+
{% block nav %}
|
11
|
+
<h4>Page contents</h4>
|
12
|
+
<ul>
|
13
|
+
<li><a href="#what-is-lorem-ipsum">What is Lorem Ipsum?</a></li>
|
14
|
+
<li><a href="#where-does-it-come-from">Where does it come from?</a></li>
|
15
|
+
<li><a href="#why-do-we-use-it">Why do we use it?</a></li>
|
16
|
+
<li><a href="#where-can-i-get-some">Where can I get some?</a></li>
|
17
|
+
<li><a href="#what-is-lorem-ipsum">What is Lorem Ipsum?</a></li>
|
18
|
+
<li><a href="#where-does-it-come-from">Where does it come from?</a></li>
|
19
|
+
<li><a href="#why-do-we-use-it">Why do we use it?</a></li>
|
20
|
+
<li><a href="#where-can-i-get-some">Where can I get some??</a></li>
|
21
|
+
</ul>
|
22
|
+
{% endblock %}
|
23
|
+
|
24
|
+
{% block article %}
|
25
|
+
<h1>Typography Showcase</h1>
|
26
|
+
|
27
|
+
<!-- Standard Serif -->
|
28
|
+
<section>
|
29
|
+
<h2>Zilla Slab (Regular)</h2>
|
30
|
+
<p>
|
31
|
+
This is a paragraph set in <strong>Zilla Slab (Bold)</strong>.
|
32
|
+
</p>
|
33
|
+
<p>Donec tincidunt eros justo, sit amet luctus mauris condimentum eu. Nam posuere ultrices turpis, ut facilisis velit ultricies in. Sed at risus sed purus pellentesque aliquam sed nec est. Sed non nisi id neque bibendum bibendum at vitae ligula. Integer eget dapibus velit, eu pulvinar nisl. Duis lobortis arcu ex. Aenean fermentum maximus interdum. Curabitur sit amet bibendum nisi, a cursus risus. Curabitur at <strong>metus eget nibh consequat</strong> viverra. Cras rhoncus finibus urna, efficitur viverra tellus molestie et. Sed nec vulputate erat. Vestibulum nec nunc condimentum, <span class="highlight">ultrices ipsum</span> in, hendrerit quam. Integer felis erat, placerat eget libero eu, mollis sagittis mauris. Aenean sed lacus id orci accumsan porttitor. Etiam aliquet nunc et consectetur scelerisque.</p>
|
34
|
+
</section>
|
35
|
+
|
36
|
+
<!-- Highlighted Serif -->
|
37
|
+
<section>
|
38
|
+
<h2>Zilla Slab Highlight</h2>
|
39
|
+
<p>
|
40
|
+
This is <span class="highlight">highlighted text</span> using the regular weight of
|
41
|
+
<span class="highlight">Zilla Slab Highlight</span>.
|
42
|
+
</p>
|
43
|
+
<p>
|
44
|
+
Here’s the <span class="highlight-strong">bold version</span>.
|
45
|
+
</p>
|
46
|
+
</section>
|
47
|
+
|
48
|
+
<!-- Cursive Headings -->
|
49
|
+
<section>
|
50
|
+
<h2>Sacramento Cursive</h2>
|
51
|
+
<h3>“Elegant Cursive for Headlines”</h3>
|
52
|
+
</section>
|
53
|
+
|
54
|
+
<!-- Monospaced Code -->
|
55
|
+
<section>
|
56
|
+
<h2>Fira Code (Light & SemiBold)</h2>
|
57
|
+
<p>
|
58
|
+
Inline code snippet: <code>let x = 42;</code>
|
59
|
+
</p>
|
60
|
+
<pre>
|
61
|
+
<code class="strong">
|
62
|
+
function example() {
|
63
|
+
return "Fira Code SemiBold!";
|
64
|
+
}
|
65
|
+
</code>
|
66
|
+
</pre>
|
67
|
+
</section>
|
68
|
+
|
69
|
+
<h1>What is Lorem Ipsum?</h1>
|
70
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent justo leo, dapibus non ultricies sit amet, sagittis a mauris. Aliquam nec dolor arcu. Nullam sollicitudin venenatis commodo. Morbi aliquet venenatis felis, et condimentum sem sodales nec. Etiam at risus tellus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam et lobortis purus. Vestibulum nisi sem, feugiat eget auctor vel, scelerisque et dui.</p>
|
71
|
+
<p>Donec tincidunt eros justo, sit amet luctus mauris condimentum eu. Nam posuere ultrices turpis, ut facilisis velit ultricies in. Sed at risus sed purus pellentesque aliquam sed nec est. Sed non nisi id neque bibendum bibendum at vitae ligula. Integer eget dapibus velit, eu pulvinar nisl. Duis lobortis arcu ex. Aenean fermentum maximus interdum. Curabitur sit amet bibendum nisi, a cursus risus. Curabitur at metus eget nibh consequat viverra. Cras rhoncus finibus urna, efficitur viverra tellus molestie et. Sed nec vulputate erat. Vestibulum nec nunc condimentum, ultrices ipsum in, hendrerit quam. Integer felis erat, placerat eget libero eu, mollis sagittis mauris. Aenean sed lacus id orci accumsan porttitor. Etiam aliquet nunc et consectetur scelerisque.</p>
|
72
|
+
<p>Donec ac urna quis justo mollis porta. Nunc sit amet risus at nulla vestibulum mattis. Donec sit amet ante bibendum, elementum elit nec, congue arcu. Fusce eu porttitor justo. Pellentesque feugiat nunc id neque tristique hendrerit eu porta orci. Aenean et magna aliquam nibh elementum pharetra. Donec ornare, dui eget blandit semper, risus est hendrerit nulla, vulputate eleifend felis augue vitae diam. Proin suscipit eros turpis, et mattis libero sollicitudin non. Mauris iaculis est sed neque volutpat, vel posuere dui cursus.</p>
|
73
|
+
{% endblock %}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{% extends "dl_view.html" %}
|
2
|
+
|
3
|
+
{% block definitions %}
|
4
|
+
<dt><p><a href="#what-is-lorem-ipsum">What is Lorem Ipsum?</a></p></dt>
|
5
|
+
<dd><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent justo leo, dapibus non ultricies sit amet, sagittis a mauris. Aliquam nec dolor arcu. Nullam sollicitudin venenatis commodo. Morbi aliquet venenatis felis, et condimentum sem sodales nec. Etiam at risus tellus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam et lobortis purus. Vestibulum nisi sem, feugiat eget auctor vel, scelerisque et dui.</p></dd>
|
6
|
+
<dt><p><a href="#where-does-it-come-from">Where does it come from?</a></p></dt>
|
7
|
+
<dd><p>Donec tincidunt eros justo, sit amet luctus mauris condimentum eu. Nam posuere ultrices turpis, ut facilisis velit ultricies in. Sed at risus sed purus pellentesque aliquam sed nec est. Sed non nisi id neque bibendum bibendum at vitae ligula. Integer eget dapibus velit, eu pulvinar nisl. Duis lobortis arcu ex. Aenean fermentum maximus interdum. Curabitur sit amet bibendum nisi, a cursus risus. Curabitur at metus eget nibh consequat viverra. Cras rhoncus finibus urna, efficitur viverra tellus molestie et. Sed nec vulputate erat. Vestibulum nec nunc condimentum, ultrices ipsum in, hendrerit quam. Integer felis erat, placerat eget libero eu, mollis sagittis mauris. Aenean sed lacus id orci accumsan porttitor. Etiam aliquet nunc et consectetur scelerisque.</p></dd>
|
8
|
+
<dt><p><a href="#why-do-we-use-it">Why do we use it?</a></p></dt>
|
9
|
+
<dd><p>Donec ac urna quis justo mollis porta. Nunc sit amet risus at nulla vestibulum mattis. Donec sit amet ante bibendum, elementum elit nec, congue arcu. Fusce eu porttitor justo. Pellentesque feugiat nunc id neque tristique hendrerit eu porta orci. Aenean et magna aliquam nibh elementum pharetra. Donec ornare, dui eget blandit semper, risus est hendrerit nulla, vulputate eleifend felis augue vitae diam. Proin suscipit eros turpis, et mattis libero sollicitudin non. Mauris iaculis est sed neque volutpat, vel posuere dui cursus.</p></dd>
|
10
|
+
{% endblock %}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{% extends "split_view.html" %}
|
2
|
+
|
3
|
+
{% block content %}
|
4
|
+
<div><p><a href="#what-is-lorem-ipsum">What is Lorem Ipsum?</a></p></div>
|
5
|
+
<div><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent justo leo, dapibus non ultricies sit amet, sagittis a mauris. Aliquam nec dolor arcu. Nullam sollicitudin venenatis commodo. Morbi aliquet venenatis felis, et condimentum sem sodales nec. Etiam at risus tellus. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam et lobortis purus. Vestibulum nisi sem, feugiat eget auctor vel, scelerisque et dui.</p></div>
|
6
|
+
<div><p>Donec tincidunt eros justo, sit amet luctus mauris condimentum eu. Nam posuere ultrices turpis, ut facilisis velit ultricies in. Sed at risus sed purus pellentesque aliquam sed nec est. Sed non nisi id neque bibendum bibendum at vitae ligula. Integer eget dapibus velit, eu pulvinar nisl. Duis lobortis arcu ex. Aenean fermentum maximus interdum. Curabitur sit amet bibendum nisi, a cursus risus. Curabitur at metus eget nibh consequat viverra. Cras rhoncus finibus urna, efficitur viverra tellus molestie et. Sed nec vulputate erat. Vestibulum nec nunc condimentum, ultrices ipsum in, hendrerit quam. Integer felis erat, placerat eget libero eu, mollis sagittis mauris. Aenean sed lacus id orci accumsan porttitor. Etiam aliquet nunc et consectetur scelerisque.</p></div>
|
7
|
+
<div><p><a href="#where-does-it-come-from">Where does it come from?</a></p></div>
|
8
|
+
<div><p><a href="#why-do-we-use-it">Why do we use it?</a></p></div>
|
9
|
+
<div><p>Donec ac urna quis justo mollis porta. Nunc sit amet risus at nulla vestibulum mattis. Donec sit amet ante bibendum, elementum elit nec, congue arcu. Fusce eu porttitor justo. Pellentesque feugiat nunc id neque tristique hendrerit eu porta orci. Aenean et magna aliquam nibh elementum pharetra. Donec ornare, dui eget blandit semper, risus est hendrerit nulla, vulputate eleifend felis augue vitae diam. Proin suscipit eros turpis, et mattis libero sollicitudin non. Mauris iaculis est sed neque volutpat, vel posuere dui cursus.</p></div>
|
10
|
+
{% endblock %}
|
@@ -0,0 +1,158 @@
|
|
1
|
+
{% extends "article.html" %}
|
2
|
+
{% load wagtailimages_tags %}
|
3
|
+
|
4
|
+
|
5
|
+
{% block title %}Theme gallery{% endblock %}
|
6
|
+
|
7
|
+
{% block article %}
|
8
|
+
<img src="{% if settings.hpk.SocialSettings.default_social_image %}{% image_url settings.hpk.SocialSettings.default_social_image 'fill-1200x630' %}{% endif %}" width="1200" height="630" />
|
9
|
+
<div class="mx-8 my-8">
|
10
|
+
<div class="grid grid-cols-2 gap-2 md:grid-cols-4">
|
11
|
+
<button class="btn">Default</button>
|
12
|
+
<button class="btn btn-primary">Primary</button>
|
13
|
+
<button class="btn btn-secondary">Secondary</button>
|
14
|
+
<button class="btn btn-accent">Accent</button>
|
15
|
+
<button class="btn btn-info">Info</button>
|
16
|
+
<button class="btn btn-success">Success</button>
|
17
|
+
<button class="btn btn-warning">Warning</button>
|
18
|
+
<button class="btn btn-error">Error</button>
|
19
|
+
</div>
|
20
|
+
<div class="grid grid-cols-2 place-items-center gap-2 md:grid-cols-4 my-8">
|
21
|
+
<span class="badge">Default</span>
|
22
|
+
<span class="badge badge-primary">Primary</span>
|
23
|
+
<span class="badge badge-secondary">Secondary</span>
|
24
|
+
<span class="badge badge-accent">Accent</span>
|
25
|
+
<span class="badge badge-info">Info</span>
|
26
|
+
<span class="badge badge-success">Success</span>
|
27
|
+
<span class="badge badge-warning">Warning</span>
|
28
|
+
<span class="badge badge-error">Error</span>
|
29
|
+
</div>
|
30
|
+
<div class="flex flex-col gap-3 my-8">
|
31
|
+
<div class="flex flex-col gap-3 md:flex-row">
|
32
|
+
<div class="md:w-1/2">
|
33
|
+
<div class="tabs tabs-lifted">
|
34
|
+
<button class="tab">Tab</button>
|
35
|
+
<button class="tab tab-active">Tab</button>
|
36
|
+
<button class="tab">Tab</button>
|
37
|
+
</div>
|
38
|
+
<div class="flex flex-col">
|
39
|
+
<span class="link">I'm a simple link</span>
|
40
|
+
<span class="link link-primary">I'm a simple link</span>
|
41
|
+
<span class="link link-secondary">I'm a simple link</span>
|
42
|
+
<span class="link link-accent">I'm a simple link</span>
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
<div class="flex flex-col gap-3 md:w-1/2">
|
46
|
+
<progress value="20" max="100" class="progress">Default</progress>
|
47
|
+
<progress value="25" max="100" class="progress progress-primary">Primary</progress>
|
48
|
+
<progress value="30" max="100" class="progress progress-secondary">Secondary</progress>
|
49
|
+
<progress value="40" max="100" class="progress progress-accent">Accent</progress>
|
50
|
+
<progress value="45" max="100" class="progress progress-info">Info</progress>
|
51
|
+
<progress value="55" max="100" class="progress progress-success">Success</progress>
|
52
|
+
<progress value="70" max="100" class="progress progress-warning">Warning</progress>
|
53
|
+
<progress value="90" max="100" class="progress progress-error">Error</progress>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
<div class="flex flex-col gap-3 md:flex-row">
|
57
|
+
<div class="stats bg-base-300 border-base-300 border md:w-1/2">
|
58
|
+
<div class="stat">
|
59
|
+
<div class="stat-title">Total Page Views</div>
|
60
|
+
<div class="stat-value">89,400</div>
|
61
|
+
<div class="stat-desc">21% more than last month</div>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
<div class="flex flex-wrap items-center justify-center gap-3 md:w-1/2">
|
65
|
+
<div class="radial-progress" style="--value:60;--size:3.5rem">60%</div>
|
66
|
+
<div class="radial-progress" style="--value:75;--size:3.5rem">75%</div>
|
67
|
+
<div class="radial-progress" style="--value:90;--size:3.5rem">90%</div>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
<div class="flex flex-col gap-3">
|
72
|
+
<div class="flex flex-col gap-3 md:flex-row">
|
73
|
+
<div class="md:w-1/2">
|
74
|
+
<div>
|
75
|
+
<input type="checkbox" class="toggle" checked="checked" />
|
76
|
+
<input type="checkbox" class="toggle toggle-primary" checked="checked" />
|
77
|
+
<input type="checkbox" class="toggle toggle-secondary" checked="checked" />
|
78
|
+
<input type="checkbox" class="toggle toggle-accent" checked="checked" />
|
79
|
+
</div>
|
80
|
+
<div>
|
81
|
+
<input type="checkbox" class="checkbox" checked="checked" />
|
82
|
+
<input type="checkbox" class="checkbox checkbox-primary" checked="checked" />
|
83
|
+
<input type="checkbox" class="checkbox checkbox-secondary" checked="checked" />
|
84
|
+
<input type="checkbox" class="checkbox checkbox-accent" checked="checked" />
|
85
|
+
</div>
|
86
|
+
<div>
|
87
|
+
<input type="radio" name="radio-1" class="radio" checked="checked" />
|
88
|
+
<input type="radio" name="radio-1" class="radio radio-primary" />
|
89
|
+
<input type="radio" name="radio-1" class="radio radio-secondary" />
|
90
|
+
<input type="radio" name="radio-1" class="radio radio-accent" />
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
<div class="md:w-1/2">
|
94
|
+
<input type="range" min="0" max="100" value="90" class="range range-xs" />
|
95
|
+
<input type="range" min="0" max="100" value="70" class="range range-xs range-primary" />
|
96
|
+
<input type="range" min="0" max="100" value="50" class="range range-xs range-secondary" />
|
97
|
+
<input type="range" min="0" max="100" value="40" class="range range-xs range-accent" />
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
<div class="flex flex-col gap-3 md:flex-row">
|
101
|
+
<div class="flex flex-col gap-3 md:w-1/2">
|
102
|
+
<input type="text" placeholder="Default" class="input input-bordered w-full" />
|
103
|
+
<input type="text" placeholder="Primary" class="input input-primary input-bordered w-full" />
|
104
|
+
<input type="text" placeholder="Secondary" class="input input-secondary input-bordered w-full" />
|
105
|
+
<input type="text" placeholder="Accent" class="input input-accent input-bordered w-full" />
|
106
|
+
</div>
|
107
|
+
<div class="flex flex-col gap-3 md:w-1/2">
|
108
|
+
<input type="text" placeholder="Info" class="input input-info input-bordered w-full" />
|
109
|
+
<input type="text" placeholder="Success" class="input input-success input-bordered w-full" />
|
110
|
+
<input type="text" placeholder="Warning" class="input input-warning input-bordered w-full" />
|
111
|
+
<input type="text" placeholder="Error" class="input input-error input-bordered w-full" />
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
<!-- Cards -->
|
116
|
+
<section>
|
117
|
+
<h2 class="text-2xl font-semibold">Cards</h2>
|
118
|
+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
|
119
|
+
<div class="card bg-primary text-primary-content">
|
120
|
+
<div class="card-body">
|
121
|
+
<h3 class="card-title">Primary Card</h3>
|
122
|
+
<p>This is a card using the primary color.</p>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
<div class="card bg-secondary text-secondary-content">
|
126
|
+
<div class="card-body">
|
127
|
+
<h3 class="card-title">Secondary Card</h3>
|
128
|
+
<p>This is a card using the secondary color.</p>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
<div class="card bg-accent text-accent-content">
|
132
|
+
<div class="card-body">
|
133
|
+
<h3 class="card-title">Accent Card</h3>
|
134
|
+
<p>This is a card using the accent color.</p>
|
135
|
+
</div>
|
136
|
+
</div>
|
137
|
+
<div class="card bg-neutral text-neutral-content">
|
138
|
+
<div class="card-body">
|
139
|
+
<h3 class="card-title">Neutral Card</h3>
|
140
|
+
<p>This is a card using the neutral color.</p>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
</section>
|
145
|
+
|
146
|
+
<!-- Typography -->
|
147
|
+
<section>
|
148
|
+
<h2 class="text-2xl font-semibold">Typography</h2>
|
149
|
+
<p class="text-lg">This is a normal paragraph.</p>
|
150
|
+
<p class="text-lg font-semibold">This is a bold paragraph.</p>
|
151
|
+
<p class="text-lg text-primary">This is a paragraph in primary color.</p>
|
152
|
+
<p class="text-lg text-secondary">This is a paragraph in secondary color.</p>
|
153
|
+
<p class="text-lg text-accent">This is a paragraph in accent color.</p>
|
154
|
+
</section>
|
155
|
+
</div>
|
156
|
+
|
157
|
+
|
158
|
+
{% endblock %}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
{% extends "dl_view.html" %}
|
2
|
+
{% load wagtailcore_tags stringify %}
|
3
|
+
|
4
|
+
{% block main_classes %}{{ block.super }} post-list search-results{% endblock %}
|
5
|
+
|
6
|
+
{% block content %}
|
7
|
+
<dl>
|
8
|
+
<dt></dt><dd class="title">
|
9
|
+
{% if query %}
|
10
|
+
<h1>Search results for '{{ query }}'</h1>
|
11
|
+
{% if page_types %}<h2>for pages of type {{ page_types|stringify:"single" }}{% if tags %},<br />
|
12
|
+
tagged {{ tags|stringify:"single" }}
|
13
|
+
{% endif %}</h2>{% elif tags %}<h2>for pages tagged {{ tags|stringify:"single" }}</h2>{% endif %}
|
14
|
+
|
15
|
+
{% elif page_types %}<h1>Results for {{ page_types|stringify:"single" }} pages{% if tags %},</h1>
|
16
|
+
<h2>tagged {{ tags|stringify:"single" }}</h2>{% else %}</h1>{% endif %}
|
17
|
+
|
18
|
+
{% elif tags %}<h1>Pages tagged {{ tags|stringify:"single" }}</h1>
|
19
|
+
|
20
|
+
{% else %}
|
21
|
+
<h1>No search specified!</h1>
|
22
|
+
{% endif %}
|
23
|
+
</dd>
|
24
|
+
|
25
|
+
{% include "_post_list.html" with posts=pages %}
|
26
|
+
|
27
|
+
</dl>
|
28
|
+
{% endblock %}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{% extends "base.html" %}
|
2
|
+
{% comment %}
|
3
|
+
Two-column layout (50%/50%), with a 2px line between the columns.
|
4
|
+
|
5
|
+
Override the "content" block with a series of <div />s, or just pass in a list
|
6
|
+
of content items called "divs".
|
7
|
+
{% endcomment %}
|
8
|
+
|
9
|
+
{% block main_classes %}split-view{% endblock %}
|
10
|
+
|
11
|
+
{% block content %}
|
12
|
+
{% for div in self.content %}
|
13
|
+
<div>{{ div }}</div>
|
14
|
+
{% endfor %}
|
15
|
+
{% endblock%}
|
@@ -0,0 +1 @@
|
|
1
|
+
"""Package for custom Django template tags."""
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"""Simple template tag to produce absolute URLs from static file requests."""
|
2
|
+
|
3
|
+
from django import template
|
4
|
+
from django.templatetags.static import static
|
5
|
+
|
6
|
+
from hpk.typing import Context
|
7
|
+
|
8
|
+
register = template.Library()
|
9
|
+
|
10
|
+
|
11
|
+
@register.simple_tag(takes_context=True)
|
12
|
+
def absolute_static(context: Context, file: str) -> str:
|
13
|
+
"""Return the absolute path to a static file."""
|
14
|
+
request = context["request"]
|
15
|
+
return request.build_absolute_uri(static(file))
|
@@ -0,0 +1,42 @@
|
|
1
|
+
"""Template tags for rendering menus."""
|
2
|
+
|
3
|
+
# NB: Django's meta-class shenanigans over-complicate type hinting when QuerySets get involved.
|
4
|
+
# pyright: reportAttributeAccessIssue=false
|
5
|
+
|
6
|
+
from typing import TypedDict
|
7
|
+
|
8
|
+
from django import template
|
9
|
+
from django.http import HttpRequest
|
10
|
+
from hpk.typing import Context
|
11
|
+
from wagtail.models import Page, Site
|
12
|
+
|
13
|
+
register = template.Library()
|
14
|
+
|
15
|
+
|
16
|
+
class SiteMenuContext(TypedDict):
|
17
|
+
"""Context returned from `render_site_menu` for `site_menu.html`."""
|
18
|
+
|
19
|
+
root_page: Page
|
20
|
+
menu_pages: list[Page]
|
21
|
+
request: HttpRequest
|
22
|
+
|
23
|
+
|
24
|
+
@register.inclusion_tag("picata/tags/site_menu.html", takes_context=True)
|
25
|
+
def render_site_menu(context: Context) -> SiteMenuContext:
|
26
|
+
"""Fetch the site root and its child pages for the site menu."""
|
27
|
+
request: HttpRequest = context["request"]
|
28
|
+
current_site = Site.find_for_request(request)
|
29
|
+
if not current_site:
|
30
|
+
raise ValueError("No Wagtail Site found for the current request.")
|
31
|
+
|
32
|
+
root_page = current_site.root_page.specific
|
33
|
+
|
34
|
+
menu_pages = root_page.get_children().in_menu()
|
35
|
+
if not request.user.is_authenticated:
|
36
|
+
menu_pages = menu_pages.live()
|
37
|
+
|
38
|
+
return {
|
39
|
+
"root_page": root_page,
|
40
|
+
"menu_pages": menu_pages.specific(),
|
41
|
+
"request": request,
|
42
|
+
}
|