The TimelineRailsHelper provides a timeline_molecules_tag helper to draw a vertical time line usable with vanilla CSS.
- Ruby >= 2.6
Add this line to your application's Gemfile:
gem "timeline_rails_helper"
And then execute:
$ bundle
Or install it yourself as:
$ gem install timeline_rails_helper
<div id="time_line_rails_helper">
<%= timeline_molecules_tag [{title: (DateTime.now - 3.days).strftime('%Y-%m-%d'),
body: 'This is a test'},
{title: DateTime.now.strftime('%Y-%m-%d'),
body: 'This is a test'}] %>
</div>
- Append the following line to your app/assets/application.scss:
@import 'timeline_rails_helper'
- And then append the line to your view file like below:
timeline_molecules_tag [{title: (DateTime.now - 3.days).strftime('%Y-%m-%d'),
body: 'This is a test'},
{title: DateTime.now.strftime('%Y-%m-%d'),
body: 'This is a test'}]
# => "<div class="entries">
# <div class="entry">
# <div class="title ">2022-04-13</div>
# <div class="body">This is a test</div>
# </div>
# <div class="entry">
# <div class="title ">2022-04-16</div>
# <div class="body">This is a test</div>
# </div>
# </div>"
bin/test
TimelineRailsHelper's changelog is available here.
Bug reports and pull requests are welcome on Github at https://github.com/smapira/timeline_rails_helper. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct. License
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the timeline_rails_helper project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
- routeflagsinc / jma — Bitbucket
- for the Japan Meteorological Agency (気象庁) for searching new information simplifies.
- smapira / punch_time — Bitbucket
- Work time calculations using punch clock.
- smapira / rspec-css — Bitbucket
- Record your test suite's computed CSS during future test runs for deterministic and accurate tests.
- routeflags/timeline_rails_helper: The TimelineRailsHelper provides a timeline_molecules_tag helper to draw a vertical time line usable with vanilla CSS.
- smapira/acts_as_tree_diagram: ActsAsTreeDiagram extends ActsAsTree to add simple function for draw tree diagram with html.
- 株式会社旗指物