Gusssssy Posted November 27 Posted November 27 Site URL: https://www.beyondinsights.co.uk/home-new Hello, I'm trying to create the attached design in Squarespace (see image below). I'm having a lot of trouble creating the card in the bottom right of the design linking to the latest article. Is this even possible? The best I can do is draw a rectangle shape with a drop shadow, add an image and some text but the layout doesn't work across different screen sizes. site https://www.beyondinsights.co.uk/home-new If you scroll into the next section you can see other ways i've tried creating this card - all with their limitations. Any help would be much appreciated @tuanphan
katycarlisle Posted Thursday at 12:21 AM Posted Thursday at 12:21 AM I can see in the second section you've tried using a summary block and that's the option I'd have suggested as well as it removes the need to manually update that card for every new article. You can add this to your custom CSS to style the summary block: /* Remove padding and margin from summary block item */ .sqs-block-summary-v2 .summary-block-setting-design-list .summary-item { margin-bottom: 0 !important; padding-bottom: 0 !important; } /* Add drop shadow to summary block */ .sqs-block-summary-v2 { box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px; } /* Set "Latest Article" tag background */ .sqs-block-summary-v2 .summary-metadata-item { background: #0d1bdc; color: #fff; opacity: 1; padding: 0.1em 0.6em; } /* Increase title font weight */ .sqs-block-summary-v2 .summary-title { font-weight: 600; } And of course make sure you've resized the block so there's no additional space underneath. Let me know if you need any more tweaks! tuanphan 1 Oh hey! I'm Katy Carlisle, a web designer and trainer who goes by the name SQSP Queen. My pronouns are she/her and I'm based on Vancouver Island in BC 🍁 I've been using Squarespace since 2013, and work mainly with non-profits or freelancers on projects that do good. I love answering questions about Squarespace and don't expect anything in return, but if you do want to say thanks, feel free to buy me a coffee ☕
Gusssssy Posted Thursday at 09:16 AM Author Posted Thursday at 09:16 AM @katycarlisle Wow, thanks! Thats a massive help but I'm still struggling to get the layout consistent across different screen sizes though... eg. on mobile the image is too big with too much padding beneath it (see attached screenshot). It looks great at 1440x900 - Is it possible to get it looking as similar to this across smaller/larger screen widths? Would it help if the article image was a fixed size? Thank you for your help
katycarlisle Posted Thursday at 05:54 PM Posted Thursday at 05:54 PM You can use the code below to change the size of the image on smaller screens. In the Squarespace mobile editor view are you able to resize the block to reduce the space at the bottom? /* Reduce image width on mobile */ @media screen and (max-width: 575px) { .sqs-block-summary-v2 .summary-block-setting-design-list .summary-thumbnail-outer-container { width: 30% !important; } } Oh hey! I'm Katy Carlisle, a web designer and trainer who goes by the name SQSP Queen. My pronouns are she/her and I'm based on Vancouver Island in BC 🍁 I've been using Squarespace since 2013, and work mainly with non-profits or freelancers on projects that do good. I love answering questions about Squarespace and don't expect anything in return, but if you do want to say thanks, feel free to buy me a coffee ☕
Gusssssy Posted Thursday at 06:47 PM Author Posted Thursday at 06:47 PM Many thanks again @katycarlisle - it kinda works - but i've noticed when resizing the browser and on mobile that if the title drops onto three lines the space beneath the image becomes uneven - see attached screenshot. Do you have any ideas? Thanks!
Solution katycarlisle Posted Friday at 01:23 AM Solution Posted Friday at 01:23 AM Okay so the text is going to alway reflow on different screen sizes, plus I'm assuming your article titles will vary in length. Because of this, an alternativel approach would be to allow the image to fill up the whole space, but it would mean you wouldn't have control over the aspect ratio i.e. it wouldn't always be square. This code should do that if you want to try it out and see what I mean (we may need to tweak it slightly). /* Allow image and text containers within the summary block to change size */ .sqs-block-summary-v2 .summary-block-setting-design-list .summary-item { display: flex; } .sqs-block-summary-v2 .summary-content { min-height: 75px; flex: 1 1 70%; } .sqs-block-summary-v2 .summary-block-setting-design-list .summary-thumbnail-outer-container { flex: 1 1 30% !important } /* Override image aspect ratio settings */ .sqs-block-summary-v2 .img-wrapper { padding-bottom: 0 !important; } .sqs-block-summary-v2 [data-animation-role="image"] { min-height: 100% !important; } /* Make image take up the full space available and crop to fit */ .sqs-block-summary-v2 .summary-block-setting-design-list .summary-item .summary-thumbnail-container { height: 100%; } .sqs-block-summary-v2 .summary-thumbnail-container img { width: 100% !important; height: 100% !important; object-fit: cover !important; top: 0 !important; left: 0 !important; } You can also remove the previous code I gave you for the mobile layout if you're happy with this approach. Oh hey! I'm Katy Carlisle, a web designer and trainer who goes by the name SQSP Queen. My pronouns are she/her and I'm based on Vancouver Island in BC 🍁 I've been using Squarespace since 2013, and work mainly with non-profits or freelancers on projects that do good. I love answering questions about Squarespace and don't expect anything in return, but if you do want to say thanks, feel free to buy me a coffee ☕
Gusssssy Posted Friday at 02:30 PM Author Posted Friday at 02:30 PM Thanks so much @katycarlisle - you legend, love it - works beautifully! katycarlisle 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment