diff --git a/about.json b/about.json
index a816477..376fa5f 100644
--- a/about.json
+++ b/about.json
@@ -4,6 +4,6 @@
"license_url": null,
"about_url": "https://www.mon-discourse.fr/themes/md-composer-extras/",
"authors": "Steven",
- "theme_version": "1.4",
+ "theme_version": "1.5",
"learn_more": "https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966"
}
diff --git a/common/common.scss b/common/common.scss
index dbf7c7c..e69de29 100644
--- a/common/common.scss
+++ b/common/common.scss
@@ -1,26 +0,0 @@
-[data-wrap="center"] {
- text-align: center;
-}
-
-[data-wrap="right"] {
- text-align: right;
-}
-
-[data-wrap="justify"] {
- text-align: justify;
-}
-
-[data-wrap="columns"] {
- width: 50%;
- float: left;
-}
-
-[data-wrap="floatl"] {
- float: left;
- margin-right: 10px;
-}
-
-[data-wrap="floatr"] {
- float: right;
- margin-left: 10px;
-}
diff --git a/desktop/desktop.scss b/desktop/desktop.scss
new file mode 100644
index 0000000..dbf7c7c
--- /dev/null
+++ b/desktop/desktop.scss
@@ -0,0 +1,26 @@
+[data-wrap="center"] {
+ text-align: center;
+}
+
+[data-wrap="right"] {
+ text-align: right;
+}
+
+[data-wrap="justify"] {
+ text-align: justify;
+}
+
+[data-wrap="columns"] {
+ width: 50%;
+ float: left;
+}
+
+[data-wrap="floatl"] {
+ float: left;
+ margin-right: 10px;
+}
+
+[data-wrap="floatr"] {
+ float: right;
+ margin-left: 10px;
+}
diff --git a/desktop/head_tag.html b/desktop/head_tag.html
new file mode 100644
index 0000000..46e6d3d
--- /dev/null
+++ b/desktop/head_tag.html
@@ -0,0 +1,134 @@
+
diff --git a/common/head_tag.html b/mobile/head_tag.html
similarity index 79%
rename from common/head_tag.html
rename to mobile/head_tag.html
index 5d5fa50..519c9bc 100644
--- a/common/head_tag.html
+++ b/mobile/head_tag.html
@@ -9,30 +9,6 @@ api.onToolbarCreate(toolbar => {
perform: e => e.applySurround('[u]', '[/u]', 'underline_text')
});
});
-api.onToolbarCreate(toolbar => {
- toolbar.addButton({
- id: "align_center_button",
- group: "extras",
- icon: "align-center",
- perform: e => e.applySurround('[wrap="center"]\n', '\n[/wrap]', 'align_center_text')
- });
-});
-api.onToolbarCreate(toolbar => {
- toolbar.addButton({
- id: "align_right_button",
- group: "extras",
- icon: "align-right",
- perform: e => e.applySurround('[wrap="right"]\n', '\n[/wrap]', 'align_right_text')
- });
-});
-api.onToolbarCreate(toolbar => {
- toolbar.addButton({
- id: "align_justify_button",
- group: "extras",
- icon: "align-justify",
- perform: e => e.applySurround('[wrap="justify"]\n', '\n[/wrap]', 'align_justify_text')
- });
-});
// EXTRAS
api.addToolbarPopupMenuOptionsCallback(() => {
@@ -56,6 +32,27 @@ api.addToolbarPopupMenuOptionsCallback(() => {
label: "subscript_button"
};
});
+api.addToolbarPopupMenuOptionsCallback(() => {
+ return {
+ action: "aligncenter",
+ icon: "align-center",
+ label: "align_center_button"
+ };
+});
+api.addToolbarPopupMenuOptionsCallback(() => {
+ return {
+ action: "alignright",
+ icon: "align-right",
+ label: "align_right_button"
+ };
+});
+api.addToolbarPopupMenuOptionsCallback(() => {
+ return {
+ action: "alignjustify",
+ icon: "align-justify",
+ label: "align_justify_button"
+ };
+});
api.addToolbarPopupMenuOptionsCallback(() => {
return {
action: "floatleft",
@@ -81,6 +78,15 @@ api.modifyClass("controller:composer", {
},
subscript() {
this.get("toolbarEvent").applySurround("", "", "subscript_text");
+ },
+ aligncenter() {
+ this.get("toolbarEvent").applySurround('[wrap="center"]\n', '\n[/wrap]', "align_center_text");
+ },
+ alignright() {
+ this.get("toolbarEvent").applySurround('[wrap="right"]\n', '\n[/wrap]', "align_right_text");
+ },
+ alignjustify() {
+ this.get("toolbarEvent").applySurround('[wrap="justify"]\n', '\n[/wrap]', "align_justify_text");
},
floatleft() {
this.get("toolbarEvent").applySurround('[wrap="floatl"]\n', '\n[/wrap]', "float_left_text");
diff --git a/mobile/mobile.scss b/mobile/mobile.scss
index e57a9fd..5a60373 100644
--- a/mobile/mobile.scss
+++ b/mobile/mobile.scss
@@ -4,4 +4,8 @@
.d-editor-spacer {
margin: 0 2px;
-}
\ No newline at end of file
+}
+
+[data-wrap="columns"] {
+}
+