Projet

Général

Profil

Révision 74f6bef0

Ajouté par Assos Assos il y a plus de 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/themes/adaptivetheme/at_subtheme/scripts/media_queries.js
10 10
 * media queries you set in theme settings (by adding the font-family
11 11
 * declarations to the responsive layout CSS).
12 12
 *
13
 * SEE: https://github.com/JoshBarr/js-media-queries (really, go look, lots of
14
 * useful documentation available).
13
 * SEE: https://github.com/JoshBarr/js-media-queries
15 14
 *
16 15
 * IMPORTANT: do not rename or move this file, or change the directory name!
17 16
 */
18 17
var queries = [
19
  // README! The following are examples, remove what you don't need!
20 18

  
21

  
22
  // Smartphone
19
  /*
20
   * Smalltouch
21
   */
23 22
  {
24
    context: ['smartphone_portrait', 'smartphone_landscape'],
23
    context: ['smalltouch_portrait', 'smalltouch_landscape'], // portrait and landscape
25 24
    call_in_each_context: false,
26 25
    callback: function() {
27
      // Debug
28
      console.log('smartphone');
26
      // console.log('smalltouch');
27

  
28
      // Example: this will remove the search block in smartphones
29
      // el = document.getElementById("block-search-form");
30
      // el.parentNode.removeChild(element);
29 31
    }
30 32
  },
31
  // portrait only
32 33
  {
33
    context: 'smartphone_portrait',
34
    context: 'smalltouch_portrait', // portrait only
34 35
    callback: function() {
35
      // Debug
36
      console.log('smartphone portrait');
36
      //console.log('smalltouch portrait');
37 37
    }
38 38
  },
39
  // landscape only
40 39
  {
41
    context: 'smartphone_landscape',
40
    context: 'smalltouch_landscape', // landscape only
42 41
    callback: function() {
43
      // Debug
44
      console.log('smartphone_landscape ');
42
      //console.log('smalltouch_landscape ');
45 43
    }
46 44
  },
47 45

  
48 46

  
49
  // Tablet
47
  /*
48
   * Tablet
49
   */
50 50
  {
51
    context: ['tablet_portrait', 'tablet_landscape'],
51
    context: ['tablet_portrait', 'tablet_landscape'], // portrait and landscape
52 52
    call_in_each_context: false,
53 53
    callback: function() {
54
      // Debug
55
      console.log('tablet');
54
      //console.log('tablet');
56 55
    }
57 56
  },
58
  // portrait only
59 57
  {
60
    context: 'tablet_portrait',
58
    context: 'tablet_portrait', // portrait only
61 59
    callback: function() {
62
      // Debug
63
      console.log('tablet_portrait');
60
      //console.log('tablet_portrait');
64 61
    }
65 62
  },
66
  // landscape only
67 63
  {
68
    context: 'tablet_landscape',
64
    context: 'tablet_landscape', // landscape only
69 65
    callback: function() {
70
      // Debug
71
      console.log('tablet_landscape');
66
      //console.log("tablet_landscape");
72 67
    }
73 68
  },
74 69

  
75 70

  
76
  // Standard desktop context
71
  /*
72
   * Standard desktop layout
73
   */
77 74
  {
78 75
    context: 'standard',
79 76
    callback: function() {
80
      // Debug
81
      console.log('standard desktop');
77
      //console.log("standard desktop");
82 78
    }
83 79
  },
84 80
];
85 81

  
86
// Go!
87 82
MQ.init(queries);

Formats disponibles : Unified diff