Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
proto3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Frost
proto3
Commits
473676a5
Commit
473676a5
authored
Mar 31, 2019
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Add option to get bootstrap and jquery from a cdn
parent
6074e130
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
configproxy.py
+5
-0
5 additions, 0 deletions
configproxy.py
templates/layout.html
+12
-3
12 additions, 3 deletions
templates/layout.html
with
17 additions
and
3 deletions
configproxy.py
+
5
−
0
View file @
473676a5
...
...
@@ -472,6 +472,11 @@ CONFIG_SECTIONS = [
required
=
False
,
internal
=
False
,
description
=
"
Protocol used by this website.
"
"
Either
'
http
'
or
'
https
'
.
"
),
ConfigEntry
(
name
=
"
CDN_URL
"
,
default
=
None
,
required
=
False
,
internal
=
False
,
description
=
"
URL to get bootstrap and jQuery from.
"
)
],
check
=
check_server_name
,
description
=
"
Where is the website hosted
"
),
...
...
This diff is collapsed.
Click to expand it.
templates/layout.html
+
12
−
3
View file @
473676a5
...
...
@@ -5,7 +5,11 @@
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"description"
content=
"Protokollsystem"
/>
{% if config.CDN_URL is defined %}
<link
rel=
"stylesheet"
href=
"{{[config.CDN_URL, "
bootstrap
/
css
/
bootstrap.min.css
"]|
join
("/")}}"
>
{% else %}
<link
rel=
"stylesheet"
href=
"{{url_for("
static
",
filename=
"css/bootstrap.min.css"
)}}"
>
{% endif %}
<link
rel=
"stylesheet"
href=
"{{url_for("
static
",
filename=
"css/style.css"
)}}"
/>
{% block additional_js %}
{% endblock %}
...
...
@@ -73,6 +77,11 @@ Diese Seite ist leer.
{% endblock %}
</div>
{% if config.CDN_URL is defined %}
<script
src=
"{{[config.CDN_URL, "
jquery
/
jquery.min.js
"]|
join
("/")}}"
></script>
<script
src=
"{{[config.CDN_URL, "
bootstrap
/
js
/
bootstrap.min.js
"]|
join
("/")}}"
></script>
{% else %}
<script
src=
"{{url_for("
static
",
filename=
"js/jquery.min.js"
)}}"
></script>
<script
src=
"{{url_for("
static
",
filename=
"js/bootstrap.min.js"
)}}"
></script>
{% endif %}
</body>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment