color: $blue;
}
+/* Rules for borders */
+/* These add additional colours to those provided by bootstrap */
+.border-grey {
+ border-color: $grey !important;
+}
+
+.border-lightgrey {
+ border-color: $lightgrey !important;
+}
+
/* Rules for the header */
#menu-icon {
border-bottom: none;
}
- .paginate {
- border: 1px solid $lightgrey;
- border-radius: 3px;
- }
-
.browse-field {
margin-bottom: 10px;
.browse-tag-list {
background-color: $offwhite;
- border: 1px solid $grey;
- border-radius: 3px;
table-layout: fixed;
border-collapse: separate;
border-spacing: 0;
.export_boxy {
background: $lightgrey;
- border: 1px solid $grey;
- border-radius: 3px;
#maxlat { margin-top: -1px; }
#minlon {
.content_map {
height: 200px;
- border: 1px solid $grey;
margin-bottom: $lineheight;
}
.diary_entries {
#map {
height: 400px;
- border: 1px solid $grey;
display: none;
margin-bottom: $lineheight;
}
.users-terms {
.legale {
- border: 1px solid $grey;
padding: $lineheight;
margin-bottom: $lineheight;
overflow: auto;
img.user_image {
max-width: 100px;
max-height: 100px;
- border: 1px solid $grey;
}
img.user_thumbnail {
max-width: 50px;
max-height: 50px;
- border: 1px solid $grey;
}
img.user_thumbnail_tiny {
height: auto;
max-width: 25px;
max-height: 25px;
- border: 1px solid $grey;
}
/* Rules for geo microformats */
# User images
def user_image(user, options = {})
- options[:class] ||= "user_image"
+ options[:class] ||= "user_image border border-grey"
options[:alt] ||= ""
if user.image_use_gravatar
end
def user_thumbnail(user, options = {})
- options[:class] ||= "user_thumbnail"
+ options[:class] ||= "user_thumbnail border border-grey"
options[:alt] ||= ""
if user.image_use_gravatar
end
def user_thumbnail_tiny(user, options = {})
- options[:class] ||= "user_thumbnail_tiny"
+ options[:class] ||= "user_thumbnail_tiny border border-grey"
options[:alt] ||= ""
if user.image_use_gravatar
<% if pages.page_count > 1 %>
<div class="col-auto">
<h4>
- <span class="paginate p-1">
+ <span class="border border-lightgrey rounded p-1">
<%= raw pagination_links_each(pages, {}) { |n| link_to(n, page_param => n) } %>
</span>
</h4>
<% unless tag_details.empty? %>
<h4><%= t ".tags" %></h4>
- <table class='browse-tag-list'>
+ <table class='browse-tag-list border border-grey rounded'>
<%= render :partial => "tag", :collection => tag_details.sort %>
</table>
<% end %>
<% if current_user and @user.id == current_user.id %>
<div class="col-md order-md-last">
<% if @user.home_lat.nil? or @user.home_lon.nil? %>
- <div id="map" class="content_map">
+ <div id="map" class="content_map border border-grey">
<p class="m-3"><%= t(".no_home_location_html", :edit_profile_link => link_to(t(".edit_your_profile"), edit_profile_path)) %></p>
</div>
<% else %>
:icon => image_path("marker-red.png"),
:description => render(:partial => "popup", :object => current_user, :locals => { :type => "your location" })
} %>
- <%= tag.div "", :id => "map", :class => "content_map", :data => { :user => user_data } %>
+ <%= tag.div "", :id => "map", :class => "content_map border border-grey rounded", :data => { :user => user_data } %>
<% end %>
<% friends = @user.friends %>
<fieldset>
<legend><%= t ".location" -%></legend>
- <%= tag.div "", :id => "map", :data => { :lat => @lat, :lon => @lon, :zoom => @zoom } %>
+ <%= tag.div "", :id => "map", :class => "border border-grey rounded", :data => { :lat => @lat, :lon => @lon, :zoom => @zoom } %>
<div class="form-row">
<%= f.text_field :latitude, :wrapper_class => "col-sm-4", :id => "latitude" %>
<input class="form-check-input" type="checkbox" name="updatehome" value="1" <% unless current_user.home_lat and current_user.home_lon %> checked="checked" <% end %> id="updatehome" />
<label class="form-check-label" for="updatehome"><%= t ".update home location on click" %></label>
</div>
- <%= tag.div "", :id => "map", :class => "content_map set_location" %>
+ <%= tag.div "", :id => "map", :class => "content_map set_location border border-grey rounded" %>
</fieldset>
<%= f.primary t(".save") %>
<%= hidden_field_tag "format", "osm", :autocomplete => "off" %>
<div class='export_area_inputs'>
- <div class='export_boxy'>
+ <div class='export_boxy border border-grey rounded'>
<%= text_field_tag("maxlat", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control mx-auto") %>
<div class="clearfix">
<%= text_field_tag("minlon", nil, :size => 10, :autocomplete => "off", :class => "export_bound form-control") %>
<% end %>
</div>
- <div id="contributorTerms" class="legale">
+ <div id="contributorTerms" class="legale border border-grey rounded">
<%= render :partial => "terms" %>
</div>
gravatar_user = create(:user, :image_use_gravatar => true)
image = user_image(user)
- assert_match %r{^<img class="user_image" .* src="/images/avatar_large.png" />$}, image
+ assert_match %r{^<img class="user_image border border-grey" .* src="/images/avatar_large.png" />$}, image
image = user_image(user, :class => "foo")
assert_match %r{^<img class="foo" .* src="/images/avatar_large.png" />$}, image
image = user_image(gravatar_user)
- assert_match %r{^<img class="user_image" .* src="http://www.gravatar.com/avatar/.*" />$}, image
+ assert_match %r{^<img class="user_image border border-grey" .* src="http://www.gravatar.com/avatar/.*" />$}, image
image = user_image(gravatar_user, :class => "foo")
assert_match %r{^<img class="foo" .* src="http://www.gravatar.com/avatar/.*" />$}, image
gravatar_user = create(:user, :image_use_gravatar => true)
image = user_thumbnail(user)
- assert_match %r{^<img class="user_thumbnail" .* src="/images/avatar_small.png" />$}, image
+ assert_match %r{^<img class="user_thumbnail border border-grey" .* src="/images/avatar_small.png" />$}, image
image = user_thumbnail(user, :class => "foo")
assert_match %r{^<img class="foo" .* src="/images/avatar_small.png" />$}, image
image = user_thumbnail(gravatar_user)
- assert_match %r{^<img class="user_thumbnail" .* src="http://www.gravatar.com/avatar/.*" />$}, image
+ assert_match %r{^<img class="user_thumbnail border border-grey" .* src="http://www.gravatar.com/avatar/.*" />$}, image
image = user_thumbnail(gravatar_user, :class => "foo")
assert_match %r{^<img class="foo" .* src="http://www.gravatar.com/avatar/.*" />$}, image
gravatar_user = create(:user, :image_use_gravatar => true)
image = user_thumbnail_tiny(user)
- assert_match %r{^<img class="user_thumbnail_tiny" .* src="/images/avatar_small.png" />$}, image
+ assert_match %r{^<img class="user_thumbnail_tiny border border-grey" .* src="/images/avatar_small.png" />$}, image
image = user_thumbnail_tiny(user, :class => "foo")
assert_match %r{^<img class="foo" .* src="/images/avatar_small.png" />$}, image
image = user_thumbnail_tiny(gravatar_user)
- assert_match %r{^<img class="user_thumbnail_tiny" .* src="http://www.gravatar.com/avatar/.*" />$}, image
+ assert_match %r{^<img class="user_thumbnail_tiny border border-grey" .* src="http://www.gravatar.com/avatar/.*" />$}, image
image = user_thumbnail_tiny(gravatar_user, :class => "foo")
assert_match %r{^<img class="foo" .* src="http://www.gravatar.com/avatar/.*" />$}, image