Skip to content

Commit

Permalink
Get rid of examples in exchange for gh-pages + fix id
Browse files Browse the repository at this point in the history
  • Loading branch information
haroldtreen committed Dec 30, 2015
1 parent d43075e commit 91bf562
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 228 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@ Using the source code in a container as the background for the container.
<body>
<!-- Body contents -->
<script type="text/javascript" src="node-modules/show-code/index.js"></script>
<script>
window.showCode(); // Run when your container is ready
</script>
</body>
```

3. The add `show-code` ID to a container
```html
<div id='show-code'>
<div id='sc-container'>
<span>All your content!</span>
</div>
```
Expand Down Expand Up @@ -50,11 +53,13 @@ When the background is injected it will have the `sc-background` ID. Using this
```

## Example:
```
See it in action [here](https://haroldtreen.github.io/show-code/)

or

```bash
npm install -g serve
cd show-code
serve
open http://localhost:3000/example/
git clone git@github:haroldtreen/show-code --branch gh-pages
serve show-code
open http://127.0.0.1:3000/
```

![Example](https://raw.githubusercontent.com/haroldtreen/show-code/master/example/example.png)
26 changes: 0 additions & 26 deletions example/example.css

This file was deleted.

Binary file removed example/example.png
Binary file not shown.
65 changes: 0 additions & 65 deletions example/index.html

This file was deleted.

119 changes: 0 additions & 119 deletions example/prism.css

This file was deleted.

6 changes: 0 additions & 6 deletions example/prism.js

This file was deleted.

8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function() {
(function(global) {
// Cached variables
var containerEl;
var backgroundEl;
Expand Down Expand Up @@ -71,7 +71,7 @@
});
};

var showCodeStart = function() {
var showCode = function() {
backgroundEl = createBackground();
containerEl = document.getElementById('show-code');

Expand All @@ -82,5 +82,5 @@
setupEventListeners();
};

showCodeStart();
})();
global.showCode = showCode;
})(window);
2 changes: 1 addition & 1 deletion stylesheet.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#show-code {
#sc-container {
width: 100%;
overflow: hidden;
position: relative;
Expand Down

0 comments on commit 91bf562

Please sign in to comment.