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

mozilla / blurts-server / #13417

pending completion
#13417

push

circleci

flozia
chore: Add meta strings for breach scan page

282 of 1780 branches covered (15.84%)

Branch coverage included in aggregate %.

959 of 4679 relevant lines covered (20.5%)

1.71 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 '../appConstants.js'
6
import { getMessage, getLocale } from '../utils/fluent.js'
7

8
/**
9
 * @type {ViewPartial<GuestViewPartialData<any>>}
10
 */
11
const guestLayout = data => {
×
12
  const siteTitle = data.meta?.title ?? getMessage('brand-fx-monitor')
×
13
  const metaTitle = data.meta?.socialTitle ?? getMessage('brand-fx-monitor')
×
14
  const metaDescription = data.meta?.socialDescription ?? getMessage('meta-desc-2')
×
15

16
  return `
×
17
    <!doctype html>
18
    <html lang=${getLocale()}>
19
      <head>
20
        <title>${siteTitle}</title>
21
        <style>html {display: none;}</style>
22

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

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

49
        <script src='/js/index.js' type='module'></script>
50

51
        <noscript>
52
          <style>
53
            :root {
54
              --enter-transition-opacity: 1;
55
              --enter-transition-y: 0;
56
            }
57
          </style>
58
        </noscript>
59
        ${data.skipPartialModule ? '' : `<script src='/js/partials/${data.partial.name}.js' type='module'></script>`}
×
60
      </head>
61
      <body>
62
        <header>
63
          <a href='/'>
64
            <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')}'>
65
          </a>
66
          <menu>
67
            <li><a href='/user/breaches' data-cta-id='sign-in-1' class='button secondary'>${getMessage('sign-in')}</a></li>
68
          </menu>
69
        </header>
70
        <main data-partial='${data.partial.name}'>
71
          ${data.partial(data)}
72
        </main>
73
        <footer class='site-footer'>
74
          <a href='https://www.mozilla.org' target='_blank'>
75
            <img src='/images/moz-logo-1color-white-rgb-01.svg' width='100' height='29' loading='lazy' alt='${getMessage('mozilla')}'>
76
          </a>
77
          <menu>
78
            <li><a href='/breaches'>${getMessage('footer-nav-all-breaches')}</a></li>
79
            <li><a href='https://support.mozilla.org/kb/firefox-monitor-faq' target='_blank'>FAQ</a></li>
80
            <li><a href='https://www.mozilla.org/privacy/firefox-monitor' target='_blank'>${getMessage('terms-and-privacy')}</a></li>
81
            <li><a href='https://github.com/mozilla/blurts-server' target='_blank'>${getMessage('github')}</a></li>
82
          </menu>
83
        </footer>
84
      </body>
85
    </html>
86
  `
87
}
88

89
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