show-code
Using the source code in a container as the background for the container.
Usage
- Install the npm package
npm install show-code --save
- Include the show-code js/css in your HTML
<!-- Head contents --> <!-- Body contents -->
- The add
sc-container
ID to a container
All your content!
- Bonus: Add external libraries like Prism for syntax highlighting.
<!-- Head contents --> <!-- Body contents -->
Customization
When the background is injected it will have the sc-background
ID. Using this selector, you can apply custom styles to your background.
Example:
See it in action here
OR
npm install -g servegit clone git@github:haroldtreen/show-code --branch gh-pagesserve show-codeopen http://127.0.0.1:3000/