Edgar Allan is working on a large Webflow project that includes authentication, URL rewrites, API connections, and a quiz. Webflow isn’t well-suited for much of this functionality. To achieve everything the client wants, we utilized a tool we built called Wes. Wes allows us to work within Webflow Enterprise while managing deployment using the tech stack of your choice. Recently, we’ve had conversations with several Webflow agencies to unblock them. If you’re facing limitations with functionality you can’t support, let us know—we might be able to help. And a quiz? Yes, we developed an initial draft of the quiz functionality and added 25 JavaScript questions. You can test your Javascript knowledge and let's discuss how we built the quiz functionality. Javascript 101: Building a quizOur quiz app required the following:
Step 1: Setup and Initialization The quiz initializes by checking if questions are already stored in localStorage. If not, it fetches them from a JSON file. You can see that here. let currentQuestionIndex = 0; async function fetchQuestions() { if (!questions) { Step 2: Running the Quiz The runQuiz function manages the quiz’s main functionality: displaying questions, handling navigation, and showing results. This code retrieves references to essential DOM elements and then defines functionality. code const questionSection = document.querySelector(“.question-section”); const questionTitle = document.getElementById(“question-title”); const prevBtn = document.getElementById(“prevBtn”); // Functions come next... The updateQuestion function updates the quiz UI with the current question, its options, and the progress bar.
That's the primary functionality. You can view all the code and the question set. 👀 View the quiz code Take it, improve it, and create your own quizzes. If you do, let us know! Happy coding! 🤙 the Slater Team 🖨️ Check out Wes If Slater helps you create better websites, please support the team behind it.
|
Slater resources, updates and community activity
The team behind Slater would like to wish you a Merry Christmas and a happy New Year! 🎄🎅🎁 Get the Santa ASCII art: https://slater.app/projects/11431/pages/27608 Happy coding! 🤙 the Slater Team If Slater helps you create better websites, please support the team behind it. Become a Pro Slater User
Earlier this year, we built figdam.com. It is currently used by several of our clients to host files and watermark PDFs. We’d like to bring this file hosting functionality to Slater users. With that in mind, where do you currently store files that Webflow doesn’t support? Would this feature be useful to you? What file hosting features do you need? Let us know. JS 101: File types File storage? Javascript? Let's consider all of the different file types that you could host and then retrieve and...
Hi, Just a reminder that Kendra and Mason will be hosting an EA Office Hours Zoom this Friday, the 13th (spooky…) to chat about topics relating to Chapter 1: Sales for Creative Types. Sign up if you can make it, and bring your questions. Let’s get past any lingering sales ick together. Register to join us this Friday, 12/13 here. Also, if you can’t make it this week, we’re thinking about doing it again next Friday, 12/20 as well, if anyone is game? To ring in the holiday break, we’ll chat...