tutorial06.rst 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. Tutorial Part 6: Web Page and Google Map
  2. =========================================
  3. Another page type that you will use to build your site in the CMS is the **Web Page**.
  4. The Web Page is a general-purpose page type which contains a big dynamic
  5. StreamField enabling the editor to add grids, cards, and all kinds of content to
  6. the page dynamically without requiring code. Our Home Page is a Web Page.
  7. Go back to the admin page screen. Use the side menu and select **Pages > Home**.
  8. Let's build out the "Our Facility" web page we setup in Part 02. Hover over Our Facility and click edit.
  9. * In the body select **Responsive Grid Row**
  10. * Add a **column**
  11. * Choose "1/2 column" in **column size**"
  12. * Choose **Text**
  13. * Enter "Map of the Area" as H2
  14. * Enter placeholder text for this demo
  15. * Add another **column**
  16. * Choose "1/2 column" in column size"
  17. * Choose **Google Map**
  18. * In **search query** enter an address, or if you know the Google place ID enter that.
  19. .. figure:: images/tut06/webpage_map_editor.jpeg
  20. :alt: Editing our web page layout.
  21. The edit screen for our web page with a google map
  22. Let's publish this page and see what it looks like:
  23. .. figure:: images/tut06/google_map_preview.jpeg
  24. :alt: Our published web page.
  25. Our published web page.
  26. Our site is really coming together! Here a challenge for you.
  27. Let's make all the h1 headings blue and bold(font-weight: 700).
  28. Try on your own. Here is the CSS you need.
  29. .. code-block::
  30. h1 {
  31. color: $primary;
  32. font-weight: 700;
  33. }
  34. You'll need to go to custom.scss in the file explorer and add that CSS with the rest of the CSS code we already wrote.
  35. Here is what my code editor looks like:
  36. .. figure:: images/tut06/h1css.jpg
  37. :alt: code editor with css code
  38. I put the h1 tag just under the body tag and above the custom classes. This a preference to organize the code. HTML Tags then custom css classes.
  39. Remember to compile the sass and refresh your page. Now the h1 headings (titles of each web page) will match our theme.
  40. .. figure:: images/tut06/h1_preview.jpeg
  41. :alt: Updated h1's