class CreateMinimalistTheme < ActiveRecord::Migration
  tag :predeploy

  NAME = "Minimalist Theme"

  def up
    variables = {
      "ic-brand-primary"=>"#2773e2",
      "ic-brand-button--secondary-bgd"=>"#4d4d4d",
      "ic-link-color"=>"#1d6adb",
      "ic-brand-global-nav-bgd"=>"#f2f2f2",
      "ic-brand-global-nav-ic-icon-svg-fill"=>"#444444",
      "ic-brand-global-nav-menu-item__text-color"=>"#444444",
      "ic-brand-global-nav-avatar-border"=>"#444444",
      "ic-brand-global-nav-logo-bgd"=>"#4d4d4d",
      "ic-brand-watermark-opacity"=>"1",
      "ic-brand-Login-body-bgd-color"=>"#f2f2f2",
      "ic-brand-Login-body-bgd-shadow-color"=>"#f2f2f2",
      "ic-brand-Login-Content-bgd-color"=>"#ffffff",
      "ic-brand-Login-Content-border-color"=>"#efefef",
      "ic-brand-Login-Content-label-text-color"=>"#444444",
      "ic-brand-Login-Content-password-text-color"=>"#444444",
      "ic-brand-Login-Content-button-bgd"=>"#2773e2",
      "ic-brand-Login-footer-link-color"=>"#2773e2",
      "ic-brand-Login-instructure-logo"=>"#aaaaaa"
    }
    bc = BrandConfig.new(variables: variables)
    bc.name = NAME
    bc.share = true
    bc.save!
    bc.save_scss_file!
  end

  def down
    BrandConfig.where(name: NAME).delete_all
  end
end

Add Minimalist Theme to Theme Editor
Add Minimalist Theme to Theme Editor

Fixes: CNVS-25766

This is the first of four themes we are going to
add to Theme Editor's default offerings.

Test plan:
- Pull down the patchset, migrate your
  database, and restart Canvas
- Open Theme Editor. Make sure you have delayed
  jobs running in the background:
  script/delayed_job run
- You should now see the Minimalist theme listed in
  the select input:
  http://screencast.com/t/m7RvtWpDuZFw
- If you lose all your styles after doing this, you
  might need to run:
  bundle exec rake brand_configs:generate_and_upload_all
  ... then restart.
- Canvas should now look Minimalist!
  http://screencast.com/t/NCYCNjcc2lc

Change-Id: I04c093a8dd7e6d989c3b83656354ce0cdb38ea27
Reviewed-on: https://gerrit.instructure.com/68008
Reviewed-by: Ryan Shaw <ea3cd978650417470535f3a4725b6b5042a6ab59@instructure.com>
Product-Review: Pam Hiett <7b533437add1ce4ea4ed79979fa88e0e484e554b@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <59e3fde81b8d9a4f5e0cc016a3c2695591912604@instructure.com>
