mirror of
https://github.com/discourse/discourse.git
synced 2025-01-30 06:28:03 +08:00
UX: Updating the edit post title layout
This commit is contained in:
parent
995bf3c84e
commit
4af4081c39
|
@ -12,10 +12,10 @@
|
|||
{{#if model.postStream.firstPostPresent}}
|
||||
{{#topic-title cancelled="cancelEditingTopic" save="finishedEditingTopic" model=model}}
|
||||
{{#if editingTopic}}
|
||||
<div class="edit-topic-title">
|
||||
{{#if model.isPrivateMessage}}
|
||||
<span class="private-message-glyph">{{d-icon "envelope"}}</span>
|
||||
{{/if}}
|
||||
|
||||
{{text-field id="edit-title" value=buffered.title maxlength=siteSettings.max_topic_title_length autofocus="true"}}
|
||||
{{#if showCategoryChooser}}
|
||||
{{category-chooser class="small" value=buffered.category_id}}
|
||||
|
@ -26,7 +26,6 @@
|
|||
{{/if}}
|
||||
|
||||
{{plugin-outlet name="edit-topic" args=(hash model=model buffered=buffered)}}
|
||||
|
||||
<div class="edit-controls">
|
||||
{{d-button action="finishedEditingTopic" class="btn-primary btn-small submit-edit" icon="check"}}
|
||||
{{d-button action="cancelEditingTopic" class="btn-small cancel-edit" icon="times"}}
|
||||
|
@ -38,6 +37,8 @@
|
|||
</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{else}}
|
||||
<h1>
|
||||
{{#unless model.is_warning}}
|
||||
|
|
|
@ -73,8 +73,46 @@
|
|||
}
|
||||
|
||||
a.edit-topic i { font-size: 0.8em; }
|
||||
|
||||
.edit-topic-title {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
box-sizing: border-box;
|
||||
max-width: 758px;
|
||||
#edit-title {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
.private-message-glyph {
|
||||
margin: 5px 5px 0 0;
|
||||
}
|
||||
.category-chooser, .tag-chooser {
|
||||
flex: 1 1 49%;
|
||||
margin: 0 0 9px 0;
|
||||
@media all and (max-width: 500px) {
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
|
||||
}
|
||||
.tag-chooser {
|
||||
margin-left: 2%;
|
||||
@media all and (max-width: 500px) {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.private_message {
|
||||
#topic-title {
|
||||
.edit-topic-title {
|
||||
#edit-title {
|
||||
width: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.topic-title-outlet {
|
||||
clear: both;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
}
|
||||
|
||||
.select2-container {
|
||||
border: 1px solid $primary-low;
|
||||
min-width: 200px;
|
||||
|
||||
&.select2-dropdown-open {
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
.private-message-glyph {
|
||||
color: dark-light-choose($primary-low-mid, $secondary-high);
|
||||
float: left;
|
||||
margin: 0 5px 0 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.private_message #topic-title .private-message-glyph { display: inline; }
|
||||
|
||||
|
|
2
app/assets/stylesheets/vendor/select2.scss
vendored
2
app/assets/stylesheets/vendor/select2.scss
vendored
|
@ -406,7 +406,7 @@ disabled look for disabled choices in the results dropdown
|
|||
margin: 0;
|
||||
padding: 0 5px 0 0;
|
||||
position: relative;
|
||||
border: 1px solid #aaa;
|
||||
border: 1px solid $primary-medium;
|
||||
cursor: text;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user