From 45c44989c8fb6e24badd18bb83ac5f68de0aceaf Mon Sep 17 00:00:00 2001 From: kibigo! Date: Fri, 17 Nov 2017 19:11:18 -0800 Subject: Forking glitch theme --- app/javascript/packs/about.js | 6 +++--- app/javascript/packs/application.js | 4 ++++ app/javascript/packs/common.js | 3 --- app/javascript/packs/public.js | 16 ++++++++-------- app/javascript/packs/share.js | 6 +++--- 5 files changed, 18 insertions(+), 17 deletions(-) (limited to 'app/javascript/packs') diff --git a/app/javascript/packs/about.js b/app/javascript/packs/about.js index 50c81198e..6ce8757dc 100644 --- a/app/javascript/packs/about.js +++ b/app/javascript/packs/about.js @@ -1,9 +1,9 @@ -import loadPolyfills from '../mastodon/load_polyfills'; +import loadPolyfills from 'themes/glitch/util/load_polyfills'; require.context('../images/', true); function loaded() { - const TimelineContainer = require('../mastodon/containers/timeline_container').default; + const TimelineContainer = require('themes/glitch/containers/timeline_container').default; const React = require('react'); const ReactDOM = require('react-dom'); const mountNode = document.getElementById('mastodon-timeline'); @@ -15,7 +15,7 @@ function loaded() { } function main() { - const ready = require('../mastodon/ready').default; + const ready = require('themes/glitch/util/ready').default; ready(loaded); } diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index d275c3bb0..21dc78986 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -1,3 +1,7 @@ +// THIS IS THE `vanilla` THEME PACK FILE!! +// IT'S HERE FOR UPSTREAM COMPATIBILITY!! +// THE `glitch` PACK FILE IS IN `themes/glitch/index.js`!! + import loadPolyfills from '../mastodon/load_polyfills'; // import default stylesheet with variables diff --git a/app/javascript/packs/common.js b/app/javascript/packs/common.js index 5ac6504d4..96e6f4b16 100644 --- a/app/javascript/packs/common.js +++ b/app/javascript/packs/common.js @@ -1,9 +1,6 @@ import { start } from 'rails-ujs'; import 'font-awesome/css/font-awesome.css'; -// import common styling -require('../styles/common.scss'); - require.context('../images/', true); start(); diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index 59d0e98dd..4362905da 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -1,6 +1,6 @@ -import loadPolyfills from '../mastodon/load_polyfills'; -import { processBio } from '../glitch/util/bio_metadata'; -import ready from '../mastodon/ready'; +import loadPolyfills from 'themes/glitch/util/load_polyfills'; +import { processBio } from 'themes/glitch/util/bio_metadata'; +import ready from 'themes/glitch/util/ready'; window.addEventListener('message', e => { const data = e.data || {}; @@ -22,12 +22,12 @@ function main() { const { length } = require('stringz'); const IntlRelativeFormat = require('intl-relativeformat').default; const { delegate } = require('rails-ujs'); - const emojify = require('../mastodon/features/emoji/emoji').default; - const { getLocale } = require('../mastodon/locales'); + const emojify = require('../themes/glitch/features/emoji/emoji').default; + const { getLocale } = require('mastodon/locales'); const { localeData } = getLocale(); - const VideoContainer = require('../mastodon/containers/video_container').default; - const MediaGalleryContainer = require('../mastodon/containers/media_gallery_container').default; - const CardContainer = require('../mastodon/containers/card_container').default; + const VideoContainer = require('../themes/glitch/containers/video_container').default; + const MediaGalleryContainer = require('../themes/glitch/containers/media_gallery_container').default; + const CardContainer = require('../themes/glitch/containers/card_container').default; const React = require('react'); const ReactDOM = require('react-dom'); diff --git a/app/javascript/packs/share.js b/app/javascript/packs/share.js index 51e4ae38b..9cd95bcee 100644 --- a/app/javascript/packs/share.js +++ b/app/javascript/packs/share.js @@ -1,9 +1,9 @@ -import loadPolyfills from '../mastodon/load_polyfills'; +import loadPolyfills from 'themes/glitch/util/load_polyfills'; require.context('../images/', true); function loaded() { - const ComposeContainer = require('../mastodon/containers/compose_container').default; + const ComposeContainer = require('themes/glitch/containers/compose_container').default; const React = require('react'); const ReactDOM = require('react-dom'); const mountNode = document.getElementById('mastodon-compose'); @@ -15,7 +15,7 @@ function loaded() { } function main() { - const ready = require('../mastodon/ready').default; + const ready = require('themes/glitch/util/ready').default; ready(loaded); } -- cgit From 08a01dd0374618438aab95c41940841b66c5e2a9 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sat, 18 Nov 2017 11:05:39 -0800 Subject: Public pack fix --- app/javascript/packs/public.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript/packs') diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index 4362905da..6adacad98 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -22,7 +22,7 @@ function main() { const { length } = require('stringz'); const IntlRelativeFormat = require('intl-relativeformat').default; const { delegate } = require('rails-ujs'); - const emojify = require('../themes/glitch/features/emoji/emoji').default; + const emojify = require('../themes/glitch/util/emoji').default; const { getLocale } = require('mastodon/locales'); const { localeData } = getLocale(); const VideoContainer = require('../themes/glitch/containers/video_container').default; -- cgit