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

mozilla / blurts-server / 8423e6d4-3a77-48ae-b970-884eb59cfb74

pending completion
8423e6d4-3a77-48ae-b970-884eb59cfb74

Pull #2968

circleci

Vincent
fixup! Merge branch 'main' into MNTOR-1309-exposure-scan
Pull Request #2968: Allow scanning for exposures without logging in

282 of 1653 branches covered (17.06%)

Branch coverage included in aggregate %.

107 of 107 new or added lines in 9 files covered. (100.0%)

959 of 4478 relevant lines covered (21.42%)

3.57 hits per line

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

0.0
/src/views/guestLayout.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
/**
9
 * @template {object} PartialParameters
10
 * @param {ViewPartialData<PartialParameters>} data
11
 * @returns {string}
12
 */
13
const guestLayout = data => `
×
14
<!doctype html>
15
<html lang=${getLocale()}>
16
  <head>
17
    <title>${getMessage('brand-fx-monitor')}</title>
18
    <style>html {display: none;}</style>
19

20
    <meta charset='utf-8'>
21
    <meta name='viewport' content='width=320, initial-scale=1'>
22
    <meta name='description' content='${getMessage('meta-desc')}'>
23
    <meta name='twitter:card' content='summary_large_image'>
24
    <meta name='twitter:title' content='${getMessage('brand-fx-monitor')}'>
25
    <meta name='twitter:description' content='${getMessage('meta-desc')}'>
26
    <meta name='twitter:image' content='${AppConstants.SERVER_URL}/images/og-image.webp'>
27
    <meta property='og:title' content='${getMessage('brand-fx-monitor')}'>
28
    <meta property='og:description' content='${getMessage('meta-desc')}'>
29
    <meta property='og:site_name' content='${getMessage('brand-fx-monitor')}'>
30
    <meta property='og:type' content='website'>
31
    <meta property='og:url' content='${AppConstants.SERVER_URL}'>
32
    <meta property='og:image' content='${AppConstants.SERVER_URL}/images/og-image.webp'>
33

34
    <link rel='preload' href='/fonts/Metropolis-Bold.woff2' as='font' type='font/woff2' crossorigin>
35
    <link rel='preload' href='/fonts/Inter-Regular-latin.woff2' as='font' type='font/woff2' crossorigin>
36
    <link rel='stylesheet' href='/css/index.css' type='text/css'>
37
    <link rel='stylesheet' href='/css/partials/${data.partial.name}.css' type='text/css'>
38
    <link rel='icon' href='/images/favicon-16.webp' sizes='16x16'>
39
    <link rel='icon' href='/images/favicon-32.webp' sizes='32x32'>
40
    <link rel='icon' href='/images/favicon-48.webp' sizes='48x48'>
41
    <link rel='icon' href='/images/favicon-96.webp' sizes='96x96'>
42
    <link rel='icon' href='/images/favicon-144.webp' sizes='144x144'>
43
    <link rel='icon' href='/images/favicon-256.webp' sizes='256x256'>
44
    <link rel='apple-touch-icon' href='/images/apple-touch-icon.webp' sizes='180x180'>
45

46
    <script src='/js/index.js' type='module'></script>
47

48
    <!-- Google tag (gtag.js) -->
49
    <script nonce='${data.nonce}'>
50
      (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
51
      new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
52
      j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
53
      'https://www.googletagmanager.com/gtag/js?id='+i+dl;var n=d.querySelector('[nonce]');
54
      n&&j.setAttribute('nonce',n.nonce||n.getAttribute('nonce'));f.parentNode.insertBefore(j,f);
55
      })(window,document,'script','dataLayer','${AppConstants.GA4_MEASUREMENT_ID}');
56
      function gtag(){dataLayer.push(arguments);}
57
      gtag('js', new Date());
58
      gtag('config', '${AppConstants.GA4_MEASUREMENT_ID}',
59
        {
60
          cookie_domain: window.location.hostname,
61
          cookie_flags: "SameSite=None;Secure",
62
          debug_mode: ${Boolean(AppConstants.GA4_DEBUG_MODE)},
63
          page_location: location.protocol + '//' + location.host + location.pathname
64
        }
65
      );
66
      window.gtag = gtag;
67

68
      // Detect CTA clicks on public pages.
69
      document.querySelectorAll('[data-cta-id]').forEach(a =>
70
        a.addEventListener('click', e => {
71
          gtag('event', 'clicked_cta', { cta_id: a.dataset.ctaId })
72
        })
73
      )
74
      </script>
75
    <!-- End Google tag (gtag.js) -->
76

77
  </head>
78
  <body>
79
    <header>
80
      <a href='/'>
81
        <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')}'>
82
      </a>
83
      <menu>
84
        <li><a href='/user/breaches' data-cta-id='sign-in-1' class='button secondary'>${getMessage('sign-in')}</a></li>
85
      </menu>
86
    </header>
87
    <main data-partial='${data.partial.name}'>
88
      ${data.partial(data)}
89
    </main>
90
    <footer class='site-footer'>
91
      <a href='https://www.mozilla.org' target='_blank'>
92
        <img src='/images/moz-logo-1color-white-rgb-01.svg' width='100' height='29' loading='lazy' alt='${getMessage('mozilla')}'>
93
      </a>
94
      <menu>
95
        <li><a href='/breaches'>${getMessage('footer-nav-all-breaches')}</a></li>
96
        <li><a href='https://support.mozilla.org/kb/firefox-monitor-faq' target='_blank'>FAQ</a></li>
97
        <li><a href='https://www.mozilla.org/privacy/firefox-monitor' target='_blank'>${getMessage('terms-and-privacy')}</a></li>
98
        <li><a href='https://github.com/mozilla/blurts-server' target='_blank'>${getMessage('github')}</a></li>
99
      </menu>
100
    </footer>
101
  </body>
102
</html>
103
`
104

105
export { guestLayout }
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