Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spacing around widgets in TheAdmin theme #12984

Merged
merged 1 commit into from
Dec 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
/* Flow uses common Widget CSS from Widget Module - Define any additional Flow or Bag specific CSS here*/
.widget-editor-body > div > .edit-container{
.widget-editor-body > div > .edit-container {

div.form-group:only-of-type > label {
display: none;
}

div.form-group:only-of-type > .trumbowyg-box:not(.trumbowyg-fullscreen) {
margin-top: -12px !important;
width: calc(100% + 33px );
margin-left: -17px !important;
border-top:none;
border-right:none;
border-top: none;
border-right: none;
}

div.form-group:only-of-type > .CodeMirror {
margin-top: -12px !important;
width: calc(100% + 33px );
margin-left: -17px !important;
border-top:none;
border-right:none;
}
border-top: none;
border-right: none;
}
}

.btn-widget-add-below, .btn-widget-metadata, .btn-bag-add {
Expand All @@ -42,6 +44,7 @@
border-color: #007bff;
border-style: dotted;
}

.btn-widget-metadata {
margin: 0 auto;
left: 0;
Expand All @@ -51,47 +54,54 @@
height: 1px;
white-space: nowrap;
text-align: center;
transition: 0.3s visibility;
transition: 0.3s visibility;

> .btn-group {
top: -20px;
}
}
.widget-editor-header{
&.card-header{

.widget-editor-header {
&.card-header {
&:hover {
> .btn-widget-metadata {
visibility:visible;
}
visibility: visible;
}
}
}
}

.btn-widget-add-below-wrapper {
min-height: 5px;

&:hover {
> .btn-widget-add-below {
border-width: 5px;
opacity: 1;
}
}
}
}

.btn-widget-add-below {
height: 1px;
position: relative;
opacity: 0.5;
transition: 0.3s opacity;
> .btn-group {

> .btn-group {
margin: 0 auto;
bottom: 17px;
}
}

[dir="ltr"] .btn-widget-add-below {
> .btn-group {
> .btn-group {
left: calc(-14px + 50%);
}
}

[dir="rtl"] .btn-widget-add-below {
> .btn-group {
> .btn-group {
right: calc(-14px + 50%);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
{
var type = Model.ContainedContentTypeDefinitions.First();

<a class="btn btn-primary add-widget btn-sm mt-1"
<a class="btn btn-primary add-widget btn-sm"
data-target-id="@widgetTemplatePlaceholderId"
data-html-field-prefix="@htmlFieldPrefix"
data-prefixes-name="@Html.NameFor(x => x.Prefixes)"
Expand All @@ -70,7 +70,7 @@
}
else if (totalItems > 1)
{
<div class="btn-group btn-bag-add mt-1">
<div class="btn-group btn-bag-add">
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@T["Add Item"]
</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@* This template can be Overridden to change the row behavior of widget collection *@
@* For ROOT DIV its CSS classes widget-template and col-md-* are required - Do not remove then in customization*@
<div class="widget-template col-md-12 px-0">
<div class="widget-template col-md-12 px-0 mb-1">
@await DisplayAsync(Model.ChildContent)
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
display: inline-block;
}

.widget-template-placeholder {
min-height: 4em;
}

.widget-dropzone-hint {
border: 3px dashed orange;
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions src/OrchardCore.Themes/TheAdmin/Assets/scss/modules/_layout.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.preload * {
.preload * {
-webkit-transition: none !important;
-moz-transition: none !important;
-ms-transition: none !important;
Expand Down Expand Up @@ -27,7 +27,6 @@ a {
// -----------------------------

.ta-wrapper {

}

.ta-content {
Expand Down Expand Up @@ -66,9 +65,9 @@ a {

// Sortable
// ------------------------------
.ui-sortable {
min-height: $font-size-base;
}
// .ui-sortable {
// min-height: $font-size-base;
// }

.with-checkbox .list-group-item {
padding: 0.75rem 0.5rem;
Expand All @@ -91,7 +90,7 @@ a {
z-index: $zindex-sticky;
}

.list-group-item+.list-group-item {
.list-group-item + .list-group-item {
border-top-width: 0px;
}

Expand Down Expand Up @@ -119,7 +118,7 @@ svg {
border-width: 5px;
opacity: 1;
}
}
}
}

.btn-dropdown {
Expand All @@ -145,7 +144,8 @@ svg {
z-index: 1000;
opacity: 0.8;
transition: 0.3s opacity;
> .btn-group {

> .btn-group {
margin: 0 auto;
bottom: 17px;
}
Expand All @@ -156,13 +156,13 @@ svg {
}

[dir="ltr"] .btn-dropdown {
> .btn-group {
> .btn-group {
left: calc(-14px + 50%);
}
}

[dir="rtl"] .btn-dropdown {
> .btn-group {
> .btn-group {
right: calc(-14px + 50%);
}
}
Expand All @@ -175,6 +175,6 @@ svg {
text-decoration: none !important;
}

.unset{
.unset {
all: unset;
}
6 changes: 0 additions & 6 deletions src/OrchardCore.Themes/TheAdmin/wwwroot/css/TheAdmin.css
Original file line number Diff line number Diff line change
Expand Up @@ -29028,9 +29028,6 @@ html[data-theme=default] .auth-wrapper {
html[dir][data-theme=default] .auth-wrapper {
margin: auto;
}
html[data-theme=default] .ui-sortable {
min-height: 1rem;
}
html[dir][data-theme=default] .with-checkbox .list-group-item {
padding: 0.75rem 0.5rem;
}
Expand Down Expand Up @@ -58467,9 +58464,6 @@ html[data-theme=darkmode] .auth-wrapper {
html[dir][data-theme=darkmode] .auth-wrapper {
margin: auto;
}
html[data-theme=darkmode] .ui-sortable {
min-height: 1rem;
}
html[dir][data-theme=darkmode] .with-checkbox .list-group-item {
padding: 0.75rem 0.5rem;
}
Expand Down
4 changes: 2 additions & 2 deletions src/OrchardCore.Themes/TheAdmin/wwwroot/css/TheAdmin.min.css

Large diffs are not rendered by default.