discourse/app/assets/stylesheets/common/base/compose.scss

456 lines
7.6 KiB
SCSS
Raw Normal View History

2017-11-08 17:39:26 +08:00
#reply-control {
position: fixed;
display: flex;
flex-direction: column;
bottom: 0;
height: 0;
right: 0;
left: 0;
margin-left: auto;
margin-right: auto;
max-width: 1475px;
width: 100%;
&.hide-preview {
max-width: 740px;
}
@media screen and (max-width: 1200px) {
min-width: 0;
2017-11-08 17:39:26 +08:00
}
z-index: z("composer", "content");
transition: height 250ms ease, background 250ms ease, transform 250ms ease,
max-width 250ms ease;
background-color: $secondary;
box-shadow: shadow("composer");
2017-11-08 17:39:26 +08:00
.reply-area {
display: flex;
flex-direction: column;
2017-11-08 17:39:26 +08:00
}
.saving-text,
.draft-text {
display: none;
padding-left: 10px;
2017-11-08 17:39:26 +08:00
.spinner {
margin-left: 5px;
border-color: $secondary;
border-right-color: transparent;
2017-11-08 17:39:26 +08:00
}
Upgrade to FontAwesome 5 (take two) (#6673) * Add missing icons to set * Revert FA5 revert This reverts commit 42572ff * use new SVG syntax in locales * Noscript page changes (remove login button, center "powered by" footer text) * Cast wider net for SVG icons in settings - include any _icon setting for SVG registry (offers better support for plugin settings) - let themes store multiple pipe-delimited icons in a setting - also replaces broken onebox image icon with SVG reference in cooked post processor * interpolate icons in locales * Fix composer whisper icon alignment * Add support for stacked icons * SECURITY: enforce hostname to match discourse hostname This ensures that the hostname rails uses for various helpers always matches the Discourse hostname * load SVG sprite with pre-initializers * FIX: enable caching on SVG sprites * PERF: use JSONP for SVG sprites so they are served from CDN This avoids needing to deal with CORS for loading of the SVG Note, added the svg- prefix to the filename so we can quickly tell in dev tools what the file is * Add missing SVG sprite JSONP script to CSP * Upgrade to FA 5.5.0 * Add support for all FA4.7 icons - adds complete frontend and backend for renamed FA4.7 icons - improves performance of SvgSprite.bundle and SvgSprite.all_icons * Fix group avatar flair preview - adds an endpoint at /svg-sprites/search/:keyword - adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset * Remove FA 4.7 font files
2018-11-27 05:49:57 +08:00
.d-icon {
color: $secondary;
2017-11-08 17:39:26 +08:00
}
}
&.open {
height: 300px;
&.edit-title {
height: 400px; // more room when editing the title
}
}
&.closed {
height: 0 !important;
}
&.draft,
&.saving {
height: 40px !important;
align-items: center;
background: $tertiary;
color: $secondary;
flex-direction: row;
width: 100%;
.composer-controls {
margin-left: auto;
display: flex;
padding-right: 5px;
.toggle-toolbar {
display: none;
}
.d-icon {
opacity: 1;
}
}
2017-11-08 17:39:26 +08:00
}
&.draft {
cursor: pointer;
display: flex;
.draft-text {
display: block;
}
.grippie,
.saving-text {
2017-11-08 17:39:26 +08:00
display: none;
}
2018-11-14 00:12:58 +08:00
.toggler {
order: 2;
}
2017-11-08 17:39:26 +08:00
}
&.saving .saving-text {
display: flex;
}
.reply-to {
color: $primary-high;
margin: 5px 0 10px 0;
display: flex;
align-items: center;
Upgrade to FontAwesome 5 (take two) (#6673) * Add missing icons to set * Revert FA5 revert This reverts commit 42572ff * use new SVG syntax in locales * Noscript page changes (remove login button, center "powered by" footer text) * Cast wider net for SVG icons in settings - include any _icon setting for SVG registry (offers better support for plugin settings) - let themes store multiple pipe-delimited icons in a setting - also replaces broken onebox image icon with SVG reference in cooked post processor * interpolate icons in locales * Fix composer whisper icon alignment * Add support for stacked icons * SECURITY: enforce hostname to match discourse hostname This ensures that the hostname rails uses for various helpers always matches the Discourse hostname * load SVG sprite with pre-initializers * FIX: enable caching on SVG sprites * PERF: use JSONP for SVG sprites so they are served from CDN This avoids needing to deal with CORS for loading of the SVG Note, added the svg- prefix to the filename so we can quickly tell in dev tools what the file is * Add missing SVG sprite JSONP script to CSP * Upgrade to FA 5.5.0 * Add support for all FA4.7 icons - adds complete frontend and backend for renamed FA4.7 icons - improves performance of SvgSprite.bundle and SvgSprite.all_icons * Fix group avatar flair preview - adds an endpoint at /svg-sprites/search/:keyword - adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset * Remove FA 4.7 font files
2018-11-27 05:49:57 +08:00
.d-icon {
color: $primary-high;
2017-11-08 17:39:26 +08:00
}
.reply-details {
2018-11-14 00:12:58 +08:00
max-width: calc(100% - 175px);
flex: 1 1 auto;
Upgrade to FontAwesome 5 (take two) (#6673) * Add missing icons to set * Revert FA5 revert This reverts commit 42572ff * use new SVG syntax in locales * Noscript page changes (remove login button, center "powered by" footer text) * Cast wider net for SVG icons in settings - include any _icon setting for SVG registry (offers better support for plugin settings) - let themes store multiple pipe-delimited icons in a setting - also replaces broken onebox image icon with SVG reference in cooked post processor * interpolate icons in locales * Fix composer whisper icon alignment * Add support for stacked icons * SECURITY: enforce hostname to match discourse hostname This ensures that the hostname rails uses for various helpers always matches the Discourse hostname * load SVG sprite with pre-initializers * FIX: enable caching on SVG sprites * PERF: use JSONP for SVG sprites so they are served from CDN This avoids needing to deal with CORS for loading of the SVG Note, added the svg- prefix to the filename so we can quickly tell in dev tools what the file is * Add missing SVG sprite JSONP script to CSP * Upgrade to FA 5.5.0 * Add support for all FA4.7 icons - adds complete frontend and backend for renamed FA4.7 icons - improves performance of SvgSprite.bundle and SvgSprite.all_icons * Fix group avatar flair preview - adds an endpoint at /svg-sprites/search/:keyword - adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset * Remove FA 4.7 font files
2018-11-27 05:49:57 +08:00
display: flex;
align-items: center;
white-space: nowrap;
Upgrade to FontAwesome 5 (take two) (#6673) * Add missing icons to set * Revert FA5 revert This reverts commit 42572ff * use new SVG syntax in locales * Noscript page changes (remove login button, center "powered by" footer text) * Cast wider net for SVG icons in settings - include any _icon setting for SVG registry (offers better support for plugin settings) - let themes store multiple pipe-delimited icons in a setting - also replaces broken onebox image icon with SVG reference in cooked post processor * interpolate icons in locales * Fix composer whisper icon alignment * Add support for stacked icons * SECURITY: enforce hostname to match discourse hostname This ensures that the hostname rails uses for various helpers always matches the Discourse hostname * load SVG sprite with pre-initializers * FIX: enable caching on SVG sprites * PERF: use JSONP for SVG sprites so they are served from CDN This avoids needing to deal with CORS for loading of the SVG Note, added the svg- prefix to the filename so we can quickly tell in dev tools what the file is * Add missing SVG sprite JSONP script to CSP * Upgrade to FA 5.5.0 * Add support for all FA4.7 icons - adds complete frontend and backend for renamed FA4.7 icons - improves performance of SvgSprite.bundle and SvgSprite.all_icons * Fix group avatar flair preview - adds an endpoint at /svg-sprites/search/:keyword - adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset * Remove FA 4.7 font files
2018-11-27 05:49:57 +08:00
.d-icon {
opacity: 0.8;
}
}
.composer-action-title {
display: inline-flex;
align-items: center;
width: auto;
max-width: 100%;
.avatar {
width: 20px;
}
.action-title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.topic-link,
.user-link,
.post-link {
margin-right: 5px;
}
.username {
margin-right: 5px;
max-width: 100px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
@media screen and (max-width: 500px) {
display: none;
}
}
.d-icon {
margin-right: 5px;
}
img.avatar {
margin-right: 3px;
}
}
.composer-controls {
display: flex;
margin-left: auto;
button {
padding: 5px 7px;
&.toggler {
order: 2;
}
}
}
2017-11-08 17:39:26 +08:00
}
.whisper,
.display-edit-reason {
font-style: italic;
}
.display-edit-reason {
display: inline;
}
2017-11-08 17:39:26 +08:00
#edit-reason {
margin: 4px;
}
.user-selector,
.title-and-category {
display: flex;
flex-wrap: wrap;
width: 100%;
2017-11-08 17:39:26 +08:00
align-items: center;
margin-bottom: 5px;
2017-11-08 17:39:26 +08:00
position: relative;
&.with-preview {
width: 50%;
}
2017-11-08 17:39:26 +08:00
}
.title-input {
position: relative;
display: flex;
flex: 1 1 50%;
input {
flex-grow: 1;
}
}
.with-tags {
.title-input {
flex: 1 1 100%;
}
}
.category-input {
display: flex;
flex: 1 0 35%;
margin: 0 0 5px 10px;
@media screen and (max-width: 955px) {
flex: 1 0 100%;
margin-left: 0;
}
.category-chooser {
display: flex;
flex: 1 0 auto;
width: auto;
}
}
.with-tags {
.category-input {
flex-basis: 25%;
margin-left: 0;
margin-right: 5px;
@media screen and (max-width: 920px) {
flex-basis: 100%;
margin-right: 0;
}
}
2017-11-08 17:39:26 +08:00
}
.add-warning {
margin-left: 0.75em;
margin-bottom: 0;
2017-12-05 00:15:10 +08:00
display: flex;
input {
margin-right: 5px;
}
2017-11-08 17:39:26 +08:00
}
#reply-title {
margin: 0 0 5px 0;
flex-basis: 50%;
2017-11-08 17:39:26 +08:00
}
.mini-tag-chooser {
flex: 1 1 25%;
2018-02-14 04:46:25 +08:00
margin: 0 0 5px 0;
background: $secondary;
z-index: z("composer", "dropdown");
@media all and (max-width: 900px) {
margin: 0;
flex: 1 1 100%;
}
2017-11-08 17:39:26 +08:00
}
2018-04-27 04:03:48 +08:00
.popup-tip {
z-index: z("composer", "dropdown");
2018-04-27 04:03:48 +08:00
}
2017-11-08 17:39:26 +08:00
.wmd-controls {
position: relative;
display: flex;
flex-direction: column;
flex-grow: 1;
min-height: 0;
}
.submit-panel {
display: flex;
flex-shrink: 0;
margin: 7px 0 3px 0;
2017-11-08 17:39:26 +08:00
}
.save-or-cancel {
flex-basis: 50%;
display: flex;
align-items: center;
button {
flex: 0 0 auto;
}
.cancel {
margin-left: 1.25em;
line-height: normal;
color: $primary-high;
transition: color 250ms;
&:hover {
color: $danger;
}
}
2017-11-08 17:39:26 +08:00
#draft-status,
#file-uploading {
margin-left: 25px;
}
#file-uploading {
display: flex;
align-items: center;
a {
margin-left: 5px;
color: $primary-high;
}
2017-11-08 17:39:26 +08:00
.spinner {
margin-right: 5px;
}
}
}
.composer-bottom-right {
flex-basis: 50%;
display: flex;
flex-direction: row-reverse;
.toggle-preview {
order: 2;
}
}
#draft-status,
#file-uploading {
color: $primary-high;
2017-11-08 17:39:26 +08:00
}
}
.cooked > *:first-child {
margin-top: 0;
}
.autocomplete {
z-index: z("composer", "dropdown") + 1;
position: absolute;
width: 240px;
background-color: $secondary;
2017-11-08 17:39:26 +08:00
border: 1px solid $primary-low;
ul {
list-style: none;
padding: 0;
margin: 0;
2017-01-04 12:37:02 +08:00
li {
.d-icon-users {
color: lighten($primary, 40%);
padding: 0 2px;
}
2017-11-08 17:39:26 +08:00
border-bottom: 1px solid $primary-low;
a {
padding: 5px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
span.username {
color: $primary;
}
span.name {
2018-01-13 06:27:38 +08:00
font-size: $font-down-1;
vertical-align: middle;
}
&.selected {
2017-06-12 10:20:14 +08:00
background-color: $tertiary-low;
}
@include hover {
2017-11-08 17:39:26 +08:00
background-color: $highlight-low;
text-decoration: none;
}
}
}
}
}
div.ac-wrap.disabled {
input {
display: none;
}
.item a {
display: none;
}
}
div.ac-wrap div.item a.remove,
.remove-link {
margin-left: 4px;
2018-01-13 06:27:38 +08:00
font-size: $font-down-1;
line-height: $line-height-small;
padding: 1px 3.5px;
border-radius: 12px;
box-sizing: border-box;
2017-11-08 17:39:26 +08:00
border: 1px solid $primary-low;
&:hover {
2017-10-11 04:07:46 +08:00
background-color: $danger-low;
border: 1px solid $danger-medium;
text-decoration: none;
color: $danger;
}
}
div.ac-wrap {
overflow: auto;
max-height: 150px;
display: flex;
flex-wrap: wrap;
align-items: center;
background-color: $secondary;
border: 1px solid $primary-medium;
min-height: 30px;
box-sizing: border-box;
div.item {
float: left;
padding: 4px 10px;
line-height: $line-height-large;
span {
display: inline-block;
line-height: $line-height-medium;
}
}
.ac-collapsed-button {
float: left;
border-radius: 20px;
position: relative;
top: -2px;
margin-right: 10px;
}
input[type="text"] {
float: left;
display: block;
box-shadow: none;
border: 0;
margin: 0;
background: transparent;
min-height: unset;
}
}
.future-date-input {
.examples {
color: $primary-medium;
}
}
.md-table {
overflow-y: auto;
margin: 1em 0;
2018-08-09 03:51:11 +08:00
.mobile-view & {
table {
width: 100%;
}
}
}