Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit 72ad814

Browse files
NoamELBfacebook-github-bot
authored andcommitted
Fixing Docusaurus migration issues
Summary: **Summary** Fixes #1765 Includes: 1. Upgrading Docusaurus to 1.1.0, which fix the sticky footer issue. 2. Using production assets (for react, react-dom, immutable, babel-core) instead of development ones. 3. Supporting small screens with css. More details in the issue. **Test Plan** Live site with the fixes: https://noamelb.github.io/draft-js * Wide desktop: ![screencapture-noamelb-github-io-draft-js-2018-05-21-22_50_02](https://user-images.githubusercontent.com/7422547/40327618-45d38ba4-5d4c-11e8-908a-0f04a30a4d2c.png) * Mobile: ![screencapture-noamelb-github-io-draft-js-2018-05-21-22_58_13](https://user-images.githubusercontent.com/7422547/40328208-4635f60c-5d4e-11e8-8838-5e2ee125e2a6.png) * Mobile Docs: ![screencapture-noamelb-github-io-draft-js-docs-getting-started-html-2018-05-21-23_09_18](https://user-images.githubusercontent.com/7422547/40328215-49b5034a-5d4e-11e8-8166-152dfa161dcf.png) Closes #1771 Reviewed By: yangshun Differential Revision: D8095846 Pulled By: yangshun fbshipit-source-id: a07720785d787a6455c2704b2f4413b0572af321
1 parent dc9fa27 commit 72ad814

File tree

4 files changed

+2029
-154
lines changed

4 files changed

+2029
-154
lines changed

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"rename-version": "docusaurus-rename-version"
1010
},
1111
"devDependencies": {
12-
"docusaurus": "1.0.15"
12+
"docusaurus": "1.1.3"
1313
},
1414
"dependencies": {
1515
"babel-preset-env": "1.6.0",

website/pages/en/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,11 @@ class Index extends React.Component {
254254
<p>
255255
In Draft.js, everything is customizable &ndash; we provide the
256256
building blocks so that you have full control over the user
257-
interface. Here's a simple example of a rich text editor built in
258-
Draft.js:
257+
interface. <span className="hide-on-mobile">Here's a simple example of a rich text editor built in
258+
Draft.js:</span>
259259
</p>
260260

261-
<div id="rich-example"></div>
261+
<div className="hide-on-mobile" id="rich-example"></div>
262262
</section>
263263

264264
<section className="home-bottom-section">
@@ -268,10 +268,10 @@ class Index extends React.Component {
268268
</section>
269269
</section>
270270

271-
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react.js"></script>
272-
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react-dom.js"></script>
273-
<script src="https://cdnjs.cloudflare.com/ajax/libs/immutable/3.7.6/immutable.js"></script>
274-
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.js"></script>
271+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react.min.js"></script>
272+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.0.1/react-dom.min.js"></script>
273+
<script src="https://cdnjs.cloudflare.com/ajax/libs/immutable/3.7.6/immutable.min.js"></script>
274+
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"></script>
275275
<script src="lib/Draft.js"></script>
276276
<script type="text/javascript" src="//use.typekit.net/vqa1hcx.js"></script>
277277
<script type="text/javascript">{'try{Typekit.load();}catch(e){}'}</script>

website/static/css/custom.css

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,26 @@ pre code.hljs.css {
151151
.docMainWrapper .mainContainer .wrapper .post h5,
152152
.docMainWrapper .mainContainer .wrapper .post h6 {
153153
font-weight: bold;
154-
}
154+
}
155+
156+
@media screen and (max-width: 767px) {
157+
.hide-on-mobile {
158+
display: none;
159+
}
160+
161+
.home-getting-started {
162+
width: 100%;
163+
}
164+
165+
.buttons-unit {
166+
margin: 30px 0 60px;
167+
}
168+
169+
.hero .text,
170+
.hero .minitext,
171+
.buttons-unit,
172+
.home-getting-started {
173+
box-sizing: border-box;
174+
padding: 0 15px;
175+
}
176+
}

0 commit comments

Comments
 (0)