From 03c32797109e0528e3492237851a3e707b52ea29 Mon Sep 17 00:00:00 2001 From: Aron Carroll Date: Wed, 9 May 2012 12:22:29 +0100 Subject: [PATCH] Add dataset search results to primer --- ckan/public/base/less/ckan.less | 1 + ckan/public/base/less/dataset.less | 39 ++++++++++ ckan/public/base/less/module.less | 41 ++++++++-- ckan/public/base/less/variables.less | 9 ++- ckan/public/base/test/primer/index.html | 99 +++++++++++++++++++++++++ 5 files changed, 180 insertions(+), 9 deletions(-) create mode 100644 ckan/public/base/less/dataset.less diff --git a/ckan/public/base/less/ckan.less b/ckan/public/base/less/ckan.less index 32342e3d1e5..26ec2f50e01 100644 --- a/ckan/public/base/less/ckan.less +++ b/ckan/public/base/less/ckan.less @@ -1,6 +1,7 @@ @import "variables.less"; @import "module.less"; @import "nav.less"; +@import "dataset.less"; body { background: @layout-background-color; diff --git a/ckan/public/base/less/dataset.less b/ckan/public/base/less/dataset.less new file mode 100644 index 00000000000..7ebb22445bb --- /dev/null +++ b/ckan/public/base/less/dataset.less @@ -0,0 +1,39 @@ +.dataset-list .dataset-item { + border-bottom: 1px dotted #ccc; + padding-bottom: 20px; + margin-bottom: 20px; +} + +.dataset-list .dataset-item:last-of-type { + border-bottom: none; + margin-bottom: 0; + padding-bottom: 0; +} + +.dataset-item { +} + +.dataset-item > .heading { + font-size: 14px; + line-height: 1; + float: left; +} + +.dataset-item > .content { + clear: both; + font-size: 12px; +} + +.dataset-resources { + font-size: 10px; + line-height: 14px; + float: right; +} + +.dataset-resources li { + display: inline; +} + +.dataset-resources li a { + background-color: #aaa; +} diff --git a/ckan/public/base/less/module.less b/ckan/public/base/less/module.less index b5843a65476..ac5b28ad13d 100644 --- a/ckan/public/base/less/module.less +++ b/ckan/public/base/less/module.less @@ -10,23 +10,50 @@ margin-bottom: 10px; } -.module .heading { +.module > .heading { font-size: 14px; padding: 0 @module-margin-x; border-bottom: 1px solid @module-heading-border-color; #gradient > .vertical(@module-heading-background-color-start, @module-heading-background-color-end); } -.module .content { +.module > .content { padding: @module-margin-y @module-margin-x; } -.module .content :last-child { +.module > .content :last-child { margin-bottom: 0; } -.module .content .heading { - .module .heading; - margin: 20px -@module-margin-x 20px; - border-top: 1px solid lighten(@module-heading-border-color, 5%); +.module > .pagination { + height: 34px; + border-top: 1px solid @module-heading-border-color; } + +.module > .pagination > ul { + .border-radius(0); + border: 0; +} + +.pagination li a { + border-top: none; + border-bottom: none; +} + +.pagination li:first-child a, +.pagination li:last-child a { + .border-radius(0); +} + +.pagination li:first-child a { + border-left: 0; +} + +.pagination li:last-child a { + border-right: 0; +} +//.module > .content .heading { +// .module .heading; +// margin: 20px -@module-margin-x 20px; +// border-top: 1px solid lighten(@module-heading-border-color, 5%); +//} diff --git a/ckan/public/base/less/variables.less b/ckan/public/base/less/variables.less index 92e443daada..3bb1a68a0e2 100644 --- a/ckan/public/base/less/variables.less +++ b/ckan/public/base/less/variables.less @@ -1,8 +1,10 @@ // Base variables -@font-family: Arial, sans-serif; @image-path: "../images"; // Layout Variables +@layout-font-family: Arial, sans-serif; +@layout-text-color: #4d4d4d; +@layout-link-color: #005772; @layout-background-color: #f2f1ee; // Module Variables @@ -14,7 +16,10 @@ @nav-link-color: #333; // Twitter Bootstrap Overrides -@baseFontFamily: @font-family; +@bodyBackground: @layout-background-color; +@baseFontFamily: @layout-font-family; +@textColor: @layout-text-color; +@linkColor: @layout-link-color; @iconSpritePath: "@{image-path}/bootstrap-glyphicons-halflings.png"; @iconWhiteSpritePath: "@{image-path}/bootstrap-glyphicons-halflings-white.png"; diff --git a/ckan/public/base/test/primer/index.html b/ckan/public/base/test/primer/index.html index eba657f2d52..6396cad4cd3 100644 --- a/ckan/public/base/test/primer/index.html +++ b/ckan/public/base/test/primer/index.html @@ -462,6 +462,105 @@

Forms

This block is copyright © 2012 Paul Robert Lloyd. Code covered by the MIT license.

+

Dataset Results

+
+
+
    +
  • +

    Counselling in London Central, Camden

    + +
    +

    This is an application programming interface (API) that opens up + core EU legislative data for further use. The interface uses JSON, + meaning that you have easy to use machine-readable access to + metadata on European Union legislation.

    +

    It will be useful if you + want to use or analyze European Union legislative data in a way + that the official databases are not originally build for. The API + extracts, organize and connects data from various official + sources.

    +
    +
  • +
+
+
+
+
+
    +
  • +

    Counselling in London Central, Camden

    + +
    +

    This is an application programming interface (API) that opens up + core EU legislative data for further use. The interface uses JSON, + meaning that you have easy to use machine-readable access to + metadata on European Union legislation.

    +

    It will be useful if you + want to use or analyze European Union legislative data in a way + that the official databases are not originally build for. The API + extracts, organize and connects data from various official + sources.

    +
    +
  • +
  • +

    Counselling in London Central, Camden

    + +
    +

    This is an application programming interface (API) that opens up + core EU legislative data for further use. The interface uses JSON, + meaning that you have easy to use machine-readable access to + metadata on European Union legislation.

    +

    It will be useful if you + want to use or analyze European Union legislative data in a way + that the official databases are not originally build for. The API + extracts, organize and connects data from various official + sources.

    +
    +
  • +
  • +

    Counselling in London Central, Camden

    + +
    +

    This is an application programming interface (API) that opens up + core EU legislative data for further use. The interface uses JSON, + meaning that you have easy to use machine-readable access to + metadata on European Union legislation.

    +

    It will be useful if you + want to use or analyze European Union legislative data in a way + that the official databases are not originally build for. The API + extracts, organize and connects data from various official + sources.

    +
    +
  • +
+
+ +