Jump to content

iamdavehart

Circle Member
  • Posts

    250
  • Joined

  • Last visited

4 Followers

Recent Profile Visitors

1,643 profile views
  1. The switch is easy enough. You can do that in HTML/CSS alone. Changing the content of the home page without redirecting to a new page is a little harder and would require javascript to do it without redirecting. Managing multiple sections for two pages within one sqsp page would probably be a lot of effort too. However, for education purposes here's how you could do the switch solely in HTML/CSS so no js required. Just chuck this into a code block. 20240421-1338-16.5200976.mp4 <div class="toggle-switch"> <input type="radio" name="tog" id="toggle1" value="1"/> <label for="toggle1">Services</label> <input type="radio" checked name="tog" id="toggle2" value="2"/> <label for="toggle2">Clients</label> <div class="toggle-shadow"></div> </div> <style> .toggle-shadow { width:50%; height:100%; position:absolute; border-radius:2rem; background:black; z-index:-10; transition:ease-in-out 0.2s; } .toggle-switch { text-transform: uppercase; position:relative; width:100%; display:flex; justify-content: center; align-items: center; border:solid 2px black; border-radius:2rem; } .toggle-switch label { flex-grow:1; text-align:center; padding:0.5rem; border-radius:2rem; cursor: pointer; } .toggle-switch input[type="radio"] { display:none; } .toggle-switch input[type="radio"]:checked + label { font-weight:bold; } input:checked + label { color:white } #toggle1:checked ~ .toggle-shadow { left:0; } #toggle2:checked ~ .toggle-shadow { left:50%; } </style>
  2. In the very specific example you've given you're really talking about how hyphens are brought in to wrapping long words. This can be done using a css property of "hyphens", and therefore no upgrade to javascript required. in your case, I think the best thing to do here is to set it to "manual" and then insert hard or soft breaks depending on your use case. hard breaks are just "-" and will always be broken, but if you insert a soft break in the middle of the word where you want it to break if there isn't enough room. (have tested and this works in the carousel title). EDIT: To insert a soft break you can do this by copying it using something like charmap. It's unicode is 00AD, or 173. Squarespace will strip the html version which is &shy; (i thought that would work at first), but if you just copy it and paste it in as the unicode character it will work. I think the hyphens property defaults to auto and that should respect &shy, but if it doesn't work straight away you just need to add a rule to your site CSS that sets the hyphen property. It's probably better to do this using a rule that targets just that section Id (you can find the id using the squarespace Section ID finder extension, but I've used the right one in the example below). section[data-section-id="65bf889227dbcd753275e596"] h2.list-item-content__title { hyphens:manual; } 20240330-1218-15.8028240.mp4 more information here: Wrapping and breaking text - CSS: Cascading Style Sheets | MDN (mozilla.org)
  3. you should use a non-breaking hyphen instead of your standard one. Its unicode character is U+2011. if you find a character map (such as the windows one below) you can just find the code in a font that supports it and then copy that character, and then paste that into your text box and it will not break there. With custom fonts it might not be supported, we'd have to know exactly what your font was, but it'll probably be fine. you can see on the right how that changes the break when you paste it in. The html code for this non-breaking hyphen is &#8209; so you can also directly write this in if you use a markdown block instead of a text box. In the screenshot below the second box is a markdown block
  4. You've got plenty of options here, but I suppose each has their own caveat. Official Buy Me A Coffee buttons and widgets this is actually done using a javascript script file, so the easiest squarespace way of doing this is to just add a code block to your section and paste in the code they provide in their main instructions. However, because this is a script tag and is therefore injecting javascript you might find that you need a business subscription to squarespace... this is also true of the more expansive widget. just chuck it in a code block. Use a squarespace button and some css It's really just a link, so as you point out in your text, it's very easy to add a button, insert your buy me a coffee url and off you go. It will be styled as per one of your template button styles, but to insert the image, we'll need ot put some CSS in. You could download the image you want, upload it as a standard file in your custom CSS section and reference it there, but as buymeacoffee.com use an SVG themselves, I've just inlined the SVG in the CSS for convenience here. This will add the bmac image to the left of the text for any button that references buymeacoffee.com a.sqs-block-button-element[href*='buymeacoffee.com']::before { content:''; width:30px; height:30px; margin-right:2px; background-position: 50% 50%; background-repeat:no-repeat; background-size: contain; background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 884 1279' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M791.109 297.518L790.231 297.002L788.201 296.383C789.018 297.072 790.04 297.472 791.109 297.518Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath d='M803.896 388.891L802.916 389.166L803.896 388.891Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath d='M791.484 297.377C791.359 297.361 791.237 297.332 791.118 297.29C791.111 297.371 791.111 297.453 791.118 297.534C791.252 297.516 791.379 297.462 791.484 297.377Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath d='M791.113 297.529H791.244V297.447L791.113 297.529Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath d='M803.111 388.726L804.591 387.883L805.142 387.573L805.641 387.04C804.702 387.444 803.846 388.016 803.111 388.726Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath d='M793.669 299.515L792.223 298.138L791.243 297.605C791.77 298.535 792.641 299.221 793.669 299.515Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath d='M430.019 1186.18C428.864 1186.68 427.852 1187.46 427.076 1188.45L427.988 1187.87C428.608 1187.3 429.485 1186.63 430.019 1186.18Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath d='M641.187 1144.63C641.187 1143.33 640.551 1143.57 640.705 1148.21C640.705 1147.84 640.86 1147.46 640.929 1147.1C641.015 1146.27 641.084 1145.46 641.187 1144.63Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath d='M619.284 1186.18C618.129 1186.68 617.118 1187.46 616.342 1188.45L617.254 1187.87C617.873 1187.3 618.751 1186.63 619.284 1186.18Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath d='M281.304 1196.06C280.427 1195.3 279.354 1194.8 278.207 1194.61C279.136 1195.06 280.065 1195.51 280.684 1195.85L281.304 1196.06Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath d='M247.841 1164.01C247.704 1162.66 247.288 1161.35 246.619 1160.16C247.093 1161.39 247.489 1162.66 247.806 1163.94L247.841 1164.01Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath class='logo-coffee' d='M472.623 590.836C426.682 610.503 374.546 632.802 306.976 632.802C278.71 632.746 250.58 628.868 223.353 621.274L270.086 1101.08C271.74 1121.13 280.876 1139.83 295.679 1153.46C310.482 1167.09 329.87 1174.65 349.992 1174.65C349.992 1174.65 416.254 1178.09 438.365 1178.09C462.161 1178.09 533.516 1174.65 533.516 1174.65C553.636 1174.65 573.019 1167.08 587.819 1153.45C602.619 1139.82 611.752 1121.13 613.406 1101.08L663.459 570.876C641.091 563.237 618.516 558.161 593.068 558.161C549.054 558.144 513.591 573.303 472.623 590.836Z' fill='%23FFDD00'%3E%3C/path%3E%3Cpath d='M78.6885 386.132L79.4799 386.872L79.9962 387.182C79.5987 386.787 79.1603 386.435 78.6885 386.132Z' fill='%230D0C22'%3E%3C/path%3E%3Cpath class='logo-outline' d='M879.567 341.849L872.53 306.352C866.215 274.503 851.882 244.409 819.19 232.898C808.711 229.215 796.821 227.633 788.786 220.01C780.751 212.388 778.376 200.55 776.518 189.572C773.076 169.423 769.842 149.257 766.314 129.143C763.269 111.85 760.86 92.4243 752.928 76.56C742.604 55.2584 721.182 42.8009 699.88 34.559C688.965 30.4844 677.826 27.0375 666.517 24.2352C613.297 10.1947 557.342 5.03277 502.591 2.09047C436.875 -1.53577 370.983 -0.443234 305.422 5.35968C256.625 9.79894 205.229 15.1674 158.858 32.0469C141.91 38.224 124.445 45.6399 111.558 58.7341C95.7448 74.8221 90.5829 99.7026 102.128 119.765C110.336 134.012 124.239 144.078 138.985 150.737C158.192 159.317 178.251 165.846 198.829 170.215C256.126 182.879 315.471 187.851 374.007 189.968C438.887 192.586 503.87 190.464 568.44 183.618C584.408 181.863 600.347 179.758 616.257 177.304C634.995 174.43 647.022 149.928 641.499 132.859C634.891 112.453 617.134 104.538 597.055 107.618C594.095 108.082 591.153 108.512 588.193 108.942L586.06 109.252C579.257 110.113 572.455 110.915 565.653 111.661C551.601 113.175 537.515 114.414 523.394 115.378C491.768 117.58 460.057 118.595 428.363 118.647C397.219 118.647 366.058 117.769 334.983 115.722C320.805 114.793 306.661 113.611 292.552 112.177C286.134 111.506 279.733 110.801 273.333 110.009L267.241 109.235L265.917 109.046L259.602 108.134C246.697 106.189 233.792 103.953 221.025 101.251C219.737 100.965 218.584 100.249 217.758 99.2193C216.932 98.1901 216.482 96.9099 216.482 95.5903C216.482 94.2706 216.932 92.9904 217.758 91.9612C218.584 90.9319 219.737 90.2152 221.025 89.9293H221.266C232.33 87.5721 243.479 85.5589 254.663 83.8038C258.392 83.2188 262.131 82.6453 265.882 82.0832H265.985C272.988 81.6186 280.026 80.3625 286.994 79.5366C347.624 73.2301 408.614 71.0801 469.538 73.1014C499.115 73.9618 528.676 75.6996 558.116 78.6935C564.448 79.3474 570.746 80.0357 577.043 80.8099C579.452 81.1025 581.878 81.4465 584.305 81.7391L589.191 82.4445C603.438 84.5667 617.61 87.1419 631.708 90.1703C652.597 94.7128 679.422 96.1925 688.713 119.077C691.673 126.338 693.015 134.408 694.649 142.03L696.732 151.752C696.786 151.926 696.826 152.105 696.852 152.285C701.773 175.227 706.7 198.169 711.632 221.111C711.994 222.806 712.002 224.557 711.657 226.255C711.312 227.954 710.621 229.562 709.626 230.982C708.632 232.401 707.355 233.6 705.877 234.504C704.398 235.408 702.75 235.997 701.033 236.236H700.895L697.884 236.649L694.908 237.044C685.478 238.272 676.038 239.419 666.586 240.486C647.968 242.608 629.322 244.443 610.648 245.992C573.539 249.077 536.356 251.102 499.098 252.066C480.114 252.57 461.135 252.806 442.162 252.771C366.643 252.712 291.189 248.322 216.173 239.625C208.051 238.662 199.93 237.629 191.808 236.58C198.106 237.389 187.231 235.96 185.029 235.651C179.867 234.928 174.705 234.177 169.543 233.397C152.216 230.798 134.993 227.598 117.7 224.793C96.7944 221.352 76.8005 223.073 57.8906 233.397C42.3685 241.891 29.8055 254.916 21.8776 270.735C13.7217 287.597 11.2956 305.956 7.64786 324.075C4.00009 342.193 -1.67805 361.688 0.472751 380.288C5.10128 420.431 33.165 453.054 73.5313 460.35C111.506 467.232 149.687 472.807 187.971 477.556C338.361 495.975 490.294 498.178 641.155 484.129C653.44 482.982 665.708 481.732 677.959 480.378C681.786 479.958 685.658 480.398 689.292 481.668C692.926 482.938 696.23 485.005 698.962 487.717C701.694 490.429 703.784 493.718 705.08 497.342C706.377 500.967 706.846 504.836 706.453 508.665L702.633 545.797C694.936 620.828 687.239 695.854 679.542 770.874C671.513 849.657 663.431 928.434 655.298 1007.2C653.004 1029.39 650.71 1051.57 648.416 1073.74C646.213 1095.58 645.904 1118.1 641.757 1139.68C635.218 1173.61 612.248 1194.45 578.73 1202.07C548.022 1209.06 516.652 1212.73 485.161 1213.01C450.249 1213.2 415.355 1211.65 380.443 1211.84C343.173 1212.05 297.525 1208.61 268.756 1180.87C243.479 1156.51 239.986 1118.36 236.545 1085.37C231.957 1041.7 227.409 998.039 222.9 954.381L197.607 711.615L181.244 554.538C180.968 551.94 180.693 549.376 180.435 546.76C178.473 528.023 165.207 509.681 144.301 510.627C126.407 511.418 106.069 526.629 108.168 546.76L120.298 663.214L145.385 904.104C152.532 972.528 159.661 1040.96 166.773 1109.41C168.15 1122.52 169.44 1135.67 170.885 1148.78C178.749 1220.43 233.465 1259.04 301.224 1269.91C340.799 1276.28 381.337 1277.59 421.497 1278.24C472.979 1279.07 524.977 1281.05 575.615 1271.72C650.653 1257.95 706.952 1207.85 714.987 1130.13C717.282 1107.69 719.576 1085.25 721.87 1062.8C729.498 988.559 737.115 914.313 744.72 840.061L769.601 597.451L781.009 486.263C781.577 480.749 783.905 475.565 787.649 471.478C791.392 467.391 796.352 464.617 801.794 463.567C823.25 459.386 843.761 452.245 859.023 435.916C883.318 409.918 888.153 376.021 879.567 341.849ZM72.4301 365.835C72.757 365.68 72.1548 368.484 71.8967 369.792C71.8451 367.813 71.9483 366.058 72.4301 365.835ZM74.5121 381.94C74.6842 381.819 75.2003 382.508 75.7337 383.334C74.925 382.576 74.4089 382.009 74.4949 381.94H74.5121ZM76.5597 384.641C77.2996 385.897 77.6953 386.689 76.5597 384.641V384.641ZM80.672 387.979H80.7752C80.7752 388.1 80.9645 388.22 81.0333 388.341C80.9192 388.208 80.7925 388.087 80.6548 387.979H80.672ZM800.796 382.989C793.088 390.319 781.473 393.726 769.996 395.43C641.292 414.529 510.713 424.199 380.597 419.932C287.476 416.749 195.336 406.407 103.144 393.382C94.1102 392.109 84.3197 390.457 78.1082 383.798C66.4078 371.237 72.1548 345.944 75.2003 330.768C77.9878 316.865 83.3218 298.334 99.8572 296.355C125.667 293.327 155.64 304.218 181.175 308.09C211.917 312.781 242.774 316.538 273.745 319.36C405.925 331.405 540.325 329.529 671.92 311.91C695.906 308.686 719.805 304.941 743.619 300.674C764.835 296.871 788.356 289.731 801.175 311.703C809.967 326.673 811.137 346.701 809.778 363.615C809.359 370.984 806.139 377.915 800.779 382.989H800.796Z' fill='%230D0C22'%3E%3C/path%3E%3C/svg%3E"); } Use an Image Block download the buymeacoffee creator kit which has all their button images in. It's in the same place you generate the code for buy me a coffee buttons. Get the button image. Use an image block, upload the button, add the link and off you go. Compared to the official script based one, you won't get your custom message (in my case it's tea instead of coffee!) as that is dynamic and the image is not. All viable options. You can even just put the link in text, e.g. My own buymeacoffee link is https://buymeacoffee.com/iamdavehart 😉🍵
  5. if it's unrelated to the thread, best to start a new one. it helps other people find the solutions they're looking for. especially when the thread is already marked 'solved'.
  6. sure, you can do that. just put your column count to one and then override pretty much everything that squarespace do to lay it out. Because you're undoing all the things they do I'd probably only do this for specific sections by prefixing the rules with the section id as i mentioned in previous posts. Gallery Block div.sqs-block-gallery { height:auto !important; } .slide a.image-slide-anchor { background:black !important; padding-bottom:unset !important; height:auto !important; margin:0 !important; padding:0 !important; } .slide img.thumb-image { inset:0 !important; width:100% !important; height:auto !important; object-fit: contain !important; display:block !important; } Gallery Section /* add a background colour if you want (optional) */ .gallery-grid-item-wrapper { background:black; padding-bottom:unset !important; height:auto !important; } /* change to contain (default is cover) */ .gallery-grid-item-wrapper img { position:relative !important; height:initial !important; min-height:initial !important; object-fit: contain !important; }
  7. OK, we might just have to check whether you're using a Gallery Section or a Gallery Block. The mark-up is different. Gallery Section You edit your page, click Add Section, choose Image from the left hand side and pick the auto layout that looks like a grid of images. In that case, the CSS I posted above will work /* add a background colour if you want (optional) */ .gallery-grid-item-wrapper { background:black; } /* change to contain (default is cover) */ .gallery-grid-item-wrapper img { object-fit: contain !important; } Gallery Block If you just click Add Blank Section and then Add Block and pick Gallery you'll get a different grid which will use the css below .slide a.image-slide-anchor { background:black !important } .slide img.thumb-image { inset:0 !important; width:100% !important; object-fit: contain !important; } results for both here, the top one is a gallery block, the bottom one is a gallery section. if it still isn't working for you then add the gallery you want to a page and share that link, as the one you've linked to in your original post doesn't have a gallery on it. or at least didn't when I first looked.
  8. choose the aspect ratio you want them to fit into then change the object-fit property in your css like so /* add a background colour if you want (optional) */ .gallery-grid-item-wrapper { background:black; } /* change to contain (default is cover) */ .gallery-grid-item-wrapper img { object-fit: contain !important; } if you want to restrict that to a certain section or page then use the squarespace id finder extension to find the relevant id and add that before each rule.
  9. Well, sort of. As I alluded in a reply to paul: you can, but I don't think you should tbh. The main reason is that there's a danger you're going to get an invalid order record into the customers cart which they then won't be able to check out. This will certainly happen in the case where you have required fields in your custom form (which you do), squarespace will think its an invalid order and wont add it to the cart. however, if you must, and if you're prepared for the fact that it might break at some point as its non-standard behaviour, then you can try this. (you must make sure that you have no required fields in your custom product form - it won't work otherwise). Because you're modifying the classes assigned to elements you'll also have to have premium account as we'll need to add some code. in the advanced section of the stores settings, go to your Page Header Code Injection and add this: <script> document.addEventListener("DOMContentLoaded", function () { document.querySelectorAll(".sqs-add-to-cart-button.use-form") .forEach(function(e) { e.classList.remove("use-form"); }); }); </script> You can test it out, but honestly I'll just reiterate that I don't think you should do this. Apart from the fact that we're bypassing Squarespace's default behaviour, it feels like bad UX to me to have people have to wait until the cart to fill this stuff out. if it's optional and they want to skip it then just make sure it's clearly labelled that they can do that when the pop up comes and just fill it in in the cart later on. If you feel you must bypass the form then by all means try the code above.
  10. @Charlottenz the font of your paragraphs are not being targeted by a rule with your new font. I would set the base font variable in your custom css like this. that should do it. :root { --body-font-font-family: 'gotham'; --heading-font-font-family: 'gotham'; --meta-font-font-family: 'gotham'; } btw, in future, it's probably better to start a new question. especially if the original post has already been marked as solved
  11. it's not pixelated, what's happening here is that the marquee block lays out three copies of your text so that it can move them around to give the idea of a continuous ticker tape. in your mobile version those three are laid out on top of each other. it looks like it's only the S that's affected because an S has non-right angles and so it's more pronounced. in fact, if you look more closely, everything looks "fatter" on the other letters, the bend of the U is actually pointed etc. Why is this happening? I'd say it's a bug... essentially as far as I can tell what's going on is that its incorrectly measuring the size as 0 and so its offsetting its three copies by 0 + your item spacing. I can't be sure why that's happening on mobile only though, but it's possible that it's because it's loading up the custom font and it's not ready in time to be measured. (if you do it on mobile emulation within chrome it's fine). What you could do is drop your item spacing to zero in your scrolling section's properties and then if the bug happens it should overlay all three copies directly on top of each other and remove the effect.
  12. yes, so as Paul said in his reply just after mine, you will definitely get the form when you click Add to Cart from the product form. (and in your case you'll have to fill in the Notes as you've made them required). You will then also see the Edit Details link in the cart. At this point you can use the CSS i quoted to change the text. It looks like currently (on your published site) that you haven't saved the CSS as it's not rendering. I would make sure that you save the CSS then go and add the Customizable Baby Bibs on your site and try it out. I've tried the two simple rules on your cart and they do work. I have seen that sometimes they might not render in the config itself but try it in the published site and it should work
  13. @paul2009 Good point! You could bypass that easily enough on the product page with a bit of code to take the use-form class off the button, but I think it's probably decent user experience as is though and we're probably moving dangerously towards the territory where I write "for educational purposes only".
  14. just one small addition I thought of: if you use the Custom Product Form that Paul mentions (the best option IMO) you do get a link that says "Edit Details" on the cart page. You can get to that in css by using button.cart-row-edit. e.g. to change the wording you could try. you won't get a text box on the page but you can get them to fill in / edit the notes in the dialog that comes up. button.cart-row-edit::before { content:'Add Notes' } button.cart-row-edit span { display:none; } if you wanted to change the text in the cart for a specific product then you can do that by using the products url in a sibling selector button.cart-row-edit::before { content:'Add Notes' } button.cart-row-edit span { display:none; } .cart-row-desc a[href='/store/p/golden-mist-cup-weny8-54bjz'] ~ button.cart-row-edit::before { content:'Misty Cup Notes' }
  15. @MKrause18 sure. either find the block id or the section id and then just insert that in the query selector. like this // using a block id const btn = document.querySelector("#block-yui_3_17_2_1_1693644183227_2008 form input[type=submit]"); // using a section id const btn = document.querySelector("section[data-section-id='64f2f5bebec5b306ece83a42'] form input[type=submit]");
×
×
  • 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.