Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
Ensure SCSS compilation compatibility with core (#77)
* WIP: Fix for new Discourse * Ensure SCSS compilation compatibility with core Co-authored-by: Faizaan Gagan <fzngagan@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
3bb244be79
Commit
fa73a18363
2 geänderte Dateien mit 12 neuen und 7 gelöschten Zeilen
11
plugin.rb
11
plugin.rb
|
@ -174,9 +174,14 @@ after_initialize do
|
||||||
::Wizard::Step.prepend CustomWizardStepExtension
|
::Wizard::Step.prepend CustomWizardStepExtension
|
||||||
|
|
||||||
full_path = "#{Rails.root}/plugins/discourse-custom-wizard/assets/stylesheets/wizard/wizard_custom.scss"
|
full_path = "#{Rails.root}/plugins/discourse-custom-wizard/assets/stylesheets/wizard/wizard_custom.scss"
|
||||||
DiscoursePluginRegistry.register_asset(full_path, {}, "wizard_custom")
|
if Stylesheet::Importer.respond_to?(:plugin_assets)
|
||||||
Stylesheet::Importer.register_import("wizard_custom") do
|
Stylesheet::Importer.plugin_assets['wizard_custom'] = Set[full_path]
|
||||||
import_files(DiscoursePluginRegistry.stylesheets["wizard_custom"])
|
else
|
||||||
|
# legacy method, Discourse 2.7.0.beta5 and below
|
||||||
|
DiscoursePluginRegistry.register_asset(full_path, {}, "wizard_custom")
|
||||||
|
Stylesheet::Importer.register_import("wizard_custom") do
|
||||||
|
import_files(DiscoursePluginRegistry.stylesheets["wizard_custom"])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
CustomWizard::CustomField::CLASSES.keys.each do |klass|
|
CustomWizard::CustomField::CLASSES.keys.each do |klass|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<%= discourse_color_scheme_stylesheets %>
|
<%= discourse_color_scheme_stylesheets %>
|
||||||
|
|
||||||
<%= discourse_stylesheet_link_tag :wizard, theme_id: nil %>
|
<%= discourse_stylesheet_link_tag :wizard, theme_id: nil %>
|
||||||
<%= discourse_stylesheet_link_tag :wizard_custom %>
|
<%= discourse_stylesheet_link_tag :wizard_custom %>
|
||||||
<%- if wizard_theme_ids.present? %>
|
<%- if wizard_theme_ids.present? %>
|
||||||
<%= discourse_stylesheet_link_tag (mobile_view? ? :mobile_theme : :desktop_theme), theme_ids: wizard_theme_ids %>
|
<%= discourse_stylesheet_link_tag (mobile_view? ? :mobile_theme : :desktop_theme), theme_ids: wizard_theme_ids %>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
|
|
||||||
<%= preload_script "locales/#{I18n.locale}" %>
|
<%= preload_script "locales/#{I18n.locale}" %>
|
||||||
<%= preload_script "ember_jquery" %>
|
<%= preload_script "ember_jquery" %>
|
||||||
<%= preload_script "wizard-vendor" %>
|
<%= preload_script "wizard-vendor" %>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
<%= tag.meta id: 'data-discourse-setup', data: client_side_setup_data %>
|
<%= tag.meta id: 'data-discourse-setup', data: client_side_setup_data %>
|
||||||
|
|
||||||
<meta name="discourse_theme_ids" content="<%= wizard_theme_ids&.join(",") %>">
|
<meta name="discourse_theme_ids" content="<%= wizard_theme_ids&.join(",") %>">
|
||||||
<meta name="discourse-base-uri" content="<%= Discourse.base_uri %>">
|
<meta name="discourse-base-uri" content="<%= Discourse.base_path %>">
|
||||||
|
|
||||||
<%= render partial: "layouts/head" %>
|
<%= render partial: "layouts/head" %>
|
||||||
<title><%= wizard_page_title %></title>
|
<title><%= wizard_page_title %></title>
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<%- unless customization_disabled? %>
|
<%- unless customization_disabled? %>
|
||||||
<%= raw theme_lookup("header") %>
|
<%= raw theme_lookup("header") %>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
|
|
||||||
<div id='custom-wizard-main'></div>
|
<div id='custom-wizard-main'></div>
|
||||||
|
|
||||||
<%- unless customization_disabled? %>
|
<%- unless customization_disabled? %>
|
||||||
|
|
Laden …
In neuem Issue referenzieren