Jump to content

Jake235

Member
  • Posts

    21
  • Joined

  • Last visited

Everything posted by Jake235

  1. Hi, I have a custom option that I am working on that seems to be working using the window.addEventListener('DOMContentLoaded', ()=> {}, false); methodology. How could I accomplish what I am seeking using squarespace's methodology? Is it possible?
  2. I am volunteering for this organization and it’s really taken me several weeks to figure out (real time) to figure out how to target css to individual Squarespace components. While it’s really helpful to be able to target the individual components of html with the IDs, we should be able to write regular semantic css without needing to know the exact ID for each block. That said, if that’s what we need to do, fine. I have also found it’s possible to target an entire block as well with IDs. Please stop autogenerating so many <div> tags. It makes the CSS unnecessarily complicated. You should have an html/css expert look at your auto generated tags and they should be able to fix it. If it’s this complicated for me and I’m intermediate/advanced, imagine how hard it is for the non coders that use this service. Please at least have a manual. You can actually target position with css, it’s not that limited. You just need to know what to target.
  3. Thanks. For some reason, that worked. I don’t know why Squarespace doesn’t work the way that you would expect it too.
  4. <script> let imgs = document.querySelectorAll('section.page-section.gallery-section.full-bleed-section.background-width--full-bleed.section-height--medium.content-width--wide.horizontal-alignment--center img'); for (i= 0; i < imgs.length; i++) { alert("Hi!"); i++; } </script> <style>/* section.page-section.gallery-section.full-bleed-section.background-width--full-bleed.section-height--medium.content-width--wide.horizontal-alignment--center img { display: none !important;*/</style> This is the code that I am working with. I am trying to have it match to www.chicagofashioncoalition.org. I am able to get the images to disappear with the CSS that I have commented out, yet, Squarespace seems to edit out the javascript with the nodelist. Anyone have any ideas why Squarespace is not liking this particular line of JavaScript text? I've seen people able to manipulate, so, I know that it's possible.
  5. Have you tried editing it in mobile first? On the edit page click the mobile icon, otherwise, this is a higher skilled topic, but, if you’re interested this MDN article is a quick overview to the syntax and that should get you started.
  6. Hi, you all may need to add a div.content (for custom HTML) before your <element name> for the selector rule. I've encountered this and I think that the people at Squarespace may need to really work on their selectors. It's given me very funny behavior when I've used custom CSS. Other elements may need some similar specific thing, you'll need to look and use the inspect tool in the dev tools to see.
  7. Actually, I may stand corrected. @paul2009 while there seems to be no native solution for a database, how about having a members only area, and using airtable? If you have a members only area, wouldn’t that be a viable solution?
  8. @paul2009, I know it’s been a while. I am learning the AJAX language better. Can squarespace allow AJAX post requests too? Would I have to prevent the form from submitting and do an event listener?
  9. This is not a good idea! While you may be not be okay with that, your users may use many different device types. I highly do not recommend turning off this feature if you can.
  10. Google sheets is the only integration that I have found so far with Squarespace that seems to just work with HTML forms, no matter what it is. This vastly simplifies the amount of time that I need to take on making a form. If you're an experienced developer, would you say that it is an optimal solution for data, and, is it good enough for sensitive data?
  11. After doing a lot of trouble shooting, I’ve been able to answer my own question. One error I see many people making is that they think they need to use the custom code panel. This is not true. With only injecting code into the page itself with the external stylesheet, I was able to get it to work. First, I had to correct all errors in the stylesheet. Secondly, positioning does work with squarespace, but, you have to give out elements really high specificity with css, and, you need to make it very simple. Once I simplified it by adding an ID to the link selector, everything else worked like a charm. I believe squarespace is funny with links. You can get normal html and css to work. I didn’t need to inject the media queries. Secondly, I found that the vw and vh elements don’t work as well as REMs. Just something to keep in mind. I can do this with version 7.1.
  12. This is the external css that I am using. https://github.com/Azalea9X/css_style_sheets/blob/main/jan.css It likes a certain amount of my code, but, doesn’t seem to like all of it, even when I do it on the custom css section.
  13. Question... how familiar are you with html and css? This is something that you can present as table data.
  14. I'm trying to do a regular CSS media query with a basic HTML table using a .container class. This is pure HTML, CSS, and JS, no bootstrap. I seem to not be able to affect the width of the table.container. Is this a limitation on squarespace 7.1? Would I need to inject it through the site in order to do it? /*Trying media queries to target small, and medium screens*/ @media screen and (min-width: 400px) and (max-width: 600px) { .container { position: relative; left: 100px; width: 300px; height: 600px; position: relative; margin-bottom: 400px; background-size: contain; max-width: 100%; max-height: 100%; } } /*For a medium tablet*/ @media screen and (min-width: 600px) and (max-width: 800px) { .container { position: relative !important; left: 100px !important; min-width: 300px !important; max-width: 300px !important; height: 600px !important; position: relative !important; margin-bottom: 400px !important; background-size: contain !important; max-width: 100% !important; max-height: 100% !important; } }
  15. @paul2009, I think you're exactly correct. But, question, since I am using squarespace 7.0, do I need to use it? I am using Squarespace 7.0 and I thought that in order to use AJAX that I had to do something special. I think that the issue is with accessing the squarespace static API on a trial site. I am, however, able to access my Github pages. I have an example of my working code here, and, now that I have a working code, I can play around with things and break things, then, go back to here when I mess up. I believe that I followed this guidance. window.addEventListener('load', loadXMLDoc); window.addEventListener('mercury:load', loadXMLDoc); function loadXMLDoc() { var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == XMLHttpRequest.DONE) { // XMLHttpRequest.DONE == 4 if (xmlhttp.status == 200) { document.getElementById("demo").innerHTML = xmlhttp.responseText; } else if (xmlhttp.status == 400) { alert('There was an error 400'); } else { alert(xmlhttp.status); } } }; xmlhttp.open("GET", 'https://#######.github.io/portfolio/Ajax_material/test.txt', true); //This should work xmlhttp.send(); }
  16. @paul2009 I’m trying to hook into a local .xml file which can be read like data in browsers. Ajax, it’s supposed to natively work with them, but, I believe squarespace has its own flavor of it. Would providing a link be helpful with a free trial?
  17. @paul2009 I’m following this tutorial. I’m volunteering for a non profit and it would make my life a lot easier if I could store sensitive data in an xml file and retrieve it as needed. I know that you are limited with the backend, and, squarespace seems to want to play nice with Ajax, but, whenever I tried all the online solutions, I could not get it to work.
  18. @johnnyapples is that why I have issues with simple Ajax requests? My txt or xml files do not load in the static cdn.
  19. I want to be able to link xml data. I’m following along a tutorial for Ajax with Mozilla and I know it works. I also know other people have had success with Mercury, but, whenever I try to do it, it fails. Can someone please walk me through that and how to get the exact path to use for the Ajax file?
  20. Hi, my website is a trial website. This is what my code is, it should give you an idea of what I want to do. Question is, is it possible, am I going about it the wrong way, do I need to only use JSON-T? I have been able to connect to mongodb on my own with localhost, but, I would love to be able to make an application myself with squarespace and cut out the middle-ware. Question is, does that require a lot more sophistication? Something like this works in the local host. //jshint esversion:6 let url = 'https://lavender-ellipse-xay2.squarespace.com'; let express = require('express'); const app = express(); const path = require('path'); const https = require('https'); app.set('view engine', 'ejs'); let fs = require('fs'); const parser = require('body-parser'); const parsing = parser.urlencoded({ extended: true }); //squarespace-server https://trombone-oboe-e8lm.squarespace.com/ --auth //<password> /* const mongoose = require('mongoose'); const username = "<username>"; const password = "<password>"; const cluster = "<clusterName>"; const uri = '<urlName/database>'; const dbname= "sample_airbnb"; const sqserver = mongoose.connect(`<mongo+srv setup>/myFirstDatabase`); const citySchema = new mongoose.Schema({ name:{ type: String, required: [1, "Please check your data entry, no name specified"] //You can use 1 or true for the required option }, rating: { type: Number, min: 1, max: 10 }, review: String, return_policy: String, price_of_rent: Number }); const City = mongoose.model('City', citySchema); const Rockville = new City({ name: "Rockville", rating: 8, review: "Really good city! I liked it", return_policy: "", price_of_rent: 666 }); */ //Rockville.save(); /*Person.deleteMany({name: "Lex"}, (err) => { if (err) { console.log(err); } else{ console.log("Successfully updated the item.!"); } //End of the Update });*/ //To delete many //fruit.save(); // /*Fruit.updateOne({_id:"6222a7bbe41fe2584ceee236" }, {name: "Peach"}, (err) => { if (err){ console.log(err); } else { console.log("You have successfully updated the document!"); } }); console.log("Saved the fruit"); Fruit.deleteMany({name: "apple"}, (err) => { if (err){ console.log(err); } else { console.log("Successfuly deleted the items!!"); } }) const banana = new Fruit({ name: "banana", rating: 8, review: "pretty great fruit! I love it." }); /*Fruit.insertMany([], (err) => { if (err) { console.log(err);} else{ console.log("Successfully save dall the fruits to the DB!"); } } ); */ /* Fruit.find((err, fruits) => { if (err){ console.log(err); } else{ fruits.forEach((fruit) => { console.log(fruit.name); }) // mongoose.connection.close(); } }); const apple = new Fruit({ name: "apple", rating: 8, review: "pretty great fruit! I love it." }); //Rockville.save(); //console.log("Saved the fruit") */ //Trying to use the express server for an app Get. app.use(express.static(__dirname + 'public')); app.get('/', (req, res) => { res.write("Hi!!!"); }); app.listen(process.env.port ||, (err)=> { if (err){ console.log(err); } else { console.log("Successful"); } });
×
×
  • 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.