mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
18
Commits
nc/react-sync
...
v0.27.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3268f7dd1 | ||
|
|
8abca24268 | ||
|
|
8074b09e7d | ||
|
|
a6b8110528 | ||
|
|
877df8cb1a | ||
|
|
fe189c18aa | ||
|
|
37cc5cfb0c | ||
|
|
41fa6e7f45 | ||
|
|
8b734173d3 | ||
|
|
252102588d | ||
|
|
76003f3720 | ||
|
|
3cabf4f98f | ||
|
|
bbccdd5b84 | ||
|
|
cacf6b1267 | ||
|
|
934acd809d | ||
|
|
24a806a9f1 | ||
|
|
7d1b4d681a | ||
|
|
0f9e31cce8 |
@@ -64,40 +64,47 @@ function setUpConsole() {
|
||||
* https://github.com/facebook/react-native/issues/934
|
||||
*/
|
||||
function polyfillGlobal(name, newValue, scope = global) {
|
||||
const descriptor = Object.getOwnPropertyDescriptor(scope, name) || {
|
||||
// jest for some bad reasons runs the polyfill code multiple times. In jest
|
||||
// environment, XmlHttpRequest doesn't exist so getOwnPropertyDescriptor
|
||||
// returns undefined and defineProperty default for writable is false.
|
||||
// Therefore, the second time it runs, defineProperty will fatal :(
|
||||
writable: true,
|
||||
};
|
||||
|
||||
if (scope[name] !== undefined) {
|
||||
const descriptor = Object.getOwnPropertyDescriptor(scope, name);
|
||||
if (descriptor) {
|
||||
const backupName = `original${name[0].toUpperCase()}${name.substr(1)}`;
|
||||
Object.defineProperty(scope, backupName, {...descriptor, value: scope[name]});
|
||||
}
|
||||
|
||||
Object.defineProperty(scope, name, {...descriptor, value: newValue});
|
||||
}
|
||||
const {enumerable, writable} = descriptor || {};
|
||||
|
||||
function polyfillLazyGlobal(name, valueFn, scope = global) {
|
||||
if (scope[name] !== undefined) {
|
||||
const descriptor = Object.getOwnPropertyDescriptor(scope, name);
|
||||
const backupName = `original${name[0].toUpperCase()}${name.substr(1)}`;
|
||||
Object.defineProperty(scope, backupName, {...descriptor, value: scope[name]});
|
||||
}
|
||||
// jest for some bad reasons runs the polyfill code multiple times. In jest
|
||||
// environment, XmlHttpRequest doesn't exist so getOwnPropertyDescriptor
|
||||
// returns undefined and defineProperty default for writable is false.
|
||||
// Therefore, the second time it runs, defineProperty will fatal :(
|
||||
|
||||
Object.defineProperty(scope, name, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
enumerable: enumerable !== false,
|
||||
writable: writable !== false,
|
||||
value: newValue,
|
||||
});
|
||||
}
|
||||
|
||||
function polyfillLazyGlobal(name, valueFn, scope = global) {
|
||||
const descriptor = getPropertyDescriptor(scope, name);
|
||||
if (descriptor) {
|
||||
const backupName = `original${name[0].toUpperCase()}${name.substr(1)}`;
|
||||
Object.defineProperty(scope, backupName, descriptor);
|
||||
}
|
||||
|
||||
const {enumerable, writable} = descriptor || {};
|
||||
Object.defineProperty(scope, name, {
|
||||
configurable: true,
|
||||
enumerable: enumerable !== false,
|
||||
get() {
|
||||
return (this[name] = valueFn());
|
||||
},
|
||||
set(value) {
|
||||
Object.defineProperty(this, name, {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value
|
||||
enumerable: enumerable !== false,
|
||||
writable: writable !== false,
|
||||
value,
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -211,6 +218,16 @@ function setUpDevTools() {
|
||||
}
|
||||
}
|
||||
|
||||
function getPropertyDescriptor(object, name) {
|
||||
while (object) {
|
||||
const descriptor = Object.getOwnPropertyDescriptor(object, name);
|
||||
if (descriptor) {
|
||||
return descriptor;
|
||||
}
|
||||
object = Object.getPrototypeOf(object);
|
||||
}
|
||||
}
|
||||
|
||||
setUpProcess();
|
||||
setUpConsole();
|
||||
setUpTimers();
|
||||
|
||||
+1
@@ -88,6 +88,7 @@ var ReactNative = {
|
||||
get ImagePickerIOS() { return require('ImagePickerIOS'); },
|
||||
get IntentAndroid() { return require('IntentAndroid'); },
|
||||
get InteractionManager() { return require('InteractionManager'); },
|
||||
get Keyboard() { return require('Keyboard'); },
|
||||
get LayoutAnimation() { return require('LayoutAnimation'); },
|
||||
get Linking() { return require('Linking'); },
|
||||
get LinkingIOS() { return require('LinkingIOS'); },
|
||||
|
||||
+51
-49
@@ -4,7 +4,7 @@ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React"
|
||||
s.version = package['version']
|
||||
s.version = "0.27.2"
|
||||
s.summary = package['description']
|
||||
s.description = <<-DESC
|
||||
React Native apps are built using the React JS
|
||||
@@ -29,95 +29,97 @@ Pod::Spec.new do |s|
|
||||
s.preserve_paths = "cli.js", "Libraries/**/*.js", "lint", "linter.js", "node_modules", "package.json", "packager", "PATENTS", "react-native-cli"
|
||||
|
||||
s.subspec 'Core' do |ss|
|
||||
ss.source_files = "React/**/*.{c,h,m,mm,S}"
|
||||
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*"
|
||||
ss.frameworks = "JavaScriptCore"
|
||||
ss.source_files = "React/**/*.{c,h,m,mm,S}"
|
||||
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*"
|
||||
ss.frameworks = "JavaScriptCore"
|
||||
ss.libraries = "stdc++"
|
||||
ss.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
|
||||
end
|
||||
|
||||
s.subspec 'ART' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/ART/**/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/ART/**/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/ART/**/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/ART/**/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTActionSheet' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/ActionSheetIOS/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/ActionSheetIOS/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTAdSupport' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/AdSupport/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/AdSupport/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/AdSupport/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/AdSupport/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTCameraRoll' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.dependency 'React/RCTImage'
|
||||
ss.source_files = "Libraries/CameraRoll/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/CameraRoll/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.dependency 'React/RCTImage'
|
||||
ss.source_files = "Libraries/CameraRoll/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/CameraRoll/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTGeolocation' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/Geolocation/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Geolocation/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/Geolocation/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Geolocation/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTImage' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.dependency 'React/RCTNetwork'
|
||||
ss.source_files = "Libraries/Image/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Image/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.dependency 'React/RCTNetwork'
|
||||
ss.source_files = "Libraries/Image/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Image/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTNetwork' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/Network/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Network/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/Network/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Network/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTPushNotification' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/PushNotificationIOS/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/PushNotificationIOS/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/PushNotificationIOS/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/PushNotificationIOS/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTSettings' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/Settings/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Settings/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/Settings/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Settings/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTText' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/Text/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Text/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/Text/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Text/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTVibration' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/Vibration/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Vibration/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/Vibration/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/Vibration/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTWebSocket' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/WebSocket/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/WebSocket/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/WebSocket/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/WebSocket/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTLinkingIOS' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/LinkingIOS/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/LinkingIOS/*.js"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/LinkingIOS/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/LinkingIOS/*.js"
|
||||
end
|
||||
|
||||
s.subspec 'RCTTest' do |ss|
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/RCTTest/**/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/RCTTest/**/*.js"
|
||||
ss.frameworks = "XCTest"
|
||||
ss.dependency 'React/Core'
|
||||
ss.source_files = "Libraries/RCTTest/**/*.{h,m}"
|
||||
ss.preserve_paths = "Libraries/RCTTest/**/*.js"
|
||||
ss.frameworks = "XCTest"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=1000.0.0-master
|
||||
VERSION_NAME=0.27.2
|
||||
GROUP=com.facebook.react
|
||||
|
||||
POM_NAME=ReactNative
|
||||
|
||||
@@ -41,14 +41,15 @@ ProxyExecutor::~ProxyExecutor() {
|
||||
}
|
||||
|
||||
void ProxyExecutor::loadApplicationScript(
|
||||
const std::string& script,
|
||||
const std::string&,
|
||||
const std::string& sourceURL) {
|
||||
static auto loadApplicationScript =
|
||||
jni::findClassStatic(EXECUTOR_BASECLASS)->getMethod<void(jstring, jstring)>("loadApplicationScript");
|
||||
jni::findClassStatic(EXECUTOR_BASECLASS)->getMethod<void(jstring)>("loadApplicationScript");
|
||||
|
||||
// The proxy ignores the script data passed in.
|
||||
|
||||
loadApplicationScript(
|
||||
m_executor.get(),
|
||||
jni::make_jstring(script).get(),
|
||||
jni::make_jstring(sourceURL).get());
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native",
|
||||
"version": "1000.0.0",
|
||||
"version": "0.27.2",
|
||||
"description": "A framework for building native apps using React",
|
||||
"license": "BSD-3-Clause",
|
||||
"repository": {
|
||||
@@ -126,7 +126,7 @@
|
||||
"react-native": "local-cli/wrong-react-native.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "15.1.0-alpha.1"
|
||||
"react": "15.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"absolute-path": "^0.0.0",
|
||||
@@ -158,7 +158,7 @@
|
||||
"mkdirp": "^0.5.1",
|
||||
"module-deps": "^3.9.1",
|
||||
"node-fetch": "^1.3.3",
|
||||
"node-haste": "~2.11.0",
|
||||
"node-haste": "~2.12.0",
|
||||
"opn": "^3.0.2",
|
||||
"optimist": "^0.6.1",
|
||||
"progress": "^1.1.8",
|
||||
@@ -189,7 +189,7 @@
|
||||
"flow-bin": "^0.25.0",
|
||||
"jest-cli": "11.0.2",
|
||||
"portfinder": "0.4.0",
|
||||
"react": "^15.1.0-alpha.1",
|
||||
"react": "15.1.0",
|
||||
"shelljs": "0.6.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
-5
@@ -51,7 +51,7 @@ class AssetServer {
|
||||
}
|
||||
|
||||
get(assetPath, platform = null) {
|
||||
const assetData = getAssetDataFromName(assetPath);
|
||||
const assetData = getAssetDataFromName(assetPath, new Set([platform]));
|
||||
return this._getAssetRecord(assetPath, platform).then(record => {
|
||||
for (let i = 0; i < record.scales.length; i++) {
|
||||
if (record.scales[i] >= assetData.resolution) {
|
||||
@@ -64,7 +64,7 @@ class AssetServer {
|
||||
}
|
||||
|
||||
getAssetData(assetPath, platform = null) {
|
||||
const nameData = getAssetDataFromName(assetPath);
|
||||
const nameData = getAssetDataFromName(assetPath, new Set([platform]));
|
||||
const data = {
|
||||
name: nameData.name,
|
||||
type: nameData.type,
|
||||
@@ -115,7 +115,7 @@ class AssetServer {
|
||||
.then(res => {
|
||||
const dir = res[0];
|
||||
const files = res[1];
|
||||
const assetData = getAssetDataFromName(filename);
|
||||
const assetData = getAssetDataFromName(filename, new Set([platform]));
|
||||
|
||||
const map = this._buildAssetMap(dir, files, platform);
|
||||
|
||||
@@ -166,8 +166,8 @@ class AssetServer {
|
||||
});
|
||||
}
|
||||
|
||||
_buildAssetMap(dir, files) {
|
||||
const assets = files.map(getAssetDataFromName);
|
||||
_buildAssetMap(dir, files, platform) {
|
||||
const assets = files.map(this._getAssetDataFromName.bind(this, new Set([platform])));
|
||||
const map = Object.create(null);
|
||||
assets.forEach(function(asset, i) {
|
||||
const file = files[i];
|
||||
@@ -194,6 +194,10 @@ class AssetServer {
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
_getAssetDataFromName(platform, file) {
|
||||
return getAssetDataFromName(file, platform);
|
||||
}
|
||||
}
|
||||
|
||||
function getAssetKey(assetName, platform) {
|
||||
|
||||
+10
-5
@@ -60,12 +60,17 @@ if (buildBranch.indexOf(`-stable`) !== -1) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// ['latest', 'v0.33.0', 'v0.33.0-rc', 'v0.33.0-rc1', 'v0.33.0-rc2', 'v0.34.0', '']
|
||||
const tagsWithVersion = exec(`git tag -l --points-at HEAD`).stdout.split(/\s/)
|
||||
// ['v0.33.0', 'v0.33.0-rc', 'v0.33.0-rc1', 'v0.33.0-rc2', 'v0.34.0']
|
||||
.filter(version => !!version && version.indexOf(`v${branchVersion}`) === 0)
|
||||
// 34c034298dc9cad5a4553964a5a324450fda0385
|
||||
const currentCommit = exec(`git rev-parse HEAD`, {silent: true}).stdout.trim();
|
||||
// [34c034298dc9cad5a4553964a5a324450fda0385, refs/heads/0.33-stable, refs/tags/latest, refs/tags/v0.33.1, refs/tags/v0.34.1-rc]
|
||||
const tagsWithVersion = exec(`git ls-remote origin | grep ${currentCommit}`, {silent: true})
|
||||
.stdout.split(/\s/)
|
||||
// ['refs/tags/v0.33.0', 'refs/tags/v0.33.0-rc', 'refs/tags/v0.33.0-rc1', 'refs/tags/v0.33.0-rc2', 'refs/tags/v0.34.0']
|
||||
.filter(version => !!version && version.indexOf(`refs/tags/v${branchVersion}`) === 0)
|
||||
// ['refs/tags/v0.33.0', 'refs/tags/v0.33.0-rc', 'refs/tags/v0.33.0-rc1', 'refs/tags/v0.33.0-rc2']
|
||||
.filter(version => version.indexOf(branchVersion) !== -1)
|
||||
// ['v0.33.0', 'v0.33.0-rc', 'v0.33.0-rc1', 'v0.33.0-rc2']
|
||||
.filter(version => version.indexOf(branchVersion) !== -1);
|
||||
.map(version => version.slice(`refs/tags/`.length));
|
||||
|
||||
if (tagsWithVersion.length === 0) {
|
||||
echo(`Error: Can't find version tag in current commit. To deploy to NPM you must add tag v0.XY.Z[-rc] to your commit`);
|
||||
|
||||
@@ -481,42 +481,53 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 960px) {
|
||||
@media only screen and (max-device-width: 1024px) {
|
||||
@-webkit-keyframes slide-in {
|
||||
0% { top: -30px; opacity: 0; }
|
||||
100% { top: 0; opacity: 1; }
|
||||
}
|
||||
@-moz-keyframes slide-in {
|
||||
0% { top: -30px; opacity: 0; }
|
||||
100% { top: 0; opacity: 1; }
|
||||
}
|
||||
@-o-keyframes slide-in {
|
||||
0% { top: -30px; opacity: 0; }
|
||||
100% { top: 0; opacity: 1; }
|
||||
}
|
||||
@keyframes slide-in {
|
||||
0% { top: -30px; opacity: 0; }
|
||||
100% { top: 0; opacity: 1; }
|
||||
}
|
||||
|
||||
.nav-docs {
|
||||
position: fixed;
|
||||
z-index: 90;
|
||||
top: 0;
|
||||
top: -100%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 53px 0 0 0;
|
||||
background: #3B3738;
|
||||
/* Transition these properties */
|
||||
transition: opacity 0.3s, visibility 0.3s;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.nav-docs-viewport {
|
||||
border-top: 1px solid rgb(5, 165, 209);
|
||||
height: 100%;
|
||||
padding: 25px;
|
||||
overflow: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
top: -30px;
|
||||
position: relative;
|
||||
transition: top 0.3s;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Active state */
|
||||
.nav-docs.in {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.nav-docs.in .nav-docs-viewport {
|
||||
top: 0;
|
||||
-webkit-animation: slide-in 0.3s forwards;
|
||||
-moz-animation: slide-in 0.3s forwards;
|
||||
-o-animation: slide-in 0.3s forwards;
|
||||
animation: slide-in 0.3s forwards;
|
||||
}
|
||||
|
||||
.nav-docs * {
|
||||
@@ -555,18 +566,38 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-device-width: 641px) and (max-device-width: 1024px) {
|
||||
/**
|
||||
* Multicolumn layout for phone (landscape only) & tablet (regardless its screen orientation)/
|
||||
*/
|
||||
@media only screen and (min-device-width : 375px) and (max-device-width : 1024px) {
|
||||
.nav-docs-section ul {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* Display 2 columns on tablet */
|
||||
.nav-docs-section li {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* 2 columns layout */
|
||||
@media
|
||||
/*Phone, landscape screen orientation*/
|
||||
only screen and (min-device-width : 375px) and (max-device-width : 1024px) and (orientation : landscape),
|
||||
/*Tablet, portrait screen orientation*/
|
||||
only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {
|
||||
.nav-docs-section li {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
/* 3 columns layout on tablet (landscape screen orientation) */
|
||||
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {
|
||||
.nav-docs-section li {
|
||||
width: 33%;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-blog li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
@@ -1351,13 +1382,10 @@ div[data-twttr-id] iframe {
|
||||
}
|
||||
|
||||
.survey-image {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
height: 83px;
|
||||
width: 120px;
|
||||
float: left;
|
||||
height: 128px;
|
||||
width: 128px;
|
||||
background-image: url('../img/survey.png');
|
||||
background-size: 272px 198px;
|
||||
background-position: -8px -8px;
|
||||
}
|
||||
|
||||
.survey p {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 20 KiB |
+12
-3
@@ -8,7 +8,7 @@
|
||||
|
||||
function init() {
|
||||
if (isMobile()) {
|
||||
document.querySelector('.nav-site-wrapper a[data-target]').addEventListener('click', toggleTargetNav);
|
||||
document.querySelector('.nav-site-wrapper a[data-target]').addEventListener('click', toggleTarget);
|
||||
}
|
||||
|
||||
var backdrop = document.querySelector('.modal-backdrop');
|
||||
@@ -46,12 +46,21 @@
|
||||
modal.classList.remove('modal-open');
|
||||
}
|
||||
|
||||
function toggleTargetNav(event) {
|
||||
var toggledTarget;
|
||||
function toggleTarget(event) {
|
||||
var target = document.body.querySelector(event.target.getAttribute('data-target'));
|
||||
|
||||
if (target) {
|
||||
event.preventDefault();
|
||||
target.classList.toggle('in');
|
||||
|
||||
if (toggledTarget === target) {
|
||||
toggledTarget.classList.toggle('in');
|
||||
} else {
|
||||
toggledTarget && toggledTarget.classList.remove('in');
|
||||
target.classList.add('in');
|
||||
}
|
||||
|
||||
toggledTarget = target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user