-
Notifications
You must be signed in to change notification settings - Fork 362
Local support #523
Local support #523
Changes from 2 commits
ef3acc2
465ef5a
c7e1f1f
ff4c393
e722edc
d5102a5
564a3e4
8d77638
9058a4f
70d0276
161ff10
b87506b
2bf0186
11afb12
dbfeeb8
1002dde
85f7eeb
2979a75
18f3a01
18c392a
aae5118
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom/server'; | ||
|
||
export default function NoScript(props) { | ||
const staticMarkup = ReactDOM.renderToStaticMarkup(props.children); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not just
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mmahalwy I took this code from this comment: facebook/react#1252 (comment) Honestly don't know yet what's difference b/w these two approaches :) |
||
return <noscript dangerouslySetInnerHTML={{__html: staticMarkup}} />; | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,8 @@ $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/"; | |
@import 'partials/tooltip'; | ||
@import 'partials/highlight'; | ||
@import 'partials/local-switcher'; | ||
|
||
@import 'nightmode'; | ||
@import 'partials/noscript-message'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, we want to move more into the css-modules way of doing it and less of global css styles. So, if you have |
||
|
||
html,body{ | ||
height: 100%; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.noscript-message { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
z-index: 1201; | ||
text-align: center; | ||
color: #FFF; | ||
background-color: #AE0000; | ||
padding: 5px 0 5px 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref: facebook/react#1252 (comment)