Hugo Sandbox
This is a test to see if the playground works with HTML, CSS, and JavaScript.
HTML
CSS
JavaScript
Result
This example is taken from Lab 5, 2022.
HTML
CSS
JavaScript
Result
This example is taken from Lab 6, 2022.
HTML
CSS
JavaScript
Result
This example is taken from Lab 6, 2022.
HTML
CSS
JavaScript
Result
This example is taken from Lab 6, 2022.
HTML
CSS
JavaScript
Result
- Lab 6
- DOM API
- tree structure
- window, document
- HTMLElement interface
- children() …
- DOM manipulation
- array methods (fill, forEach, map, filter, findIndexOf, some, every)
- parse form input
- add form data to DOM
- DOM API
- Lab 7
- fetch data
- JSON
- Lab more
- ES6 modules
- Cookies
- WebStorage and IndexedDB
- form validation
- leafleft.js
- transition
<!-- this is a comment in HTML -->
Open the Web Console in your web browser, usually it’s F12.
alert("hello world!");
Congratulate yourself on running your first piece of JavaScript code
- if you don’t know where to find an image url, use this one: https://cosc203.cspages.otago.ac.nz/labs/img/01_image_file.jpg
📝 Task 1: no taskNameInspect the page and learn about element tags.
- view the HTML of this
- find the opening
<head>
and closing<head>
- everything between those 2 tags is the “element”
- find the opening
<body>
and the closing</body>
- find the following 10 element tags,
<input>
<label>
<img>
<a>
<section>
<article>
<h1>
<h2>
<h3>
- in the HTML element reference
✅ Easier Search for TagsUse ⌘+F (or Ctrl+F) to search for tags in source code.
Only search for the token
<h1
, i.e. exclude the>
Document Object Model (DOM)
flowchart TD html{{"html"}} --- head & l(["lang=“en”"]) & body head{{"head"}} --- meta{{"meta"}} & title meta --- c(["charset=“UTF-8”"]) title{{"title"}} --- text1["page title"] body{{"body"}} --- h1 & p h1{{"h1"}} --- text2["Hellow World! 😃"] p{{"p"}} --- text3["polly the penguin."] style c fill:#f79,stroke:#333,stroke-width:2px style l fill:#f79,stroke:#333,stroke-width:2px style html fill:#4186c988,stroke-width:2px,stroke:#333 style head fill:#4186c988,stroke-width:2px,stroke:#333 style meta fill:#4186c988,stroke-width:2px,stroke:#333 style title fill:#4186c988,stroke-width:2px,stroke:#333 style body fill:#4186c988,stroke-width:2px,stroke:#333 style h1 fill:#4186c988,stroke-width:2px,stroke:#333 style p fill:#4186c988,stroke-width:2px,stroke:#333 style text1 fill:#0000,stroke:#333,stroke-width:1px style text2 fill:#0000,stroke:#333,stroke-width:1px style text3 fill:#0000,stroke:#333,stroke-width:1px
- Hugo generates HTML documents from the Markdown files in
/content
. - Page routing matches the directory structure in
/content
. - The navigation menu links are populated from
data/menu/main.yml
- Along with MarkDown, Hugo can also embed raw HTML, JavaScript, and “shortcodes snippets”.
- This page is a sandbox to test/showcase these features.
- This Hugo project uses the Geekdocs theme with several shortcodes built in
- Geekdocs documentation https://geekdocs.de/usage/getting-started/
- To write your own short
- To delete this sandbox page
- delete:
/content/hugo-sandbox.md
- delete:
- To hide this page
- edit:
/data/menu/more.yml
- edit:
🎯 Lab ObjectiveThis is an objective
✅ TipThis is a “tip”
📝 Task 2: no taskNameThis task contains a KaTeX shortcode
\( f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi \)
📝 Task 3: no taskNameThe tasks also self-enumerate!