D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
james-johnstone
Full window
Github gist
Time
<nav class='navbar navbar-default navbar-static-top'></nav> <div class='container' ng-app='app' ng-controller='timeController'> <div class="list-group"> <div class="list-group-item"> <div class='row text-center'> <p class="col-lg-4">task</p> <p class="col-lg-4">duration</p> <p class="col-lg-4">break</p> </div> </div> <div class="list-group-item" ng-repeat="task in tasks track by $index" ng-class="{'list-group-item-info': task == activeTask}"> <div class='row'> <div class="col-lg-4"> <div class="input-group"> <span class="input-group-addon">{{$index+1}}</span> <input ng-model='task.name' type="text" class="form-control text-center" aria-label="task"> </div> </div> <div class="col-lg-4"> <div class="input-group"> <div class="input-group-btn"> <button class='btn btn-default' ng-click='alterDuration(task, -1)'><i class='fa fa-minus'></i></button> </div> <input ng-model="task.duration" type="number" min="0" class="form-control text-center" aria-label="duration"> <div class="input-group-btn"> <button class='btn btn-default' ng-click='alterDuration(task, 1)'><i class='fa fa-plus'></i></button> </div> </div> </div> <div class="col-lg-4"> <div class="input-group"> <div class="input-group-btn"> <button class='btn btn-default' ng-click='alterBreak(task, -1)'><i class='fa fa-minus'></i></button> </div> <input ng-model="task.break" type="number" min="0" class="form-control text-center" aria-label="break"> <div class="input-group-btn"> <button class='btn btn-default' ng-click='alterBreak(task, 1)'><i class='fa fa-plus'></i></button> <button class='btn btn-danger' ng-click='removeTask(task)' ng-disabled="$index === 0 && tasks.length === 1"> <i class='fa fa-times'></i></button> </div> </div> </div> </div> </div> <button class='btn btn-default fa fa-plus fa-x2 btn-block' ng-click='addTask()'></button> </div> <div class='timer' ng-style="applyGradient()" ng-click='action()'> <div class='timer-inner'>{{clockTime(countdown())}}</div> </div> </div>