Skip to content

Commit 82d98bf

Browse files
committed
chore update bulma page
1 parent 749a5c9 commit 82d98bf

5 files changed

Lines changed: 87 additions & 118 deletions

File tree

ckanext/theming/themes/bs5/templates/macros/ui/nav.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66
</nav>
77
{%- endmacro %}
88

9-
{%- macro breadcrumb_item(content, href) -%}
9+
{%- macro breadcrumb_item(content, href, is_first=false) -%}
1010
{%- do kwargs -%}
11-
<li class="breadcrumb-item">
12-
<a href="{{ href }}">{{ content }}</a>
11+
<li class="breadcrumb-item {{ 'active' if is_first }}">
12+
{%- if is_first %}
13+
{{ content }}
14+
{%- else %}
15+
<a href="{{ href }}">{{ content }}</a>
16+
{%- endif %}
1317
</li>
1418
{%- endmacro %}
1519

ckanext/theming/themes/bulma/templates/base.html

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 66 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,74 @@
1-
{%- block page %}
1+
{% ckan_extends %}
22

3-
{%- block zone_header -%}
4-
{%- block header %}
5-
{% include "_header.html" %}
6-
{%- endblock header %}
7-
{%- endblock zone_header %}
3+
{%- block breadcrumb %}
4+
<section class="section is-small">
5+
<div class="container">
6+
<nav class="breadcrumb" aria-label="breadcrumbs">
7+
<ul>
8+
{% block breadcrumb_content %}{% endblock %}
9+
</ul>
10+
</nav>
11+
</div>
12+
</section>
13+
{%- endblock breadcrumb %}
814

9-
{%- block zone_toolbar %}
10-
{%- block breadcrumb %}
11-
<section class="section is-small">
12-
<div class="container">
13-
<nav class="breadcrumb" aria-label="breadcrumbs">
14-
<ul>
15-
{% block breadcrumb_content %}{% endblock %}
16-
</ul>
17-
</nav>
18-
</div>
19-
</section>
20-
{%- endblock breadcrumb %}
21-
{%- endblock %}
22-
23-
{%- block zone_intro %}
24-
{%- block notifications_container %}
25-
<section class="section is-small">
26-
<div class="container">
27-
{%- for category, message in h.get_flashed_messages(with_categories=true) %}
28-
{%- block notification_item scoped %}
29-
<article class="message is-{{ category }}">
30-
<div class="message-body">
31-
{{ message|safe }}
32-
</div>
33-
</article>
34-
{%- endblock notification_item %}
35-
{%- endfor %}
36-
</div>
37-
</section>
38-
{%- endblock notifications_container %}
39-
{%- endblock %}
40-
41-
{%- block zone_content %}
42-
{%- block content %}
43-
<main id="content">
44-
<section class="section">
45-
<div class="container">
46-
<div class="columns">
47-
{%- block zone_main %}
48-
{%- block zone_secondary -%}
49-
{%- block secondary %}
50-
<aside id="sidebar" class="column is-3">
51-
{%- block secondary_content %}
52-
<div class="card">
53-
<div class="card-content">
54-
<h4 class="title is-4">Navigation</h4>
55-
<p class="content">This is a sidebar area. Specific page content will appear here.</p>
56-
</div>
57-
</div>
58-
{%- endblock secondary_content %}
59-
</aside>
60-
{%- endblock secondary -%}
61-
{%- endblock zone_secondary %}
62-
63-
{%- block zone_primary -%}
64-
{%- block primary -%}
65-
<div class="column">
66-
<article>
67-
{%- block primary_content %}
68-
{%- block page_action %}{% endblock -%}
69-
70-
{%- block page_header %}
71-
<header class="mb-4">
72-
{%- block content_action %}{% endblock -%}
73-
{%- block content_nav %}{% endblock -%}
74-
</header>
75-
{% endblock -%}
15+
{%- block notifications_container %}
16+
<section class="section is-small">
17+
<div class="container">
18+
{%- for category, message in h.get_flashed_messages(with_categories=true) %}
19+
{%- block notification_item scoped %}
20+
<article class="message is-{{ category }}">
21+
<div class="message-body">
22+
{{ message|safe }}
23+
</div>
24+
</article>
25+
{%- endblock notification_item %}
26+
{%- endfor %}
27+
</div>
28+
</section>
29+
{%- endblock notifications_container %}
7630

77-
{%- block primary_content_inner %}
78-
{% endblock -%}
7931

80-
{%- endblock primary_content %}
81-
</article>
82-
</div>
83-
{%- endblock primary -%}
84-
{%- endblock zone_primary -%}
85-
{%- endblock zone_main %}
86-
</div>
87-
</div>
88-
</section>
89-
</main>
90-
{%- endblock content%}
91-
{%- endblock zone_content %}
32+
{%- block content %}
33+
<main id="content">
34+
<section class="section">
35+
<div class="container">
36+
<div class="columns">
37+
{%- block zone_content %}
38+
{{ super() }}
39+
{%- endblock %}
40+
</div>
41+
</div>
42+
</section>
43+
</main>
44+
{%- endblock content%}
9245

93-
{%- block zone_outro %}{% endblock %}
9446

95-
{%- block zone_footer -%}
96-
{%- block footer %}
97-
{% include "_footer.html" %}
98-
{% endblock footer %}
47+
{%- block secondary %}
48+
<aside id="sidebar" class="column is-3">
49+
{%- block secondary_content %}
50+
<div class="card">
51+
<div class="card-content">
52+
<h4 class="title is-4">Navigation</h4>
53+
<p class="content">This is a sidebar area. Specific page content will appear here.</p>
54+
</div>
55+
</div>
56+
{%- endblock secondary_content %}
57+
</aside>
58+
{%- endblock secondary -%}
9959

100-
{%- block debug -%}
101-
{%- if g.debug %}
102-
<button onclick="window['debug-modal'].showModal()" accesskey="d" hidden>Debug</button>
103-
<dialog id="debug-modal" style="max-width: 90vw; overflow-x: auto;">
104-
<pre>
105-
{%- debug -%}
106-
</pre>
107-
</dialog>
108-
{%- endif %}
109-
{%- endblock %}
110-
{%- endblock zone_footer %}
60+
{%- block primary -%}
61+
<div class="column">
62+
<article>
63+
{%- block primary_content %}
64+
{{ super() }}
65+
{%- endblock primary_content %}
66+
</article>
67+
</div>
68+
{%- endblock primary -%}
11169

112-
{%- endblock %}
70+
{%- block page_header %}
71+
<header class="mb-4">
72+
{{ super() }}
73+
</header>
74+
{% endblock -%}

ckanext/theming/themes/pico/templates/macros/ui/nav.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
</nav>
77
{%- endmacro %}
88

9-
{%- macro breadcrumb_item(content, href) -%}
10-
<li><a href="{{ href }}">{{ content }}</a></li>
9+
{%- macro breadcrumb_item(content, href, is_first=false) -%}
10+
{%- if is_first %}
11+
<li aria-current="page">{{ content }}</li>
12+
{%- else %}
13+
<li><a href="{{ href }}">{{ content }}</a></li>
14+
{%- endif %}
1115
{%- endmacro %}
1216

1317
{%- macro nav_wrapper(content) -%}

ckanext/theming/themes/tailwind/templates/macros/ui/nav.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66
</nav>
77
{%- endmacro %}
88

9-
{%- macro breadcrumb_item(content, href) -%}
9+
{%- macro breadcrumb_item(content, href, is_first=false) -%}
1010
{%- do kwargs -%}
1111
<li class="inline-flex items-center">
12-
<div class="flex items-center">
13-
{{ ui.link(content, href=href, class="ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2") }}
14-
</div>
12+
{%- if is_first %}
13+
<span class="text-sm font-medium text-gray-500 md:ml-2">{{ content }}</span>
14+
{%- else %}
15+
<div class="flex items-center">
16+
{{ ui.link(content, href=href, class="ml-1 text-sm font-medium text-gray-700 hover:text-blue-600 md:ml-2") }}
17+
</div>
18+
{%- endif %}
1519
</li>
1620
{%- endmacro %}
1721

0 commit comments

Comments
 (0)