From 0a678cf377c6dd91c439fa91f75782e457836639 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Tue, 18 Jul 2017 11:21:04 -0700 Subject: Fix for stylesheet split --- app/javascript/glitch/components/settings/index.js | 9 +-- .../glitch/components/settings/style.scss | 84 ++++++++++++++++++++++ .../glitch/components/settings/stylesheet.scss | 84 ---------------------- app/views/home/index.html.haml | 1 + 4 files changed, 90 insertions(+), 88 deletions(-) create mode 100644 app/javascript/glitch/components/settings/style.scss delete mode 100644 app/javascript/glitch/components/settings/stylesheet.scss (limited to 'app') diff --git a/app/javascript/glitch/components/settings/index.js b/app/javascript/glitch/components/settings/index.js index 04c05704e..ab2e0fb87 100644 --- a/app/javascript/glitch/components/settings/index.js +++ b/app/javascript/glitch/components/settings/index.js @@ -1,14 +1,15 @@ -// Package imports // +// Package imports import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { injectIntl, defineMessages, FormattedMessage } from 'react-intl'; -import './stylesheet'; - -// Our imports // +// Our imports import SettingsItem from './item'; +// Stylesheet imports +import './style'; + const messages = defineMessages({ layout_auto: { id: 'layout.auto', defaultMessage: 'Auto' }, layout_desktop: { id: 'layout.desktop', defaultMessage: 'Desktop' }, diff --git a/app/javascript/glitch/components/settings/style.scss b/app/javascript/glitch/components/settings/style.scss new file mode 100644 index 000000000..48cc37984 --- /dev/null +++ b/app/javascript/glitch/components/settings/style.scss @@ -0,0 +1,84 @@ +@import 'variables'; + +.settings-modal { + position: relative; + display: flex; + flex-direction: row; + background: $ui-secondary-color; + color: $ui-base-color; + border-radius: 8px; + height: 80vh; + width: 80vw; + max-width: 740px; + max-height: 450px; + overflow: hidden; + + label { + display: block; + } + + h1 { + font-size: 18px; + font-weight: 500; + line-height: 24px; + margin-bottom: 20px; + } + + h2 { + font-size: 15px; + font-weight: 500; + line-height: 20px; + margin-top: 20px; + margin-bottom: 10px; + } +} + +.settings-modal__navigation { + background: $primary-text-color; + color: $ui-base-color; + width: 200px; + font-size: 15px; + line-height: 20px; + overflow-y: auto; + + .settings-modal__navigation-item, .settings-modal__navigation-close { + display: block; + padding: 15px 20px; + cursor: pointer; + outline: none; + text-decoration: none; + } + + .settings-modal__navigation-item { + background: $primary-text-color; + color: inherit; + border-bottom: 1px $ui-primary-color solid; + transition: background .3s; + + &:hover { + background: $ui-secondary-color; + } + + &.active { + background: $ui-highlight-color; + color: $primary-text-color; + } + } + + .settings-modal__navigation-close { + background: $error-value-color; + color: $primary-text-color; + } +} + +.settings-modal__content { + display: block; + flex: auto; + padding: 15px 20px 15px 20px; + width: 360px; + overflow-y: auto; + + select { + margin-bottom: 5px; + } +} \ No newline at end of file diff --git a/app/javascript/glitch/components/settings/stylesheet.scss b/app/javascript/glitch/components/settings/stylesheet.scss deleted file mode 100644 index 48cc37984..000000000 --- a/app/javascript/glitch/components/settings/stylesheet.scss +++ /dev/null @@ -1,84 +0,0 @@ -@import 'variables'; - -.settings-modal { - position: relative; - display: flex; - flex-direction: row; - background: $ui-secondary-color; - color: $ui-base-color; - border-radius: 8px; - height: 80vh; - width: 80vw; - max-width: 740px; - max-height: 450px; - overflow: hidden; - - label { - display: block; - } - - h1 { - font-size: 18px; - font-weight: 500; - line-height: 24px; - margin-bottom: 20px; - } - - h2 { - font-size: 15px; - font-weight: 500; - line-height: 20px; - margin-top: 20px; - margin-bottom: 10px; - } -} - -.settings-modal__navigation { - background: $primary-text-color; - color: $ui-base-color; - width: 200px; - font-size: 15px; - line-height: 20px; - overflow-y: auto; - - .settings-modal__navigation-item, .settings-modal__navigation-close { - display: block; - padding: 15px 20px; - cursor: pointer; - outline: none; - text-decoration: none; - } - - .settings-modal__navigation-item { - background: $primary-text-color; - color: inherit; - border-bottom: 1px $ui-primary-color solid; - transition: background .3s; - - &:hover { - background: $ui-secondary-color; - } - - &.active { - background: $ui-highlight-color; - color: $primary-text-color; - } - } - - .settings-modal__navigation-close { - background: $error-value-color; - color: $primary-text-color; - } -} - -.settings-modal__content { - display: block; - flex: auto; - padding: 15px 20px 15px 20px; - width: 360px; - overflow-y: auto; - - select { - margin-bottom: 5px; - } -} \ No newline at end of file diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 13ca9ea79..f0f7bd619 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -3,6 +3,7 @@ %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) = javascript_pack_tag 'application', integrity: true, crossorigin: 'anonymous' + = stylesheet_pack_tag 'application', media: 'all' .app-holder#mastodon{ data: { props: Oj.dump(default_props) } } %noscript -- cgit