Browse Source

Move sass files into src and closer to the relevant components

JC Brand 4 years ago
parent
commit
f805f0d1ef
41 changed files with 23 additions and 9 deletions
  1. 3 1
      src/converse.js
  2. 2 0
      src/modals/base.js
  3. 5 0
      src/modals/styles/_modal.scss
  4. 2 0
      src/shared/autocomplete/index.js
  5. 0 0
      src/shared/autocomplete/styles/_autocomplete.scss
  6. 2 0
      src/shared/chat/emoji-picker.js
  7. 6 0
      src/shared/chat/styles/_emoji.scss
  8. 0 0
      src/shared/styles/_bookmarks.scss
  9. 0 0
      src/shared/styles/_chatbox.scss
  10. 0 0
      src/shared/styles/_chatrooms.scss
  11. 0 0
      src/shared/styles/_controlbox.scss
  12. 0 0
      src/shared/styles/_core.scss
  13. 0 0
      src/shared/styles/_forms.scss
  14. 0 0
      src/shared/styles/_headline.scss
  15. 0 0
      src/shared/styles/_lists.scss
  16. 0 0
      src/shared/styles/_messages.scss
  17. 0 0
      src/shared/styles/_minimized_chats.scss
  18. 0 0
      src/shared/styles/_roster.scss
  19. 0 0
      src/shared/styles/_toolbar.scss
  20. 0 0
      src/shared/styles/_variables.scss
  21. 0 0
      src/shared/styles/font-awesome.scss
  22. 2 6
      src/shared/styles/index.scss
  23. 0 0
      src/shared/styles/webfonts/baumans.ttf
  24. 0 0
      src/shared/styles/webfonts/fa-brands-400.eot
  25. 0 0
      src/shared/styles/webfonts/fa-brands-400.svg
  26. 0 0
      src/shared/styles/webfonts/fa-brands-400.ttf
  27. 0 0
      src/shared/styles/webfonts/fa-brands-400.woff
  28. 0 0
      src/shared/styles/webfonts/fa-brands-400.woff2
  29. 0 0
      src/shared/styles/webfonts/fa-regular-400.eot
  30. 0 0
      src/shared/styles/webfonts/fa-regular-400.svg
  31. 0 0
      src/shared/styles/webfonts/fa-regular-400.ttf
  32. 0 0
      src/shared/styles/webfonts/fa-regular-400.woff
  33. 0 0
      src/shared/styles/webfonts/fa-regular-400.woff2
  34. 0 0
      src/shared/styles/webfonts/fa-solid-900.eot
  35. 0 0
      src/shared/styles/webfonts/fa-solid-900.svg
  36. 0 0
      src/shared/styles/webfonts/fa-solid-900.ttf
  37. 0 0
      src/shared/styles/webfonts/fa-solid-900.woff
  38. 0 0
      src/shared/styles/webfonts/fa-solid-900.woff2
  39. 0 0
      src/shared/styles/webfonts/muli.ttf
  40. 0 0
      src/shared/styles/website.scss
  41. 1 2
      webpack.prod.js

+ 3 - 1
src/converse.js

@@ -4,10 +4,13 @@
  * @license Mozilla Public License (MPLv2)
  */
 
+
 import "@converse/headless/headless";
 import "i18n";
 import "shared/registry.js";
 
+import 'shared/styles/index.scss';
+
 /* START: Removable components
  * --------------------
  * Any of the following components may be removed if they're not needed.
@@ -33,7 +36,6 @@ import "./plugins/singleton.js";
 /* END: Removable components */
 
 import "./components/converse.js";
-import "../sass/converse.scss";
 
 import { _converse, converse } from "@converse/headless/core";
 import { CustomElement } from 'components/element';

+ 2 - 0
src/modals/base.js

@@ -5,6 +5,8 @@ import { View } from '@converse/skeletor/src/view.js';
 import { api, converse } from "@converse/headless/core";
 import { render } from 'lit-html';
 
+import './styles/_modal.scss';
+
 const { sizzle } = converse.env;
 const u = converse.env.utils;
 

+ 5 - 0
sass/_modal.scss → src/modals/styles/_modal.scss

@@ -1,4 +1,9 @@
+@import "bootstrap/scss/functions";
+@import "bootstrap/scss/variables";
+@import "bootstrap/scss/mixins";
+
 #conversejs {
+    @import "bootstrap/scss/modal";
 
     #converse-modals {
         .modal {

+ 2 - 0
src/shared/autocomplete/index.js

@@ -3,6 +3,8 @@ import AutoComplete from './autocomplete.js';
 import { FILTER_CONTAINS, FILTER_STARTSWITH } from './utils.js';
 import { _converse } from '@converse/headless/core';
 
+import './styles/_autocomplete.scss';
+
 _converse.FILTER_CONTAINS = FILTER_CONTAINS;
 _converse.FILTER_STARTSWITH = FILTER_STARTSWITH;
 _converse.AutoComplete = AutoComplete;

+ 0 - 0
sass/_autocomplete.scss → src/shared/autocomplete/styles/_autocomplete.scss


+ 2 - 0
src/shared/chat/emoji-picker.js

@@ -9,6 +9,8 @@ import { html } from "lit-element";
 import { tpl_emoji_picker } from "./templates/emoji-picker.js";
 import { until } from 'lit-html/directives/until.js';
 
+import './styles/_emoji.scss';
+
 const u = converse.env.utils;
 
 

+ 6 - 0
sass/_emoji.scss → src/shared/chat/styles/_emoji.scss

@@ -1,4 +1,10 @@
+@import "bootstrap/scss/functions";
+@import "bootstrap/scss/variables";
+@import "bootstrap/scss/mixins";
+
 #conversejs {
+    @import "bootstrap/scss/media";
+
     .chatbox {
         img.emoji {
             height: 1.2em;

+ 0 - 0
sass/_bookmarks.scss → src/shared/styles/_bookmarks.scss


+ 0 - 0
sass/_chatbox.scss → src/shared/styles/_chatbox.scss


+ 0 - 0
sass/_chatrooms.scss → src/shared/styles/_chatrooms.scss


+ 0 - 0
sass/_controlbox.scss → src/shared/styles/_controlbox.scss


+ 0 - 0
sass/_core.scss → src/shared/styles/_core.scss


+ 0 - 0
sass/_forms.scss → src/shared/styles/_forms.scss


+ 0 - 0
sass/_headline.scss → src/shared/styles/_headline.scss


+ 0 - 0
sass/_lists.scss → src/shared/styles/_lists.scss


+ 0 - 0
sass/_messages.scss → src/shared/styles/_messages.scss


+ 0 - 0
sass/_minimized_chats.scss → src/shared/styles/_minimized_chats.scss


+ 0 - 0
sass/_roster.scss → src/shared/styles/_roster.scss


+ 0 - 0
sass/_toolbar.scss → src/shared/styles/_toolbar.scss


+ 0 - 0
sass/_variables.scss → src/shared/styles/_variables.scss


+ 0 - 0
sass/font-awesome.scss → src/shared/styles/font-awesome.scss


+ 2 - 6
sass/converse.scss → src/shared/styles/index.scss

@@ -2,7 +2,7 @@
  * Converse.js (Web-based XMPP instant messaging client)
  * https://conversejs.org
  *
- * Copyright (c) 2013-2018, JC Brand <jc@opkode.com>
+ * Copyright (c) 2013-2021, JC Brand <jc@opkode.com>
  * Licensed under the Mozilla Public License
  */
 @import "bootstrap/scss/functions";
@@ -29,13 +29,12 @@
     @import "bootstrap/scss/media";
     @import "bootstrap/scss/list-group";
     @import "bootstrap/scss/close";
-    @import "bootstrap/scss/modal";
     @import "bootstrap/scss/tooltip";
     @import "bootstrap/scss/popover";
     @import "bootstrap/scss/utilities";
 }
 
-@import "font-awesome";
+@import "./font-awesome.scss";
 @import "variables";
 
 @import "core";
@@ -43,7 +42,6 @@
 @import "toolbar";
 @import "chatbox";
 @import "controlbox";
-@import "modal";
 @import "roster";
 @import "lists";
 @import "chatrooms";
@@ -51,5 +49,3 @@
 @import "messages";
 @import "minimized_chats";
 @import "bookmarks";
-@import "autocomplete";
-@import "emoji";

+ 0 - 0
sass/webfonts/baumans.ttf → src/shared/styles/webfonts/baumans.ttf


+ 0 - 0
sass/webfonts/fa-brands-400.eot → src/shared/styles/webfonts/fa-brands-400.eot


+ 0 - 0
sass/webfonts/fa-brands-400.svg → src/shared/styles/webfonts/fa-brands-400.svg


+ 0 - 0
sass/webfonts/fa-brands-400.ttf → src/shared/styles/webfonts/fa-brands-400.ttf


+ 0 - 0
sass/webfonts/fa-brands-400.woff → src/shared/styles/webfonts/fa-brands-400.woff


+ 0 - 0
sass/webfonts/fa-brands-400.woff2 → src/shared/styles/webfonts/fa-brands-400.woff2


+ 0 - 0
sass/webfonts/fa-regular-400.eot → src/shared/styles/webfonts/fa-regular-400.eot


+ 0 - 0
sass/webfonts/fa-regular-400.svg → src/shared/styles/webfonts/fa-regular-400.svg


+ 0 - 0
sass/webfonts/fa-regular-400.ttf → src/shared/styles/webfonts/fa-regular-400.ttf


+ 0 - 0
sass/webfonts/fa-regular-400.woff → src/shared/styles/webfonts/fa-regular-400.woff


+ 0 - 0
sass/webfonts/fa-regular-400.woff2 → src/shared/styles/webfonts/fa-regular-400.woff2


+ 0 - 0
sass/webfonts/fa-solid-900.eot → src/shared/styles/webfonts/fa-solid-900.eot


+ 0 - 0
sass/webfonts/fa-solid-900.svg → src/shared/styles/webfonts/fa-solid-900.svg


+ 0 - 0
sass/webfonts/fa-solid-900.ttf → src/shared/styles/webfonts/fa-solid-900.ttf


+ 0 - 0
sass/webfonts/fa-solid-900.woff → src/shared/styles/webfonts/fa-solid-900.woff


+ 0 - 0
sass/webfonts/fa-solid-900.woff2 → src/shared/styles/webfonts/fa-solid-900.woff2


+ 0 - 0
sass/webfonts/muli.ttf → src/shared/styles/webfonts/muli.ttf


+ 0 - 0
sass/website.scss → src/shared/styles/website.scss


+ 1 - 2
webpack.prod.js

@@ -19,7 +19,7 @@ const plugins = [
             {from: 'logo/conversejs-filled-512.png', to: 'images/logo'},
             {from: 'logo/conversejs-filled-192.svg', to: 'images/logo'},
             {from: 'logo/conversejs-filled-512.svg', to: 'images/logo'},
-            {from: 'sass/webfonts', to: 'webfonts'}
+            {from: 'src/shared/styles/webfonts', to: 'webfonts'}
         ]
     }),
     new webpack.DefinePlugin({ // This makes it possible for us to safely use env vars on our code
@@ -62,4 +62,3 @@ module.exports = merge(common, {
         }]
     }
 });
-