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

TO - Additional Info Read More JS #457

Merged
merged 4 commits into from
Dec 12, 2024
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
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;
}
}

Comment on lines +6 to 31

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

The use of !important in CSS is generally discouraged as it breaks the natural cascading in your stylesheets. It's better to increase specificity of the selector or rethink your class structure instead.

-8: 			border-color: #000 !important;
-13: 				border-color: #000 !important;

+8: 			border-color: #000;
+13: 				border-color: #000;

&.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;
}
}
}
Comment on lines +48 to +83

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

The use of !important in CSS is generally discouraged as it breaks the natural cascading in your stylesheets. It's better to increase specificity of the selector or rethink your class structure instead.

-34: 			padding: 15px !important;

+34: 			padding: 15px;


.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;
}
}
}
}
Comment on lines +91 to +117

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

The use of content: ''; /* Remove font icon */ seems to be a workaround for removing the font icon. If you don't want to display the content, consider using a different approach such as changing the visibility or display property.


.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
Loading