Commit 604ffb44 authored by Benjamin Neff's avatar Benjamin Neff Committed by Jonne Haß

optimized sprites

- move mobile icons to mobile-folder, so they aren't included in the
  icons-sprite
- move logos to branding/logos, and create a logos-sprite without the
  big other branding-images
- delete duplicate images

closes #6004
parent 247e9efe
......@@ -40,6 +40,7 @@ public/500.html
# Sprites
app/assets/images/branding-*.png
app/assets/images/branding/logos-*.png
app/assets/images/icons-*.png
app/assets/images/social_media_logos-*.png
......
......@@ -19,6 +19,7 @@
* Improve the logging of Eyes output [#5989](https://github.com/diaspora/diaspora/pull/5989)
* Gracefully handle XML parse errors within federation [#5991](https://github.com/diaspora/diaspora/pull/5991)
* Remove zip-zip workaround gem [#6001](https://github.com/diaspora/diaspora/pull/6001)
* Cleanup and reorganize image assets [#6004](https://github.com/diaspora/diaspora/pull/6004)
## Bug fixes
* Disable auto follow back on aspect deletion [#5846](https://github.com/diaspora/diaspora/pull/5846)
......
......@@ -11,7 +11,7 @@ footer {
border-top: 1px solid $border-grey;
}
.branding-powered_by_diaspora {
.logos-powered_by_diaspora {
display: inline-block;
margin-top: 3px;
height: 11px;
......
......@@ -20,7 +20,7 @@ code {
body {
background: {
image: image-url('texture/hatched-light.jpg');
image: image-url("mobile/hatched-light.jpg");
position: fixed;
/* scale background image down for iOS retina display */
size: 200px;
......@@ -398,7 +398,7 @@ h3 {
right: 14px;
}
background: {
image: image-url("icons/arrow_down_small.png");
image: image-url("mobile/arrow_down_small.png");
position: center right;
repeat: no-repeat;
}
......@@ -486,23 +486,23 @@ h3 {
}
.reshare_action {
background-image: image-url("icons/reshare_mobile.png");
background-image: image-url("mobile/reshare_mobile.png");
&.active {
background-image: image-url("icons/reshare_mobile_active.png");
background-image: image-url("mobile/reshare_mobile_active.png");
}
}
.like_action {
background-image: image-url("icons/heart_mobile_grey.png");
background-image: image-url("mobile/heart_mobile_grey.png");
&.active {
background-image: image-url("icons/heart_mobile_red.png");
background-image: image-url("mobile/heart_mobile_red.png");
}
}
.comment_action.image_link {
background-image: image-url("icons/pencil_mobile_grey_active.png");
background-image: image-url("mobile/pencil_mobile_grey_active.png");
&.inactive {
background-image: image-url("icons/pencil_mobile_grey.png");
background-image: image-url("mobile/pencil_mobile_grey.png");
}
}
......
......@@ -3,7 +3,7 @@
#reset_password {
padding-top: 25px;
.branding-asterisk {
.logos-asterisk {
margin: auto;
width: 154px;
height: 154px;
......
/* ===== sprites ===== */
@import 'icons/*.png';
@import 'branding/*.png';
@import 'branding/logos/*.png';
@import 'social_media_logos/*.png';
@include all-icons-sprites;
@include all-branding-sprites;
@include all-logos-sprites;
@include all-social_media_logos-sprites;
<div class="container" style="position:relative;">
<a href="/stream">
<div alt="Logo_small" class="diaspora_header_logo branding-header-logo">
<div alt="logo" class="diaspora_header_logo logos-header-logo">
</div>
</a>
......
......@@ -52,7 +52,6 @@ module OpenGraphHelper
def og_page_post_tags(post)
tags = og_common_tags
if post.message
tags.concat [
*tags,
......@@ -63,7 +62,7 @@ module OpenGraphHelper
og_description(post.message.plain_text_without_markdown truncate: 1000)
]
end
tags.join("\n").html_safe
end
......@@ -96,10 +95,10 @@ module OpenGraphHelper
# This method compensates for hosting assets off of s3
def default_image_url
if image_path('asterisk.png').include?("http")
image_path('asterisk.png')
if image_path("branding/logos/asterisk.png").include?("http")
image_path("branding/logos/asterisk.png")
else
"#{root_url.chop}#{image_path('asterisk.png')}"
"#{root_url.chop}#{image_path('branding/logos/asterisk.png')}"
end
end
end
......@@ -7,7 +7,7 @@
.remove_comment
.right
- if user_signed_in? && comment.author == current_user.person
= link_to(image_tag('deletelabel.png'), comment_path(comment), :method => :delete, :data => { :confirm => "#{t('are_you_sure')}" }, :class => "remove")
= link_to(image_tag("mobile/deletelabel.png"), comment_path(comment), method: :delete, data: { confirm: "#{t('are_you_sure')}" }, class: "remove")
.from
= person_image_link(comment.author)
= person_link(comment.author)
......
......@@ -4,7 +4,7 @@
.conversation_participants
.right
= link_to(image_tag('deletelabel.png'), conversation_visibility_path(conversation), :method => 'delete', :data => { :confirm => "#{t('.delete')}?" }, :class => "remove")
= link_to(image_tag("mobile/deletelabel.png"), conversation_visibility_path(conversation), method: :delete, data: { confirm: "#{t('.delete')}?" }, class: "remove")
%h3{ :class => direction_for(conversation.subject) }
= conversation.subject
......
......@@ -4,7 +4,7 @@
#reset_password
.container-fluid
.text-center
.branding-asterisk
.logos-asterisk
%h1
= AppConfig.settings.pod_name
......
......@@ -4,7 +4,7 @@
#forgot_password
.container-fluid
.text-center
.branding-asterisk
.logos-asterisk
%h1
= AppConfig.settings.pod_name
......
......@@ -2,7 +2,7 @@
We're sorry, but something went wrong (500)
%header
= image_tag "branding/white2x.png", id: "diaspora_logo"
= image_tag "branding/logos/white2x.png", id: "diaspora_logo"
%h1
500: Internal server error.
......
......@@ -4,7 +4,7 @@
#page.container
%header#header
%a#login-link.btn{href: "login"} Log In
= image_tag "branding/logo.png"
= image_tag "branding/logos/logo.png"
#banner.row
%h1 Welcome, friend.
......@@ -15,7 +15,7 @@
%h2
Configure your
%abbr.helpful{title: "A Diaspora installation"} pod
= image_tag "icons/cog.png"
= image_tag "landing/cog.png"
%p
Look at
......@@ -28,7 +28,7 @@
.span4
%h2 Try it out
= image_tag "icons/smiley_laughing.png"
= image_tag "landing/smiley_laughing.png"
%p
Start by
......@@ -36,7 +36,7 @@
.span4
%h2 Make a contribution!
= image_tag "icons/pen_write.png"
= image_tag "landing/pen_write.png"
%p
Make Diaspora even better! Fork the project on
......
%footer
.container
.branding-powered_by_diaspora
.logos-powered_by_diaspora
%ul#footer_nav
= render :partial =>'shared/links'
......@@ -5,7 +5,7 @@
%header
- unless current_user
.container{style: "position:relative;"}
= link_to content_tag(:div, nil, class: 'diaspora_header_logo branding-header-logo'), root_path
= link_to content_tag(:div, nil, class: 'diaspora_header_logo logos-header-logo'), root_path
%ul#landing_nav
- if AppConfig.settings.enable_registrations? && !current_page?(controller: '/registrations', action: :new)
......
......@@ -54,21 +54,21 @@
#nav_badges
-# Notifications
= link_to notifications_path, class: "badge", id: "notification_badge" do
= image_tag('icons/notifications_white.png')
= image_tag("mobile/notifications_white.png")
- if current_user.unread_notifications.size > 0
%span.badge_count{id: "notification"}
= current_user.unread_notifications.size
-# Conversations
= link_to conversations_path, class: "badge", id: "conversations_badge" do
= image_tag('icons/mail_white.png', id: 'conversation_icon')
= image_tag("mobile/mail_white.png", id: "conversation_icon")
- if current_user.unread_message_count > 0
%span.badge_count{id: "conversation"}
= current_user.unread_message_count
-# Publisher
= link_to(image_tag('icons/compose_mobile.png'), new_status_message_path, class: "badge", id: "compose_badge")
= link_to(image_tag("mobile/compose_mobile.png"), new_status_message_path, class: "badge", id: "compose_badge")
-# Menu
= link_to(image_tag('icons/menu.png'), "#", id: "menu_badge", class: "badge")
= link_to(image_tag('icons/asterisk_white_mobile.png'), stream_path, id: 'header_title')
= link_to(image_tag("mobile/menu.png"), "#", id: "menu_badge", class: "badge")
= link_to(image_tag("mobile/asterisk_white_mobile.png"), stream_path, id: "header_title")
- if user_signed_in?
#drawer
......
......@@ -28,7 +28,7 @@
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:14px;color:#333;">
<tr>
<td style="text-align:center;padding:30px;">
<img src="<%=AppConfig.pod_uri.to_s %>assets/branding/logo_small.png" alt="diaspora*" width="59px" height="14px"/>
<img src="<%=AppConfig.pod_uri.to_s %>assets/branding/logos/logo_small.png" alt="diaspora*" width="59px" height="14px"/>
</td>
</tr>
</table>
......
......@@ -24,8 +24,8 @@
%tr
%td
- if previous_photo != additional_photos.last
= link_to(image_tag('arrow-left.png', :id => 'arrow-left'), person_photo_path(previous_photo.author, previous_photo), :rel => 'prefetch', :class => 'arrow', :id => 'left')
= link_to(image_tag("mobile/arrow-left.png", id: "arrow-left"), person_photo_path(previous_photo.author, previous_photo), rel: "prefetch", class: "arrow", id: "left")
%td{:width => '100%'}
%td
- if next_photo == additional_photos[additional_photos.index(photo)+1]
= link_to(image_tag('arrow-right.png', :id => 'arrow-right'), person_photo_path(next_photo.author, next_photo), :rel => 'prefetch', :class => 'arrow', :id => 'right')
= link_to(image_tag("mobile/arrow-right.png", id: "arrow-right"), person_photo_path(next_photo.author, next_photo), rel: "prefetch", class: "arrow", id: "right")
......@@ -22,14 +22,14 @@
- current_user.aspects.each do |aspect|
%option{:value => aspect.id}
= #{aspect.name}"
.clear
#publisher_textarea_wrapper
%ul#photodropzone
#fileInfo-publisher
#file-upload-publisher{:title => t('shared.publisher.upload_photos'), :class => 'btn'}
= image_tag 'icons/camera.png', alt: t('shared.publisher.upload_photos').titleize
= image_tag "mobile/camera.png", alt: t("shared.publisher.upload_photos").titleize
#publisher_mobile
= submit_tag t('shared.publisher.share'), :class => 'btn primary', :id => "submit_new_message"
......
......@@ -17,7 +17,7 @@
= form_for(resource, :as => resource_name, :html => {:class => 'new_user_form'}, :url => registration_path(resource_name)) do |f|
%fieldset
%legend
= image_tag('branding/header-logo2x.png', :height => 40, :width => 40)
= image_tag("branding/logos/header-logo2x.png", height: 40, width: 40)
= t('aspects.aspect_stream.make_something')
.control-group
......
......@@ -3,7 +3,7 @@
.container-fluid#login
.text-center
.branding-asterisk
.logos-asterisk
%h1
= AppConfig.settings.pod_name
......
......@@ -21,7 +21,7 @@
= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
%fieldset
%legend
= image_tag('branding/header-logo2x.png', :height => 40, :width => 40)
= image_tag("branding/logos/header-logo2x.png", height: 40, width: 40)
= t('devise.sessions.new.login')
.control-group
......
......@@ -8,7 +8,7 @@
.remove_post
- if user_signed_in? && post.author == current_user.person
= link_to(image_tag('deletelabel.png'), post_path(post), :method => :delete, :data => { :confirm => "#{t('are_you_sure')}" }, :class => "remove")
= link_to(image_tag("mobile/deletelabel.png"), post_path(post), method: :delete, data: { confirm: "#{t('are_you_sure')}" }, class: "remove")
.info
%span
......
......@@ -15,7 +15,7 @@
%li.comment.add_comment_bottom_link_container
= link_to "#", class: "show_comments bottom_collapse active" do
= image_tag "icons/arrow_up_small.png"
- if user_signed_in?
= link_to t("comments.new_comment.comment"), new_post_comment_path(@post), class: "add_comment_bottom_link btn comment_action inactive"
\ No newline at end of file
= image_tag "mobile/arrow_up_small.png"
- if user_signed_in?
= link_to t("comments.new_comment.comment"), new_post_comment_path(@post), class: "add_comment_bottom_link btn comment_action inactive"
......@@ -61,7 +61,7 @@
= text_field_tag 'profile[first_name]', current_user.first_name
= image_tag 'ajax-loader.gif', :id => "gs-name-form-spinner", :class => "hidden"
%span.saved{:class => "hidden"}
= image_tag 'icons/check_yes_ok.png'
= image_tag "mobile/check_yes_ok.png"
= t(".saved")
= label_tag :your_photo, t('profiles.edit.your_photo'), :class => "bootstrapped"
......@@ -77,7 +77,7 @@
%fieldset
= label_tag 'follow_tags', t('.hashtag_suggestions'), :class => "bootstrapped"
= text_field_tag 'follow_tags', nil, :class => "nostrap"
.center
= link_to "#{t('.awesome_take_me_to_diaspora')} »", stream_path, :id => "awesome_button", :class => "button creation"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment