Skip to content

Commit

Permalink
Blog Post Template customisations and Scripts - Main CSS clean up (#33)
Browse files Browse the repository at this point in the history
* Hero Counter additon and update to main script file.

* Updated gap on Proof Splide

* Updated Gap

* Update to main script

* Updated Splide JS

* Update to Testimonial Slider to fix mobile view

* Splitting component scripts out

* Blog Template Page customisations and scripts.

* Update to CSS file

* Updated Class Selector for Section Banner

* Refactored CSS code to remove !important

* Updated comments on css file.
  • Loading branch information
Rework-Digital authored Nov 6, 2024
1 parent 00c7bf2 commit a6937e3
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 2 deletions.
79 changes: 77 additions & 2 deletions assets/css/solcast.webflow.style.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
font-display: swap;
}

html {
scroll-behavior: smooth;
}

/* Scroll bar styling */
* {
scrollbar-width: auto;
Expand Down Expand Up @@ -277,7 +281,7 @@ margin: 0rem !important;

/*
Custom CSS for Solcast Build
Code by Liam Hammersley of Rework Digital
Code by Liam Hammersley of Rework Digital (liam@reworkdigital.com.au)
*/

::marker {
Expand Down Expand Up @@ -416,6 +420,7 @@ table tbody tr:last-child td:last-child{
}

/* Table Columns */

.table_col-1 {
--table-col-count: 1;
}
Expand Down Expand Up @@ -607,6 +612,8 @@ table tbody tr:last-child td:last-child{
right: 0;
}

/* API Status Styling */

.sp-status {
position: relative;
display: inline-block;
Expand Down Expand Up @@ -727,4 +734,72 @@ table tbody tr:last-child td:last-child{
.gallery-items .item .item-wrap {
background-color: #111;
color: #acafb6;
}
}

/* Rich Text Formatting */

.text-rich-text.is-section-banner > h1,
.text-rich-text.is-section-banner > h2,
.text-rich-text.is-section-banner > h3 {
font-family: var(--font-families--headings);
font-weight: 700;
color: var(--text-color--text-alternate);
}

.text-rich-text.is-section-banner h1 {
font-size: var(--text-size--heading-1);
}

.text-rich-text.is-section-banner h2 {
font-size: var(--text-size--heading-2);
}

.text-rich-text.is-section-banner p {
color: var(--text-color--text-alternate);
font-family: var(--font-families--paragraph);
font-size: 1.75rem;
}

/* Custom Attribute Styling for Components*/

img[style-image-object-fit="contain"] {
object-fit: contain !important;
}
img[style-image-object-fit="cover"] {
object-fit: cover !important;
}

/* Blog Page Styling */

.blog_card:first-child {
grid-column: 1/4;
}

@media screen and (max-width: 991px) {
.blog_card:first-child {
grid-column: 1/3;
}
}

@media screen and (max-width: 767px) {
.blog_card:first-child {
grid-column: 1/2;
}
}

@media screen and (max-width: 478px) {
.blog_card:first-child {
grid-column: 1/1;
}
}

/* Blog Template Page Styling */

.blog_tags-item:last-child {
border: none;
}

.text-rich-text.is-blog * {
font-size: 0.9rem;
font-family: Montserrat , var(--font-families--paragraphs) , sans-serif;
}
9 changes: 9 additions & 0 deletions assets/js/iframe.resizer.js

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

25 changes: 25 additions & 0 deletions assets/js/page.blog-template.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* --- Blog Template Scripts --- */

//Search Box Redirect
$('form').submit(function() {
setTimeout(function() {
location.href = 'https://solcast.webflow.io/blog?*=' + $('#search').val();
}, 10);
});


//Hides Table of Contents if no H2 found
document.addEventListener("DOMContentLoaded", function() {
setTimeout(function() {
const tocElement = document.querySelector('.blog_summary-toc');
const linkWrapper = tocElement.querySelector('.blog_summary-toc_link-wrapper.is-h2');

if (linkWrapper && linkWrapper.textContent.trim() === "") {
tocElement.style.display = "none";
}
}, 200);
});


//Resizes iFrames for the newsletter sign ups
iFrameResize({log:true});

0 comments on commit a6937e3

Please sign in to comment.