1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

added new org_name config variable for T&C block

This commit is contained in:
checktheroads
2019-05-14 16:53:47 -07:00
parent 04cda65a8e
commit ffc3e05a65
4 changed files with 14 additions and 2 deletions

View File

@@ -78,6 +78,14 @@ class gen:
else:
return g["primary_asn"]
def org_name():
list = []
for g in general:
if len(g["org_name"]) == 0:
return "The Company"
else:
return g["org_name"]
def debug():
list = []
for a in general:

View File

@@ -1,6 +1,7 @@
# General site-wide parameters
[[general]]
primary_asn = ""
org_name = ""
debug = false
google_analytics = ""
message_error = ""

View File

@@ -19,7 +19,9 @@ env = jinja2.Environment(loader=file_loader)
# Converts templates/footer.md from Markdown to HTML
md = Markdown()
footer_template = env.get_template("templates/footer.md")
footer_jinja = footer_template.render(title=configuration.brand.title())
footer_jinja = footer_template.render(
site_title=configuration.brand.site_title(), org_name=configuration.gen.org_name()
)
footer = footer_jinja
# Functions for rendering Jinja2 templates & importing variables
@@ -38,6 +40,7 @@ class html:
return template.render(
# General
primary_asn=configuration.gen.primary_asn(),
org_name=configuration.gen.org_name(),
google_analytics=configuration.gen.google_analytics(),
enable_recaptcha=configuration.gen.enable_recaptcha(),
enable_bgp_route=configuration.gen.enable_bgp_route(),

View File

@@ -1 +1 @@
By using {{ title }}, you agree to be bound by the following terms of use: All queries executed on this page are logged for analysis and troubleshooting. Users are prohibited from automating queries, or attempting to process queries in bulk. This service is provided on a best effort basis, and {{ title }} makes no availability or performance warranties or guarantees whatsoever.
By using {{ site_title }}, you agree to be bound by the following terms of use: All queries executed on this page are logged for analysis and troubleshooting. Users are prohibited from automating queries, or attempting to process queries in bulk. This service is provided on a best effort basis, and {{ org_name }} makes no availability or performance warranties or guarantees whatsoever.