zzlogan
-
Posts
60 -
Joined
-
Last visited
Reputation Activity
-
zzlogan got a reaction from Jordy_TheShop in Edit form placeholder text - CSS
I had to use this code to change the text of the placeholder
.sqs-block-form .field-element::placeholder { font-family: 'YOUR FONT' !important; }
-
zzlogan got a reaction from JanetTTT in Create a fixed side navigation that shows your current scrolling page location
I tried this, and it is working
/* Style the links inside the sidenav */ #mySidenav a { position: absolute; /* Position them relative to the browser window */ right: 0em; /* Position them outside of the screen */ //transition: .1s; /* Add transition on hover */ padding: 10px; /* 15px padding */ position: fixed; width: 100px; /* Set a specific width */ text-decoration: none; /* Remove underline */ font-size: 15px; color: #ebb646; //#ffad77 //border-radius: 0 5px 5px 0; /* Rounded corners on the top right and bottom right side */ z-index: 7990; } #mySidenav a:hover { right: .444em; /* On mouse-over, make the elements appear as they should */ } /* The about link: 20px from the top with a green background */ #supload { top: 370px; //background-color: #04AA6D; } #sos { top: 400px; //background-color: #2196F3; /* Blue */ } #govote { top: 430px; //background-color: #2196F3; /* Blue */ } #solarstates { top: 460px; //background-color: #f44336; /* Red */ } #neuronnectar { top: 490px; //background-color: #555 /* Light Black */ } #rdoor { top: 520px; //background-color: #555 /* Light Black */ } #aboutme { top: 550px; //background-color: #555 /* Light Black */ } @media screen and (max-width:740px){ #block-yui_3_17_2_1_1632919836480_17663{ display:none; }} html { --scroll-behavior: smooth; scroll-behavior: smooth; } with these code injections
Header
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> jQuery(document).ready(function($){ $('.header-menu-nav-item a').click(function(){ $('body').removeClass('header--menu-open'); $('button.header-burger-btn.burger').click(); }); }) </script> Footer
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script> $(document).ready(function(){ // Add smooth scrolling to all links $("a").on('click', function(event) { // Make sure this.hash has a value before overriding default behavior if (this.hash !== "") { // Prevent default anchor click behavior event.preventDefault(); // Store hash var hash = this.hash; // Using jQuery's animate() method to add smooth page scroll // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area $('html, body').animate({ scrollTop: $(hash).offset().top }, 100, function(){ // Add hash (#) to URL when done scrolling (default click behavior) window.location.hash = hash; }); } // End if }); }); </script>
This is working well, only thing is finding a way to change the font color when the text glides over a new background color. I have tried invert, but it only works with static text, not when I scroll down the page the text just stays the same color.
Would anyone know how to change the text color when scroll into a new section?
@tuanphan @bangank36 @creedon
-
zzlogan got a reaction from creedon in Create a fixed side navigation that shows your current scrolling page location
thank you!
-
zzlogan got a reaction from creedon in Keep Main Navigation underlined when viewing a Not Linked Page
@creedon, this works great! thank you for this! it works great and am now just copying that for the different pages that have the same thing and replacing "magazine" with "blog", and it just works. Thank you for sharing this approach.
-
zzlogan reacted to creedon in Keep Main Navigation underlined when viewing a Not Linked Page
It may be possible to do this with CSS only but it seems to me it would be a more tortuous route. Javascript seems a better fit here.
Add the following to Settings > Advanced > Code Injection > HEADER. The OP doesn't need to do this step as they already have jQuery installed.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> Add the following to Settings > Advanced > Code Injection > FOOTER.
<script> $( ( ) => { /* begin add navigation magazine underline to magazine subpages Version : 0.1d0 SS Version : 7.1 Dependancies : jQuery By : Thomas Creedon < http://www.tomsWeb.consulting/ > no user serviceable parts below */ // bail if not magazine subpage if ( ! location.pathname.startsWith ( '/magazine/' ) ) return; $( '.header-nav-item [href="/magazine"]' ) .parent ( ) .addClass ( 'header-nav-item--active' ); // end add navigation magazine underline to magazine subpages } ); </script> Let us know how it goes.
-
zzlogan reacted to Beyondspace in Create a fixed side navigation that shows your current scrolling page location
Í í
It called same-page navigation, you can find more info about it here
Creating same-page links in Squarespace ▪️ Launch the Damn Thing!
-
zzlogan got a reaction from ErikaT in For the header of the mobile view, how can you show 3 things: hamburger menu, logo and a button?
awesome, thank you Erika!
-
zzlogan reacted to ErikaT in For the header of the mobile view, how can you show 3 things: hamburger menu, logo and a button?
Hi,
Sure, with the below (enclose the below in your 1024px media query if you want the rounded effect etc on mobiles/tablets only). You may need to adjust your logo padding slightly again after this 🙂
.header-actions-action--cta a {
border-radius: 5px;
padding: 0.8em 0.8em !important;
}
-
zzlogan reacted to ErikaT in For the header of the mobile view, how can you show 3 things: hamburger menu, logo and a button?
Hi,
I edited one of @tuanphan responses to a similar query, with some tweaks for your setup:. Tuan is the expert, I'm still learning 🙂
@media screen and (max-width:1024px) {
/* show button */
.header-actions {
display: block !important;
}
.header .header-actions-action--cta {
display: block;
width: 10% !important;
}
/* logo width */
.header-title-nav-wrapper {
flex: 50% !important;
}
}
.header .header-mobile-layout-logo-center-nav-left .header-display-mobile .header-title .header-mobile-logo {
padding-right: 0px;
padding-left: 10px;
}