Skip to content

Commit af2c5da

Browse files
committed
highlight current version
1 parent 8f92f57 commit af2c5da

File tree

14 files changed

+121
-30
lines changed

14 files changed

+121
-30
lines changed

0.6.7/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
<script type="text/javascript" src="_static/doctools.js"></script>
2222
<script type="text/javascript">
2323
$(function () {
24+
var pageURL = $(location).attr("href");
25+
var splitURL = pageURL.split("/");
2426
$.ajax({
2527
url: 'http://docs.sympy.org/releases.txt',
2628
success: function(data){
@@ -29,11 +31,18 @@
2931
if (elem != ""){
3032
var res = elem.split(":");
3133
if(n == (lines.length - 2)){
32-
$("#version-list").prepend("<li><a style='font-size:100%;background-color:#389cc7;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
34+
$("#version-list").prepend("<li><a style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
3335
}
3436
else if(res[0] == 'dev'){
3537
$("#version-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>Dev</span></a></li>");
3638
}
39+
else if(res[0] == splitURL[9]){
40+
$("#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>");
41+
$('li.has-sub').addClass('open');
42+
$('li.has-sub>ul').slideDown(500, function(){
43+
$(this).show();
44+
});
45+
}
3746
else{
3847
$("#bottom-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
3948
}

0.7.0/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<script type="text/javascript" src="_static/doctools.js"></script>
2323
<script type="text/javascript">
2424
$(function () {
25+
var pageURL = $(location).attr("href");
26+
var splitURL = pageURL.split("/");
2527
$.ajax({
2628
url: 'http://docs.sympy.org/releases.txt',
2729
success: function(data){
@@ -30,11 +32,18 @@
3032
if (elem != ""){
3133
var res = elem.split(":");
3234
if(n == (lines.length - 2)){
33-
$("#version-list").prepend("<li><a style='font-size:100%;background-color:#389cc7;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
35+
$("#version-list").prepend("<li><a style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
3436
}
3537
else if(res[0] == 'dev'){
3638
$("#version-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>Dev</span></a></li>");
3739
}
40+
else if(res[0] == splitURL[9]){
41+
$("#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>");
42+
$('li.has-sub').addClass('open');
43+
$('li.has-sub>ul').slideDown(500, function(){
44+
$(this).show();
45+
});
46+
}
3847
else{
3948
$("#bottom-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
4049
}

0.7.1/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
<link rel="next" title="Installation" href="install.html" />
2626
<script type="text/javascript">
2727
$(function () {
28+
var pageURL = $(location).attr("href");
29+
var splitURL = pageURL.split("/");
2830
$.ajax({
2931
url: 'http://docs.sympy.org/releases.txt',
3032
success: function(data){
@@ -33,11 +35,18 @@
3335
if (elem != ""){
3436
var res = elem.split(":");
3537
if(n == (lines.length - 2)){
36-
$("#version-list").prepend("<li><a style='font-size:100%;background-color:#389cc7;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
38+
$("#version-list").prepend("<li><a style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
3739
}
3840
else if(res[0] == 'dev'){
3941
$("#version-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>Dev</span></a></li>");
4042
}
43+
else if(res[0] == splitURL[9]){
44+
$("#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>");
45+
$('li.has-sub').addClass('open');
46+
$('li.has-sub>ul').slideDown(500, function(){
47+
$(this).show();
48+
});
49+
}
4150
else{
4251
$("#bottom-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
4352
}

0.7.2-py3k/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
<script type="text/javascript" src="_static/sidebar.js"></script>
3636
<script type="text/javascript">
3737
$(function () {
38+
var pageURL = $(location).attr("href");
39+
var splitURL = pageURL.split("/");
3840
$.ajax({
3941
url: 'http://docs.sympy.org/releases.txt',
4042
success: function(data){
@@ -43,11 +45,18 @@
4345
if (elem != ""){
4446
var res = elem.split(":");
4547
if(n == (lines.length - 2)){
46-
$("#version-list").prepend("<li><a style='font-size:100%;background-color:#389cc7;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
48+
$("#version-list").prepend("<li><a style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
4749
}
4850
else if(res[0] == 'dev'){
4951
$("#version-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>Dev</span></a></li>");
5052
}
53+
else if(res[0] == splitURL[9]){
54+
$("#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>");
55+
$('li.has-sub').addClass('open');
56+
$('li.has-sub>ul').slideDown(500, function(){
57+
$(this).show();
58+
});
59+
}
5160
else{
5261
$("#bottom-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
5362
}

0.7.2/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
<script type="text/javascript" src="_static/sidebar.js"></script>
3636
<script type="text/javascript">
3737
$(function () {
38+
var pageURL = $(location).attr("href");
39+
var splitURL = pageURL.split("/");
3840
$.ajax({
3941
url: 'http://docs.sympy.org/releases.txt',
4042
success: function(data){
@@ -43,11 +45,18 @@
4345
if (elem != ""){
4446
var res = elem.split(":");
4547
if(n == (lines.length - 2)){
46-
$("#version-list").prepend("<li><a style='font-size:100%;background-color:#389cc7;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
48+
$("#version-list").prepend("<li><a style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
4749
}
4850
else if(res[0] == 'dev'){
4951
$("#version-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>Dev</span></a></li>");
5052
}
53+
else if(res[0] == splitURL[9]){
54+
$("#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>");
55+
$('li.has-sub').addClass('open');
56+
$('li.has-sub>ul').slideDown(500, function(){
57+
$(this).show();
58+
});
59+
}
5160
else{
5261
$("#bottom-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
5362
}

0.7.3/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
<script type="text/javascript" src="_static/sidebar.js"></script>
3636
<script type="text/javascript">
3737
$(function () {
38+
var pageURL = $(location).attr("href");
39+
var splitURL = pageURL.split("/");
3840
$.ajax({
3941
url: 'http://docs.sympy.org/releases.txt',
4042
success: function(data){
@@ -43,11 +45,18 @@
4345
if (elem != ""){
4446
var res = elem.split(":");
4547
if(n == (lines.length - 2)){
46-
$("#version-list").prepend("<li><a style='font-size:100%;background-color: #7ab54a;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
48+
$("#version-list").prepend("<li><a style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
4749
}
4850
else if(res[0] == 'dev'){
4951
$("#version-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>Dev</span></a></li>");
5052
}
53+
else if(res[0] == splitURL[9]){
54+
$("#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>");
55+
$('li.has-sub').addClass('open');
56+
$('li.has-sub>ul').slideDown(500, function(){
57+
$(this).show();
58+
});
59+
}
5160
else{
5261
$("#bottom-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
5362
}

0.7.4.1/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
<script type="text/javascript" src="_static/sidebar.js"></script>
3636
<script type="text/javascript">
3737
$(function () {
38+
var pageURL = $(location).attr("href");
39+
var splitURL = pageURL.split("/");
3840
$.ajax({
3941
url: 'http://docs.sympy.org/releases.txt',
4042
success: function(data){
@@ -43,11 +45,18 @@
4345
if (elem != ""){
4446
var res = elem.split(":");
4547
if(n == (lines.length - 2)){
46-
$("#version-list").prepend("<li><a style='font-size:100%;background-color: #7ab54a;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
48+
$("#version-list").prepend("<li><a style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
4749
}
4850
else if(res[0] == 'dev'){
4951
$("#version-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>Dev</span></a></li>");
5052
}
53+
else if(res[0] == splitURL[9]){
54+
$("#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>");
55+
$('li.has-sub').addClass('open');
56+
$('li.has-sub>ul').slideDown(500, function(){
57+
$(this).show();
58+
});
59+
}
5160
else{
5261
$("#bottom-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
5362
}

0.7.4/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
<script type="text/javascript" src="_static/sidebar.js"></script>
3636
<script type="text/javascript">
3737
$(function () {
38+
var pageURL = $(location).attr("href");
39+
var splitURL = pageURL.split("/");
3840
$.ajax({
3941
url: 'http://docs.sympy.org/releases.txt',
4042
success: function(data){
@@ -43,11 +45,18 @@
4345
if (elem != ""){
4446
var res = elem.split(":");
4547
if(n == (lines.length - 2)){
46-
$("#version-list").prepend("<li><a style='font-size:100%;background-color: #7ab54a;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
48+
$("#version-list").prepend("<li><a style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
4749
}
4850
else if(res[0] == 'dev'){
4951
$("#version-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>Dev</span></a></li>");
5052
}
53+
else if(res[0] == splitURL[9]){
54+
$("#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>");
55+
$('li.has-sub').addClass('open');
56+
$('li.has-sub>ul').slideDown(500, function(){
57+
$(this).show();
58+
});
59+
}
5160
else{
5261
$("#bottom-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
5362
}

0.7.5/index.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
<script type="text/javascript" src="_static/sidebar.js"></script>
3636
<script type="text/javascript">
3737
$(function () {
38+
var pageURL = $(location).attr("href");
39+
var splitURL = pageURL.split("/");
3840
$.ajax({
3941
url: 'http://docs.sympy.org/releases.txt',
4042
success: function(data){
@@ -43,11 +45,18 @@
4345
if (elem != ""){
4446
var res = elem.split(":");
4547
if(n == (lines.length - 2)){
46-
$("#version-list").prepend("<li><a style='font-size:100%;background-color: #7ab54a;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
48+
$("#version-list").prepend("<li><a style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
4749
}
4850
else if(res[0] == 'dev'){
4951
$("#version-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>Dev</span></a></li>");
5052
}
53+
else if(res[0] == splitURL[9]){
54+
$("#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>");
55+
$('li.has-sub').addClass('open');
56+
$('li.has-sub>ul').slideDown(500, function(){
57+
$(this).show();
58+
});
59+
}
5160
else{
5261
$("#bottom-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
5362
}

0.7.6.1/index.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
<script type="text/javascript" src="_static/sidebar.js"></script>
3636
<script type="text/javascript">
3737
$(function () {
38+
var pageURL = $(location).attr("href");
39+
var splitURL = pageURL.split("/");
3840
$.ajax({
3941
url: 'http://docs.sympy.org/releases.txt',
4042
success: function(data){
@@ -43,11 +45,18 @@
4345
if (elem != ""){
4446
var res = elem.split(":");
4547
if(n == (lines.length - 2)){
46-
$("#version-list").prepend("<li><a style='font-size:100%;background-color: #7ab54a;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
48+
$("#version-list").prepend("<li><a style='font-size:100%;' href="+"../latest/index.html"+"><span>Latest</span></a></li>");
4749
}
4850
else if(res[0] == 'dev'){
4951
$("#version-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>Dev</span></a></li>");
5052
}
53+
else if(res[0] == splitURL[9]){
54+
$("#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>");
55+
$('li.has-sub').addClass('open');
56+
$('li.has-sub>ul').slideDown(500, function(){
57+
$(this).show();
58+
});
59+
}
5160
else{
5261
$("#bottom-list").prepend("<li><a style='font-size: 100%;' href="+"../" + res[0] + "/index.html"+"><span>"+ res[1] +"</span></a></li>");
5362
}
@@ -71,6 +80,7 @@
7180
}
7281
});
7382
});
83+
7484
</script>
7585
<link rel="shortcut icon" href="_static/sympy-notailtext-favicon.ico"/>
7686
<link rel="top" title="SymPy 0.7.6.1 documentation" href="#" />

0 commit comments

Comments
 (0)