Skip to content

Commit

Permalink
Merge branch 'main' into feature/backend
Browse files Browse the repository at this point in the history
# Conflicts:
#	orp/orp_search/templates/orp.html
  • Loading branch information
hareshkainthdbt committed Oct 11, 2024
2 parents a136c36 + f55668c commit c853554
Show file tree
Hide file tree
Showing 10 changed files with 282 additions and 223 deletions.
1 change: 1 addition & 0 deletions front_end/images/icon-cross.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions front_end/images/icon-search-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions front_end/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ $govuk-image-url-function: frontend-image-url;
// Custom style sheets
@import "./search.scss";
@import "./inset_text.scss";
@import "./filters.scss";
@import "./helpers.scss";
45 changes: 45 additions & 0 deletions front_end/stylesheets/filters.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.orp-applied-filters-container {
background-color: govuk-colour("light-grey");
@include govuk-responsive-padding(2);

.orp-applied-filter-tag {
display: inline-flex;
line-height: 1;

a {
background-image: url("../images/icon-cross.svg");
background-repeat: no-repeat;
background-position: center left 7px;
background-size: 10px 10px;
border: 1px solid govuk-colour("dark-grey");
border-radius: 5px;
margin: govuk-spacing(1) govuk-spacing(1) govuk-spacing(1) 0;
// display: flex;
padding: govuk-spacing(1);
padding-left: govuk-spacing(5);
text-decoration: none;

}
}
}

.orp-publisher-search {
.orp-publisher-search__input {
position: relative;
background-image: url("../images/icon-search-black.svg");
background-repeat: no-repeat;
background-position: center right -2px;
padding-right: 35px;
// background-size: $icon-size $icon-size;

&::placeholder {
color: govuk-colour("dark-grey");
}

// If the user is in a dark forced colours mode, switch the search icon out
// for a light variant.
// @media (forced-colors: active) and (prefers-color-scheme: dark) {
// background-image: _search-icon($colour: govuk-colour("white"));
// }
}
}
17 changes: 17 additions & 0 deletions front_end/stylesheets/helpers.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.orp-\!-no-text-wrap {
white-space: nowrap;
}

.orp-max-height-250 {
max-height: 250px;
overflow: scroll;
}

.orp-flex {
display: flex;
align-items: center;
}

.orp-flex--space-between {
justify-content: space-between;
}
4 changes: 2 additions & 2 deletions front_end/stylesheets/search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
height: 44px;
background-image: url("../images/icon-search.svg");
background-repeat: no-repeat;
background-position: 11px 50%;
background-position: 50% 50%;
background-size: 22px 22px;
overflow: hidden;
transition: background-color 0.3s ease;
Expand Down Expand Up @@ -55,4 +55,4 @@
// background-size: 30px 22px;
}
}
}
}
2 changes: 1 addition & 1 deletion orp/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
# Service

SERVICE_NAME: str = "Open Regulation Platform"
SERVICE_NAME_SEARCH: str = "Search for regulatory provisions"
SERVICE_NAME_SEARCH: str = "Open Regulation Platform"
CONTACT_EMAIL: str = "[email protected]"

# Cookies
Expand Down
9 changes: 3 additions & 6 deletions orp/config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
import core.views as core_views

urlpatterns = [
path("", orp_views.search, name="search"),
# If we choose to have a start page with green button, this is it:
# path("", core_views.home, name="home"),
# Uncomment the above line and comment out
# the two lines below to switch to the app
# home page.
path("", core_views.hello_world, name="hello_world"),
path("home/", core_views.home, name="home"),
path("healthcheck/", core_views.health_check, name="healthcheck"),
path(
"accessibility-statement/",
Expand All @@ -33,7 +30,7 @@
core_views.hide_cookie_banner,
name="hide-cookie-banner",
),
path("search/", orp_views.search, name="search"),
# path("search/", orp_views.search, name="search"),
]

if settings.DJANGO_ADMIN:
Expand Down
6 changes: 3 additions & 3 deletions orp/core/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ class RegulationSearchForm(forms.Form):

query = forms.CharField(
required=False,
label="Enter the sector, business activity or topic you want to find regulations for.", # noqa: E501
help_text="For example, Construction, Health and Safety, or Food",
label="Search",
help_text="",
widget=forms.TextInput(
attrs={
"class": "govuk-input",
"id": "query",
"name": "query",
"type": "search",
"placeholder": "Search for regulations",
"placeholder": "",
}
),
)
Expand Down
Loading

0 comments on commit c853554

Please sign in to comment.