Skip to content

Latest commit

 

History

History
141 lines (104 loc) · 5.37 KB

USER-GUIDE.md

File metadata and controls

141 lines (104 loc) · 5.37 KB

Study Lenses

You could read all the words below, or ... watch this video

To understand what's going on here the first thing to know is that you are using a static server, like the liveServer extension for Visual Studio Code. This means you can use $ study to develop your HTML/CSS/JavaScript projects as you normally would. You'll just have to refresh manually when you make changes.

The differences begin when you start adding URL Query Parameters (Thomas, wikipedia). This server supports a few custom query parameters called lenses because they help you see and study your code in new ways. You can add parameters to your URL by writing them directly in address bar and refreshing.

PS. The links with a ? in this file will only work properly when you are reading this in Study Lenses


Files

You can study different files in different ways. Here are some examples you can try out to get the feel:

JavaScript
Markdown
HTML

Directories

Besides single files, you can also add lenses to view entire directories.

  • ./?study - view it as a navigable directory structure with each file using the default lenses. if there is a README, it will be rendered underneath the directory contents.
  • ./?json-explorer - or examine the virtual directory as a JSON object

If you navigate to a directory without adding any parameters, what you see will depend on what files are in the directory:

  • if there is an index.html, that will be served as a web page
  • if there is a README.md and no index.html, then the README will be rendered and served as a web page
  • if there is no index.html or README.md, you will get a 404 error

Sandboxes

Study Lenses also has a few sandbox environments for working with throw-away examples. You can open a sandbox from any URL with the ?--sandbox option but you can't save your work:


Lenses

Different ways you can view the same resource


Options

Ways to modify the server's behavior, kind of like CLI options


Panda Smash