diff --git a/app/assets/stylesheets/form_hints.css.scss b/app/assets/stylesheets/form_hints.css.scss new file mode 100644 index 0000000..9bddd35 --- /dev/null +++ b/app/assets/stylesheets/form_hints.css.scss @@ -0,0 +1,12 @@ +.field_with_hint { + input { + margin-bottom: 0.6rem; + } +} + +span.hint { + display: block; + margin-bottom: 18px; + color: rgb(115, 115, 115); + font-size: 14px; +} diff --git a/app/views/listings/new.html.haml b/app/views/listings/new.html.haml index 2648456..e536007 100644 --- a/app/views/listings/new.html.haml +++ b/app/views/listings/new.html.haml @@ -7,6 +7,7 @@ = f.input :name = f.input :description = f.input :file - = f.input :price, label: "Price (in BTC)" + = f.input :price, label: "Price (in BTC)", + hint: "10% of every purchase goes to a Bitcoin-accepting charity." = f.input :bitcoin_address = f.button :submit diff --git a/config/initializers/simple_form_foundation.rb b/config/initializers/simple_form_foundation.rb index 5ddf00e..a7fb423 100644 --- a/config/initializers/simple_form_foundation.rb +++ b/config/initializers/simple_form_foundation.rb @@ -12,7 +12,7 @@ # Uncomment the following line to enable hints. The line is commented out by default since Foundation # does't provide styles for hints. You will need to provide your own CSS styles for hints. - # b.use :hint, wrap_with: { tag: :span, class: :hint } + b.use :hint, wrap_with: { tag: :span, class: :hint } end # CSS class for buttons diff --git a/db/schema.rb b/db/schema.rb index 0ee2a82..eca2325 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,57 +1,57 @@ -# encoding: UTF-8 -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). -# -# It's strongly recommended that you check this file into your version control system. - -ActiveRecord::Schema.define(version: 20131208002027) do - - create_table "friendly_id_slugs", force: true do |t| - t.string "slug", null: false - t.integer "sluggable_id", null: false - t.string "sluggable_type", limit: 50 - t.string "scope" - t.datetime "created_at" - end - - add_index "friendly_id_slugs", ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true - add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type" - add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id" - add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type" - - create_table "invoices", force: true do |t| - t.boolean "completed" - t.integer "listing_id" - t.datetime "created_at" - t.datetime "updated_at" - t.string "file_file_name" - t.string "file_content_type" - t.integer "file_file_size" - t.datetime "file_updated_at" - t.string "slug" - t.string "session_id" - end - - add_index "invoices", ["slug"], name: "index_invoices_on_slug", unique: true - - create_table "listings", force: true do |t| - t.string "name" - t.text "description" - t.decimal "price" - t.string "bitcoin_address" - t.datetime "created_at" - t.datetime "updated_at" - t.string "file_file_name" - t.string "file_content_type" - t.integer "file_file_size" - t.datetime "file_updated_at" - end - -end +# encoding: UTF-8 +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20131208002027) do + + create_table "friendly_id_slugs", force: true do |t| + t.string "slug", null: false + t.integer "sluggable_id", null: false + t.string "sluggable_type", limit: 50 + t.string "scope" + t.datetime "created_at" + end + + add_index "friendly_id_slugs", ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true + add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type" + add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id" + add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type" + + create_table "invoices", force: true do |t| + t.boolean "completed" + t.integer "listing_id" + t.datetime "created_at" + t.datetime "updated_at" + t.string "file_file_name" + t.string "file_content_type" + t.integer "file_file_size" + t.datetime "file_updated_at" + t.string "slug" + t.string "session_id" + end + + add_index "invoices", ["slug"], name: "index_invoices_on_slug", unique: true + + create_table "listings", force: true do |t| + t.string "name" + t.text "description" + t.decimal "price" + t.string "bitcoin_address" + t.datetime "created_at" + t.datetime "updated_at" + t.string "file_file_name" + t.string "file_content_type" + t.integer "file_file_size" + t.datetime "file_updated_at" + end + +end