Skip to content

added Better way to link to old docs at docs.sympy.org #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: gh-pages
Choose a base branch
from
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
132 changes: 131 additions & 1 deletion 0.6.7/_static/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/

@import url("basic.css");
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400);

/* -- page layout ----------------------------------------------------------- */

Expand Down Expand Up @@ -216,4 +217,133 @@ tt {

th {
background-color: #ede;
}
}


#popupmenu {
position: relative;
margin: 0;
font-family: 'Open Sans';
line-height: 1;
width: 100%;
}
.align-right {
float: right;
}
#popupmenu ul {
margin: 0;
padding: 0;
list-style: none;
display: block;
}
#popupmenu ul li {
position: relative;
margin: 0;
padding: 0;
}
#popupmenu ul li a {
text-decoration: none;
cursor: pointer;
}
#popupmenu > ul > li > a {
color: #dddddd;
display: block;
padding: 20px;
border-top: 1px solid #000000;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
background: #2d7d9f;
letter-spacing: 1px;
font-size: 16px;
font-weight: 400;
position: relative;
}
#popupmenu > ul > li:first-child > a {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
#popupmenu > ul > li:last-child > a {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
border-bottom: 1px solid #000000;
}
#popupmenu > ul > li:hover > a,
#popupmenu > ul > li.open > a,
#popupmenu > ul > li.active > a {
background: #276d8b;
color: #ffffff;
}
#popupmenu ul > ul > li.has-sub > a::after {
content: "";
position: absolute;
display: block;
}
#popupmenu ul > li.has-sub > a::before {
content: "";
position: absolute;
display: block;
}
#popupmenu ul > li.has-sub::after {
content: "";
display: visible;
position: absolute;
border: 7px solid transparent;
border-top-color: #dddddd;
right: 20px;
top: 24.5px;
}
#popupmenu ul > li:hover::after,
#popupmenu ul > li.active::after,
#popupmenu ul > li.open::after {
border-top-color: #ffffff;
}
#popupmenu ul > li.has-sub.open > a::after {
opacity: 1;
bottom: -13px;
}
#popupmenu ul > li.has-sub.open > a::before {
opacity: 1;
bottom: -12px;
}
#popupmenu ul ul {
display: none;
}
#popupmenu ul ul li {
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
}
#popupmenu ul ul li a {
background: #f1f1f1;
display: block;
position: relative;
font-size: 15px;
padding: 14px 20px;
border-bottom: 1px solid #dddddd;
color: #777777;
font-weight: 300;
}
#popupmenu ul ul li:first-child > a {
padding-top: 18px;
}
#popupmenu ul ul li:hover > a,
#popupmenu ul ul li.open > a,
#popupmenu ul ul li.active > a {
background: #e4e4e4;
color: #666666;
}
#popupmenu ul ul > li.has-sub > a::after {
border-top: 13px solid #dddddd;
}
#popupmenu ul ul > li.has-sub > a::before {
border-top: 13px solid #e4e4e4;
}
#popupmenu ul ul > li.has-sub::after {
top: 18.5px;
border-width: 6px;
border-top-color: #777777;
}
#popupmenu ul ul > li:hover::after,
#popupmenu ul ul > li.active::after,
#popupmenu ul ul > li.open::after {
border-top-color: #666666;
}
186 changes: 154 additions & 32 deletions 0.6.7/_static/jquery.js

Large diffs are not rendered by default.

70 changes: 56 additions & 14 deletions 0.6.7/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,54 @@
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript">
$(function () {
var pageURL = $(location).attr("href");
var splitURL = pageURL.split("/");
$.ajax({
url: 'http://docs.sympy.org/releases.txt',
success: function(data){
var lines = data.split("\n");
$.each(lines, function(n, elem) {
if (elem != ""){
var res = elem.split(":");
if(n == (lines.length - 2)){
$("#version-list").prepend("<li><a style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asmeurer Need to update last line in releases.txt on your server.
0.7.6.1:SymPy 0.7.6.1 ---> latest:SymPy 0.7.6.1.in my code currently i set 0.7.6.1 take as a latest version if you update this file then i change my condition 0.7.6.1--> latest.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That file is generated automatically from the release script. Would it be possible to just check what the last value in the file is, and set that to "latest"?

else if(res[0] == 'dev'){
$("#version-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>Dev</span></a></li>");
}
else if(res[0] == splitURL[9]){
$("#bottom-list").prepend("<li><a id="+res[0]+" style='font-size: 100%;background-color:#ccc;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
$('li.has-sub').addClass('open');
$('li.has-sub>ul').slideDown(500, function(){
$(this).show();
});
}
else{
$("#bottom-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
}
}
});
}
});

$('#popupmenu li.has-sub').live('click', function(){
if ($('li.has-sub').hasClass('open')) {
$('li.has-sub').removeClass('open');
$('li.has-sub>ul').slideUp(1000, function(){
$(this).hide();
});
}
else {
$('li.has-sub').addClass('open');
$('li.has-sub>ul').slideDown(1000, function(){
$(this).show();
});
}
});
});
</script>
<link rel="top" title="SymPy v0.6.7 documentation" href="" />
<link rel="next" title="Installation" href="install.html" />
</head>
Expand Down Expand Up @@ -152,20 +200,14 @@ <h1>Welcome to SymPy&#8217;s documentation!<a class="headerlink" href="#welcome-
<p class="logo"><a href="">
<img class="logo" src="_static/sympylogo.png" alt="Logo"/>
</a></p>
<h4>Docs for other versions</h4>
<p class="topless"><a href="../0.6.7/index.html">SymPy 0.6.7</a></p>
<p class="topless"><a href="../0.7.0/index.html">SymPy 0.7.0</a></p>
<p class="topless"><a href="../0.7.1/index.html">SymPy 0.7.1</a></p>
<p class="topless"><a href="../0.7.2/index.html">SymPy 0.7.2</a></p>
<p class="topless"><a href="../0.7.2-py3k/index.html">SymPy 0.7.2 (Python 3)</a></p>
<p class="topless"><a href="../0.7.3/index.html">SymPy 0.7.3</a></p>
<p class="topless"><a href="../dev/index.html">SymPy git</a></p>
<p class="topless"><a href="../0.7.4/index.html">SymPy 0.7.4</a></p>
<p class="topless"><a href="../0.7.4.1/index.html">SymPy 0.7.4.1</a></p>
<p class="topless"><a href="../0.7.5/index.html">SymPy 0.7.5</a></p>
<p class="topless"><a href="../0.7.6/index.html">SymPy 0.7.6</a></p>
<p class="topless"><a href="../0.7.6.1/index.html">SymPy 0.7.6.1</a></p>
<p class="topless"><a href="../1.0/index.html">SymPy 1.0</a></p>
<div id='popupmenu'>
<ul id = "version-list">
<li class='active has-sub'><a href='#'><span>Other</span></a>
<ul id = "bottom-list">
</ul>
</li>
</ul>
</div>
<h4>Next topic</h4>
<p class="topless"><a href="install.html"
title="next chapter">Installation</a></p>
Expand Down
132 changes: 131 additions & 1 deletion 0.7.0/_static/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

@import url("basic.css");
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400);

/* -- page layout ----------------------------------------------------------- */

Expand Down Expand Up @@ -253,4 +254,133 @@ div.viewcode-block:target {
background-color: #f4debf;
border-top: 1px solid #ac9;
border-bottom: 1px solid #ac9;
}
}


#popupmenu {
position: relative;
margin: 0;
font-family: 'Open Sans';
line-height: 1;
width: 100%;
}
.align-right {
float: right;
}
#popupmenu ul {
margin: 0;
padding: 0;
list-style: none;
display: block;
}
#popupmenu ul li {
position: relative;
margin: 0;
padding: 0;
}
#popupmenu ul li a {
text-decoration: none;
cursor: pointer;
}
#popupmenu > ul > li > a {
color: #dddddd;
display: block;
padding: 20px;
border-top: 1px solid #000000;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
background: #2d7d9f;
letter-spacing: 1px;
font-size: 16px;
font-weight: 400;
position: relative;
}
#popupmenu > ul > li:first-child > a {
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
#popupmenu > ul > li:last-child > a {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
border-bottom: 1px solid #000000;
}
#popupmenu > ul > li:hover > a,
#popupmenu > ul > li.open > a,
#popupmenu > ul > li.active > a {
background: #276d8b;
color: #ffffff;
}
#popupmenu ul > ul > li.has-sub > a::after {
content: "";
position: absolute;
display: block;
}
#popupmenu ul > li.has-sub > a::before {
content: "";
position: absolute;
display: block;
}
#popupmenu ul > li.has-sub::after {
content: "";
display: visible;
position: absolute;
border: 7px solid transparent;
border-top-color: #dddddd;
right: 20px;
top: 24.5px;
}
#popupmenu ul > li:hover::after,
#popupmenu ul > li.active::after,
#popupmenu ul > li.open::after {
border-top-color: #ffffff;
}
#popupmenu ul > li.has-sub.open > a::after {
opacity: 1;
bottom: -13px;
}
#popupmenu ul > li.has-sub.open > a::before {
opacity: 1;
bottom: -12px;
}
#popupmenu ul ul {
display: none;
}
#popupmenu ul ul li {
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
}
#popupmenu ul ul li a {
background: #f1f1f1;
display: block;
position: relative;
font-size: 15px;
padding: 14px 20px;
border-bottom: 1px solid #dddddd;
color: #777777;
font-weight: 300;
}
#popupmenu ul ul li:first-child > a {
padding-top: 18px;
}
#popupmenu ul ul li:hover > a,
#popupmenu ul ul li.open > a,
#popupmenu ul ul li.active > a {
background: #e4e4e4;
color: #666666;
}
#popupmenu ul ul > li.has-sub > a::after {
border-top: 13px solid #dddddd;
}
#popupmenu ul ul > li.has-sub > a::before {
border-top: 13px solid #e4e4e4;
}
#popupmenu ul ul > li.has-sub::after {
top: 18.5px;
border-width: 6px;
border-top-color: #777777;
}
#popupmenu ul ul > li:hover::after,
#popupmenu ul ul > li.active::after,
#popupmenu ul ul > li.open::after {
border-top-color: #666666;
}
Loading