diff --git a/app/javascript/backend_typed.js b/app/javascript/backend_typed.js new file mode 100644 index 0000000..6148c06 --- /dev/null +++ b/app/javascript/backend_typed.js @@ -0,0 +1,13 @@ +const Typed = require('typed.js'); +document.addEventListener("turbolinks:load", function () { + new Typed('.backends-cycler', { + strings: ['Google Sheets', 'Airtable', 'Google Sheets', 'Airtable'], // smoother loops + loop: true, + typeSpeed: 100, + backSpeed: 40, + backDelay: 1400, + smartBackspace: true, + startDelay: 800, + onBegin: (typed) => { typed.currentElContent = typed.el.innerText; } + }); +}); diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index fb7f3ef..38aa7c6 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -11,6 +11,7 @@ require("channels") require('burger_menu'); require('tinyforms'); require('demo'); +require('backend_typed'); // Uncomment to copy all static images under ../images to the output folder and reference // them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>) diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 5be9a9b..4976a1d 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -2,10 +2,10 @@
- Generate forms instantly + Link your online forms to Google Sheets and receive form submissions in your favorit spreadsheet.