Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion ckanext/bne/assets/css/bne.css
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,37 @@ body, h1, h2, h3, h4, h5, h6, a {

}
}


.fondoblog{
.blog-media-grid{
border: 1px solid var(--bne-border);
border-radius: var(--bne-border-radius);
padding: 0;
.blog-entry{
overflow: hidden;
padding: 1rem;
h3{
border-bottom: dashed;
border-width: 1px
}
height: 10rem;
a{
display: inline-block;
max-height: 5rem;
overflow: hidden;
}
}
.blog-entry:nth-child(even){
background: var(--bne-grey);
}
}
}


.blog-entry{
overflow: hidden;
}

.bne-pills {
display: flex;
align-items: center;
Expand Down
4 changes: 4 additions & 0 deletions ckanext/bne/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
def base():
return render_template('bne/base.html')

def api_view():
return render_template('bne/api_view.html')

def api_info():
return render_template('bne/api_info.html')

Expand All @@ -22,6 +25,7 @@ def resumen():
return render_template('bne/resumen.html')

bne.add_url_rule('/bne/', view_func=base)
bne.add_url_rule('/bne/api_view/', view_func=api_view)
bne.add_url_rule('/bne/api_info/', view_func=api_info)
bne.add_url_rule('/bne/informacion/', view_func=informacion)
bne.add_url_rule('/bne/resumen/', view_func=resumen)
14 changes: 14 additions & 0 deletions ckanext/bne/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ def bne_get_pages():
#log.warning(page_list)
return page_list

@helper
def bne_get_blog():
"""
Retrieves blog entries

Returns:
dict: blog
"""

page_list = tk.get_action("ckanext_pages_list")(data_dict={'page_type':'blog'})
#log.warning(page_list)
return page_list[:5]


def _bne_humanize_field_name(field_name):
"""
Converts a field name to a more human-readable format.
Expand Down
42 changes: 27 additions & 15 deletions ckanext/bne/i18n/ckanext-bne.pot
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Translations template for ckanext-bne.
# Copyright (C) 2024 ORGANIZATION
# Copyright (C) 2025 ORGANIZATION
# This file is distributed under the same license as the ckanext-bne project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ckanext-bne 0.0.1\n"
"Project-Id-Version: ckanext-bne 1.0.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2024-10-14 09:31+0000\n"
"POT-Creation-Date: 2025-01-27 11:27+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -68,6 +68,10 @@ msgstr ""
msgid "Contact"
msgstr ""

#: ckanext/bne/templates/header.html:31 ckanext/bne/templates/home/layout1.html:15
msgid "Blog"
msgstr ""

#: ckanext/bne/templates/bne/api_info.html:6
msgid "API"
msgstr ""
Expand Down Expand Up @@ -112,14 +116,17 @@ msgid ""
msgstr ""

#: ckanext/bne/templates/bne/informacion.html:7
#: ckanext/bne/templates/home/about.html:7
msgid "Platform Information"
msgstr ""

#: ckanext/bne/templates/bne/informacion.html:8
#: ckanext/bne/templates/home/about.html:8
msgid "CKAN Platform"
msgstr ""

#: ckanext/bne/templates/bne/informacion.html:10
#: ckanext/bne/templates/home/about.html:10
msgid ""
"Datos Abiertos runs on an open source tool called <a "
"href='http://ckan.org'>CKAN</a> which is a world leading\n"
Expand All @@ -128,6 +135,7 @@ msgid ""
msgstr ""

#: ckanext/bne/templates/bne/informacion.html:13
#: ckanext/bne/templates/home/about.html:13
msgid ""
"CKAN is a complete out-of-the-box software solution that makes data "
"accessible and reusable by providing tools\n"
Expand All @@ -136,13 +144,15 @@ msgid ""
msgstr ""

#: ckanext/bne/templates/bne/informacion.html:17
#: ckanext/bne/templates/home/about.html:17
msgid ""
"CKAN is aimed at data providers (national and regional governments, "
"infomediaries, companies and organizations)\n"
" that want to make their data open and available."
msgstr ""

#: ckanext/bne/templates/bne/informacion.html:20
#: ckanext/bne/templates/home/about.html:20
msgid ""
"CKAN is used by governments and user groups worldwide and manages a variety "
"of official and community data\n"
Expand All @@ -155,10 +165,12 @@ msgid ""
msgstr ""

#: ckanext/bne/templates/bne/informacion.html:28
#: ckanext/bne/templates/home/about.html:28
msgid "Functionality review: "
msgstr ""

#: ckanext/bne/templates/bne/informacion.html:30
#: ckanext/bne/templates/home/about.html:30
msgid "Built on CKAN "
msgstr ""

Expand Down Expand Up @@ -329,24 +341,24 @@ msgstr ""
msgid "Please contact the BNElab team here"
msgstr ""

#: ckanext/bne/templates/bne/snippets/bne_entry_card.html:3
#: ckanext/bne/templates/bne/snippets/bne_entry_card.html:6
#: ckanext/bne/templates/bne/snippets/bne_form.html:5
msgid "Filters"
msgstr ""

#: ckanext/bne/templates/bne/snippets/bne_entry_card.html:18
msgid "Raw data - API BNE"
#: ckanext/bne/templates/bne/snippets/bne_entry_card.html:21
msgid "Limit to {rows} first rows"
msgstr ""

#: ckanext/bne/templates/bne/snippets/bne_entry_card.html:18
msgid "Limit to {rows} first rows"
#: ckanext/bne/templates/bne/snippets/bne_entry_card.html:21
msgid "Raw data - API BNE"
msgstr ""

#: ckanext/bne/templates/bne/snippets/bne_entry_card.html:20
#: ckanext/bne/templates/bne/snippets/bne_entry_card.html:23
msgid "Number of entries :"
msgstr ""

#: ckanext/bne/templates/bne/snippets/bne_entry_card.html:24
#: ckanext/bne/templates/bne/snippets/bne_entry_card.html:27
msgid "Update"
msgstr ""

Expand Down Expand Up @@ -411,11 +423,11 @@ msgstr ""
msgid "Submit"
msgstr ""

#: ckanext/bne/templates/home/layout1.html:6
msgid "BNE API"
#: ckanext/bne/templates/home/layout1.html:10
msgid "Featured"
msgstr ""

#: ckanext/bne/templates/home/layout1.html:14
msgid "Featured"
#: ckanext/bne/templates/home/layout1.html:19
msgid "BNE API"
msgstr ""

Binary file modified ckanext/bne/i18n/es/LC_MESSAGES/ckanext-bne.mo
Binary file not shown.
Loading