Browse Source

Add mobile styles

Angus McLeod 7 years ago
parent
commit
e78291ebd0
3 changed files with 49 additions and 1 deletions
  1. 41 0
      assets/stylesheets/wizard/wizard_custom_mobile.scss
  2. 7 1
      plugin.rb
  3. 1 0
      views/layouts/wizard.html.erb

+ 41 - 0
assets/stylesheets/wizard/wizard_custom_mobile.scss

@@ -0,0 +1,41 @@
+.custom-wizard {
+  .wizard-step-form {
+    .wizard-btn {
+      margin: 0;
+    }
+  }
+
+  .wizard-step-description {
+    .image-container {
+      margin: 20px 0;
+      padding: 0;
+    }
+
+    img.large {
+      width: 150px;
+      padding: 10px;
+    }
+
+    img.small {
+      width: 60px;
+      height: 60px;
+      padding: 10px;
+    }
+
+    .tip {
+      position: relative;
+      display: inline-block;
+      margin: 20px 0;
+    }
+  }
+
+  .control-group {
+    margin-right: 0;
+    margin-bottom: 20px;
+    width: 100%;
+  }
+
+  input, textarea {
+    border: 1px solid #919191;
+  }
+}

+ 7 - 1
plugin.rb

@@ -12,7 +12,13 @@ config.assets.paths << Rails.root.join('plugins', 'discourse-custom-wizard', 'as
 config.assets.paths << Rails.root.join('plugins', 'discourse-custom-wizard', 'assets', 'stylesheets', 'wizard')
 
 if Rails.env.production?
-  config.assets.precompile += %w{ wizard-custom-lib.js wizard-custom.js wizard-plugin.js stylesheets/wizard/wizard_custom.scss }
+  config.assets.precompile += %w{
+    wizard-custom-lib.js
+    wizard-custom.js
+    wizard-plugin.js
+    stylesheets/wizard/wizard_custom.scss
+    stylesheets/wizard/wizard_custom_mobile.scss
+  }
 end
 
 after_initialize do

+ 1 - 0
views/layouts/wizard.html.erb

@@ -2,6 +2,7 @@
   <head>
     <%= discourse_stylesheet_link_tag :wizard, theme_key: nil %>
     <%= stylesheet_link_tag "wizard_custom", media: "all", "data-turbolinks-track" => "reload" %>
+    <%= stylesheet_link_tag "wizard_custom_mobile", media: "all", "data-turbolinks-track" => "reload" if mobile_view?%>
     <%= preload_script "ember_jquery" %>
     <%= preload_script "wizard-vendor" %>
     <%= preload_script "wizard-application" %>