This repository has been archived by the owner on Dec 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
74 lines (74 loc) · 3.52 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SoundCloud Description</title>
<link rel="stylesheet" href="https://noahscholfield.com/css/bootstrap-yeti.min.css">
<script data-cfasync="false" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.6/angular.min.js"></script>
<script data-cfasync="false" src="https://cdnjs.cloudflare.com/ajax/libs/angular-sanitize/1.5.6/angular-sanitize.min.js"></script>
<script data-cfasync="false" src="soundcloud.js"></script>
</head>
<body ng-app="soundcloud">
<div class="jumbotron">
<div class="container">
<h1>SoundCloud Description</h1>
</div>
</div>
<div class="container" ng-controller="descriptionController as descriptionCtrl">
<form ng-submit="descriptionCtrl.submit()">
<h3>Get Description</h3>
<fieldset>
<div class="form-group" ng-class="{'has-error': descriptionCtrl.trackJSON.code === 404, 'has-warning': descriptionCtrl.trackJSON.code === 403}">
<label for="url">Track URL</label>
<input class="form-control" type="url" name="url" ng-model="descriptionCtrl.url">
</div>
</fieldset>
<div class="form-group">
<button class="btn btn-primary" type="submit">Submit</button>
<button class="btn btn-default" type="reset">Clear</button>
</div>
</form>
<section ng-show="descriptionCtrl.trackJSON">
<div ng-show="descriptionCtrl.trackJSON.error">
<h4 class="text-danger">{{descriptionCtrl.trackJSON.error}}</h4>
<code>Error {{descriptionCtrl.trackJSON.code}}</code>
</div>
<div ng-hide="descriptionCtrl.trackJSON.error">
<div class="row" id="trackTitle">
<div class="col-sm-10 col-sm-push-2">
<h3>{{descriptionCtrl.trackJSON.title}}</h3>
<h4>by
<a target="_blank" href="{{descriptionCtrl.trackJSON.user.permalink_url}}">{{descriptionCtrl.trackJSON.user.username}}</a>
</h4>
<h6>
<a target="_blank" href="{{descriptionCtrl.trackJSON.purchase_url}}">{{descriptionCtrl.trackJSON.purchase_title}}</a>
</h6>
<span ng-hide="descriptionCtrl.tags[0] === ''">Tags:<span>
<span ng-repeat="tag in descriptionCtrl.tags track by $index"><span class="label label-primary">{{tag}}</span> </span>
</div>
<br>
<div class="col-sm-2 col-sm-pull-10">
<a href="{{descriptionCtrl.imgURL}}" target="_blank">
<img class="img-responsive center-block" ng-src="{{descriptionCtrl.imgURL}}">
</a>
</div>
</div>
<hr>
<p ng-repeat="paragraph in descriptionCtrl.html track by $index" ng-bind-html="paragraph"></p>
<br>
<div class="row">
<div class="col-xs-6">
<button class="btn-link" ng-click="descriptionCtrl.toggleJSON()">View Raw Track Info</button>
</div>
<div class="col-xs-6">
<a href="https://soundcloud.com" target="_blank"><img class="pull-right" src="https://developers.soundcloud.com/assets/powered_by_black-4339b4c3c9cf88da9bfb15a16c4f6914.png"></a>
</div>
</div>
<pre ng-show="descriptionCtrl.showJSON"><code>{{descriptionCtrl.trackJSON | json}}</code></pre>
</div>
</section>
</div>
</body>
</html>