Merge pull request #6218 from svbergerem/mobile-entypo

Entypo on mobile website
This commit is contained in:
Jonne Haß 2015-07-22 00:11:14 +02:00
commit d6587469e4
9 changed files with 36 additions and 46 deletions

View file

@ -40,6 +40,7 @@ With the port to Bootstrap 3, app/views/terms/default.haml has a new structure.
* Replace remaining faceboxes with Bootstrap modals [#6106](https://github.com/diaspora/diaspora/pull/6106) [#6161](https://github.com/diaspora/diaspora/pull/6161) * Replace remaining faceboxes with Bootstrap modals [#6106](https://github.com/diaspora/diaspora/pull/6106) [#6161](https://github.com/diaspora/diaspora/pull/6161)
* Rewrite header using Bootstrap 3 [#6109](https://github.com/diaspora/diaspora/pull/6109) [#6130](https://github.com/diaspora/diaspora/pull/6130) [#6132](https://github.com/diaspora/diaspora/pull/6132) * Rewrite header using Bootstrap 3 [#6109](https://github.com/diaspora/diaspora/pull/6109) [#6130](https://github.com/diaspora/diaspora/pull/6130) [#6132](https://github.com/diaspora/diaspora/pull/6132)
* Use upstream CSS mappings for Entypo [#6158](https://github.com/diaspora/diaspora/pull/6158) * Use upstream CSS mappings for Entypo [#6158](https://github.com/diaspora/diaspora/pull/6158)
* Replace some mobile icons with Entypo [#6218](https://github.com/diaspora/diaspora/pull/6218)
## Bug fixes ## Bug fixes
* Destroy Participation when removing interactions with a post [#5852](https://github.com/diaspora/diaspora/pull/5852) * Destroy Participation when removing interactions with a post [#5852](https://github.com/diaspora/diaspora/pull/5852)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -292,29 +292,22 @@ h3 { margin-top: 0; }
} }
#photo_controls { #photo_controls {
margin-bottom: 5px; .arrow {
} font-size: 10em;
text-decoration: none;
.arrow { text-shadow: 0 0 3px $white;
color: white !important;
font-size: 26pt;
text: {
shadow: 0 1px 2px #333;
decoration: none; };
padding: 0;
position: fixed; position: fixed;
bottom: 10%; bottom: -0.2em;
z-index: 1; z-index: 1;
height: 50px; &.left {
width: 50px; left: -0.2em;
} }
&.right {
#left.arrow { right: -0.2em;
left: 5%; text-align: right;
} }
.entypo-chevron-left, .entypo-chevron-right { margin-right: 0; }
#right.arrow{ }
right: 5%;
} }
.header-full-width { .header-full-width {
@ -931,10 +924,7 @@ select#aspect_ids_ {
float: left; float: left;
padding: 3px 12px; padding: 3px 12px;
cursor: pointer; cursor: pointer;
.entypo-camera { margin-right: 0; }
&:hover img {
opacity: 0.4;
}
} }
#publisher_textarea_wrapper { #publisher_textarea_wrapper {

View file

@ -20,12 +20,13 @@
-if additional_photos && additional_photos.length > 1 -if additional_photos && additional_photos.length > 1
#photo_controls #photo_controls
%table
%tr
%td
- if previous_photo != additional_photos.last - if previous_photo != additional_photos.last
= 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") = link_to(content_tag(:i, nil, id: "arrow-left", class: "entypo-chevron-left"),
%td{:width => '100%'} person_photo_path(previous_photo.author, previous_photo),
%td rel: "prefetch",
class: "arrow left")
- if next_photo == additional_photos[additional_photos.index(photo)+1] - if next_photo == additional_photos[additional_photos.index(photo)+1]
= 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") = link_to(content_tag(:i, nil, id: "arrow-right", class: "entypo-chevron-right"),
person_photo_path(next_photo.author, next_photo),
rel: "prefetch",
class: "arrow right")

View file

@ -30,7 +30,7 @@
#fileInfo-publisher #fileInfo-publisher
#file-upload-publisher{title: t('shared.publisher.upload_photos'), class: 'btn btn-default'} #file-upload-publisher{title: t('shared.publisher.upload_photos'), class: 'btn btn-default'}
= image_tag "mobile/camera.png", alt: t("shared.publisher.upload_photos").titleize %i.entypo-camera.middle
#publisher_mobile #publisher_mobile
= submit_tag t('shared.publisher.share'), class: 'btn btn-primary', id: "submit_new_message" = submit_tag t('shared.publisher.share'), class: 'btn btn-primary', id: "submit_new_message"
.clearfix .clearfix

View file

@ -59,10 +59,6 @@
%fieldset %fieldset
= label_tag 'profile[first_name]', t('profiles.edit.your_name'), class: "bootstrapped" = label_tag 'profile[first_name]', t('profiles.edit.your_name'), class: "bootstrapped"
= text_field_tag 'profile[first_name]', current_user.first_name = text_field_tag 'profile[first_name]', current_user.first_name
= image_tag 'ajax-loader2.gif', id: "gs-name-form-spinner", class: "hidden"
%span.saved{class: "hidden"}
= image_tag "mobile/check_yes_ok.png"
= t(".saved")
.clearfix.visible-xs-block .clearfix.visible-xs-block
= label_tag :your_photo, t('profiles.edit.your_photo'), class: "bootstrapped" = label_tag :your_photo, t('profiles.edit.your_photo'), class: "bootstrapped"
= render 'photos/new_profile_photo', aspect: :getting_started, person: current_user.person = render 'photos/new_profile_photo', aspect: :getting_started, person: current_user.person

View file

@ -15,7 +15,8 @@ Feature: viewing photos on the mobile main page
When I press "Share" When I press "Share"
And I click on selector "img.stream-photo" And I click on selector "img.stream-photo"
Then I should see a "img" within "#show_content" Then I should see a "img" within "#show_content"
And I should not see a "#right" within "#main" And I should not see a "#arrow-right" within "#main"
And I should not see a "#arrow-left" within "#main"
Scenario: view multiphoto post Scenario: view multiphoto post
Given I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload-publisher" Given I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload-publisher"
@ -25,8 +26,9 @@ Feature: viewing photos on the mobile main page
Then I should see "+ 1" within ".additional_photo_count" Then I should see "+ 1" within ".additional_photo_count"
When I click on selector "img.stream-photo" When I click on selector "img.stream-photo"
Then I should see a "#right" within "tbody" Then I should see a "#arrow-right" within "#main"
And I should not see a "#arrow-left" within "#main"
When I click on selector "img#arrow-right" When I click on selector "#arrow-right"
And I should see a "#left" within "tbody" Then I should see a "#arrow-left" within "#main"
And I should not see a "#right" within "tbody" And I should not see a "#arrow-right" within "#main"