800 ms response time AINT BAD
an endpoint that is used a lot

HSL - Hue, Saturation, Lightness

NONaggregated column

ARTSHOW ARTWORKS

The way it is organized now, is the sections are rendered once and then javascript hides or displays based on href clicked

      1) ajax on the images if user clicks on a specific collection


orrrrr a dropdown
ellipsis: omission of superfluous words
event.preventDefault() : default action will not be triggered

$ ->
  $(".prof_content").dotdotdot    watch: true
    wrap: 'word'
    ellipsis: '  '
    after: "span.more"

  menus = window.menu_items
  $.cookie('dd', screen.width + "x" + screen.height, { expires: 7, path: '/' });
  doResize()
  $('.show_dlg').leanModal()
  window.section = window.profile_layout['profile'].homepage

  $(window).resize ->
    doResize()

  $('.prof_menu_item').click (event) ->
    event.preventDefault()
    for menu in menus      sect = ".prof-#{menu}"
      $(sect).hide()
    window.section = $(this).find('a').attr('href')
    loadSection()

  $('.thumbgrid').click (e) ->
    t = $(e.target)
    show = t.attr('rel')
    $('.thumbgrid-img').hide()
    $(show).show()

  setTimeout ->
    loadSection()
  , 1000

loadSection = () ->
  window.psection = ".prof-#{window.section}"
  $(window.psection).show()
  if window.section == window.menu_items[0]
    $('.quickfacts').show()
  else
    $('.quickfacts').hide()
  if is_slideshow(window.section)
    setupSlideShow(window.section)
    $('.prof-sections').css('overflow', 'hidden')
  else
    $('.prof-sections').css('overflow', 'inherit')

setMainSize = () ->
  height = $(window).height()
  cheight = $('.prof-controls').height()
  width = $(".wrapper").width()
  if window.profile_layout.profile.overall_layout.indexOf('bottom') > 0
    height -= $('.prof-controls').height()
    $('.prof-homepage').height(height)
    $('.prof-sections').height(height)
    $('.prof-controls').css('bottom', '0')
    $('.prof-controls').css('position', 'fixed')
    $('.prof-controls').css('z-index', '100')
    $('.prof-controls').css('width', "#{width}px")
  else if window.profile_layout.profile.overall_layout.indexOf('right') > 0
    $('.prof-sections').height(height)
    $('.prof-homepage').height(height)
  else if window.profile_layout.profile.overall_layout.indexOf('left') > 0
    $('.prof-sections').height(height)
    $('.prof-homepage').height(height)
  else #top
    $('.prof-sections').height(height - cheight)
    $('.prof-homepage').height(height - cheight)
    $('.prof-controls').css('top', '0')
  #    $('.prof-controls').css('width', "#{width}px")
  $('.img_collection-slider').height($('.prof-sections').height())
  $('.thumbgrid-img img').height($('.prof-sections').height()-70)

setupSlideShow = (section) ->
  setSliderHeight()
  if window.profile_layout[section].previous_button == '1'
    $('.cycle-prev').removeClass('start-hidden')
  else
    $('.cycle-prev').addClass('start-hidden')
  if window.profile_layout[section].next_button == '1'
    $('.cycle-next').removeClass('start-hidden')
  else
    $('.cycle-next').addClass('start-hidden')

  if window.profile_layout[section].transition_type == 'slide' && Modernizr.touch    iosOptions =
      autoSlide: window.profile_layout[section].page_layout.auto_start
      snapToChildren: true
      desktopClickDrag: true
      keyboardControls: true
      responsiveSlides: true
      scrollbar: false
      scrollbarWidth: '0px'
      onSliderResize: doSlideResize      navNextSelector: $('.cycle-next.cycle-touch')
      navPrevSelector: $('.cycle-prev.cycle-touch')
    if trans_vertical(section)
      $(".prof-#{section} .slider1_wrapper").iosSliderVertical(iosOptions)
      $(".prof-#{section} .slider1_wrapper").iosSliderVertical(iosOptions)
    else
      $(".prof-#{section} .slider1_wrapper").iosSlider(iosOptions)
      $(".prof-#{section} .slider1_wrapper").iosSlider(iosOptions)
  else
    cycleOptions =
      fx: trans_type(section)
      slides: '.item_wrapper'
      swipe: true
      timeout: 4000
      pauseOnPagerHover: true
      paused: !window.profile_layout[section].auto_start
      reverse: trans_reverse(section)
      easing: easing(section)
      tileCount: 1
      speed: 1000

    $(".prof-#{section} .slider1").cycle(cycleOptions)


doSlideResize = (args) ->
  setSliderHeight()
  currentSlideObject = args.currentSlideObject  currentSlideObject.iosSliderVertical('update')

doResize = ->
  setMainSize()
  setSliderHeight()

setSliderHeight = () ->
  height = $(".prof-sections").height() - 30;
  width = $("#{window.psection} .prof-inner").width()
  $('.slider1_wrapper').css("height", "#{height}px")
  $('.slider1_wrapper').css("width", "#{width}px")
  $('.slider1').css("height", "#{height}px")
  $('.slider1').css("width", "#{width}px")
  $('.slider1 img').css("max-height", "#{height - 70}px")
  $('.slider1 img').css("max-width", "#{width}px")
  $('.slider1 figcaption').css("height", "60px")
  if trans_vertical(window.section)
    height = $('.prof-layout-0').height()
    $('.prof-page-layout0').css("height", "#{height}px")

trans_vertical = (section)  ->
  return false unless window.profile_layout[section]
  return true if window.profile_layout[section].transition_direction == 'down' or window.profile_layout[section].transition_direction == 'up'
  false

trans_reverse = (section) ->
  return false unless window.profile_layout[section]
  return true if window.profile_layout[section].transition_direction == 'left' or window.profile_layout[section].transition_direction == 'down'
  false

is_slideshow = (section) ->
  return false unless window.profile_layout[section]
  return true if window.profile_layout[section].page_layout == 'Full page scrolling view'
  return false

trans_type = (section) ->
  type = window.profile_layout[section].transition_type
  return type if type == 'fade'
  dir = window.profile_layout[section].transition_direction
  return 'flipHorz' if type == 'flip'
  return 'shuffle' if type == 'shuffle'
  return 'tileBlind' if type == 'cover'
  return 'scrollHorz' if type == 'spring'
  return 'scrollHorz' if dir == 'left' || dir == 'right'
  return 'scrollVert'

easing = (section) ->
  return 'easeInOutBack' if window.profile_layout[section].transition_type == 'spring'
  return null




Mysql2::Error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'artslant_development.artshow_artworks.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: SELECT  `artshow_artworks`.* FROM `artshow_artworks`  WHERE (list_name = 'exhibiting') GROUP BY artwork_id ORDER BY rand(1401696994692600359) LIMIT 18 OFFSET 0


NOT IN GROUP BY CLAUSE

Comments

Popular posts from this blog

ADVERTISING STYLES