Skip to content

Commit

Permalink
Merge pull request #457 from lightspeedwp/additional-info-read-more
Browse files Browse the repository at this point in the history
TO - Additional Info Read More JS
  • Loading branch information
krugazul authored Dec 12, 2024
2 parents b19e63e + 14d62aa commit 70abbf3
Show file tree
Hide file tree
Showing 8 changed files with 472 additions and 111 deletions.
94 changes: 94 additions & 0 deletions assets/css/scss/_additional.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/* Additional information specific styles */

/* Fast Facts Wrapper */
.fast-facts-wrapper > .wp-block-group .wp-block-group:first-child {
display: flex;
align-items: flex-start; /* Align content in this group to the top */
gap: 5px; /* Space between icon and text */
flex-shrink: 0; /* Prevent group from shrinking */
}

/* Style the image icon */
.fast-facts-wrapper > .wp-block-group .wp-block-image img {
width: 20px; /* Fixed width */
height: 20px; /* Fixed height */
display: inline-block;
object-fit: contain; /* Ensure image doesn't stretch or distort */
}

/* Styling for the label (e.g., "Special Interests:") */
.fast-facts-wrapper > .wp-block-group .wp-block-group:first-child p {
margin: 0;
white-space: nowrap; /* Prevent wrapping for label */
vertical-align: middle; /* Align text with the middle of the icon */
line-height: 1.2; /* Improve readability */
display: inline-block; /* Keep text inline */
}

/* Styling for the flowing text */
.fast-facts-wrapper > .wp-block-group .wp-block-group:last-child {
display: flex;
flex-wrap: nowrap; /* Keep the text flowing inline */
white-space: normal; /* Allow wrapping for text if it overflows */
overflow-wrap: break-word; /* Ensure long words wrap correctly */
word-break: break-word; /* Break long words when needed */
flex: 1; /* Allow the container to use available space */
align-items: flex-start; /* Ensure text starts at the top */
}

/* Specific styling for the text content */
.fast-facts-wrapper > .wp-block-group .wp-block-group:last-child p {
white-space: normal; /* Allow wrapping for long text */
overflow-wrap: break-word; /* Break words when needed */
word-break: break-word; /* Break words on legacy browsers */
line-height: 1.4; /* Improve readability */
text-transform: capitalize; /* Capitalize text */
padding: 0; /* Ensure no unnecessary padding */
margin: 0; /* Remove extra margins */
display: inline; /* Ensure the text flows inline with the label */
}

/* Facilities List */
.facilities-list li::marker {
display: none;
}

.facilities-list {
padding-left: 0 !important;
}

.facilities-list li {
margin-left: 10px;
list-style: none; /* Remove default list marker */
position: relative; /* Position for pseudo-element */
}

.facilities-list li::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%); /* Center the icon vertically */
width: 20px; /* Adjust the size of the tick icon */
height: 20px;
background-image: url('../../img/tick.svg'); /* Replace with the path to your tick.svg */
background-size: contain;
background-repeat: no-repeat;
left: -28px;
}

/* Additional Info */
.additional-info .wp-block-group.content .read-more-btn,
.additional-info .wp-block-group.content .read-less-btn {
color: #0073aa;
cursor: pointer;
font-weight: bold;
}

.additional-info .wp-block-group.content .read-more-btn:hover {
text-decoration: underline;
}

.additional-info .wp-block-group.content .read-less-btn {
display: none;
}
246 changes: 165 additions & 81 deletions assets/css/scss/_slider.scss
Original file line number Diff line number Diff line change
@@ -1,112 +1,196 @@
.slick-lightbox-close {
right: 32px;
top: 32px;
}

.wp-block-query {
&.lsx-to-slider {
gap: var(--wp--preset--spacing--small) var(--wp--preset--spacing--small);
position: relative;

.slick-arrow {
cursor: pointer;
border-color: #000 !important;
height: 30px;
width: 30px;

.lsx-to-slider,
.slick-lightbox-inner {
.slick-arrow {
background: transparent;
border-radius: 50%;
border-style: solid;
border-width: 2px;
font: 0/0 a;
height: 4rem;
margin-top: calc((2.25rem - 17px) / 2);
padding: 0;
text-shadow: none;
transform: translateY(-50%);
transition: border 300ms ease;
width: 4rem;
z-index: 3;

&:before {
display: block;
font-family: 'FontAwesome';
font-size: 3rem;
line-height: 1;
position: absolute;
text-rendering: auto;
top: 47%;
transform: translateY(-50%);
transition: color 300ms ease;

-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
&:before {
border-color: #000 !important;
height: 30px;
width: 30px;
}

&.slick-disabled { cursor: not-allowed; }
&.slick-prev:before {
background: url('../img/left-arrow-dark.svg') no-repeat center center;
width: 20px;
left: 3px;
height: 20px;
}

&.slick-prev {
&:before {
content: '\f104';
left: 1.1rem;
&.slick-next:before {
background: url('../img/right-arrow-dark.svg') no-repeat center center;
width: 20px;
left: 3px;
height: 20px;
}
}

&.slick-next {
&:before {
content: '\f105';
left: 1.5rem;
}
.slick-slide {
padding: 15px !important;
}
}
}

.slick-lightbox-close {
right: 52px;
top: 35px;

&:before {
font-size: 40px;
}
}

.lsx-to-slider,
.slick-lightbox-inner {
.slick-arrow {
background: transparent;
border-radius: 50%;
position: absolute;
top: 50%;
border-style: solid;
border-color: #fff;
border-width: 2px;
font: 0/0 a;
height: 4rem;
margin-top: calc((2.25rem - 17px) / 2);
padding: 0;
text-shadow: none;
transform: translateY(-50%);
transition: border 300ms ease;
width: 4rem;
z-index: 3;
color: white;

&:before {
display: block;
font-family: "slick";
color: white;
font-size: 3rem;
line-height: 1;
position: absolute;
text-rendering: auto;
top: 47%;
transform: translateY(-50%);
transition: color 300ms ease;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
}
}

.slick-prev svg,
.slick-next svg {
color: white;
}

.lsx-to-slider,
.slick-lightbox-inner {
.slick-arrow {
&.slick-disabled {
cursor: not-allowed;
}

&.slick-prev {
&:before {
content: ''; /* Remove font icon */
width: 40px;
height: 40px;
display: inline-block;
left: 10px;
}
}

&.slick-next {
&:before {
content: ''; /* Remove font icon */
width: 40px;
height: 40px;
display: inline-block;
left: 12px;
}
}
}
}

.lsx-to-slider {
.slick-dots:not(.dropdown-menu) {
align-items: center;
display: flex;
flex-flow: row wrap;
height: auto;
justify-content: center;
list-style: none;
margin: 2rem 0 0;
padding: 0;

& > li {
line-height: 1;
padding: 5px;

& > button {
background: transparent;
border-style: solid;
border-width: 1px;
font: 0/0 a;
height: 12px;
transition: all 300ms ease-in-out;
width: 4rem;
}
align-items: center;
display: flex;
flex-flow: row wrap;
height: auto;
justify-content: center;
list-style: none;
margin: 2rem 0 0;
padding: 0;

> li {
line-height: 1;
padding: 5px;

> button {
background: transparent;
border-style: solid;
border-width: 1px;
font: 0/0 a;
height: 12px;
transition: all 300ms ease-in-out;
width: 4rem;
}
}
}

.slick-arrow {
&.slick-prev { left: -4rem; }
&.slick-next { right: -4rem; }
&.slick-prev {
left: -4rem;
}

&.slick-next {
right: -4rem;
}
}

&.slider-disabled {
overflow: hidden;
}

.slick-slide {
.lazy-hidden {
max-height: 154px;
}
}
}

.lsx-to-slider {
&.slider-disabled { overflow: hidden; }
}

.slick-lightbox-inner {
.slick-arrow {
opacity: .75;

&:hover { opacity: 1; }
opacity: 0.75;

&:hover {
opacity: 1;
}
}
}

.slick-lightbox-slick-caption { display: inline-block; }
.slick-lightbox-slick-caption {
display: inline-block;
}

.lsx-to-slider,
.lsx-post-carousel-items {
.slick-slide {
.lazy-hidden {
max-height: 154px;
}
}
}
}

.lsx-itinerary-wrapper,
.lsx-units-wrapper {
.hidden {
display: none;
}
}

Loading

0 comments on commit 70abbf3

Please sign in to comment.