From 979d82df2d51780fd5d6801ed687b8779720d6d0 Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Wed, 6 Nov 2024 11:36:41 +0000 Subject: [PATCH 01/37] layout build for search results page --- app/templates/main/index.html | 2 +- app/templates/search/catalogue/index.html | 56 ++++++++++++++++++++++- package-lock.json | 9 +++- package.json | 3 +- src/styles/main.scss | 1 + 5 files changed, 66 insertions(+), 5 deletions(-) diff --git a/app/templates/main/index.html b/app/templates/main/index.html index be2e67e..cced3ca 100644 --- a/app/templates/main/index.html +++ b/app/templates/main/index.html @@ -7,7 +7,7 @@

DS Search

-

Get started building a National Archives Django application.

+

xGet started building a National Archives Django application.

Useful links

  • diff --git a/app/templates/search/catalogue/index.html b/app/templates/search/catalogue/index.html index 6d8171b..1936c71 100644 --- a/app/templates/search/catalogue/index.html +++ b/app/templates/search/catalogue/index.html @@ -3,10 +3,62 @@ {%- set pageTitle = 'Catalogue' -%} {% block content %} + +
    -
    -

    {{ pageTitle }}

    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Catalogue search results

    +
    +
    +
    +
    +
    +
    + + +
    + + Start new search + + +
    + + +
    + + + +
    +
    + +
    +
    +
    + +
    +
    + + +
    diff --git a/package-lock.json b/package-lock.json index d0a3642..90f3806 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,8 @@ "packages": { "": { "dependencies": { - "@nationalarchives/frontend": "0.2.14" + "@nationalarchives/frontend": "0.2.14", + "psycopg2-binary": "^0.0.1" }, "devDependencies": { "@babel/core": "^7.22.11", @@ -5048,6 +5049,12 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/psycopg2-binary": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/psycopg2-binary/-/psycopg2-binary-0.0.1.tgz", + "integrity": "sha512-KBMkbVNy9TmSX3TZ5B8stHAuvbCJ855b7KIHV6gDDGsfk4UhsXJvbUyvCO8Q8Zh660QT2yVnd3l3tXOdDVFCrQ==", + "license": "ISC" + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", diff --git a/package.json b/package.json index 221ddcb..75f9d9b 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "test:lint": "prettier --check . && stylelint 'src/styles/**/*.scss' && eslint 'src/scripts/**/*.js'" }, "dependencies": { - "@nationalarchives/frontend": "0.2.14" + "@nationalarchives/frontend": "0.2.14", + "psycopg2-binary": "^0.0.1" }, "devDependencies": { "@babel/core": "^7.22.11", diff --git a/src/styles/main.scss b/src/styles/main.scss index f1a6f47..463bfa5 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -1 +1,2 @@ @use "@nationalarchives/frontend/nationalarchives/all"; + From edf3f3cc25570a0fda377f39d11293b3d6033aa2 Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Wed, 6 Nov 2024 12:18:02 +0000 Subject: [PATCH 02/37] accordion layout --- app/templates/search/catalogue/index.html | 75 +++++++++++++++++++++-- src/styles/main.scss | 34 ++++++++++ 2 files changed, 103 insertions(+), 6 deletions(-) diff --git a/app/templates/search/catalogue/index.html b/app/templates/search/catalogue/index.html index 1936c71..71e951c 100644 --- a/app/templates/search/catalogue/index.html +++ b/app/templates/search/catalogue/index.html @@ -36,14 +36,15 @@

    Catalogue search results

    Start new search - + @@ -51,12 +52,74 @@

    Catalogue search results

+ + +
+ +
+
+
+
+

+ Search within results +

+
+

Content

+
+
+
+

+ Dates +

+
+

Content

+
+
+
+

+ Collections +

+
+

Content

+
+
+
+

+ Levels +

+
+

Content

+
+
+
+

+ Closure status +

+
+

Content

+
+
+
+

+ Record opening dates +

+
+

Content

+
+
+
+
+ +
+

Results panel

+
+
diff --git a/src/styles/main.scss b/src/styles/main.scss index 463bfa5..91aa1a3 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -1,2 +1,36 @@ @use "@nationalarchives/frontend/nationalarchives/all"; +// custom styles + +// sub navigation +.sub-nav { + + font-size:0.9em; + + ul { + list-style-type: none; + margin: 0; + padding: 0; + overflow: hidden; + background-color: #333333; + + } + + li { + float: left; + list-style-type: none; + } + + li a { + display: block; + color: white; + text-align: left; + padding-right: 1em; + text-decoration: none; + } + + li a:hover { + background-color: #111111; + } + +} \ No newline at end of file From b1d110060179206b7b539718a768ea51a7b6c35e Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Wed, 6 Nov 2024 13:57:19 +0000 Subject: [PATCH 03/37] accordion panel content outline --- app/templates/search/catalogue/index.html | 277 +++++++++++++++++++++- src/styles/main.scss | 2 + 2 files changed, 273 insertions(+), 6 deletions(-) diff --git a/app/templates/search/catalogue/index.html b/app/templates/search/catalogue/index.html index 71e951c..a74ddd5 100644 --- a/app/templates/search/catalogue/index.html +++ b/app/templates/search/catalogue/index.html @@ -70,7 +70,12 @@

Search within results

-

Content

+
+ + + + +
@@ -78,7 +83,76 @@

Dates

-

Content

+
+ +

Dates

+
+ For example, 27 3 2007 or 2007 +
+
+
+
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+
+
+
+ +
@@ -86,7 +160,59 @@

Collections

-

Content

+
+

Collections

+
+
+
    +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • +
+
+
+ + See more + + +
+
@@ -94,7 +220,45 @@

Levels

-

Content

+
+

Level

+
+
+
    +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • + +
  • +
+
+
+ + +
+
@@ -102,7 +266,29 @@

Closure status

-

Content

+
+

Closure Status

+
+
+
    +
  • + +
  • + +
  • + +
  • + +
  • + +
  • +
+
+
+ + +
+
@@ -110,8 +296,87 @@

Record opening dates

-

Content

+
+ +

Record opening date

+
+
+

+ Record opening date +

+
+
+
+ For example, 27 3 2007 or 2007 +
+ + +
+
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+
+
+
+
+
+
+
diff --git a/src/styles/main.scss b/src/styles/main.scss index 91aa1a3..7109658 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -6,6 +6,8 @@ .sub-nav { font-size:0.9em; + background:grey; + padding:1em; ul { list-style-type: none; From c9002bfd675d9af9e68048da55ece0027d8a86c5 Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Wed, 6 Nov 2024 16:14:05 +0000 Subject: [PATCH 04/37] accordion sections --- app/templates/search/catalogue/index.html | 506 +++++++++++----------- src/styles/main.scss | 13 + 2 files changed, 260 insertions(+), 259 deletions(-) diff --git a/app/templates/search/catalogue/index.html b/app/templates/search/catalogue/index.html index a74ddd5..8869db7 100644 --- a/app/templates/search/catalogue/index.html +++ b/app/templates/search/catalogue/index.html @@ -61,6 +61,7 @@

Catalogue search results

+
@@ -71,11 +72,9 @@

- - - -
+ +
@@ -83,181 +82,189 @@

Dates

-
- -

Dates

-
- For example, 27 3 2007 or 2007 -
-
-
-
-
-
- - -
-
-
- -
-
-
- - -
-
-
- -
-
-
- - -
-
-
+
+
+ + For example, 27 3 2007 or 2007
+ From: +
+
+
+ +
-
-
- - -
-
-
-
- - -
-
-
- -
-
-
- - -
-
-
- -
-
-
- - -
-
-
+
+ +
-
- -
+
+ + +
+
+ + To: + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+

Collections

-
-

Collections

-
-
-
    -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • -
+
+
+ +
+
+ +
-
- - See more - - -
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+

Levels

-
-

Level

-
-
-
    -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • - -
  • -
+
+
+
+
+ +
-
- - -
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
@@ -266,117 +273,98 @@

Closure status

-
-

Closure Status

-
-
-
    -
  • - -
  • - -
  • - -
  • - -
  • - -
  • -
+
+
+
+
+ +
-
- - -
+
+ + +
+
+ + +
+
+
+
+

Record opening dates

-
- -

Record opening date

-
-
-

- Record opening date -

-
-
-
- For example, 27 3 2007 or 2007 -
- - -
-
-
-
- - -
-
-
- -
-
-
- - -
-
-
- -
-
-
- - -
-
-
-
-
-
- - -
-
-
-
- - -
-
-
- -
-
-
- - -
-
-
- -
-
-
- - -
-
-
-
+
+
+ + For example, 27 3 2007 or 2007
+ From: +
+
+
+ +
-
-
+
+ + +
+
+ + +
+
+ + To: + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
- + +
+
+ +
+
diff --git a/src/styles/main.scss b/src/styles/main.scss index 7109658..7af26c7 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -8,6 +8,7 @@ font-size:0.9em; background:grey; padding:1em; + ul { list-style-type: none; @@ -35,4 +36,16 @@ background-color: #111111; } +} + +// accordion element + +// search within +.search-filters__search { + margin-bottom: 0.5rem; + border: 1px solid #8c9694; + border-radius: 0.5rem; + width: 100%; + height: 1rem; + padding: 1rem; } \ No newline at end of file From edd5c1df31482a4437da93d98d11a88b1b93befa Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Thu, 7 Nov 2024 10:43:08 +0000 Subject: [PATCH 05/37] examples of record entries. --- app/templates/search/catalogue/index.html | 89 ++++++++++++++++++++++- src/styles/main.scss | 2 +- 2 files changed, 88 insertions(+), 3 deletions(-) diff --git a/app/templates/search/catalogue/index.html b/app/templates/search/catalogue/index.html index 8869db7..a21043f 100644 --- a/app/templates/search/catalogue/index.html +++ b/app/templates/search/catalogue/index.html @@ -63,7 +63,7 @@

Catalogue search results

-
+
@@ -368,9 +368,94 @@

+
-

Results panel

+ +
diff --git a/src/styles/main.scss b/src/styles/main.scss index 7af26c7..1c0939b 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -40,7 +40,7 @@ // accordion element -// search within +// search within results .search-filters__search { margin-bottom: 0.5rem; border: 1px solid #8c9694; From c105830fae8bc658b1b21a1474a375f52086fea0 Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Thu, 7 Nov 2024 10:59:11 +0000 Subject: [PATCH 06/37] Results panels --- src/styles/main.scss | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/styles/main.scss b/src/styles/main.scss index 1c0939b..a57b2f1 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -48,4 +48,19 @@ width: 100%; height: 1rem; padding: 1rem; +} + +// results panels (right hand side) + +.search-results__list{ + + li { + list-style-type: none; + border-bottom: 1px solid black; + padding-top:1em; + padding-bottom:1em; + + } + + } \ No newline at end of file From 31889415e87ab0e0bb35aefa6ee1b28100974389 Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Thu, 7 Nov 2024 14:13:15 +0000 Subject: [PATCH 07/37] Results panel intro / dropdown --- app/templates/search/catalogue/index.html | 26 +++++++++++++++++------ src/styles/main.scss | 12 +++++++++++ 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/app/templates/search/catalogue/index.html b/app/templates/search/catalogue/index.html index a21043f..e42dcd2 100644 --- a/app/templates/search/catalogue/index.html +++ b/app/templates/search/catalogue/index.html @@ -65,8 +65,8 @@

Catalogue search results

-
-
+
+

Search within results

@@ -77,7 +77,7 @@

-
+

Dates

@@ -136,7 +136,7 @@

-
+

Collections

@@ -212,7 +212,7 @@

-
+

Levels

@@ -268,7 +268,7 @@

-
+

Closure status

@@ -301,7 +301,7 @@

-
+

Record opening dates

@@ -371,6 +371,18 @@

+ +
+
+

Showing 1 - 20 (of 10,000) results

+ +
+
+
  • diff --git a/src/styles/main.scss b/src/styles/main.scss index a57b2f1..de16a94 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -2,6 +2,8 @@ // custom styles +// Results page + // sub navigation .sub-nav { @@ -52,6 +54,16 @@ // results panels (right hand side) +.tna-form__intro { + p { + text-align:left; + padding-right:40%; + + } +} + + + .search-results__list{ li { From 76b8a3f37351c74516a41ce3f0f916e4e48a0a8e Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Thu, 7 Nov 2024 14:52:16 +0000 Subject: [PATCH 08/37] sort by icons --- app/templates/search/catalogue/index.html | 16 ++++++++++------ src/styles/main.scss | 12 +++++++++++- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/app/templates/search/catalogue/index.html b/app/templates/search/catalogue/index.html index e42dcd2..40dbbd0 100644 --- a/app/templates/search/catalogue/index.html +++ b/app/templates/search/catalogue/index.html @@ -374,12 +374,16 @@

    -

    Showing 1 - 20 (of 10,000) results

    - +

    Showing 1 - 20 (of 10,000) results

    + +
      +
    • +
    • +
    diff --git a/src/styles/main.scss b/src/styles/main.scss index de16a94..3377719 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -57,11 +57,21 @@ .tna-form__intro { p { text-align:left; - padding-right:40%; + padding-right:30%; } } +// sort results icons +.sort-icons { + + li { + float: left; + list-style-type: none; + margin-left:0.4em; + } +} + .search-results__list{ From 14925a4e9813b4a8a057ff832f099c479d620612 Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Thu, 7 Nov 2024 14:58:31 +0000 Subject: [PATCH 09/37] pagination element --- app/templates/search/catalogue/index.html | 50 ++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/app/templates/search/catalogue/index.html b/app/templates/search/catalogue/index.html index 40dbbd0..a041759 100644 --- a/app/templates/search/catalogue/index.html +++ b/app/templates/search/catalogue/index.html @@ -474,7 +474,55 @@

- + + +

From 0552346da24b4e934a5b685e50f61eb0b7cb3836 Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Thu, 7 Nov 2024 15:22:40 +0000 Subject: [PATCH 10/37] styling adjustments --- src/styles/main.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/styles/main.scss b/src/styles/main.scss index 3377719..3ebd7cb 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -10,6 +10,7 @@ font-size:0.9em; background:grey; padding:1em; + margin-top:1em; ul { @@ -44,7 +45,7 @@ // search within results .search-filters__search { - margin-bottom: 0.5rem; + margin-bottom: 1rem; border: 1px solid #8c9694; border-radius: 0.5rem; width: 100%; From cfc5923f1f0912ef20afcface1be288ff8b1f72d Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Mon, 18 Nov 2024 15:07:52 +0000 Subject: [PATCH 11/37] responsive behaviour (grid) --- app/templates/search/catalogue/index.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/templates/search/catalogue/index.html b/app/templates/search/catalogue/index.html index a041759..d4406b7 100644 --- a/app/templates/search/catalogue/index.html +++ b/app/templates/search/catalogue/index.html @@ -7,7 +7,7 @@
-
+
@@ -37,7 +37,6 @@

Catalogue search results

- - +
From 9a8699f093a0cfa33606137f381cd340a1dd0756 Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Mon, 18 Nov 2024 15:22:01 +0000 Subject: [PATCH 12/37] sub navigation styles --- src/styles/main.scss | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/styles/main.scss b/src/styles/main.scss index 3ebd7cb..e1c9cc8 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -8,9 +8,11 @@ .sub-nav { font-size:0.9em; - background:grey; - padding:1em; + // background:grey; + padding-top:0.5em; margin-top:1em; + position: relative; + top: 3em; ul { @@ -25,18 +27,23 @@ li { float: left; list-style-type: none; + padding-right: 1em; } li a { display: block; color: white; text-align: left; - padding-right: 1em; text-decoration: none; + padding-right: 1em; + margin-left: 0px; } li a:hover { background-color: #111111; + border-bottom:10px solid white; + padding-bottom: 0; + margin-bottom: 0; } } From 02ea4f85020ba0bbddaaf8dac0a1a8d04161bea4 Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Mon, 18 Nov 2024 15:40:36 +0000 Subject: [PATCH 13/37] formatting / prettier --- src/styles/main.scss | 141 ++++++++++++++++++++++--------------------- 1 file changed, 71 insertions(+), 70 deletions(-) diff --git a/src/styles/main.scss b/src/styles/main.scss index e1c9cc8..df52721 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -1,96 +1,97 @@ @use "@nationalarchives/frontend/nationalarchives/all"; -// custom styles +// custom styles // Results page // sub navigation .sub-nav { - - font-size:0.9em; - // background:grey; - padding-top:0.5em; - margin-top:1em; - position: relative; - top: 3em; - - - ul { - list-style-type: none; - margin: 0; - padding: 0; - overflow: hidden; - background-color: #333333; - - } - - li { - float: left; - list-style-type: none; - padding-right: 1em; - } - - li a { - display: block; - color: white; - text-align: left; - text-decoration: none; - padding-right: 1em; - margin-left: 0px; - } - - li a:hover { - background-color: #111111; - border-bottom:10px solid white; - padding-bottom: 0; - margin-bottom: 0; - } + margin-top: 1em; + // background:grey; + padding-top: 0.5em; + position: relative; + top: 3em; + + font-size: 0.9em; + + ul { + list-style-type: none; + + margin: 0; + padding: 0; + + overflow: hidden; + + background-color: #333; + } + + li { + padding-right: 1em; + + float: left; + list-style-type: none; + } + + li a { + margin-left: 0; + padding-right: 1em; + + display: block; + + color: white; + text-align: left; + text-decoration: none; + } + + li a:hover { + margin-bottom: 0; + padding-bottom: 0; + + background-color: #111; + border-bottom: 10px solid white; + } } // accordion element // search within results .search-filters__search { - margin-bottom: 1rem; - border: 1px solid #8c9694; - border-radius: 0.5rem; - width: 100%; - height: 1rem; - padding: 1rem; + width: 100%; + height: 1rem; + margin-bottom: 1rem; + padding: 1rem; + + border: 1px solid #8c9694; + border-radius: 0.5rem; } // results panels (right hand side) .tna-form__intro { - p { - text-align:left; - padding-right:30%; - - } + p { + padding-right: 30%; + + text-align: left; + } } // sort results icons .sort-icons { - - li { - float: left; - list-style-type: none; - margin-left:0.4em; - } -} - + li { + margin-left: 0.4em; + float: left; + list-style-type: none; + } +} -.search-results__list{ - - li { - list-style-type: none; - border-bottom: 1px solid black; - padding-top:1em; - padding-bottom:1em; - - } - +.search-results__list { + li { + list-style-type: none; + border-bottom: 1px solid black; -} \ No newline at end of file + padding-top: 1em; + padding-bottom: 1em; + } +} From 11d71d2b103d7f33008db27a4f68042913ce82b3 Mon Sep 17 00:00:00 2001 From: JohnHeeryTNA Date: Tue, 19 Nov 2024 11:52:58 +0000 Subject: [PATCH 14/37] search box and sub nav adjustments --- app/templates/search/catalogue/index.html | 11 +++---- src/styles/main.scss | 37 +++++++++++++++++++---- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/app/templates/search/catalogue/index.html b/app/templates/search/catalogue/index.html index d4406b7..ed44e7f 100644 --- a/app/templates/search/catalogue/index.html +++ b/app/templates/search/catalogue/index.html @@ -5,18 +5,18 @@ {% block content %} -
+