Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | [# This is the part of header.ezt used by both the legacy |
| 3 | Monorail UI, and the new Polymer pages. |
| 4 | ] |
| 5 | <html lang="en"> |
| 6 | <head> |
| 7 | <link rel="icon" type="image/vnd.microsoft.icon" href="/static/images/monorail.ico"> |
| 8 | [if-any link_rel_canonical] |
| 9 | <link rel="canonical" href="[link_rel_canonical]"> |
| 10 | [end] |
| 11 | |
| 12 | <script type="text/javascript" nonce="[nonce]"> |
| 13 | [# Javascript object containing basic page data. ] |
| 14 | window.CS_env = { |
| 15 | 'absoluteBaseUrl': '[format "js"][absolute_base_url][end]', |
| 16 | 'app_version': '[format "js"][app_version][end]', |
| 17 | 'token': '[format "js"][xhr_token][end]', |
| 18 | 'tokenExpiresSec': [format "js"][token_expires_sec][end], |
| 19 | 'loggedInUserEmail': |
| 20 | [if-any logged_in_user] |
| 21 | '[format "js"][logged_in_user.email][end]' |
| 22 | [else] |
| 23 | null |
| 24 | [end], |
| 25 | 'login_url': '[format "js"][login_url][end]', |
| 26 | 'logout_url': '[format "js"][logout_url][end]', |
| 27 | 'profileUrl': |
| 28 | [if-any logged_in_user] |
| 29 | '[format "js"][logged_in_user.profile_url][end]' |
| 30 | [else] |
| 31 | null |
| 32 | [end], |
| 33 | 'projectName': '[format "js"][projectname][end]', |
| 34 | 'projectIsRestricted': [if-any project_is_restricted]true[else]false[end], |
| 35 | 'is_member': '[format "js"][is_member][end]', |
| 36 | 'gapi_client_id': '[format "js"][gapi_client_id][end]', |
| 37 | }; |
| 38 | </script> |
| 39 | |
| 40 | [# Improve the snippet that appears in search] |
| 41 | [if-any show_search_metadata] |
| 42 | <meta name="Description" content="Monorail is simple, reliable, and flexible issue tracking tool."> |
| 43 | <meta name="robots" content="NOODP"> |
| 44 | [end] |
| 45 | |
| 46 | <title> |
| 47 | [if-any title][title] - [end] |
| 48 | [if-any title_summary][title_summary] - [end] |
| 49 | [if-any projectname] |
| 50 | [projectname] - |
| 51 | [else] |
| 52 | [if-any viewing_user_page][viewed_user.display_name] - [end] |
| 53 | [end] |
| 54 | [if-any title_summary][else] |
| 55 | [if-any project_summary][project_summary] - [end] |
| 56 | [end] |
| 57 | [site_name] |
| 58 | </title> |
| 59 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 60 | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 61 | <meta name="referrer" content="no-referrer"> |
| 62 | [if-any robots_no_index] |
| 63 | <meta name="ROBOTS" content="NOINDEX,NOARCHIVE"> |
| 64 | [else] |
| 65 | <meta name="ROBOTS" content="NOARCHIVE"> |
| 66 | [end] |
| 67 | <meta name="viewport" content="width=device-width, minimum-scale=1.0"> |
| 68 | <link type="text/css" rel="stylesheet" href="[version_base]/static/css/chopsui-normal.css"> |
| 69 | |
| 70 | [if-any is_ezt] |
| 71 | <link type="text/css" rel="stylesheet" href="[version_base]/static/css/ph_core.css"> |
| 72 | <link type="text/css" rel="stylesheet" media="(max-width:425px)" |
| 73 | href="[version_base]/static/css/ph_mobile.css"> |
| 74 | |
| 75 | [if-any category_css] |
| 76 | <link type="text/css" rel="stylesheet" href="[version_base]/static/[category_css]"> |
| 77 | [end] |
| 78 | [if-any category2_css] |
| 79 | <link type="text/css" rel="stylesheet" href="[version_base]/static/[category2_css]"> |
| 80 | [end] |
| 81 | [if-any page_css] |
| 82 | <link type="text/css" rel="stylesheet" href="[version_base]/static/[page_css]"> |
| 83 | [end] |
| 84 | [end] |
| 85 | |
| 86 | <!-- Lazy load icons. --> |
| 87 | <link rel="stylesheet" |
| 88 | href="https://fonts.googleapis.com/icon?family=Material+Icons" |
| 89 | media="none" |
| 90 | id="icons-stylesheet"> |
| 91 | <script type="module" async defer nonce="[nonce]"> |
| 92 | document.getElementById('icons-stylesheet').media = 'all'; |
| 93 | </script> |
| 94 | [# NO MORE SCRIPTS IN HEAD, it makes page loading too slow.] |
| 95 | </head> |
| 96 | |
| 97 | [# Tiny script used sitewide. ] |
| 98 | <script type="text/javascript" nonce="[nonce]"> |
| 99 | function _go(url, newWindow) { |
| 100 | if (newWindow) |
| 101 | window.open(url, '_blank'); |
| 102 | else |
| 103 | document.location = url; |
| 104 | } |
| 105 | function $(id) { return document.getElementById(id); } |
| 106 | |
| 107 | var loadQueue = []; |
| 108 | function runOnLoad(fn) { loadQueue.push(fn); } |
| 109 | |
| 110 | window.onload = function() { |
| 111 | for (var i = 0; i < loadQueue.length; i++) |
| 112 | loadQueue[[]i](); |
| 113 | delete loadQueue; |
| 114 | }; |
| 115 | </script> |