Skip to content

Commit

Permalink
Getting a sandbox going with the worst possible layout
Browse files Browse the repository at this point in the history
  • Loading branch information
kvz committed Nov 17, 2015
1 parent a2428ba commit 320c8a1
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Now to get a sandbox environment set up, type:

```bash
npm run preview
# For instant rebuilds, in a new tab, type:
npm run watch
```

This will `npm run build` the project into `./build`, and then serve that
Expand Down
17 changes: 15 additions & 2 deletions build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
<h1>
Loading..
</h1>
<p>
With this file we can easily test the built js client locally (via <code>npm run preview</code>)
and online.
</p>

<div id="upload-target">
</div>




<footer>
<hr />
Expand All @@ -21,10 +31,13 @@ <h1>
</body>
<script src="./transloadit-js-client.js"></script>
<script>
var branch = location.pathname.split('/')[2];
var tl = Transloadit("#upload-target");
</script>
<script>
var branch = location.pathname.split('/')[2] || 'local-unknown';
var elTitle = document.querySelector('title');
var elH1 = document.querySelector('h1');
var title = 'You are reviewing the latest push of branch: ' + branch;
var title = 'You are reviewing branch: ' + branch;
elTitle.innerHTML = title;
elH1.innerHTML = title;
</script>
Expand Down
9 changes: 9 additions & 0 deletions js/lib/transloadit-js-client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
window.Transloadit = function (selector) {
var el = document.querySelector(selector);
var inner = ''
inner += '<div class="transloadit-js-client">';
inner += 'Hello world :)';
inner += 'I am the new Transloadit js client, and as you can see, I need to be improved badly :)';
inner += '</div>';
el.innerHTML = inner;
};
6 changes: 6 additions & 0 deletions scss/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.transloadit-js-client {
font-family : "Comic Sans MS";
color : purple;
border : 1px dashed pink;
font-size : 32px;
}

0 comments on commit 320c8a1

Please sign in to comment.