File: HTMLHead.tt

package info (click to toggle)
otrs2 5.0.16-1%2Bdeb9u6
  • links: PTS
  • area: non-free
  • in suites: stretch
  • size: 141,108 kB
  • sloc: perl: 746,356; xml: 54,469; sql: 10,505; sh: 430; makefile: 64
file content (117 lines) | stat: -rw-r--r-- 6,163 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# --
# Copyright (C) 2001-2017 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --
<head>
    <meta http-equiv="Content-type" content="text/html;charset=utf-8" />
    <meta id="viewport" name="viewport" content="">
# set viewport for mobile mode, do not set viewport for DesktopMode
    <script>
        (function(doc, win) {
            var viewport = doc.getElementById('viewport'),
                isIFrame = (win.top.location.href !== win.location.href),
                isPopup = (win.name.search(/^OTRSPopup_/) != -1);
            try {
              if (((!isIFrame && !isPopup) || (isIFrame && isPopup)) && (!localStorage.getItem("DesktopMode") || parseInt(localStorage.getItem("DesktopMode"), 10) <= 0)) {
                  viewport.setAttribute("content", "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no");
              }
            }
            catch (Exception) {}
        }(document, window));
    </script>
[% RenderBlockStart("MetaHttpEquivRefresh") %]
[% INCLUDE "HTMLHeadRefresh.tt" %]
[% RenderBlockEnd("MetaHttpEquivRefresh") %]
[% RenderBlockStart("MetaLink") %]
    <link rel="[% Data.Rel | html %]" type="[% Data.Type | html %]" title="[% Data.Title | html %]" href="[% Data.Href %]" />
[% RenderBlockEnd("MetaLink") %]
    <link rel="shortcut icon" href="[% Config("Frontend::ImagePath") %]icons/product.ico" type="image/ico" />
    <link rel="apple-touch-icon" href="[% Config("Frontend::ImagePath") %]icons/apple-touch-icon.png" />

[% RenderBlockStart("CommonCSS") %]
    <link rel="stylesheet" type="text/css" href="[% Config("Frontend::WebPath") %]skins/Agent/[% Data.Skin | uri %]/[% Data.CSSDirectory %]/[% Data.Filename %]" />
[% RenderBlockEnd("CommonCSS") %]

[% RenderBlockStart("ModuleCSS") %]
    <link rel="stylesheet" type="text/css" href="[% Config("Frontend::WebPath") %]skins/Agent/[% Data.Skin | uri %]/[% Data.CSSDirectory %]/[% Data.Filename %]" />
[% RenderBlockEnd("ModuleCSS") %]

    <link rel="stylesheet" type="text/css" href="[% Config("Frontend::WebPath") %]skins/Agent/default/css/thirdparty/ui-theme/jquery-ui.css" />

[% RenderBlockStart("HeaderLogoCSS") %]
    <style type="text/css">
        #Header #Logo {
            background-image: [% Data.URL | html %];
            top: [% Data.StyleTop | html %];
            right: [% Data.StyleRight | html %];
            width: [% Data.StyleWidth | html %];
            height: [% Data.StyleHeight | html %];
        }
    </style>
[% RenderBlockEnd("HeaderLogoCSS") %]

[% RenderBlockStart("LoginLogoCSS") %]
    <style type="text/css">
        #LoginLogo {
            background-image: [% Data.URL | html %];
            height: [% Data.StyleHeight | html %];
        }
    </style>
[% RenderBlockEnd("LoginLogoCSS") %]

    <style type="text/css">
        @font-face {
          font-family: 'FontAwesome';
          src: url('[% Config("Frontend::WebPath") %]skins/Agent/default/css/thirdparty/fontawesome/fontawesome-webfont.eot?v=4.3.0');
          src: url('[% Config("Frontend::WebPath") %]skins/Agent/default/css/thirdparty/fontawesome/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'),
               url('[% Config("Frontend::WebPath") %]skins/Agent/default/css/thirdparty/fontawesome/fontawesome-webfont.woff?v=4.3.0') format('woff'),
               url('[% Config("Frontend::WebPath") %]skins/Agent/default/css/thirdparty/fontawesome/fontawesome-webfont.ttf?v=4.3.0') format('truetype'),
               url('[% Config("Frontend::WebPath") %]skins/Agent/default/css/thirdparty/fontawesome/fontawesome-webfont.svg#fontawesomeregular?v=4.3.0') format('svg');
          font-weight: normal;
          font-style: normal;
        }

        /* Fix poor font rendering on chrome based browsers on windows */
        @media all and (-webkit-min-device-pixel-ratio:0) {
            @font-face {
                font-family: 'FontAwesome';
                src: url('[% Config("Frontend::WebPath") %]skins/Agent/default/css/thirdparty/fontawesome/fontawesome-webfont.svg#fontawesomeregular') format('svg'),
                     url('[% Config("Frontend::WebPath") %]skins/Agent/default/css/thirdparty/fontawesome/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'),
                     url('[% Config("Frontend::WebPath") %]skins/Agent/default/css/thirdparty/fontawesome/fontawesome-webfont.woff?v=4.3.0') format('woff'),
                     url('[% Config("Frontend::WebPath") %]skins/Agent/default/css/thirdparty/fontawesome/fontawesome-webfont.ttf?v=4.3.0') format('truetype');
                font-weight: normal;
                font-style: normal;
            }
        }
    </style>

# decide, if responsive CSS must be loaded
# resposive CSS will not be loaded in "desktop mode" or if the document is within an iframe (customer overview in ticket phone overlay)
    <script>
      (function(doc, win) {
          var isIFrame = (win.top.location.href !== win.location.href),
              isPopup = (win.name.search(/^OTRSPopup_/) != -1);
          try {
            if (((!isIFrame && !isPopup) || (isIFrame && isPopup)) && (!localStorage.getItem("DesktopMode") || parseInt(localStorage.getItem("DesktopMode"), 10) <= 0)) {
              var ResponsiveCSS;
  [% RenderBlockStart("ResponsiveCSS") %]
              ResponsiveCSS = doc.createElement("link");
              ResponsiveCSS.setAttribute("rel", "stylesheet");
              ResponsiveCSS.setAttribute("type", "text/css");
              ResponsiveCSS.setAttribute("href", "[% Config("Frontend::WebPath") %]skins/Agent/[% Data.Skin | uri %]/[% Data.CSSDirectory %]/[% Data.Filename %]");
              doc.getElementsByTagName("head")[0].appendChild(ResponsiveCSS);
  [% RenderBlockEnd("ResponsiveCSS") %]
            }
          }
          catch (Exception) {}
      }(document, window));
    </script>

    <title>[% Data.TitleArea | html %] [% Config("ProductName") %]</title>

[% INCLUDE "HTMLHeadBlockEvents.tt" %]

</head>