Skip to content

Commit

Permalink
Set fixed height of tile in photos stream, fix diaspora#6809
Browse files Browse the repository at this point in the history
  • Loading branch information
Flaburgan committed Aug 8, 2016
1 parent 5f3e4fc commit eaaefed
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 41 deletions.
31 changes: 27 additions & 4 deletions app/assets/stylesheets/stream_element.scss
Expand Up @@ -18,7 +18,6 @@
overflow: inherit;
> .control-icons {
border-radius: 4px;
padding-left: 5px;
position: absolute;
right: 6px;
text-align: center;
Expand All @@ -28,12 +27,36 @@
&:hover > .bd > .control-icons { background: $white; }
}
.thumbnail {
padding: 10px;
margin: 0 0 15px;
background: $white;
border-radius: 0;
box-shadow: $card-shadow;
img.big_photo { max-height: 200px; }
height: 240px;
margin: 0 0 15px;
padding: 10px;

// Vertically align the image
text-align: center;
white-space: nowrap;

&:hover,
&:focus,
&:active {
border-color: $light-grey;
}

&::before {
content: '';
display: inline-block;
height: 100%;
vertical-align: middle;
}

.big-photo {
display: inline;
max-height: 200px;
vertical-align: middle;
margin-left: -4px;
}
}
}

Expand Down
8 changes: 3 additions & 5 deletions app/assets/templates/photo_tpl.jst.hbs
Expand Up @@ -20,11 +20,9 @@
</div>
{{/if}}

<div class="thumbnail img-thumbnail">
<a href="{{sizes.large}}" class="photo-link gallery-picture">
<img src="{{sizes.large}}" class="photo big_photo">
</a>
</div>
<a href="{{sizes.large}}" class="thumbnail img-thumbnail photo-link gallery-picture">
<img src="{{sizes.large}}" class="photo big-photo">
</a>
</div>
<div class="card-footer">
<div class="footer-container">
Expand Down
88 changes: 56 additions & 32 deletions db/schema.rb
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20160618033455) do
ActiveRecord::Schema.define(version: 20160807212443) do

create_table "account_deletions", force: :cascade do |t|
t.string "diaspora_handle", limit: 255
Expand Down Expand Up @@ -100,12 +100,21 @@
t.datetime "created_at", null: false
end

create_table "comment_signatures", id: false, force: :cascade do |t|
t.integer "comment_id", limit: 4, null: false
t.text "author_signature", limit: 65535, null: false
t.integer "signature_order_id", limit: 4, null: false
t.text "additional_data", limit: 65535
end

add_index "comment_signatures", ["comment_id"], name: "index_comment_signatures_on_comment_id", unique: true, using: :btree
add_index "comment_signatures", ["signature_order_id"], name: "comment_signatures_signature_orders_id_fk", using: :btree

create_table "comments", force: :cascade do |t|
t.text "text", limit: 65535, null: false
t.integer "commentable_id", limit: 4, null: false
t.integer "author_id", limit: 4, null: false
t.string "guid", limit: 255, null: false
t.text "author_signature", limit: 65535
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "likes_count", limit: 4, default: 0, null: false
Expand Down Expand Up @@ -186,15 +195,24 @@
add_index "invitations", ["recipient_id"], name: "index_invitations_on_recipient_id", using: :btree
add_index "invitations", ["sender_id"], name: "index_invitations_on_sender_id", using: :btree

create_table "like_signatures", id: false, force: :cascade do |t|
t.integer "like_id", limit: 4, null: false
t.text "author_signature", limit: 65535, null: false
t.integer "signature_order_id", limit: 4, null: false
t.text "additional_data", limit: 65535
end

add_index "like_signatures", ["like_id"], name: "index_like_signatures_on_like_id", unique: true, using: :btree
add_index "like_signatures", ["signature_order_id"], name: "like_signatures_signature_orders_id_fk", using: :btree

create_table "likes", force: :cascade do |t|
t.boolean "positive", default: true
t.integer "target_id", limit: 4
t.integer "author_id", limit: 4
t.string "guid", limit: 255
t.text "author_signature", limit: 65535
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "target_type", limit: 60, null: false
t.boolean "positive", default: true
t.integer "target_id", limit: 4
t.integer "author_id", limit: 4
t.string "guid", limit: 255
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "target_type", limit: 60, null: false
end

add_index "likes", ["author_id"], name: "likes_author_id_fk", using: :btree
Expand Down Expand Up @@ -394,12 +412,21 @@
add_index "poll_answers", ["guid"], name: "index_poll_answers_on_guid", unique: true, length: {"guid"=>191}, using: :btree
add_index "poll_answers", ["poll_id"], name: "index_poll_answers_on_poll_id", using: :btree

create_table "poll_participation_signatures", id: false, force: :cascade do |t|
t.integer "poll_participation_id", limit: 4, null: false
t.text "author_signature", limit: 65535, null: false
t.integer "signature_order_id", limit: 4, null: false
t.text "additional_data", limit: 65535
end

add_index "poll_participation_signatures", ["poll_participation_id"], name: "index_poll_participation_signatures_on_poll_participation_id", unique: true, using: :btree
add_index "poll_participation_signatures", ["signature_order_id"], name: "poll_participation_signatures_signature_orders_id_fk", using: :btree

create_table "poll_participations", force: :cascade do |t|
t.integer "poll_answer_id", limit: 4, null: false
t.integer "author_id", limit: 4, null: false
t.integer "poll_id", limit: 4, null: false
t.string "guid", limit: 255
t.text "author_signature", limit: 65535
t.integer "poll_answer_id", limit: 4, null: false
t.integer "author_id", limit: 4, null: false
t.integer "poll_id", limit: 4, null: false
t.string "guid", limit: 255
t.datetime "created_at"
t.datetime "updated_at"
end
Expand All @@ -423,31 +450,17 @@
t.integer "author_id", limit: 4, null: false
t.boolean "public", default: false, null: false
t.string "guid", limit: 255, null: false
t.boolean "pending", default: false, null: false
t.string "type", limit: 40, null: false
t.text "text", limit: 65535
t.text "remote_photo_path", limit: 65535
t.string "remote_photo_name", limit: 255
t.string "random_string", limit: 255
t.string "processed_image", limit: 255
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "unprocessed_image", limit: 255
t.string "object_url", limit: 255
t.string "image_url", limit: 255
t.integer "image_height", limit: 4
t.integer "image_width", limit: 4
t.string "provider_display_name", limit: 255
t.string "actor_url", limit: 255
t.string "objectId", limit: 255
t.string "root_guid", limit: 255
t.string "status_message_guid", limit: 255
t.integer "likes_count", limit: 4, default: 0
t.integer "comments_count", limit: 4, default: 0
t.integer "o_embed_cache_id", limit: 4
t.integer "reshares_count", limit: 4, default: 0
t.datetime "interacted_at"
t.string "frame_name", limit: 255
t.string "facebook_id", limit: 255
t.string "tweet_id", limit: 255
t.integer "open_graph_cache_id", limit: 4
Expand All @@ -458,11 +471,9 @@
add_index "posts", ["author_id"], name: "index_posts_on_person_id", using: :btree
add_index "posts", ["guid"], name: "index_posts_on_guid", unique: true, length: {"guid"=>191}, using: :btree
add_index "posts", ["id", "type", "created_at"], name: "index_posts_on_id_and_type_and_created_at", using: :btree
add_index "posts", ["id", "type"], name: "index_posts_on_id_and_type", using: :btree
add_index "posts", ["root_guid"], name: "index_posts_on_root_guid", length: {"root_guid"=>191}, using: :btree
add_index "posts", ["status_message_guid", "pending"], name: "index_posts_on_status_message_guid_and_pending", length: {"status_message_guid"=>190, "pending"=>nil}, using: :btree
add_index "posts", ["status_message_guid"], name: "index_posts_on_status_message_guid", length: {"status_message_guid"=>191}, using: :btree
add_index "posts", ["tweet_id"], name: "index_posts_on_tweet_id", length: {"tweet_id"=>191}, using: :btree
add_index "posts", ["type", "pending", "id"], name: "index_posts_on_type_and_pending_and_id", using: :btree

create_table "ppid", force: :cascade do |t|
t.integer "o_auth_application_id", limit: 4
Expand Down Expand Up @@ -557,6 +568,12 @@
add_index "share_visibilities", ["shareable_id"], name: "index_post_visibilities_on_post_id", using: :btree
add_index "share_visibilities", ["user_id"], name: "index_share_visibilities_on_user_id", using: :btree

create_table "signature_orders", force: :cascade do |t|
t.string "order", limit: 255, null: false
end

add_index "signature_orders", ["order"], name: "index_signature_orders_on_order", unique: true, length: {"order"=>191}, using: :btree

create_table "simple_captcha_data", force: :cascade do |t|
t.string "key", limit: 40
t.string "value", limit: 12
Expand Down Expand Up @@ -662,6 +679,8 @@
add_foreign_key "aspect_visibilities", "aspects", name: "aspect_visibilities_aspect_id_fk", on_delete: :cascade
add_foreign_key "authorizations", "o_auth_applications"
add_foreign_key "authorizations", "users"
add_foreign_key "comment_signatures", "comments", name: "comment_signatures_comment_id_fk", on_delete: :cascade
add_foreign_key "comment_signatures", "signature_orders", name: "comment_signatures_signature_orders_id_fk"
add_foreign_key "comments", "people", column: "author_id", name: "comments_author_id_fk", on_delete: :cascade
add_foreign_key "contacts", "people", name: "contacts_person_id_fk", on_delete: :cascade
add_foreign_key "conversation_visibilities", "conversations", name: "conversation_visibilities_conversation_id_fk", on_delete: :cascade
Expand All @@ -670,17 +689,22 @@
add_foreign_key "id_tokens", "authorizations"
add_foreign_key "invitations", "users", column: "recipient_id", name: "invitations_recipient_id_fk", on_delete: :cascade
add_foreign_key "invitations", "users", column: "sender_id", name: "invitations_sender_id_fk", on_delete: :cascade
add_foreign_key "like_signatures", "likes", name: "like_signatures_like_id_fk", on_delete: :cascade
add_foreign_key "like_signatures", "signature_orders", name: "like_signatures_signature_orders_id_fk"
add_foreign_key "likes", "people", column: "author_id", name: "likes_author_id_fk", on_delete: :cascade
add_foreign_key "messages", "conversations", name: "messages_conversation_id_fk", on_delete: :cascade
add_foreign_key "messages", "people", column: "author_id", name: "messages_author_id_fk", on_delete: :cascade
add_foreign_key "notification_actors", "notifications", name: "notification_actors_notification_id_fk", on_delete: :cascade
add_foreign_key "o_auth_access_tokens", "authorizations"
add_foreign_key "o_auth_applications", "users"
add_foreign_key "people", "pods", name: "people_pod_id_fk", on_delete: :cascade
add_foreign_key "poll_participation_signatures", "poll_participations", name: "poll_participation_signatures_poll_participation_id_fk", on_delete: :cascade
add_foreign_key "poll_participation_signatures", "signature_orders", name: "poll_participation_signatures_signature_orders_id_fk"
add_foreign_key "posts", "people", column: "author_id", name: "posts_author_id_fk", on_delete: :cascade
add_foreign_key "ppid", "o_auth_applications"
add_foreign_key "ppid", "users"
add_foreign_key "profiles", "people", name: "profiles_person_id_fk", on_delete: :cascade
add_foreign_key "services", "users", name: "services_user_id_fk", on_delete: :cascade
add_foreign_key "share_visibilities", "users", name: "share_visibilities_user_id_fk", on_delete: :cascade
end

0 comments on commit eaaefed

Please sign in to comment.