diff --git a/app/assets/images/dashed-stones-small.svg b/app/assets/images/dashed-stones-small.svg new file mode 100644 index 00000000..a589ea82 --- /dev/null +++ b/app/assets/images/dashed-stones-small.svg @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 77d1b4e5..87e3ea05 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -163,4 +163,4 @@ border-radius: 5px; color: $color-white; padding: 0.25rem 0.5rem; -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/ecosystems.scss b/app/assets/stylesheets/ecosystems.scss index 426accae..b8daacd0 100644 --- a/app/assets/stylesheets/ecosystems.scss +++ b/app/assets/stylesheets/ecosystems.scss @@ -718,27 +718,97 @@ body { &:hover { color: $color-purple; } - } - .page-link.active, .active > .page-link { +} + +.page-link.active, .active > .page-link { background-color: $color-purple-dark; border-color: $color-purple-dark; } - .badge-warning { +.badge-warning { background-color: $bootstrap-warning; - } +} - .badge-danger { +.badge-danger { background-color: $bootstrap-danger; color: $color-white; - } +} - .badge-dark { +.badge-dark { background-color: $color-black; color: $color-white; - } +} - .badge-light { +.badge-light { background-color: $color-grey-light; +} + +.listing { + border: 0; + border-radius: 0; + border-bottom: 3px solid $color-purple-light; + padding: 0; +} + + +.listing__title { + @include font-size(1rem); + a { + text-decoration: none; + color: $color-black; + } +} + +.listing__meta { + font-weight: normal; + color: $color-grey-dark; + @include font-size(0.875rem); +} + +.listing__details { + @include font-size(0.875rem); +} + +.listing__time { + margin-top: 0.3888888889; //gross number but it aligns the baseline with the severity badge + @include font-size(0.7777777778rem); +} + +.listing-filters { + .list-group-item { + @include font-size(0.875rem); + border-color: $color-grey; + word-break: break-word; + } +} + +.listing-controls { + background-color: $color-grey-light; + p { + line-height: 2.2222222222rem; } - \ No newline at end of file + .dropdown-item.active, + .dropdown-item:active { + background-color: $color-purple; + } +} + +.listing-header__meta__text { + @include font-size(1rem); + line-height: 1.4rem; +} + +.listing-header__title { + line-break: anywhere; +} + +.rounded-input-group { + .form-control { + border-top-left-radius: 800px; //magic number, but it's consistent with bootstrap + border-bottom-left-radius: 800px; + } + .btn { + border-top-right-radius: 800px; + border-bottom-right-radius: 800px; + } +} diff --git a/app/views/funds/search.html.erb b/app/views/funds/search.html.erb index 05515748..5dd48ce7 100644 --- a/app/views/funds/search.html.erb +++ b/app/views/funds/search.html.erb @@ -1,32 +1,70 @@ -
-

Funds Search: <%= params[:query] %>

- +
+
+

Find a fund

+

Search <%= Fund.count %> curated funds to find the projects that need your support

<%= form_tag search_funds_path, method: :get, class: "mb-4" do %> -
- <%= text_field_tag :query, params[:query], class: "form-control", placeholder: "Search funds..." %> - + +
+ <%= text_field_tag :query, params[:query], class: "form-control form-control-lg", placeholder: "eg. Django" %> +
- <% end %> - -
- <% @funds.each do |fund| %> -
- -
-
- -

Distributed<%= number_to_currency fund.total_distributed_cents/100 %>

-

From<%= pluralize fund.total_donors, 'Funder'%>

-

To<%= pluralize fund.total_funded_projects, 'Projects' %>

+ <% end %> +
+
+
+
+
+ <% if params[:query].present? %> +
+

<%= pluralize(@funds.count, 'result') %> for <%= params[:query] %>

+
+ <% if @funds.any? %> + <% @funds.each do |fund| %> +
+ +
+

+ + <%= fund.name %> <%= fund.description %> + +

+
+
+ <%= bootstrap_icon 'box', width: 18, height: 18, class: 'flex-shrink-0 me-2' %> + <%= pluralize fund.total_funded_projects, 'Projects' %> + <%= bootstrap_icon 'wallet', width: 18, height: 18, class: 'flex-shrink-0 me-2' %> + <%= pluralize fund.total_donors, 'Funder'%> +
+
+
-
- + <% end %> + <% else %> +
+
+ <%= image_tag("dashed-stones-small.svg", alt: " ", class: "img-fluid pe-md-3 mb-3", size: "300x245") %> +
+
+

We couldn't find any results for ‘<%= params[:query] %>’

+

Try amending your search to use more general terms

+

Can’t find your fund?

+

Contact us to talk about adding a new fund

+ Contact us +
-
- + + <% end %> + <% else %> +

Searching <%= Fund.count %> funds

+ <% end %> + <%== pagy_bootstrap_nav(@pagy) if @pagy.pages > 1 %> +
+
+ <% if @funds.any? %> +

Can’t find your fund?

+

Contact us to talk about adding a new fund

+ Contact us + <% end %>
- <% end %>
- - <%== pagy_bootstrap_nav(@pagy) if @pagy.pages > 1 %> -
\ No newline at end of file +