This repository has been archived by the owner on Jan 17, 2023. It is now read-only.
/
view.js
175 lines (165 loc) · 7.55 KB
/
view.js
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
const React = require("react");
const reactruntime = require("../../reactruntime");
const sendEvent = require("../../browser-send-event.js");
const { Footer } = require("../../footer-view.js");
const { Localized } = require("fluent-react/compat");
class Head extends React.Component {
render() {
return (
<reactruntime.HeadTemplate {...this.props}>
<link rel="stylesheet" href={ this.props.staticLink("/static/css/home.css") } />
<script src={this.props.staticLink("/static/js/homepage-bundle.js")} async></script>
<meta name="viewport" content="width=320, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<Localized id="homePageDescription">
<meta name="description" content="Intuitive screenshots baked right into the browser. Capture, save and share screenshots as you browse the Web using Firefox." />
</Localized>
<meta property="og:title" content={ this.props.title } />
<meta property="og:url" content={ this.props.backend } />
<Localized id="homePageDescription">
<meta property="og:description" content="Intuitive screenshots baked right into the browser. Capture, save and share screenshots as you browse the Web using Firefox." />
</Localized>
<meta name="twitter:title" content={ this.props.title } />
<Localized id="homePageDescription">
<meta name="twitter:description" content="Intuitive screenshots baked right into the browser. Capture, save and share screenshots as you browse the Web using Firefox." />
</Localized>
<meta name="twitter:card" content="summary_large_image" />
<meta property="og:image" content={ this.props.staticLink("/static/img/onboarding-1.png") } />
<meta name="twitter:image" content={ this.props.staticLink("/static/img/onboarding-1.png") } />
</reactruntime.HeadTemplate>
);
}
}
class Body extends React.Component {
onClickMyShots() {
sendEvent("goto-myshots", "homepage", {useBeacon: true});
window.location = "/shots";
}
onClickGetStarted() {
sendEvent("get-started", "homepage", {useBeacon: true});
}
onClickInstallFirefox() {
sendEvent("click-install-firefox-home", {useBeacon: true});
}
renderGetFirefox() {
if (this.props.isFirefox) {
return null;
}
return (
<a href="https://www.mozilla.org/firefox/new/?utm_source=screenshots.firefox.com&utm_medium=referral&utm_campaign=screenshots-acquisition&utm-content=from-home" className="button primary download-firefox" onClick={ this.onClickInstallFirefox.bind(this) }>
<div className="button-icon">
<div className="button-icon-badge"></div>
</div>
<div className="button-copy">
<Localized id="homePageDownloadFirefoxTitle">
<div className="button-title">Firefox</div>
</Localized>
<Localized id="homePageDownloadFirefoxSubTitle">
<div className="button-description">Free Download</div>
</Localized>
</div>
</a>
);
}
render() {
let myShots;
if (this.props.showMyShots) {
myShots = <a className="myshots-button" onClick={ this.onClickMyShots.bind(this) }>
<Localized id="gMyShots">
<span className="myshots-text">My Shots</span>
</Localized>
</a>
}
return (
<reactruntime.BodyTemplate {...this.props}>
<div className="default-color-scheme">
<header>
<nav>
<div className="container">
<div className="header-logo">
<a href="#" className="screenshots-logo"></a>
</div>
<div className="nav-links">
<Localized id="homePageGetStarted">
<a href="#how-screenshots-works" onClick={ this.onClickGetStarted.bind(this) }>Get Started</a>
</Localized>
{ myShots }
</div>
</div>
</nav>
<div className="banner-spacer" />
<div className="banner">
<div className="container">
<div className="banner-content">
<h1>Firefox Screenshots</h1>
<Localized id="gScreenshotsDescription">
<p>Screenshots made simple. Take, save, and share screenshots without leaving Firefox.</p>
</Localized>
{ this.renderGetFirefox() }
</div>
</div>
<div className="banner-image" />
</div>
</header>
<Localized id="homePageHowScreenshotsWorks">
<h2 id="how-screenshots-works">How Screenshots Works</h2>
</Localized>
<section id="section-1">
<div className="container">
<div className="section-content">
<Localized id="homePageGetStartedTitle">
<h3>Get Started</h3>
</Localized>
<Localized id="homePageGetStartedDescription">
<p>Find the new Screenshots icon on your toolbar. Select it, and the Screenshots menu will appear on top of your browser window.</p>
</Localized>
</div>
<div className="section-image"></div>
</div>
</section>
<section id="section-2">
<div className="container">
<div className="section-content">
<Localized id="homePageCaptureRegion">
<h3>Capture a Region</h3>
</Localized>
<Localized id="homePageCaptureRegionDescription">
<p>Click and drag to select the area you want to capture. Or just hover and click — Screenshots will select the area for you. Like what you see? Select Save to access your screenshot online or the down arrow button to download it to your computer.</p>
</Localized>
</div>
<div className="section-image"></div>
</div>
</section>
<section id="section-3">
<div className="container">
<div className="section-content">
<Localized id="homePageCapturePage">
<h3>Capture a Page</h3>
</Localized>
<Localized id="homePageCapturePageDescription">
<p>Use the buttons in the upper right to capture full pages. The Save Visible button will capture the area you can view without scrolling, and the Save Full Page will capture everything on the page.</p>
</Localized>
</div>
<div className="section-image"></div>
</div>
</section>
<section id="section-4">
<div className="container">
<div className="section-content">
<Localized id="homePageSaveShare">
<h3>Save and Share</h3>
</Localized>
<Localized id="homePageSaveShareDescription">
<p>When you take a shot, Firefox posts your screenshot to your online Screenshots library and copies the link to your clipboard. We automatically store your screenshot for two weeks, but you can delete shots at any time or change the expiration date to keep them in your library for longer. </p>
</Localized>
</div>
<div className="section-image"></div>
</div>
</section>
<Footer {...this.props} />
</div>
</reactruntime.BodyTemplate>
);
}
}
exports.HeadFactory = React.createFactory(Head);
exports.BodyFactory = React.createFactory(Body);