Jump to content

Hover for Blog exerpt link

Recommended Posts

Hello All-

Trying, unsuccessfully to style a link in Exerpts on a blog page. I would like to have a hover color, medium bold the link, and remove the underline. Is it also possible to have the web link open a new browser window the same behaviour as the passthrough-link? 

Using inspector I can see that exerpt text is  p.preFade.fadeIn but dont know where to go from there with code. Many Many thanks for any support.

https://playbook-nth.squarespace.com/communications

password: NTH2024#

First blog entry “Using Accessibility Features” is the entry I am working on 

Edited by hansworks
added a function
Link to comment
On 1/8/2024 at 3:53 AM, hansworks said:

Hello All-

Trying, unsuccessfully to style a link in Exerpts on a blog page. I would like to have a hover color, medium bold the link, and remove the underline. Is it also possible to have the web link open a new browser window the same behaviour as the passthrough-link? 

Using inspector I can see that exerpt text is  p.preFade.fadeIn but dont know where to go from there with code. Many Many thanks for any support.

https://playbook-nth.squarespace.com/communications

password: NTH2024#

First blog entry “Using Accessibility Features” is the entry I am working on 

It looks like you changed url, the page doesn't work now

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Add this code to Website Tools (under Not Linked) > Code Injection > Footer

<style>
  .blog-excerpt a:hover {
    font-weight: bold;
    color: #f1f;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('.blog-excerpt a').attr('target','_blank');
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Amazing! Thank you sooooo much for the script, definitely outside my capacity. One question: How do I increase the weight and reduce the size of  the "VIEW WEBSITE" link before hover effect?

Edited by hansworks
Link to comment
On 1/24/2024 at 11:47 PM, hansworks said:

Amazing! Thank you sooooo much for the script, definitely outside my capacity. One question: How do I increase the weight and reduce the size of  the "VIEW WEBSITE" link before hover effect?

Edit top code <style> code to this

<style>
    .blog-excerpt a {
  	font-size: 10px;
    font-weight: 300;
  }
  .blog-excerpt a:hover {
    font-weight: bold;
    color: #f1f;
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...
  • 1 month later...
Posted (edited)

Looking for some help updating the above code

https://playbook-nth.squarespace.com/technology-resources. PW:NTH2024#

#collection-659613958b47182e64b137e0 was targeted in sitewide CSS to make changes as well as footer injection to create hover.

 

/*BLOG ADJUST SECTION:

remove accessibilty arrow on blog post title*/ 

.passthrough-link:after {

    content: "" !important;

}

/* blog page title link hover color */

.passthrough-link:hover {

   color: none;

}

// remove click through on categories 

body#collection-659613958b47182e64b137e0 .blog-categories {

    pointer-events: none;

}

/* remove click through on title */

body#collection-659613958b47182e64b137e0 .blog-title

{

    pointer-events: none;

}

/* remove click through on tags */

body#collection-659613958b47182e64b137e0 .blog-tags

{

    pointer-events: none;

}

 

(1)  https://playbook-nth.squarespace.com/technology-resources/queens-connected-mobile-hotspot-lending-program  Sitewide how can i block the "tags" from showing - see attached screen shot. I'm using Universal Filter if that makes any difference.

(2) https://playbook-nth.squarespace.com/social-services-referral-resources  on this page only #collection-65afe261149961050212a96a could a hover be added to the accessability arrows?  I have tried removing the code .passthrough-link:after {content: "" !important; but the arrows are not showing after removal. Could this be caused by Universal Plugin?

Grateful for the help!

 

 

 

TAG REMOVAL.png

Edited by hansworks
Link to comment
On 4/4/2024 at 11:26 AM, hansworks said:

Looking for some help updating the above code

https://playbook-nth.squarespace.com/technology-resources. PW:NTH2024#

#collection-659613958b47182e64b137e0 was targeted in sitewide CSS to make changes as well as footer injection to create hover.

 

/*BLOG ADJUST SECTION:

remove accessibilty arrow on blog post title*/ 

.passthrough-link:after {

    content: "" !important;

}

/* blog page title link hover color */

.passthrough-link:hover {

   color: none;

}

// remove click through on categories 

body#collection-659613958b47182e64b137e0 .blog-categories {

    pointer-events: none;

}

/* remove click through on title */

body#collection-659613958b47182e64b137e0 .blog-title

{

    pointer-events: none;

}

/* remove click through on tags */

body#collection-659613958b47182e64b137e0 .blog-tags

{

    pointer-events: none;

}

 

(1)  https://playbook-nth.squarespace.com/technology-resources/queens-connected-mobile-hotspot-lending-program  Sitewide how can i block the "tags" from showing - see attached screen shot. I'm using Universal Filter if that makes any difference.

(2) https://playbook-nth.squarespace.com/social-services-referral-resources  on this page only #collection-65afe261149961050212a96a could a hover be added to the accessability arrows?  I have tried removing the code .passthrough-link:after {content: "" !important; but the arrows are not showing after removal. Could this be caused by Universal Plugin?

Grateful for the help!

 

 

 

TAG REMOVAL.png

#1. You can use this code to Technology Resources Page Header Code Injection

<style>
  .blog-meta-item.blog-meta-item--tags {
    display: none !important;
}
</style>

#2. You mean add an arrows after Website link?

image.thumb.png.4cb948120a940695a6214dde0e11a9c8.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
Posted (edited)

That worked perfectly! Thank you so much

For some reason the pre hover color (from higher up in the thread ) on the link "WEBSITE" is not displaying as a color. I am tring to have the pre-hover color as red and the hover color is set to blue using CSS. I think this is probably a SQSP site style issue as I cant find it in CSS.

Edited by hansworks
Link to comment
On 4/10/2024 at 11:42 PM, hansworks said:

That worked perfectly! Thank you so much

For some reason the pre hover color (from higher up in the thread ) on the link "WEBSITE" is not displaying as a color. I am tring to have the pre-hover color as red and the hover color is set to blue using CSS. I think this is probably a SQSP site style issue as I cant find it in CSS.

Use this CSS code

body#collection-659613958b47182e64b137e0 {
.blog-excerpt a {
    color: red;
}
.blog-excerpt a:hover {
    color: #6789d3 !important;
}}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Thank you so much! This also allows me to repeat this for other blocks as well, so super useful.

Another related aspect of the blog has come up: On https://playbook-nth.squarespace.com/social-services-referral-resources pw NTH2024 I am trying to make a link on each blog excerpt jump to each the blog entry in the same way that the title links to the entry. link would be blue text that changes to red on hover.

I have attached a sample image below using 'NYC 988..." entry as an example. Many thanks.

Screen Shot 2024-04-15 at 2.18.25 PM.png

Link to comment
On 4/16/2024 at 1:49 AM, hansworks said:

Thank you so much! This also allows me to repeat this for other blocks as well, so super useful.

Another related aspect of the blog has come up: On https://playbook-nth.squarespace.com/social-services-referral-resources pw NTH2024 I am trying to make a link on each blog excerpt jump to each the blog entry in the same way that the title links to the entry. link would be blue text that changes to red on hover.

I have attached a sample image below using 'NYC 988..." entry as an example. Many thanks.

Screen Shot 2024-04-15 at 2.18.25 PM.png

Password is incorrect now

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.