Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
chaotikum
website
Commits
d301344a
Commit
d301344a
authored
4 months ago
by
Lukas Ruge
Browse files
Options
Downloads
Patches
Plain Diff
infrainfo
parent
39c27ffd
No related branches found
No related tags found
No related merge requests found
Pipeline
#32744
passed
4 months ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
_includes/infrainfo.html
+43
-0
43 additions, 0 deletions
_includes/infrainfo.html
with
43 additions
and
0 deletions
_includes/infrainfo.html
0 → 100644
+
43
−
0
View file @
d301344a
{% assign display_info = 0 -%}
{% if component.out_of_service -%}
{% assign display_info = 1 -%}
{% endif -%}
{% capture nowunix %}{{'now' | date: '%s'}}{% endcapture %}
{%- capture next_week %}{{'now' | date: '%s' | plus: 604800 }}{%- endcapture -%}
{% for maintenance in site.maintenance -%}
{% capture eventdate %}{{maintenance.eventdate | date: '%s'}}{% endcapture %}
{% capture eventend %}{{maintenance.eventend | date: '%s'}}{% endcapture %}
{% if maintenance.components -%}
{% if maintenance.components contains component.uid -%}
{% if eventdate
<
nowunix
-
%}
{%
if
nowunix
<
eventend
-
%}
{%
assign
display_info =
2
-
%}
{%
endif
-
%}
{%
endif
-
%}
{%
if
eventdate
<
next_week
-
%}
{%
assign
display_info =
3
-
%}
{%
endif
-
%}
{%
endif
-
%}
{%
endif
-
%}
{%
endfor
-
%}
{%
if
display_info =
=
1
-
%}
<
div
style=
"line-height: 18pt; margin:10px 0; width: 100%; background-color: #FFB390; border-width: thick; border-color: #e67206; border-radius: 10px; min-height: 40pt; "
>
<span
style=
"float: left; color: #e67206; font-size: 40pt; display:block; width: 50pt; height: 40pt; text-align:center; line-height: 40pt;"
>
⚠
</span><p
style=
"vertical-align: middle;"
>
Ist aktuell außer Betrieb.
</p>
</div>
{% endif -%}
{% if display_info == 2 -%}
<div
style=
"line-height: 18pt; margin:10px 0; width: 100%; background-color: #FFB390; border-width: thick; border-color: #e67206; border-radius: 10px; min-height: 40pt; "
>
<span
style=
"float: left; color: #e67206; font-size: 40pt; display:block; width: 50pt; height: 40pt; text-align:center; line-height: 40pt;"
>
⚠
</span><p
style=
"vertical-align: middle;"
>
Laufende Wartung.
</p>
</div>
{% endif -%}
{% if display_info == 3 -%}
<div
style=
"line-height: 18pt; margin:10px 0; width: 100%; background-color: #FFF8DC; border-width: thick; border-color: #e67206; border-radius: 10px; min-height: 40pt; "
>
<span
style=
"float: left; color: #e67206; font-size: 40pt; display:block; width: 50pt; height: 40pt; text-align:center; line-height: 40pt;"
>
⚠
</span><p
style=
"vertical-align: middle;"
>
Innerhalb der nächsten 7 Tage ist eine Wartung geplant.
</p>
</div>
{% endif -%}
\ No newline at end of file
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