Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
angular-timeline
Advanced tools
An Angular.js directive that generates a responsive, data-driven vertical timeline to tell a story, show history or describe a sequence of events.
An Angular.JS directive that generates a responsive, data-driven vertical timeline to tell a story, show history or describe a sequence of events.
Original Implementation (HTML / Javascript)
bower install angular-timeline --save
angular-timeline.css
in your app:<link rel="stylesheet" href="bower_components/angular-timeline/angular-timeline.css" />
angular-timeline.js
in your app:<script src="bower_components/angular-timeline/angular-timeline.js"></script>
angular-timeline
as a new module dependency in your angular app.var myapp = angular.module('myapp', ['angular-timeline']);
<timeline>
<timeline-node side="left">
<timeline-badge class="info"><i class="glyphicon glyphicon-check"></i>
</timeline-badge>
<timeline-panel>
<timeline-heading>
<timeline-title>Some twitter post</timeline-title>
<p>
<small class="text-muted"><i class="glyphicon glyphicon-time"></i> 11 hours ago via Twitter</small>
</p>
</timeline-heading>
<timeline-content>
<p>Twitter post goes here</p>
</timeline-content>
</timeline-panel>
</timeline-node>
<timeline-node side="right">
<timeline-badge class="warning"><i class="glyphicon glyphicon-credit-card"></i>
</timeline-badge>
<timeline-panel>
<timeline-heading>
<timeline-title>Another twitter post</timeline-title>
<p>
<small class="text-muted">12 hours ago via Twitter</small>
</p>
</timeline-heading>
<timeline-content>
<p>Another twitter post goes here</p>
</timeline-content>
</timeline-panel>
</timeline-node>
</timeline>
Yes, there is a bit of markup here, but <timeline-content>
and <timeline-heading>
are optional.
timeline-badge
is for the centre line between the two sides, and should represent the event type that occured.
I had also added an optional <timeline-footer>
to go after <timeline-content>
for links and other info.
You can use the side=left
or side=right
attribute on the <timeline-node>
element to float the timeline panels left or right accordingly. (when < 768px in width it will push all <timeline-node>
elements to the right).
You can use either the SASS styles directly file under /src
or the compiled CSS files, up to you :)
If you are using Bootstrap 3 it affects the timeline CSS, so include angular-timeline-bootstrap.[css|scss]}
to re-adjust the offsets e.g:
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="bower_components/angular-timeline/src/angular-timeline-bootstrap.css" />
<script src="bower_components/angular-timeline/src/angular-timeline.js"></script>
git clone git@github.com:rpocklin/angular-timeline.git
npm install
bower install
grunt serve
http://localhost:9000/example/
in your browser to see the example.git checkout -b my-new-feature
)grunt karma
to ensure all tests pass. (Ideally add more tests!)git commit -am 'Added some feature'
)git push origin my-new-feature
)luisrudge for the original vanilla JS implementation on Bootsnipp
Released under the MIT License. See the LICENSE file for further details.
FAQs
An Angular.js directive that generates a responsive, data-driven vertical timeline to tell a story, show history or describe a sequence of events.
The npm package angular-timeline receives a total of 406 weekly downloads. As such, angular-timeline popularity was classified as not popular.
We found that angular-timeline demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.