You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.0 KiB

  1. semantic.home = {};
  2. // ready event
  3. semantic.home.ready = function() {
  4. var
  5. $themeDropdown = $('.theme.dropdown'),
  6. $header = $('.masthead'),
  7. $ui = $header.find('h1 b'),
  8. $phrase = $header.find('h1 span'),
  9. $download = $header.find('.download')
  10. ;
  11. $themeDropdown
  12. .dropdown('setting', 'action', 'activate')
  13. ;
  14. // zoom out
  15. $header
  16. .removeClass('zoomed')
  17. ;
  18. window.Transifex.live.onTranslatePage(function(name){
  19. name = $('.language.dropdown .item[data-value=' + name + ']').text();
  20. $('.language.dropdown > .text').html(name);
  21. });
  22. $ui.typed({
  23. replaceBaseText : true,
  24. strings : [
  25. $ui.data('text')
  26. ],
  27. showCursor : false,
  28. typeSpeed : 120,
  29. backSpeed : 120,
  30. backDelay : 2000
  31. });
  32. $('.demo .ui.accordion')
  33. .accordion()
  34. ;
  35. $('.demo .ui.dropdown')
  36. .dropdown()
  37. ;
  38. $('.demo .ui.checkbox')
  39. .checkbox()
  40. ;
  41. };
  42. // attach ready event
  43. $(document)
  44. .ready(semantic.home.ready)
  45. ;