• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / blurts-server / #11898

pending completion
#11898

push

circleci

web-flow
Merge pull request #2770 from mozilla/license

Add license headers in source files

282 of 1138 branches covered (24.78%)

Branch coverage included in aggregate %.

959 of 3049 relevant lines covered (31.45%)

2.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/views/main.js
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4

5
import AppConstants from '../app-constants.js'
6
import { getMessage, getLocale } from '../utils/fluent.js'
7

8
const { SERVER_URL } = AppConstants
×
9

10
const mainLayout = data => `
×
11
<!doctype html>
12
<html lang=${getLocale()}>
13
  <head>
14
    <title>${getMessage('brand-fx-monitor')}</title>
15
    <style>html {display: none;}</style>
16

17
    <meta charset='utf-8'>
18
    <meta name='viewport' content='width=320, initial-scale=1'>
19
    <meta name='description' content='${getMessage('meta-desc')}'>
20
    <meta name='twitter:card' content='summary_large_image'>
21
    <meta property='og:title' content='${getMessage('brand-fx-monitor')}'>
22
    <meta property='og:type' content='website'>
23
    <meta property='og:url' content='${SERVER_URL}'>
24
    <meta property='og:image' content='${SERVER_URL}/images/og-image.webp'>
25

26
    <link rel="preload" href="/fonts/Metropolis-Bold.woff2" as="font" type="font/woff2" crossorigin>
27
    <link rel="preload" href="/fonts/Inter-Regular-latin.woff2" as="font" type="font/woff2" crossorigin>
28
    <link rel='stylesheet' href='/css/index.css' type='text/css'>
29
    <link rel='stylesheet' href='/css/partials/${data.partial.name}.css' type='text/css'>
30
    <link rel='icon' href='/images/favicon-16.webp' sizes='16x16'>
31
    <link rel='icon' href='/images/favicon-32.webp' sizes='32x32'>
32
    <link rel='icon' href='/images/favicon-48.webp' sizes='48x48'>
33
    <link rel='icon' href='/images/favicon-96.webp' sizes='96x96'>
34
    <link rel='icon' href='/images/favicon-144.webp' sizes='144x144'>
35
    <link rel='icon' href='/images/favicon-256.webp' sizes='256x256'>
36
    <link rel='apple-touch-icon' href='/images/apple-touch-icon.webp' sizes='180x180'>
37

38
    <script src='/js/index.js' type='module'></script>
39
  </head>
40
  <body>
41
    ${data.partial.name === 'landing' ? landingHeader(data) : mainHeader(data)}
×
42
    <main data-partial='${data.partial.name}'>
43
      ${data.partial(data)}
44
    </main>
45
    <footer>
46
      <a href='https://www.mozilla.org' target='_blank'>
47
        <img src='/images/moz-logo-1color-white-rgb-01.svg' width='100' height='29' loading='lazy' alt='${getMessage('mozilla')}'>
48
      </a>
49
      <menu>
50
        <li><a href='https://support.mozilla.org/kb/firefox-monitor-faq' target='_blank'>FAQ</a></li>
51
        <li><a href='https://www.mozilla.org/privacy/firefox-monitor' target='_blank'>${getMessage('terms-and-privacy')}</a></li>
52
        <li><a href='https://github.com/mozilla/blurts-server' target='_blank'>${getMessage('github')}</a></li>
53
      </menu>
54
    </footer>
55
  </body>
56
</html>
57
`
58

59
const mainHeader = data => `
×
60
<header>
61
  <a href='/user/breaches'>
62
    <img class='monitor-logo' srcset='/images/monitor-logo-transparent.webp 213w, /images/monitor-logo-transparent@2x.webp 425w' width='213' height='33' alt='${getMessage('brand-fx-monitor')}'>
63
  </a>
64
  <menu>
65
    <li>
66
      <button class='nav-toggle'>
67
        <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' width='20'>
68
          <path d='M1 1h8M1 4h8M1 7h8' stroke='#000' stroke-width='1' stroke-linecap='round'/>
69
        </svg>
70
      </button>
71
    </li>
72
  </menu>
73
</header>
74
<nav>
75
  <a href='/user/dashboard' class='nav-item ${data.partial.name === 'dashboard' ? 'current' : ''}'>Dashboard</a>
×
76
  <a href='/user/breaches' class='nav-item ${data.partial.name === 'breaches' ? 'current' : ''}'>Data breaches</a>
×
77
  <a href='/user/data-removal' class='nav-item ${data.partial.name === 'dataRemoval' ? 'current' : ''}'>Data removal</a>
×
78
  <a href='/user/settings' class='nav-item ${data.partial.name === 'settings' ? 'current' : ''}'>Settings</a>
×
79
</nav>
80
`
81

82
const landingHeader = data => `
×
83
<header>
84
  <a href='/'>
85
    <img class='monitor-logo' srcset='/images/monitor-logo-transparent.webp 213w, /images/monitor-logo-transparent@2x.webp 425w' width='213' height='33' alt='${getMessage('brand-fx-monitor')}'>
86
  </a>
87
  <menu>
88
    <li><a href='/user/breaches' class='button secondary'>${getMessage('sign-in')}</a></li>
89
  </menu>
90
</header>
91
`
92

93
export { mainLayout }
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc