Jump to content

Portfolio page link from portfolio in galleries to portfolio on home page

Recommended Posts

Posted

Hello, I have a portfolio on my galleries page. I'm trying to have a selection of my favourite portfolios on my homepage but cannot work out how they would link to the same place without having to build two pages exactly the same. I chose portfolios rather than just using images with a link as I wanted the text and darken when you hover the mouse over the top? Any help is much appreciated

  • Replies 35
  • Views 5.3k
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 weeks later...
Posted

Yes I’d like to be able to make those lead to the same pages as the ones in the galleries page so that I don’t have to duplicate pages. Either the link on those or if it’s easier I can change to regular pictures and then just need the code for the hover effect of darken and light text same as what is on the portfolio?

Posted
On 10/23/2023 at 4:20 PM, ConnorMcLarenPhotography said:

Yes I’d like to be able to make those lead to the same pages as the ones in the galleries page so that I don’t have to duplicate pages. Either the link on those or if it’s easier I can change to regular pictures and then just need the code for the hover effect of darken and light text same as what is on the portfolio?

Yes. Use Gallery will be easier.

You can share link to page where you use gallery page, we can give code to achieve hover

(If you use Gallery Section Grid, you can also try this CSS code first)

figure.gallery-grid-item {
    position: relative;
}
.gallery-caption {
    position: static;
}
/* title */
figcaption.gallery-caption .gallery-caption-wrapper p.gallery-caption-content {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 7%;
    transition: opacity ease 200ms !important;
    opacity: 0 !important;
pointer-events: none;
}
.gallery-grid-item:hover .gallery-caption-wrapper p.gallery-caption-content {
    opacity: 1 !important;
}
/* overlay */
.gallery-grid-item-wrapper a:after {
    background: #f4f6ea; /* overlay color */
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity ease 200ms !important;
}
.gallery-grid-item:hover .gallery-grid-item-wrapper a:after {
    opacity: 0.75;
}
/* remove gap */
figcaption {
    padding: 0 !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!)

Posted

Hello,

I've tried adding in the code you've given there but I can't see what it's doing?

https://www.connormclaren.co.uk/galleries

This is the link to my galleries page which will have lots of pictures to make have the same hover effect as the portfolio page. I've also noticed the pictures don't go right to the edge of the screen, is there code for this too?

Thank you for your help.

Posted

My code for Gallery Section, but you are using Image Blocks, so it won't work.

You can consider using Gallery Section, it will easier to achieve with code, with Image Block, each image will need a different code so your case will require a lot of code

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!)

Posted

figure.gallery-grid-item {
    position: relative;
}
.gallery-caption {
    position: static;
}
/* title */
figcaption.gallery-caption .gallery-caption-wrapper p.gallery-caption-content {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 7%;
    transition: opacity ease 200ms !important;
    opacity: 0 !important;
pointer-events: none;
}
.gallery-grid-item:hover .gallery-caption-wrapper p.gallery-caption-content {
    opacity: 1 !important;
}
/* overlay */
.gallery-grid-item-wrapper a:after {
    background:rgba(0,0,0,0.85) /* overlay color */
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity ease 200ms !important;
}
.gallery-grid-item:hover .gallery-grid-item-wrapper a:after {
    opacity: 0.75;
}
/* remove gap */
figcaption {
    padding: 0 !important;
}

 

This is the full code I'm using, I tried adding a semicolon (background:rgba(0,0,0,0.85); /* overlay color */) which removed the syntax message but the code still didn't achieve what I was hoping for.      

 

 

Posted

These code for LINKED IMAGES, but you haven't added any links to image, so it won't work.

Use this new code

/* Gallery hover - with No Link */
figure[class*="gallery"]:not(.gallery-slideshow-item) {
    position: relative;
}
.gallery-caption {
    position: static;
}
/* title */
.gallery-caption p.gallery-caption-content {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 7%;
    transition: opacity ease 200ms !important;
    opacity: 0 !important;
pointer-events: none;
}
figure[class*="gallery"]:hover .gallery-caption-wrapper p.gallery-caption-content {
    opacity: 1 !important;
}
/* overlay */
div[class*="-item-wrapper"]:after {
    background:rgba(0,0,0,0.85); /* overlay color */
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity ease 200ms !important;
}
figure[class*="gallery"]:hover div[class*="-item-wrapper"]:after {
    opacity: 0.75;
}
/* remove gap */
figcaption {
    padding: 0 !important;
}

image.png.1b3e3d4a717689f31333e3fbb49bf0e5.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!)

Posted

You can add font size to this code

image.png.7e911856f09817a641d0b2d08624c691.png

it will be

/* title */
.gallery-caption p.gallery-caption-content {
	font-size: 30px !important;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 7%;
    transition: opacity ease 200ms !important;
    opacity: 0 !important;
pointer-events: none;
}

 

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!)

  • 8 months later...
Posted
On 8/27/2024 at 11:10 PM, ConnorMcLarenPhotography said:

That's great thanks. I have it set to rows of 3 on desktop but it seems to default to rows of two for mobile, is there a code to make it just single image rows on mobile?

You can use this CSS code

@media screen and (max-width:767px) {
.gallery-grid-wrapper {
    grid-template-columns: repeat(1,1fr) !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!)

Posted

Thank you. Is there a way I can make the buttons smaller for the phone without affecting the desktop? I have 4 buttons in a row which sits nice on the desktop but when they’re on the phone they’re too big to fit in a row so I have to stack them on top of each other? Please see attached pictures

 

 

IMG_6932.jpeg

IMG_6933.jpeg

Posted
On 8/31/2024 at 10:06 PM, ConnorMcLarenPhotography said:

Thank you. Is there a way I can make the buttons smaller for the phone without affecting the desktop? I have 4 buttons in a row which sits nice on the desktop but when they’re on the phone they’re too big to fit in a row so I have to stack them on top of each other? Please see attached pictures

 

 

IMG_6932.jpeg

IMG_6933.jpeg

I think you can edit page > Click Mobile icon on top right > Then drag 4 items same line

Use this code to Custom CSS to reduce their size

@media screen and (max-width:767px) {
.fe-6544ffc4966f3e0e4f844d1b>div:not(:first-child) a {
    font-size: 10px !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!)

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.