Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MJU-POPS
ckanext-dgu
Commits
6e940c25
Commit
6e940c25
authored
Mar 21, 2016
by
Ross Jones
Browse files
Change the styling on the search results page, currently breaks publisher page
parent
3d32ec4f
Changes
3
Hide whitespace changes
Inline
Side-by-side
ckanext/dgu/lib/brand.py
0 → 100644
View file @
6e940c25
core_brands
=
{
"attorney-generals-office"
:
"#a03a88"
,
"cabinet-office"
:
"#347da4"
,
# $civil-service: #af292e;
"department-for-business-innovation-and-skills"
:
"#347da4"
,
"department-for-communities-and-local-government"
:
"#37836e"
,
"department-for-culture-media-sport"
:
"#a03155"
,
"department-for-education"
:
"#347ca9"
,
"department-for-environment-food-and-rural-affairs"
:
"#00a33b"
,
"department-for-international-development"
:
"#405e9a"
,
"department-for-transport"
:
"#398373"
,
"department-for-work-and-pensions"
:
"#37807b"
,
"department-of-energy-and-climate-change"
:
"#2b7cac"
,
"department-of-health"
:
"#39836e"
,
"foreign-commonwealth-office"
:
"#406e97"
,
$
government
-
equalities
-
office
:
#9325b2;
$
hm
-
government
:
#0076c0;
$
hm
-
government
-
websafe
:
#347da4;
$
hm
-
revenue
-
customs
:
#009390;
$
hm
-
revenue
-
customs
-
websafe
:
#008770;
$
hm
-
treasury
:
#af292e;
$
hm
-
treasury
-
websafe
:
#832322;
$
home
-
office
:
#9325b2;
$
home
-
office
-
websafe
:
#9440b2;
$
ministry
-
of
-
defence
:
#4d2942;
$
ministry
-
of
-
defence
-
websafe
:
#5a5c92;
$
ministry
-
of
-
justice
:
#231f20;
$
ministry
-
of
-
justice
-
websafe
:
#5a5c92;
$
northern
-
ireland
-
office
:
#002663;
$
northern
-
ireland
-
office
-
websafe
:
#3e598c;
$
office
-
of
-
the
-
advocate
-
general
-
for
-
scotland
:
#002663;
$
office
-
of
-
the
-
advocate
-
general
-
for
-
scotland
-
websafe
:
$
link
-
colour
;
$
office
-
of
-
the
-
leader
-
of
-
the
-
house
-
of
-
lords
:
#9c132e;
$
office
-
of
-
the
-
leader
-
of
-
the
-
house
-
of
-
lords
-
websafe
:
#c2395d;
$
scotland
-
office
:
#002663;
$
scotland
-
office
-
websafe
:
#405c8a;
//
Note
:
the
'the'
part
here
will
get
dropped
$
the
-
office
-
of
-
the
-
leader
-
of
-
the
-
house
-
of
-
commons
:
#317023;
$
the
-
office
-
of
-
the
-
leader
-
of
-
the
-
house
-
of
-
commons
-
websafe
:
#005f8f;
$
uk
-
export
-
finance
:
#005747;
$
uk
-
export
-
finance
-
websafe
:
$
link
-
colour
;
$
uk
-
trade
-
investment
:
#C80651;
$
uk
-
trade
-
investment
-
websafe
:
$
link
-
colour
;
$
wales
-
office
:
#a33038;
$
wales
-
office
-
websafe
:
#7a242a;
}
ckanext/dgu/theme/src/css/dgu-ckan.less
View file @
6e940c25
...
...
@@ -21,7 +21,7 @@
}
.btn-preview.btn-xs {
font-size: 1
1
px;
font-size: 1
0
px;
width: 135px;
}
...
...
@@ -513,25 +513,23 @@ table.tablesorter {
@color_geography: @color_mapping;
.dataset-summary {
border-left: 6px solid #e0e0e0;
padding-left: 10px;
margin-bottom: 30px;
.dataset-header {
display: block;
padding-top: 8px;
padding-bottom: 8px;
border: 0px solid #ccc;
border-right-width: 6px;
min-height: 40px;
min-height: 30px;
padding-right: 10px;
&:hover {
text-decoration: none;
.underlined { text-decoration: underline; }
.
x
underlined { text-decoration: underline; }
}
.underlined {
font-size: 22px;
line-height: 25px;
color: #393939;
text-decoration: underline;
}
.theme-name {
float: right;
...
...
@@ -543,7 +541,6 @@ table.tablesorter {
}
}
.dataset-body {
border-right: 6px solid #e0e0e0;
padding-right: 10px;
.left {
float: left;
...
...
@@ -556,9 +553,9 @@ table.tablesorter {
text-align: right;
}
.dataset-publisher {
font-size: 12px
;
color: #999
;
margin-top: -13
px;
color: #666
;
margin-top: -7px
;
font-size: 14
px;
}
}
.view-data-link {
...
...
@@ -566,13 +563,12 @@ table.tablesorter {
}
&.unpublished {
border-left-style: dotted;
.text-unpublished {
color: #777;
font-style: italic;
}
}
&.theme-none { .theme-name { display: none; color: #bbb; font-weight: normal; font-style: italic; } }
&.theme-none { .theme-name { display: none; color: #bbb; font-weight: normal; font-style: italic; } }
&.theme-Crime { .theme-name { color: @color_crime; } .dataset-header { border-color: @color_crime; } }
&.theme-Defence { .theme-name { color: @color_defence; } .dataset-header { border-color: @color_defence; } }
&.theme-Economy { .theme-name { color: @color_economy; } .dataset-header { border-color: @color_economy; } }
...
...
@@ -1295,8 +1291,9 @@ body.controller-package {
}
}
.dataset-map-info {
padding:
20
px;
padding:
18
px;
color: #999;
max-height: 18px;
h3 {
text-transform: uppercase;
font-size: 14px;
...
...
ckanext/dgu/theme/templates/_dgu_jinja_util.html
View file @
6e940c25
...
...
@@ -207,60 +207,74 @@
{% set title = packages[i].get('title') or packages[i].get('name') %}
{% set primary_theme = h.get_primary_theme(packages[i]) %}
<div
class=
"{{if_(mini,'col-lg-3 col-md-4 col-sm-6')}}"
>
<div
class=
"{{if_(mini,'col-lg-3 col-md-4 col-sm-6')}}"
>
<div
class=
"dataset dataset-summary theme-{{primary_theme or 'none'}} {{if_(mini,'mini', '')}} {{if_(unpublished,'unpublished', '')}}"
>
<a
class=
"dataset-header"
href=
"{{h.url_for(controller='package', action='read', id=package.get('name'))}}"
>
<div
class=
"theme-name"
>
{{primary_theme or '(Uncategorised)'}}
</div>
<div
class=
"underlined"
>
{{title}} {% if unpublished %}
<span
class=
"text-unpublished"
>
(unpublished)
</span>
{% endif %}
</div>
</a>
<a
class=
"
left
dataset-header"
href=
"{{h.url_for(controller='package', action='read', id=package.get('name'))}}"
>
{% if mini %}
<div
class=
"theme-name"
>
{{primary_theme or '(Uncategorised)'}}
</div>
{% endif %}
<div
class=
"underlined"
>
{{title}} {% if unpublished %}
<span
class=
"text-unpublished"
>
(unpublished)
</span>
{% endif %}
</div>
</a>
<div
class=
"dataset-body"
>
<div
class=
"left"
>
<a
class=
"dataset-publisher"
href=
"{{h.url_for(controller='ckanext.dgu.controllers.publisher:PublisherController', action='read', id=h.package_publisher_dict(package).get('name', ''))}}"
>
{{h.package_publisher_dict(package).get('title', '')}}
<h3
style=
"margin-top: 6px; margin-bottom: 4px;"
>
{{h.package_publisher_dict(package).get('title', '')}}
</h3>
</a>
<div
class=
"dataset-description"
>
{{h.markdown_extract(package.notes)}}
</div>
</div>
<div
class=
"right"
>
{% if not mini %}
<div>
<label>
Theme:
</label>
{{primary_theme}}
</div>
<div
class=
"right"
>
<!-- Publisher logo -->
</div>
{% endif %}
</div>
<div
class=
"clearfix clearfix-ie7"
>
</div>
<div
style=
"max-height: 20px;"
>
{% if h.is_core_dataset(package) %}
<div
title=
"This dataset is part of the National Information Infrastructure"
class=
"js-tooltip format-box"
style=
'background-color: #8BC658;'
>
NII
</div>
{% endif %}
{% for format in h.formats_for_package(package) %}
{{format_box(format.
low
er())}}
{{format_box(format.
upp
er())}}
{% endfor %}
{% if not mini and h.get_wms_info_urls(package) %}
<div
class=
"map-buttons"
>
<span
style=
"display: none;"
class=
"js-data-id"
>
{{package.id}}
</span>
<span
style=
"display: none;"
class=
"js-data-title"
>
{{package.get('title')}}
</span>
<span
style=
"display: none;"
class=
"js-data-querystring"
>
{{h.get_wms_info_urls(package)}}
</span>
<span
style=
"display: none;"
class=
"js-data-extent"
>
{{','.join(h.get_wms_info_extent(package))}}
</span>
{{map_preview_button_direct(package)}}
{% set in_basket = package.id in session.get('preview_list',[])%}
<span
class=
"preview-add js-dataset-{{package.id}}-add"
style=
"{{if_(in_basket,'display: none;')}}"
>
<button
data-id=
"{{package.id}}"
class=
"btn btn-default btn-xs btn-info btn-preview btn-basket"
><i
class=
"icon-shopping-cart"
></i>
Add to Preview List
</button>
</span>
<span
class=
"preview-remove js-dataset-{{package.id}}-remove"
style=
"{{if_(not in_basket,'display: none;')}}"
>
<button
data-id=
"{{package.id}}"
class=
"btn btn-danger btn-xs btn-preview btn-basket"
><i
class=
"icon-shopping-cart"
></i>
Remove from List
</button>
</span>
</div>
{% endif %}
</div>
<div
class=
"clearfix clearfix-ie7"
>
</div>
{% if not mini and h.get_wms_info_urls(package) %}
<div
class=
"map-buttons"
style=
"display:inline;"
>
<span
style=
"display: none;"
class=
"js-data-id"
>
{{package.id}}
</span>
<span
style=
"display: none;"
class=
"js-data-title"
>
{{package.get('title')}}
</span>
<span
style=
"display: none;"
class=
"js-data-querystring"
>
{{h.get_wms_info_urls(package)}}
</span>
<span
style=
"display: none;"
class=
"js-data-extent"
>
{{','.join(h.get_wms_info_extent(package))}}
</span>
{{map_preview_button_direct(package)}}
{% set in_basket = package.id in session.get('preview_list',[])%}
<span
class=
"preview-add js-dataset-{{package.id}}-add"
style=
"{{if_(in_basket,'display: none;')}}"
>
<button
data-id=
"{{package.id}}"
class=
"btn btn-default btn-xs btn-info btn-preview btn-basket"
><i
class=
"icon-shopping-cart"
></i>
Add to Preview List
</button>
</span>
<span
class=
"preview-remove js-dataset-{{package.id}}-remove"
style=
"{{if_(not in_basket,'display: none;')}}"
>
<button
data-id=
"{{package.id}}"
class=
"btn btn-danger btn-xs btn-preview btn-basket"
><i
class=
"icon-shopping-cart"
></i>
Remove from List
</button>
</span>
</div>
{% endif %}
</div>
<a
class=
"view-data-link"
href=
"{{h.url_for(controller='package', action='read', id=package.get('name'))}}"
>
View Data
</a>
</div>
</div>
</div>
</div>
<!-- dataset-body -->
</div>
<!-- dataset -->
{% if not mini %}
<hr/>
{% endif %}
{% endwith %}
{% endfor %}
</div>
</div>
<!-- if mini -->
</div>
</div>
{% endmacro %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment