Skip to content

Commit 98a2828

Browse files
authored
Merge pull request #2328 from tf/perma-input-wrap
Break permalink input but not inside base url
2 parents a9ddea5 + 4e24340 commit 98a2828

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

app/assets/stylesheets/pageflow/admin/permalink_input.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ $pageflow-permalink-input-directory-background-position: null !default;
1818
.pageflow_permalink.input {
1919
.permalink {
2020
display: inline-flex;
21+
flex-wrap: wrap;
2122
border: 1px solid $pageflow-permalink-input-border-color;
2223
border-radius: $pageflow-permalink-input-border-radius;
2324
background-color: $pageflow-permalink-input-background-color;
@@ -38,6 +39,12 @@ $pageflow-permalink-input-directory-background-position: null !default;
3839
background-color: $pageflow-permalink-input-base-url-background-color;
3940
color: $pageflow-permalink-input-base-url-color;
4041
flex: 1;
42+
white-space: nowrap;
43+
}
44+
45+
.permalink_inputs {
46+
display: inline-flex;
47+
flex: 10;
4148
}
4249

4350
select,
@@ -61,7 +68,7 @@ $pageflow-permalink-input-directory-background-position: null !default;
6168

6269
input {
6370
padding-left: 0;
64-
flex: 2;
71+
flex: 1;
6572
}
6673

6774
&.no_directories {

app/inputs/pageflow_permalink_input.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ def base_url_html
3030
def permalink_inputs_html
3131
return '' if options[:site].permalink_directories.empty? || options[:only_root]
3232

33-
builder.select(:directory_id, directory_select_options) <<
34-
builder.text_field(:slug, data: {placeholder: options[:slug_placeholder]})
33+
template.content_tag(
34+
:div,
35+
builder.select(:directory_id, directory_select_options) <<
36+
builder.text_field(:slug, data: {placeholder: options[:slug_placeholder]}),
37+
class: 'permalink_inputs'
38+
)
3539
end
3640

3741
def error_keys

0 commit comments

Comments
 (0)