diff --git a/scripts/demo.js b/scripts/demo.js
index 2781c4fd2..31cf93a3d 100644
--- a/scripts/demo.js
+++ b/scripts/demo.js
@@ -81,4 +81,24 @@ InstantClickChangeFns.push(function () {
, document.getElementById('versions-select'));
});
+window.BrowserDemo = React.createClass({
+ render() {
+ return (
+
+
+
+ {this.props.children}
+
+
+ );
+ }
+});
+
module.exports = antd;
diff --git a/site/static/style.css b/site/static/style.css
index 0e2928631..2732828bc 100644
--- a/site/static/style.css
+++ b/site/static/style.css
@@ -2003,3 +2003,102 @@ a.entry-link:hover .anticon-smile {
position: relative;
top: -2px;
}
+
+.window-frame {
+ position: relative;
+ margin: 0;
+ padding: 0;
+ border-radius: 5px;
+ border: 1px solid #ccc;
+ background-color: #fff;
+ line-height: 1;
+}
+
+.window-frame .top-bar {
+ background: #DCD9DC;
+ background-image: -webkit-linear-gradient(#F6F6F6, #dadada);
+ background-image: linear-gradient(#F6F6F6, #dadada);
+ min-height: 2rem;
+ border-radius: 0.35rem 0.35rem 0 0;
+ padding: 0.41528rem 0.83056rem;
+ border-bottom: 1px solid transparent;
+ border-bottom-color: #ccc;
+ color: rgba(0, 0, 0, 0.5);
+}
+
+.window-frame .top-bar .address-bar {
+ border-radius: 0.245rem;
+ border: 1px solid rgba(0, 0, 0, 0.3);
+ color: black;
+ box-shadow: 0 0.5px 0 0 rgba(255, 255, 255, 0.75), inset 0 1px 1px rgba(0, 0, 0, 0.15);
+ display: inline-block;
+ padding: 0 0.5em 0 1em;
+ font-size: 0.75rem;
+ line-height: 2;
+ background: white;
+ width: 60%;
+ margin-left: 15%;
+}
+
+.window-frame .top-bar .controls {
+ display: inline-block;
+ vertical-align: top;
+ position: relative;
+ padding-top: 0.2em;
+}
+.window-frame .top-bar .controls > * {
+ position: relative;
+ vertical-align: middle;
+ line-height: 1;
+ display: inline-block;
+ margin-right: 0.41528rem;
+ -webkit-transition: 0.1s linear;
+ transition: 0.1s linear;
+}
+.window-frame .top-bar .control {
+ width: 0.83056rem;
+ height: 0.83056rem;
+ background: #DCD9DC;
+ border-radius: 0.83056rem;
+ border: 1px solid rgba(0, 0, 0, 0.08);
+ cursor: pointer;
+}
+.window-frame .top-bar .control:hover {
+ background: #b0adb0;
+}
+.window-frame .top-bar .control:before,
+.window-frame .top-bar .control:after {
+ line-height: 0.5;
+ color: black;
+ text-align: center;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ vertical-align: middle;
+ line-height: 0.5;
+}
+.window-frame .top-bar .control.close {
+ background: #FC625C;
+}
+.window-frame .top-bar .control.minify {
+ background: #FDC041;
+}
+.window-frame .top-bar .control.expand {
+ background: #35CD4B;
+}
+.window-frame .window-content {
+ padding: 0;
+ line-height: 1.5;
+ overflow: auto;
+ height: 440px;
+ position: relative;
+ border-radius: 0 0 5px 5px;
+ background: #f4f4f4;
+}
+.window-frame .status-bar {
+ height: 2rem;
+ border-radius: 0 0 0.35rem 0.35rem;
+ display: none;
+}
diff --git a/site/templates/component.html b/site/templates/component.html
index e87b19210..4d068c72d 100644
--- a/site/templates/component.html
+++ b/site/templates/component.html
@@ -14,9 +14,7 @@
{{ post.html|add_anchor }}
- {%- if post.meta.template === 'component' %}
{%- include "demos.html" %}
- {%- endif %}
{% endblock %}
diff --git a/site/templates/demos.html b/site/templates/demos.html
index 98f76891d..4f0866f61 100644
--- a/site/templates/demos.html
+++ b/site/templates/demos.html
@@ -1,7 +1,7 @@
{%- set items = resource.pages|find_demo_in_component(post.meta.directory) %}
{%- if items.length > 0 %}