Skip to content

Commit

Permalink
community widget loads fully externally
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Goedde committed Apr 26, 2014
1 parent 14b3d95 commit 145ebdc
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 111 deletions.
23 changes: 0 additions & 23 deletions doc/_static/communitywidget.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,4 @@
#communityWidget {
position: fixed;
top: 81px;
right: -2px;
background-color: #fff;
z-index: 1000;
border-radius: 3px 0 0 3px;
border: solid 1px #fff;
box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.3);
}

#communityWidget.nonDisplay {
display: none;
}

#communityWidget {
transition: width 0.3s, height 0.5s;
}

#communityWidget.min {
width: 143px;
height: 36px;
}
#communityWidget.max {
width: 170px;
height: 254px;
}
83 changes: 0 additions & 83 deletions doc/_static/communitywidget.js

This file was deleted.

23 changes: 18 additions & 5 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,23 @@
{% block footer %}
{{ super() }}

<!-- community widget iframe -->
<!-- <iframe id="communityWidget" src="http://127.0.0.1:8090/widget/index.html" frameborder="0"></iframe> -->
<iframe id="communityWidget" src="http://192.168.1.147:8090/widget/index.html" frameborder="0"></iframe>
<!-- change url for production -->
{% if widgeturl %}

<!-- general styles for the widget -->
<link rel="stylesheet" type="text/css" href="{{ widgeturl }}/css/parent.css" />
<!-- site-specific modifications -->
<link rel="stylesheet" href="_static/communitywidget.css">
<!-- base stylesheet to ensure non-Display if nothing loads -->
<style>
#communityWidget.nonDisplay {
display: none;
}
</style>
<iframe id="communityWidget" class="nonDisplay" src="{{ widgeturl }}/index.html" frameborder="0"></iframe>
<script src="{{ widgeturl }}/js/parent.js"></script>

{% else %}
<!-- Community Widget stripped! -->
{% endif %}

<script src="_static/communitywidget.js"></script>
{% endblock %}
5 changes: 5 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@
# directly to the root of the documentation.
#html_extra_path = []

# additional variables which become accessible in the template engine's context for
# all pages
# html_context = {'widgeturl': 'http://192.168.1.147:8090/widget'}
html_context = {'widgeturl': 'https://demo.crossbar.io/clandeck/widget'}

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
Expand Down

0 comments on commit 145ebdc

Please sign in to comment.