Retrospring/app/javascript/packs/legacy.coffee

48 lines
1.3 KiB
CoffeeScript
Raw Normal View History

import 'core-js/stable'
import 'regenerator-runtime/runtime'
import '../legacy/jquery'
import {} from 'jquery-ujs'
import 'popper.js'
import 'bootstrap'
import 'particleground/jquery.particleground.min'
2020-12-25 06:50:34 -08:00
import 'sweetalert'
import Cookies from 'js-cookie'
require('nprogress/nprogress.css')
2020-12-25 06:07:47 -08:00
# this file is generated by Rails
import I18n from '../legacy/i18n'
import '../legacy/memes'
import '../legacy/notifications'
import '../legacy/pagination'
import '../legacy/locale-box'
import '../legacy/util'
2015-06-08 07:49:47 -07:00
window.translate = (scope, options) ->
# for some reason I18n errors when calling it by assign proxy, so we got to wrap it
I18n.translate(scope, options)
I18n.defaultLocale = 'en';
I18n.locale = Cookies.get('hl') || 'en';
2014-11-10 09:19:04 -08:00
$(document).on "click", "button#create-account", ->
Turbolinks.visit "/sign_up"
_ready = ->
if document.getElementById('particles')?
jumbo = $ '.j2-jumbo'
bodyColorOrig = jumbo.css 'background-color'
bodyColor = doppler 0.25, bodyColorOrig
console.log bodyColor, bodyColorOrig
particleground document.getElementById('particles'),
dotColor: bodyColor
lineColor: bodyColor
2015-09-20 06:16:24 -07:00
density: 23000
2015-05-12 14:53:42 -07:00
$(document).ready _ready
$(document).on 'turbolinks:load', _ready
$(document).on 'turbolinks:render', ->
$('.dropdown-toggle').dropdown()
$('[data-toggle="tooltip"]').tooltip()