X Tutup
Skip to content
Merged

Badges #5825

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ div.sphinxsidebar {
text-align: left;
/* margin-left: -100%; */
}
div.sphinxsidebarwrapper {
padding-top: 28px
}

div.sphinxsidebar h4, div.sphinxsidebar h3 {
margin: 1em 0 0.5em 0;
Expand Down Expand Up @@ -650,3 +653,32 @@ figcaption {
}


.donate_button {
background:#11557C;
font-weight:normal;
border:solid 1px #fff;
outline: solid 1px #11557C;
clear: both;
display: block;
width:200px;
line-height:2.8;
font-size: 16px;
text-align: center;
cursor:pointer;
color:#fff;
text-decoration: none;
margin: 30px auto 0;
z-index:1;
transition: background .25s ease;
}

.donate_button:last-of-type {
margin: 15px auto 30px;


}

.donate_button:hover, .donate_button:active, .donate_button:focus {
background: #003c63;
outline-color: #003c63;
}
11 changes: 11 additions & 0 deletions doc/_templates/badgesidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

<a href="http://depsy.org/package/python/matplotlib">
<img src="http://depsy.org/api/package/pypi/matplotlib/badge.svg">
</a>

<br/>

Travis-CI: <a href="https://travis-ci.org/matplotlib/matplotlib">
<img src="https://travis-ci.org/matplotlib/matplotlib.svg?branch=master"/>
</a>
<br/>
5 changes: 5 additions & 0 deletions doc/_templates/donate_sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

<div>
<div onclick="open_window('MjI1OA==')" class="donate_button">Support matplotlib</div>
<div onclick="open_window('MjM2OA==')" class="donate_button">Support NumFOCUS</div>
</div>
168 changes: 150 additions & 18 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,6 @@ <h3>{{ _('Navigation') }}</h3>
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
{%- else %}
{#- old style sidebars: using blocks -- should be deprecated #}
{%- block sidebartoc %}
{%- include "localtoc.html" %}
{%- endblock %}
{%- block sidebarrel %}
{%- include "relations.html" %}
{%- endblock %}
{%- block sidebarsourcelink %}
{%- include "sourcelink.html" %}
{%- endblock %}
{%- if customsidebar %}
{%- include customsidebar %}
{%- endif %}
{%- block sidebarsearch %}
{%- include "searchbox.html" %}
{%- endblock %}
{%- endif %}
</div>
</div>
Expand Down Expand Up @@ -170,7 +153,7 @@ <h3>{{ _('Navigation') }}</h3>
{%- endif %}
{%- endblock %}
{%- block extrahead %} {% endblock %}
<link href="http://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css">


</head>
<body>
Expand Down Expand Up @@ -266,4 +249,153 @@ <h3>We're updating the default styles for Matplotlib 2.0</h3>

</script>
</body>
<footer>
<!--Flipcause Integration v3.0// Flipcause Integration Instructions:
Install the following code block once in the website Header (after <head> tag) -->

<style>

.fc-black_overlay{
display:none; position: fixed; z-index:1000001; top: 0%;left: 0%;width: 100%;height: 100%;
background-color: black; filter: alpha(opacity=50); cursor:pointer; opacity:0.5;
}

.fc-white_content {
opacity:1; display:none; margin-top: -320px; margin-left: -485px; width:970px; height:640px;
position:fixed; top:50%; left:50%; border: none;z-index:1000002;overflow: auto;
}

.fc-main-box{
opacity:1; display:none; margin:15px auto 0 auto; width:930px; position:relative; z-index:1000003;
}

.fc-widget_close{
opacity:1; content:url(http://i1338.photobucket.com/albums/o691/WeCause/X_zpse4a7e538.png);
position:absolute; z-index=1000004; right:-16px; top:-16px; display:block; cursor:pointer;
}

.floating_button{
display: block; margin-top: 0px; margin-left: 0px; width:auto ; height: auto;
position:fixed; z-index:999999; overflow: auto;
}

@keyframes backfadesin {
from { opacity:0; }
to {opacity:.5;}
}

@-moz-keyframes backfadesin {
from { opacity:0; }
to {opacity:.5;}
}

@-webkit-keyframes backfadesin {
from { opacity:0; }
to {opacity:.5;}
}

@-o-keyframes backfadesin {
from { opacity:0; }
to {opacity:.5;}
}


@-ms-keyframes backfadesin {
from { opacity:0; }
to {opacity:.5;}
}

@keyframes fadesin {
0%{ opacity:0; }
50%{ opacity:0; }
75% {opacity: 0; transform: translateY(20px);}
100% {opacity: 1; transform: translateY(0);}
}

@-moz-keyframes fadesin {
0%{ opacity:0; }
50%{ opacity:0; }
75% {opacity: 0; -moz-transform: translateY(20px);}
100% {opacity: 1; -moz-transform: translateY(0);}
}

@-webkit-keyframes fadesin {
0%{ opacity:0; }
50%{ opacity:0; }
75% {opacity: 0; -webkit-transform: translateY(20px);}
100% {opacity: 1; -webkit-transform: translateY(0);}
}

@-o-keyframes fadesin {
0%{ opacity:0; }
50%{ opacity:0; }
75% {opacity: 0; -o-transform: translateY(20px);}
100% {opacity: 1; -o-transform: translateY(0);}
}

@-ms-keyframes fadesin {
0%{ opacity:0; }
50%{ opacity:0; }
75% {opacity: 0; -ms-transform: translateY(20px);}
100% {opacity: 1; -ms-transform: translateY(0);}
}

</style>

<script>

function open_window(cause_id) {
var protocol=String(document.location.protocol);
var new_url;
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
new_url="https://www.flipcause.com/widget/"+cause_id
window.open(new_url);
}

else {
document.getElementById("fc-fade").style.display = "block";
document.getElementById("fc-fade").style.webkitAnimation = "backfadesin 1s";
document.getElementById("fc-fade").style.animation = "backfadesin 1s";
document.getElementById("fc-fade").style.mozAnimation = "backfadesin 1s";
document.getElementById("fc-light").style.display = "block";
document.getElementById("fc-light").style.webkitAnimation = "fadesin 1.5s";
document.getElementById("fc-light").style.animation = "fadesin 1.5s";
document.getElementById("fc-light").style.mozAnimation = "fadesin 1.5s";
document.getElementById("fc-main").style.display = "block";
document.getElementById("fc-main").style.webkitAnimation = "fadesin 1.5s";
document.getElementById("fc-main").style.animation = "fadesin 1.5s";
document.getElementById("fc-main").style.mozAnimation = "fadesin 1.5s";
document.getElementById("fc-close").style.display = "block";
document.getElementById("fc-close").style.webkitAnimation = "fadesin 1.5s";
document.getElementById("fc-close").style.animation = "fadesin 1.5s";
document.getElementById("fc-close").style.mozAnimation = "fadesin 1.5s";
document.getElementById("fc-myFrame").style.display = "block";
document.getElementById("fc-myFrame").style.webkitAnimation = "fadesin 1.5s";
document.getElementById("fc-myFrame").style.animation = "fadesin 1.5s";
document.getElementById("fc-myFrame").style.mozAnimation = "fadesin 1.5s";
document.getElementById("fc-myFrame").src="https://www.flipcause.com/widget/"+cause_id;
}
}


function close_window() {
document.getElementById("fc-fade").style.display="none";
document.getElementById("fc-light").style.display="none";
document.getElementById("fc-main").style.display="none";
document.getElementById("fc-close").style.display="none";
document.getElementById("fc-myFrame").style.display="none";
}

</script>

<div id="fc-fade" class="fc-black_overlay" onclick="close_window()"></div>
<div id="fc-light" class="fc-white_content">
<div id="fc-main" class="fc-main-box">
<div id="fc-close" class="fc-widget_close" onclick="close_window()">
</div><iframe id="fc-myFrame" iframe height="580" width="925" style="border: 0;
border-radius:5px 5px 5px 5px; box-shadow:0 0 8px rgba(0, 0, 0, 0.5);" scrolling="no" src=""></iframe></div>
</div>

<!--END Flipcause Main Integration Code-->
</footer>
</html>
9 changes: 6 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,12 @@
#html_sidebars = {}

# Custom sidebar templates, maps page names to templates.
html_sidebars = {'index': 'indexsidebar.html',
}

html_sidebars = {
'index': ['badgesidebar.html','donate_sidebar.html',
'indexsidebar.html', 'searchbox.html'],
'**': ['badgesidebar.html', 'localtoc.html',
'relations.html', 'sourcelink.html', 'searchbox.html']
}

# Additional templates that should be rendered to pages, maps page names to
# template names.
Expand Down
X Tutup