Skip to content

Commit

Permalink
replaces ogp images with geoblacklight icon font
Browse files Browse the repository at this point in the history
  • Loading branch information
mejackreed committed Nov 7, 2014
1 parent 1e3227e commit 8a8b3eb
Show file tree
Hide file tree
Showing 24 changed files with 209 additions and 33 deletions.
Binary file added app/assets/fonts/geoblacklight.eot
Binary file not shown.
117 changes: 117 additions & 0 deletions app/assets/fonts/geoblacklight.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/fonts/geoblacklight.ttf
Binary file not shown.
Binary file added app/assets/fonts/geoblacklight.woff
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/src_berkeley.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/src_cambridge.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/src_harvard.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/src_maryland.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/src_massgis.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/src_mit.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/src_princeton.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/src_stanford.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/src_tufts.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/src_un.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/type_arc.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/type_dot.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/type_library.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/type_map.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/type_polygon.png
Binary file not shown.
Binary file removed app/assets/images/geoblacklight/type_raster.png
Binary file not shown.
2 changes: 2 additions & 0 deletions app/assets/stylesheets/geoblacklight/_geoblacklight.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
*/

@import 'geoblacklight/styles';
@import 'modules/icons';
@import 'modules/icon-customization';
@import 'modules/item';
@import 'modules/results';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Additional customizations beyond generated FontCustom styles

.geoblacklight-icon {
color: $gray-light;
font-size: 1.2em;
}

.geoblacklight-stanford {
color: #8c1515;
}
77 changes: 77 additions & 0 deletions app/assets/stylesheets/geoblacklight/modules/icons.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
//
// Icon Font: geoblacklight
//
// From https://github.com/geoblacklight/geoblacklight-icons/blob/master/app/assets/stylesheets/_geoblacklight.scss

@font-face {
font-family: "geoblacklight";
src: font-url("geoblacklight.eot");
src: font-url("geoblacklight.eot?#iefix") format("embedded-opentype"),
font-url("geoblacklight.woff") format("woff"),
font-url("geoblacklight.ttf") format("truetype"),
font-url("geoblacklight.svg#geoblacklight") format("svg");
font-weight: normal;
font-style: normal;
}

@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "geoblacklight";
src: font-url("geoblacklight.svg#geoblacklight") format("svg");
}
}

[data-icon]:before { content: attr(data-icon); }

[data-icon]:before,
.geoblacklight-berkeley:before,
.geoblacklight-harvard:before,
.geoblacklight-image:before,
.geoblacklight-line:before,
.geoblacklight-massgis:before,
.geoblacklight-mit:before,
.geoblacklight-paper-map:before,
.geoblacklight-point:before,
.geoblacklight-polygon:before,
.geoblacklight-raster:before,
.geoblacklight-stanford:before,
.geoblacklight-tufts:before {
display: inline-block;
font-family: "geoblacklight";
font-style: normal;
font-weight: normal;
font-variant: normal;
line-height: 1;
text-decoration: inherit;
text-rendering: optimizeLegibility;
text-transform: none;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
}

.geoblacklight-berkeley:before { content: "\f101"; }
.geoblacklight-harvard:before { content: "\f103"; }
.geoblacklight-image:before { content: "\f10a"; }
.geoblacklight-line:before { content: "\f108"; }
.geoblacklight-massgis:before { content: "\f106"; }
.geoblacklight-mit:before { content: "\f104"; }
.geoblacklight-paper-map:before { content: "\f110"; }
.geoblacklight-point:before { content: "\f109"; }
.geoblacklight-polygon:before { content: "\f107"; }
.geoblacklight-raster:before { content: "\f10d"; }
.geoblacklight-stanford:before { content: "\f102"; }
.geoblacklight-tufts:before { content: "\f105"; }

$font-geoblacklight-berkeley: "\f101";
$font-geoblacklight-harvard: "\f103";
$font-geoblacklight-image: "\f10a";
$font-geoblacklight-line: "\f108";
$font-geoblacklight-massgis: "\f106";
$font-geoblacklight-mit: "\f104";
$font-geoblacklight-paper-map: "\f110";
$font-geoblacklight-point: "\f109";
$font-geoblacklight-polygon: "\f107";
$font-geoblacklight-raster: "\f10d";
$font-geoblacklight-stanford: "\f102";
$font-geoblacklight-tufts: "\f105";
36 changes: 3 additions & 33 deletions app/helpers/geoblacklight_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,47 +40,17 @@ def snippit(text)
end

def layer_type_image(type)
case type
when "Polygon"
image_tag('geoblacklight/type_polygon.png', 'data-toggle' => 'tooltip', title: 'Polygon', :class => 'tooltip-icon')
when "Line"
image_tag('geoblacklight/type_arc.png', 'data-toggle' => 'tooltip', title: 'Line', :class => 'tooltip-icon')
when "Point"
image_tag('geoblacklight/type_dot.png', 'data-toggle' => 'tooltip', title: 'Point', :class => 'tooltip-icon')
when "Raster"
image_tag('geoblacklight/type_raster.png', 'data-toggle' => 'tooltip', title: 'Raster', :class => 'tooltip-icon')
when "Paper Map"
image_tag('geoblacklight/type_map.png', 'data-toggle' => 'tooltip', title: 'Paper Map', :class => 'tooltip-icon')
when "LibraryRecord"
content_tag(:i, '', class: 'fa fa-book fa-lg text-muted tooltip-icon', 'data-toggle' => 'tooltip', title: 'Library Record')
else
""
end
content_tag :span, '', class: "geoblacklight-icon geoblacklight-#{type.downcase}"
end

def layer_institution_image(institution)
case institution
when /Stanford/
image_tag('geoblacklight/src_stanford.png', 'data-toggle' => 'tooltip', title: 'Stanford', :class => 'tooltip-icon')
when /Berkeley/
image_tag('geoblacklight/src_berkeley.png', 'data-toggle' => 'tooltip', title: 'UC Berkeley', :class => 'tooltip-icon')
when /Harvard/
image_tag('geoblacklight/src_harvard.png', 'data-toggle' => 'tooltip', title: 'Harvard', :class => 'tooltip-icon')
when /MIT/
image_tag('geoblacklight/src_mit.png', 'data-toggle' => 'tooltip', title: 'MIT', :class => 'tooltip-icon')
when /Tufts/
image_tag('geoblacklight/src_tufts.png', 'data-toggle' => 'tooltip', title: 'Tufts', :class => 'tooltip-icon')
when /MassGIS/
image_tag('geoblacklight/src_massgis.png', 'data-toggle' => 'tooltip', title: 'MassGIS', :class => 'tooltip-icon')
else
""
end
content_tag :span, '', class: "geoblacklight-icon geoblacklight-#{institution.downcase}"
end

def layer_access_image(access)
case access
when 'Restricted'
content_tag(:i, '', class: 'fa fa-lock fa-lg text-muted tooltip-icon', 'data-toggle' => 'tooltip', title: 'Restricted')
content_tag(:i, '', class: 'fa fa-lock fa-lg text-muted tooltip-icon', 'data-toggle' => 'tooltip', title: 'Restricted', style: 'width: 17px;')
when 'Public'
content_tag(:i, '', class: 'fa fa-unlock fa-lg text-muted tooltip-icon', 'data-toggle' => 'tooltip', title: 'Public')
else
Expand Down

0 comments on commit 8a8b3eb

Please sign in to comment.