Browse Source

New logo and font and a few other minor things

development
Godwin 10 years ago
parent
commit
623445411a
  1. BIN
      app/assets/images/favicon.ico
  2. 1
      app/assets/images/icons.svg
  3. 12
      app/assets/javascripts/application.js.coffee
  4. 9
      app/assets/stylesheets/foundation_and_overrides.scss
  5. 1
      app/assets/stylesheets/sass/_base.scss
  6. 20
      app/assets/stylesheets/sass/_layout.scss
  7. 4
      app/assets/stylesheets/sass/_typography.scss
  8. 21
      app/helpers/application_helper.rb
  9. 2
      app/views/conferences/_header.html.haml
  10. 11
      app/views/layouts/application.html.haml
  11. 2
      app/views/organizations/index.html.haml
  12. 3
      app/views/organizations/show.html.haml
  13. 6
      app/views/shared/_navbar.html.haml

BIN
app/assets/images/favicon.ico

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

1
app/assets/images/icons.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 17 KiB

12
app/assets/javascripts/application.js.coffee

@ -163,12 +163,12 @@ startTranslating = ($td) ->
return
$ ->
trial = document.createElement('script');
trial.type = 'text/javascript';
trial.async = true;
trial.src = 'http://easy.myfonts.net/v2/js?sid=158991(font-family=Scotch+Modern+Bold)&sid=174040(font-family=Scotch+Micro)&key=WPfecRji9L';
head = document.getElementsByTagName("head")[0];
head.appendChild(trial);
#trial = document.createElement('script');
#trial.type = 'text/javascript';
#trial.async = true;
#trial.src = 'http://easy.myfonts.net/v2/js?sid=158991(font-family=Scotch+Modern+Bold)&sid=174040(font-family=Scotch+Micro)&key=WPfecRji9L';
#head = document.getElementsByTagName("head")[0];
#head.appendChild(trial);
#$(document).foundation();
$('.field.country-select select').change () ->
$country = $(this)

9
app/assets/stylesheets/foundation_and_overrides.scss

@ -47,7 +47,7 @@ $header-font-weight: bold;
// $header-bottom-margin: .5rem;
// $header-text-rendering: optimizeLegibility;
$color-1: #00ACEE; // blue
$color-1: #00ADEF; // blue
$color-2: #A0C700; // green
$color-3: #F11845; // pink
$color-4: #FFCC00; // yellow
@ -65,7 +65,8 @@ $gray: #E1E1E1;
// We use these to control various global styles
$body-bg: $white;
$body-font-color: $black;
$body-font-family: 'Scotch Micro', serif;
//$body-font-family: 'Scotch Micro', serif;
$body-font-family: 'Source Sans Pro', sans-serif;
// $body-font-weight: normal;
// $body-font-style: normal;
@ -1130,8 +1131,8 @@ $include-open-sans: false;
// We use these to style paragraphs
// $paragraph-font-family: inherit;
// $paragraph-font-weight: normal;
// $paragraph-font-size: 1rem;
// $paragraph-line-height: 1.6;
$paragraph-font-size: 1.4rem;
$paragraph-line-height: 1.5;
// $paragraph-margin-bottom: rem-calc(20);
// $paragraph-aside-font-size: rem-calc(14);
// $paragraph-aside-line-height: 1.35;

1
app/assets/stylesheets/sass/_base.scss

@ -216,6 +216,7 @@ ul.tags,
max-width: 90%;
max-height: 66.667%;
z-index: 1;
-webkit-transform: translate3d(0,0,0);
}
}

20
app/assets/stylesheets/sass/_layout.scss

@ -26,6 +26,7 @@ body {
.button {
width: 29%;
margin: 0;
clear: left;
&.logo {
background-color: $white;
@ -33,14 +34,22 @@ body {
border: 0;
padding: 0;
vertical-align: top;
overflow: auto;
/*svg {
float: left;
width: 50%;
}*/
.logo {
width: auto;
height: 2.4em;
fill: $primary-color;
}
.logo-text {
display: none;
fill: $black;
}
&:hover {
@ -72,19 +81,24 @@ body {
margin: 0 0 1.25rem;
&.logo {
position: relative;
width: 100%;
margin-bottom: 2em;
.logo {
float: left;
width: 40%;
width: 51%;
height: 100%;
margin-right: 5%;
}
img.logo {
height: auto;
margin-right: 10%;
}
.logo-text {
display: block;
width: 50%;
width: 44%;
}
}
}

4
app/assets/stylesheets/sass/_typography.scss

@ -528,3 +528,7 @@ input:-webkit-autofill {
}
}
}
svg {
height: 0%;
}

21
app/helpers/application_helper.rb

@ -409,6 +409,27 @@ module ApplicationHelper
end
end
def hash_to_html_attributes(hash, prefix = '')
attributes = ''
if hash
hash.each { |k,v|
k = k.to_s
if v
if v.is_a?(Hash)
attributes += hash_to_html_attributes(v, 'data-')
else
attributes += " #{k}=\"" + (v.is_a?(Array) ? v.join(' ') : v) + '"'
end
end
}
end
attributes
end
def icon(id, attributes = nil)
('<svg' + hash_to_html_attributes(attributes) + '><use xlink:href="/assets/icons.svg#bb-icon-' + id + '"></use></svg>').html_safe
end
private
def _form_field(type, name, value, options)
if type == 'check_box'

2
app/views/conferences/_header.html.haml

@ -11,7 +11,7 @@
%h1='Bike!Bike! '+@conference.start_date.year.to_s
%h2
- location = @conference.organizations.first.locations.first
= location.city + ', ' + (location.territory || location.country)
= location.city + ', ' + (location.territory ? Carmen::Country.coded(location.country).subregions.coded(location.territory).name : location.country)
%em
= (l @conference.start_date, format: :date) + ' - ' + (l @conference.end_date, format: :date)
- if params['controller'] != 'conferences'

11
app/views/layouts/application.html.haml

@ -10,12 +10,11 @@
/[if lt IE 9]
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
/ Le styles
= stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Ubuntu:400,500,700',
'application',
media: 'all'
= stylesheet_link_tag 'http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic', 'application', media: 'all'
/ Touch icons
%link{ href: asset_path('favicon.ico'), rel: 'shortcut icon', type: 'image/x-icon' }
%link{ href: asset_path('favicon.ico'), rel: 'icon', type: 'image/x-icon' }
%link{ href: asset_path('apple-touch-icon.png'), rel: 'apple-touch-icon' }
%link{ href: asset_path('apple-touch-icon-72x72.png'), rel: 'apple-touch-icon', sizes: '72x72' }
%link{ href: asset_path('apple-touch-icon-114x114.png'), rel: 'apple-touch-icon', sizes: '114x114' }
@ -25,13 +24,13 @@
Le javascript
\==================================================
/ Placed at the top of the document 'cause of turbolinks
= javascript_include_tag '//use.typekit.net/iqv7hcg.js'
=# javascript_include_tag '//use.typekit.net/iqv7hcg.js'
= javascript_include_tag 'application'
= javascript_include_tag 'nested_form'
%body{ class: (yield_or_default :page_style) }
:javascript
var b=document.getElementsByTagName('HTML')[0];b.className+=' '+(window.getComputedStyle(document.body).backgroundBlendMode?'':'no-')+'blend-modes';</script>
document.getElementsByTagName('HTML')[0].className+=' '+(window.getComputedStyle(document.body).backgroundBlendMode?'':'no-')+'blend-modes'
-#= render 'shared/translation_control'
%main

2
app/views/organizations/index.html.haml

@ -15,7 +15,7 @@
%ul.small-block-grid-1.medium-block-grid-2.large-block-grid-3.org-list.preview-list
- uri = CGI::escape(city+' '+country)
%li.city
%figure{:style => "background-image: url('http://maps.googleapis.com/maps/api/staticmap?center=#{uri}&zoom=4&size=600x300&maptype=roadmap&markers=size:small%7C#{uri}&key=AIzaSyDhfT68lGTwJHoUfC02fmA1SYNexO19J3M');"}
%figure{:style => "background-image: url('http://maps.googleapis.com/maps/api/staticmap?center=#{uri}&zoom=4&size=600x300&maptype=roadmap&markers=size:small%7C#{uri}&key=AIzaSyAH7U8xUUb8IwDPy1wWuYGprzxf4E1Jj4o');"}
%h4=city
- organizations.each do |organization|
%li=render 'preview', :organization => organization

3
app/views/organizations/show.html.haml

@ -7,7 +7,8 @@
= image_tag(@organization.avatar.url)
.columns.info{:class => (@organization.avatar.is_landscape? ? nil : ['medium-6', 'medium-pull-6'])}
%h1=@organization.name
%h2=@organization.locations[0].city + (@organization.locations[0].territory ? ' ' + @organization.locations[0].territory : '') + ', ' + Carmen::Country.coded(@organization.locations[0].country).name
- territory = Carmen::Country.coded(@organization.locations[0].country).subregions.coded(@organization.locations[0].territory)
%h2=@organization.locations[0].city + (territory ? ' ' + territory.name : '') + ', ' + Carmen::Country.coded(@organization.locations[0].country).name
%p#notice= notice

6
app/views/shared/_navbar.html.haml

@ -1,7 +1,9 @@
%nav#main-nav
= link_to '/', :class => ['button', 'logo'] do
= image_tag('logo.png', class: 'logo')
= image_tag('logo-text.png', class: 'logo-text')
=# image_tag('logo.png', class: 'logo')
=# image_tag('logo-text.png', class: 'logo-text')
= icon('logo', {:class => 'logo'})
= icon('logo-text', {:class => 'logo-text'})
= link_to (_'Conferences'), :conferences, {:class => ['button', 'conference']}
= link_to (_'Organizations'), {:controller => :organizations}, {:class => ['button', 'organization']}
= link_to (_'Zine'), 'http://zinezine.bikebike.org', :class => ['button', 'article']

Loading…
Cancel
Save