Congratulations!
Congratulations, Starlight Cinema has its new look, and you've finished the third phase of the Web Development path!
Think back to where the cinema started: two pages of HTML, a stylesheet, three film cards and two tables. Since then, the site has gone online at an address of its own. Its showtimes load from a data file, visitors choose seats and book them with a form that checks what they typed, and the page remembers their tickets. And now it has a modern look that works on a phone as well as on a computer.
You built all of it yourself, and you can do it again for any website: write its pages in HTML, style them with CSS or Tailwind for every screen, bring them to life with JavaScript, load data, check forms, remember things in the browser and put the site online. That's how the web is made.
The new version online. Upload it as in the lesson Putting It Online, with one extra step first. Browsers don't understand @import "tailwindcss";: at every Run, Start Coder turns your style.css into ordinary CSS. For your website, the Tailwind CLI does that on your computer, as you saw at the end of the Tailwind course. It needs Node.js. Your Tailwind stylesheet stays on your computer, and the website gets the finished CSS:
- Create a folder
cinemaand move your website's folder,starlight-cinema, into it. From the editor, saveindex.html,showtimes.html,script.jsandshowtimes.jsonintostarlight-cinema, in place of the old files, andstyle.cssintocinema. - Open the terminal in the folder
cinemaand run:
The second command reads your Tailwind stylesheet, finds the classes in the website's files,npm install tailwindcss @tailwindcss/cli npx @tailwindcss/cli -i style.css -o starlight-cinema/style.css --minifyscript.jsincluded, and writes the finished CSS intostarlight-cinema/style.css.--minifyleaves out spaces and line breaks, so the file is smaller and downloads faster. Run the command again whenever you change your classes. - Open
starlight-cinema/index.htmlin your browser and check the look (the showtimes themselves load only from a server, as you know from the showtimes project). Then, on Netlify, drag the folderstarlight-cinemaonto your project's Deploys page, as before. What npm installed stays incinema: the website doesn't need it.
Then open your website on your phone. This time, it's made for it.
What's next. The path's last phase is React, a JavaScript library for building whole apps out of components, pieces of a page that you write once and use again and again. After the React course, the cinema comes back one last time: you'll rebuild it as a React app. And if you'd like to keep working on this version first, you know everything a dark mode needs: the variant dark: and the switch from the lesson Dark Mode, and with localStorage, the switch can even remember the visitor's choice.
Before you go, sign your website, as you signed your very first page at the start of the path.
Instructions
- 1
On both pages, add a paragraph with your name at the end of the footer, for example
<p class="mt-2 text-sm text-gold">Website by (your name)</p>, with your name in place of(your name).