Browse Source

some cleanup

tags/v2019.9.0
adam j hartz 2 months ago
parent
commit
febefc7b41

+ 1
- 1
catsoop/__STATIC__/templates/main.template View File

@@ -84,7 +84,7 @@
<pre class="catsooplogo" style="font-size:50%;">{cs_base_logo_text}</pre>
Powered by <a target='_blank' href='https://catsoop.org'>CAT-SOOP</a> v{cs_version}.<br/>
CAT-SOOP is <a href="http://www.fsf.org/about/what-is-free-software" target="_blank">free/libre software</a>, available under the terms<br/>of the <a href="BASE/_util/license" target="_blank">GNU Affero General Public License, version 3</a>.<br/>
<a href="BASE/_util/source.zip{cs_source_qstring}" download target="_blank">Download Source Code</a><br/>
<a href="BASE/_util/source.zip" download target="_blank">Download Source Code</a><br/>
<a href="BASE/_util/jslicense.html" rel="jslicense" target="_blank">Javascript License Information</a>
</div>
</footer>

+ 0
- 2
catsoop/dispatch.py View File

@@ -660,10 +660,8 @@ def main(environment, return_context=False, form_data=None):
"_auth",
}:
context["cs_home_link"] = "BASE"
context["cs_source_qstring"] = ""
else:
context["cs_home_link"] = "COURSE"
context["cs_source_qstring"] = "?course=%s" % course
context["cs_top_menu_html"] = ""

# CHECK FOR VALID CONFIGURATION

+ 0
- 3
catsoop/errors.py View File

@@ -165,8 +165,6 @@ def do_error_message(context, msg=None):
e = ': <font color="red">ERROR</font>'
new["cs_header"] = new.get("cs_header", "") + e
new["cs_content_header"] = "An Error Occurred:"
new["cs_source_qstring"] = ""
new["cs_source_qstring"] = ""
new["cs_top_menu_html"] = ""
new["cs_breadcrumbs_html"] = ""
new["cs_base_font_color"] = "#fff"
@@ -201,7 +199,6 @@ def do_404_message(context):
e = ': <font color="red">404</font>'
new["cs_header"] = new.get("cs_header", "") + e
new["cs_content_header"] = "File/Resource Not Found"
new["cs_source_qstring"] = ""
new["cs_top_menu_html"] = ""
new["cs_breadcrumbs_html"] = ""
new["cs_base_font_color"] = "#fff"

+ 0
- 93
website/__STATIC__/main.template View File

@@ -1,93 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<!-- This page was generated by CAT-SOOP (v{cs_version}). miau. -->

<meta charset="UTF-8">
<title>{cs_title}</title>
<link rel="icon" href="{cs_icon_url}" type="image/gif" />

<!-- jQuery and Bootstrap -->
<script src="BASE/scripts/jquery.js"></script>
<link rel="stylesheet" href="BASE/themes/bootstrap.css" />
<script src="BASE/scripts/bootstrap.js"></script>

<!-- automatically adjust the top padding so that the whole page is visible even if the navbar's height changes -->
<script type="text/javascript">
var set_top_margin = function(){{
$("#myPage").css('padding-top', $('#cs_main_navbar').height());
}}

$(document).ready(set_top_margin);
$('#cs_main_navbar').resize(set_top_margin);
var catsoop = {{}};
</script>

<!-- Additional styling specific for course-->
<link rel="stylesheet" type="text/css" href="{cs_theme}" />

<!-- load in katex and mathjax, and CAT-SOOP-specific math rendering -->
<script type="text/javascript" src="BASE/scripts/katex/katex.min.js"></script>
<link rel="stylesheet" type="text/css" href="BASE/scripts/katex/katex.min.css" />
<script type="text/javascript" src="BASE/scripts/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="BASE/scripts/cs_math.js"></script>

<!-- CAT-SOOP Hashing -->
<script type="text/javascript" src="BASE/scripts/cs_hash.js"></script>

<!-- Syntax Highlighting -->
<link rel="stylesheet" href="BASE/scripts/highlight/styles/catsoop.css">
<script type="text/javascript" src="BASE/scripts/highlight/highlight.pack.js"></script>
<script type="text/javascript">
hljs.initHighlightingOnLoad();
</script>

{cs_scripts}

<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body id="myPage">

<nav class="navbar navbar-default navbar-fixed-top" id="cs_main_navbar">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-brand"><a href="{cs_home_link}">{cs_header}</a></div><div class="navbar-brand"><div class="logininfo">{cs_welcome_message}</div></div>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
{cs_top_menu}
</ul>
</div>
</div>
</nav>
<center>
<h1>{cs_content_header}</h1>
</center>

<div class="container">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
{cs_content}
{cs_footnotes}
</div>
<div class="col-md-2"></div>
</div>
</div>
<div id="bottom_menu">
{cs_bottom_menu}
</div>

<div id="footer">
{cs_footer}
Powered by <a href='https://catsoop.org'>CAT-SOOP</a> v{cs_version}<br/>
(<a href="BASE/cs_util/license" target="_blank">View License</a>, <a href="BASE/cs_util/source.zip{cs_source_qstring}" download>Download Source Code</a>)
<pre class="catsooplogo" style="font-size:50%;">{cs_base_logo_text}</pre>
</div>
</body>
</html>

Loading…
Cancel
Save