Skip to content

Commit

Permalink
layout fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lisovskey committed May 29, 2018
1 parent 07aff25 commit 49f4869
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 32 deletions.
41 changes: 27 additions & 14 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ h1, h2, h3, h4, h5, h6 {
margin-top: 0;
}

.modal input {
color: #333 !important;
}

.vend-align {
display: flex;
align-items: flex-end;
Expand Down Expand Up @@ -198,6 +202,10 @@ i.material-icons.left {
margin: 0 auto;
}

.datepicker-table td.is-selected {
background-color: $border-color;
}

input[type=number] {
-moz-appearance: none;
-webkit-appearance: none;
Expand Down Expand Up @@ -317,24 +325,29 @@ input[type=number] {
margin: 0 !important;
}

& .card-content {
& .card-content, & .card-reveal {
padding: 20px 24px;
}

& .card-nav i, & .card-reveal i {
line-height: 32px;
cursor: pointer;
}

& .card-nav {
margin-bottom: 8px;
display: flex;
}

& .card-title {
display: flex !important;
margin-bottom: 8px;
font-size: 20px;
width: 100%;
color: inherit;
cursor: initial !important;

& .card-title-text {
width: 100%;
color: inherit;
}

& i:not(.pay) {
line-height: 32px;
cursor: pointer;
}

& .btn-floating {
overflow: initial;
}
}

& .card-progress {
Expand Down Expand Up @@ -369,7 +382,7 @@ input[type=number] {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
height: 4.3em;
height: 4.4em;
/* autoprefixer: off */
-webkit-box-orient: vertical;
box-orient: vertical;
Expand Down
9 changes: 5 additions & 4 deletions app/views/cards/_card.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
%a.card-image{:href => project_path(project)}
.image{:style => "background-image: url('#{project.avatar_url.to_s}');"}
.card-content.fade-text
.card-nav
%a.card-title.truncate{:href => project_path(project)}
.card-title
%a.card-title-text.truncate{:href => project_path(project)}
= project.name
%span.activator.right
%i.material-icons more_vert
Expand All @@ -31,8 +31,9 @@
%b= remain(project)
= t('project.remains')
.card-reveal
%span.card-title.truncate
= project.name
%span.card-title
.card-title-text.truncate
= project.name
%i.material-icons.right close
%p= project.description
.author.right-align
Expand Down
21 changes: 11 additions & 10 deletions app/views/projects/_reward.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
%div{:class => reward_class(project.finished)}
.card-upper
%span.card-title
= t('.from')
%b
= humanized_money_with_symbol reward.price
- unless project.finished
- if current_user
%a.btn-floating.waves-effect.waves-light.modal-trigger.right{:href => '#' << reward.price.to_s}
%i.material-icons attach_money
- else
%a.btn-floating.disabled.tooltipped.right{"data-position" => "bottom", "data-tooltip" => t('.not_authorized')}
%i.material-icons attach_money
.card-title-text.truncate
= t('.from')
%b
= humanized_money_with_symbol reward.price
- unless project.finished
- if current_user
%a.btn-floating.waves-effect.waves-light.modal-trigger.right{:href => '#' << reward.price.to_s}
%i.material-icons.pay attach_money
- else
%a.btn-floating.disabled.tooltipped.right{"data-position" => "bottom", "data-tooltip" => t('.not_authorized')}
%i.material-icons.pay attach_money
.card-content
%p= reward.description
- unless project.finished
Expand Down
2 changes: 1 addition & 1 deletion app/views/projects/new.haml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
%input.file-path{:type => "text", :id => "filename"}
%label{:for => "filename"}= t('.avatar')
.col.s12.m6.input-field
= f.text_field :expiration_time, class: 'datepicker', required: true
= f.text_field :expiration_time, class: 'datepicker', value: Date.today, required: true
= f.label :expiration_time, class: 'active'
.row
.col.s12
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20170902234207_create_projects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def change
t.monetize :balance, null: false, default: 0

t.text :full_description, null: false, default: ""
t.datetime :expiration_time, null: false, default: "11 September, 2001"
t.datetime :expiration_time

t.boolean :finished, null: false, default: false
t.boolean :successful
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This migration comes from active_storage (originally 20170806125915)
class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
def change
create_table :active_storage_blobs do |t|
t.string :key, null: false
t.string :filename, null: false
t.string :content_type
t.text :metadata
t.bigint :byte_size, null: false
t.string :checksum, null: false
t.datetime :created_at, null: false

t.index [ :key ], unique: true
end

create_table :active_storage_attachments do |t|
t.string :name, null: false
t.references :record, null: false, polymorphic: true, index: false
t.references :blob, null: false

t.datetime :created_at, null: false

t.index [ :record_type, :record_id, :name, :blob_id ], name: "index_active_storage_attachments_uniqueness", unique: true
end
end
end
25 changes: 23 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,32 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20180120121117) do
ActiveRecord::Schema.define(version: 2018_05_29_183843) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
t.bigint "record_id", null: false
t.bigint "blob_id", null: false
t.datetime "created_at", null: false
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
end

create_table "active_storage_blobs", force: :cascade do |t|
t.string "key", null: false
t.string "filename", null: false
t.string "content_type"
t.text "metadata"
t.bigint "byte_size", null: false
t.string "checksum", null: false
t.datetime "created_at", null: false
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
end

create_table "categories", force: :cascade do |t|
t.string "name"
t.datetime "created_at", null: false
Expand Down Expand Up @@ -90,7 +111,7 @@
t.integer "balance_cents", default: 0, null: false
t.string "balance_currency", default: "BTC", null: false
t.text "full_description", default: "", null: false
t.datetime "expiration_time", default: "2001-09-11 00:00:00", null: false
t.datetime "expiration_time"
t.boolean "finished", default: false, null: false
t.boolean "successful"
t.datetime "created_at", null: false
Expand Down

0 comments on commit 49f4869

Please sign in to comment.