Commit 1bdf8803 authored by tron's avatar tron

Merge branch 'feature-dev'

# Conflicts:
#	.gitlab-ci.yml
#	scripts/development
parents 5d052bc1 05b0b17d
Pipeline #24276 passed with stage
in 14 minutes and 23 seconds
......@@ -8,4 +8,4 @@ build-container:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:build 2>&1 | grep -v "Adding "
only:
- master
- master
\ No newline at end of file
{
"beautify.ignore": ["assets/css/*.scss", "_layouts/*"]
}
\ No newline at end of file
......@@ -5,7 +5,7 @@ LABEL maintainer="andreas.knote@uni-wuerzburg.de"
# set noninteractive installation
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get upgrade && \
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y \
curl ssh git-lfs build-essential locales
......
......@@ -2,8 +2,9 @@
{% if include.tags %}
{% assign taged = include.tags | remove: " " | split: "," %}
{% assign itemlist = '' | split: ',' %}
{% for tag in taged %}
{% assign temp = site.jobs | where: "active",true | where: "tags", tag %}
{% for d in taged %}
{% assign tag = d | remove: '"'| remove: ',,'| remove: "["| remove: "]"%}
{% assign temp = site.jobs | where: "active","true" | where: "tags", tag %}
{% assign itemlist = itemlist | concat: temp | sort: 'date' | reverse %}
{% endfor %}
{% else %}
......@@ -12,25 +13,10 @@
<!-- Display data -->
{% if itemlist.size > 0 %}
{% unless include.noHeadline %}
{% if include.headline %}
{{include.headline}}
{% else %}
## Open Positions
{% endunless %}
{% assign counter = 1 %}
{% assign hiddenItems = 0 %}
<div class="column-layout">
{% for i in itemlist %}
{% assign visibility = "" %}
{% if counter > include.maxItems %}
{% assign visibility = "toggle-visibility hide" %}
{% assign hiddenItems = hiddenItems | plus: 1 %}
{% endif %}
{% assign date = i.date | date_to_string %}
{% include block class=visibility image=i.image title=i.title teaser=i.teaser external_url=i.external_url url=i.url meta=date%}
{% assign counter = counter | plus: 1 %}
{% endfor %}
{% include placeholderBlocks maxItems= include.maxItems itemListLength=itemlist.size hiddenItems=hiddenItems%}
</div>
<!--{% unless include.noToggle %}
<div id="react-placeholder-toggleVisibility"></div>
{% endunless %}-->
{% endif %}
\ No newline at end of file
{% endif %}
{% include list-blocks items=itemlist maxItems=include.maxItems noToggle=include.noToggle hardMax=include.hardMax%}
{% endif %}
{% assign maxItems = include.maxItems %}
{% if include.hardMax %}
{% assign items = include.items | slice: 0, maxItems %}
{% else %}
{% assign items = include.items %}
{% endif %}
{% assign counter = 1 %}
{% assign hiddenItems = 0 %}
{% assign listSize = items.size %}
<div class="column-layout">
{% if include.logo %}
<div class="block">
{% include image src=include.logo sizes="(min-width: 1180px) 320px, (min-width: 980px) 260px, (min-width: 740px) 50vw, 100vw" class=include.imageclass style="width: 75%; margin: auto" %}
</div>
{% assign counter = counter | plus: 1 %}
{% assign listSize = listSize | plus: 1 %}
{% endif %}
{% for i in items %}
{% assign visibility = "" %}
{% if counter > maxItems %}
{% assign visibility = "toggle-visibility hide" %}
{% assign hiddenItems = hiddenItems | plus: 1 %}
{% endif %}
{% assign date = i.date | date_to_string %}
<!--- Person Block --->
{% if i.firstNames %}
{% if stuwo==yes%}
{% capture title %}{{i.titlePrefix}} {{i.firstNames}} {{i.lastName}}{{i.titleSuffix}}{% endcapture %}
{% include block image=i.image imagedimension="portrait" imageclass="u-width-50" title=title teaser=i.function url="none"%}
{% else %}
{% capture title %}{{i.titlePrefix}} {{i.firstNames}} {{i.lastName}}{{i.titleSuffix}}{% endcapture %}
{% include block image=i.image imagedimension="portrait" imageclass="u-width-50" title=title teaser=i.function url=i.url %}
{% endif %}
{% else %}
<!-- Change Meta -->
{% if i.enddate %}
{% capture meta %}{{ i.startdate | date:"%Y" }} &ndash; {{ i.enddate | date:"%Y" }}{% endcapture %}
{% else %}
{% capture meta %}Since {{ i.startdate | date:"%Y" }}{% endcapture %}
{% endif %}
<!--- Normal Block --->
{% include block class=visibility image=i.image title=i.title teaser=i.teaser external_url=i.external_url url=i.url meta=meta%}
{% endif %}
{% assign counter = counter | plus: 1 %}
{% endfor %}
{% include placeholderBlocks maxItems=maxItems itemListLength=listSize hiddenItems=hiddenItems %}
</div>
{% unless include.noToggle %}
{% if include.maxItems < listSize %}
<div id="react-placeholder-toggleVisibility"></div>
{% endif %}
{% endunless %}
\ No newline at end of file
......@@ -2,41 +2,20 @@
{% if include.tags %}
{% assign taged = include.tags | remove: " " | split: "," %}
{% assign itemlist = '' | split: ',' %}
{% for tag in taged %}
{% for d in taged %}
{% assign tag = d | remove: '"'| remove: ',,'| remove: "["| remove: "]"%}
{% assign temp = site.posts | where: active,true | where: "tags", tag %}
{% assign itemlist = itemlist | concat: temp | sort: 'date' | reverse %}
{% endfor %}
{% else %}
{% assign itemlist = site.posts | where: active,true | sort: 'date' | reverse %}
{% endif %}
<!-- Display data -->
{% if itemlist.size > 0 %}
{% unless include.noHeadline %}
{% if include.headline %}
{{include.headline}}
{% else %}
## News
{% endunless %}
{% assign counter = 1 %}
{% assign hiddenItems = 0 %}
<div class="column-layout">
{% if include.logo %}
{% assign counter = counter | plus: 1 %}
<div class="block">
{% include image src=include.logo sizes="(min-width: 1180px) 320px, (min-width: 980px) 260px, (min-width: 740px) 50vw, 100vw" class=include.imageclass style="width: 75%; margin: auto" %}
</div>
{% endif %}
{% for i in itemlist %}
{% assign visibility = "" %}
{% if counter > include.maxItems %}
{% assign visibility = "toggle-visibility hide" %}
{% assign hiddenItems = hiddenItems | plus: 1 %}
{% endif %}
{% assign date = i.date | date_to_string %}
{% include block class=visibility image=i.image title=i.title teaser=i.teaser external_url=i.external_url url=i.url meta=date%}
{% assign counter = counter | plus: 1 %}
{% endfor %}
{% include placeholderBlocks maxItems= include.maxItems itemListLength=itemlist.size hiddenItems=hiddenItems%}
</div>
{% unless include.noToggle %}
<div id="react-placeholder-toggleVisibility"></div>
{% endunless %}
{% endif %}
{% include list-blocks items=itemlist maxItems=include.maxItems noToggle=include.noToggle hardMax=include.hardMax logo=include.logo%}
{% endif %}
\ No newline at end of file
<!-- Filter people. Further filter tags when used. -->
{% if include.tags %}
{% assign taged = include.tags | remove: " " | split: "," %}
{% assign itemlist = '' | split: ',' %}
{% for tag in taged %}
{% assign temp = site.people | where: "tags", tag %}
{% assign itemlist = itemlist | concat: temp | sort: 'date' | reverse %}
{% endfor %}
{% else %}
{% assign itemlist = site.people %}
{% endif %}
<!-- Display data -->
{% if itemlist.size > 0 %}
{% if include.headline %}
{{include.headline}}
{% else %}
## Team
{% endif %}
{% include list-blocks items=itemlist maxItems=include.maxItems noToggle=include.noToggle hardMax=include.hardMax logo=include.logo%}
{% endif %}
\ No newline at end of file
<!-- Filter active projects. Further filter tags when used. -->
{% if include.tags %}
{% assign taged = include.tags | remove: " " | split: "," %}
{% assign itemlist = '' | split: ',' %}
{% for d in taged %}
{% assign tag = d | remove: '"'| remove: ',,'| remove: "["| remove: "]"%}
{% assign temp = site.projects | where: "tags", tag %}
{% assign itemlist = itemlist | concat: temp %}
{% endfor %}
{% else %}
{% assign itemlist = site.projects | where: active,true | sort: 'date' | reverse %}
{% endif %}
<!-- Display data -->
{% if itemlist.size > 0 %}
{% if include.headline %}
{{include.headline}}
{% else %}
## Projects
{% endif %}
{% include list-blocks items=itemlist maxItems=include.maxItems noToggle=include.noToggle hardMax=include.hardMax logo=include.logo%}
{% endif %}
......@@ -2,8 +2,13 @@
{% if include.tags %}
{% assign taged = include.tags | remove: " " | split: "," %}
{% assign itemlist = '' | split: ',' %}
{% for tag in taged %}
{% assign temp = site.topics | where: "tags", tag | where: "status",include.status %}
{% for d in taged %}
{% assign tag = d | remove: '"'| remove: ',,'| remove: "["| remove: "]"%}
{% if include.status%}
{% assign temp = site.topics | where: "tags", tag | where: "status",include.status %}
{% else %}
{% assign temp = site.topics | where: "tags", tag %}
{% endif %}
{% assign itemlist = itemlist | concat: temp | sort: 'date' | reverse | sort:"put-on-top-of-the-list" | reverse%}
{% endfor %}
{% else %}
......@@ -23,6 +28,11 @@
{% assign hiddenItems = 0 %}
<div class="column-layout">
{% for topic in itemlist %}
{% assign visibility = "" %}
{% if counter > maxItems %}
{% assign visibility = "hide toggle-visibility-topics-" %}
{% assign hiddenItems = hiddenItems | plus: 1 %}
{% endif %}
{% assign typeClasses = "topic " %}
{% assign typeDescription = "unknown format" %}
{% if topic.type-mcs-bachelor-project == true %}
......@@ -71,11 +81,23 @@
{% if topic.put-on-top-of-the-list == true %}
{% assign title = title | append: " &#9733;" %}
{% endif %}
{% include detailed-topic class=typeClasses image=topic.image title=title teaser=topic.teaser url=topic.url assigned-to=topic.assigned-to type=typeDescription%}
{% if include.status%}
{% assign overallClasses = typeClasses | append: " " | append: visibility | append: include.status%}
{% include detailed-topic class=overallClasses image=topic.image title=title teaser=topic.teaser url=topic.url assigned-to=topic.assigned-to type=typeDescription%}
{% endif %}
{% assign counter = counter | plus: 1 %}
{% endfor %}
{% include placeholderBlocks maxItems= include.maxItems itemListLength=itemlist.size hiddenItems=hiddenItems%}
{% if include.status%}
{% include placeholderBlocks maxItems= include.maxItems itemListLength=itemlist.size hiddenItems=hiddenItems%}
{% endif %}
</div>
<!--{% unless include.noToggle %}
<div id="react-placeholder-toggleVisibility"></div>
{% endunless %}-->
{% unless include.noToggle %}
{% if include.maxItems < itemlist.size %}
{% assign toggleID = "react-placeholder-toggleVisibility-topics-" | append: include.status%}
<div id="{{toggleID}}"></div>
{% endif %}
{% endunless %}
{% endif %}
......@@ -208,6 +208,127 @@ if (document.getElementById("react-placeholder-toggleVisibility") !== null) {
ReactDOM.render(<ToggleVisibility />, document.getElementById("react-placeholder-toggleVisibility"));
}
if (document.getElementById("react-placeholder-toggleVisibility-topics-open") !== null) {
const ToggleVisibilityTopicsOpen = class extends React.Component {
constructor(props) {
super(props);
this.state = {
visible: false,
language: document.getElementById("react-placeholder-toggleVisibility-topics-open").getAttribute("language") // null if not set
};
}
render() {
console.log(this.state.language);
const stringShowLess = this.state.language === "DE" ? "Weniger anzeigen" : "Show less";
const stringShowMore = this.state.language === "DE" ? "Mehr anzeigen" : "Show more";
const toggle = () => this.setState({ visible: !this.state.visible },
(this.state.visible) ? (
() => $(".toggle-visibility-topics-open").addClass("hide")
) : (
() => $(".toggle-visibility-topics-open").removeClass("hide")
)
);
return (
<div className="u-cursor-pointer" onClick={toggle}>
{
(this.state.visible) ? (
stringShowLess
) : (
stringShowMore
)
}
</div>
);
}
};
ReactDOM.render(<ToggleVisibilityTopicsOpen />, document.getElementById("react-placeholder-toggleVisibility-topics-open"));
}
if (document.getElementById("react-placeholder-toggleVisibility-topics-closed") !== null) {
const ToggleVisibilityTopicsClosed = class extends React.Component {
constructor(props) {
super(props);
this.state = {
visible: false,
language: document.getElementById("react-placeholder-toggleVisibility-topics-closed").getAttribute("language") // null if not set
};
}
render() {
console.log(this.state.language);
const stringShowLess = this.state.language === "DE" ? "Weniger anzeigen" : "Show less";
const stringShowMore = this.state.language === "DE" ? "Mehr anzeigen" : "Show more";
const toggle = () => this.setState({ visible: !this.state.visible },
(this.state.visible) ? (
() => $(".toggle-visibility-topics-closed").addClass("hide")
) : (
() => $(".toggle-visibility-topics-closed").removeClass("hide")
)
);
return (
<div className="u-cursor-pointer" onClick={toggle}>
{
(this.state.visible) ? (
stringShowLess
) : (
stringShowMore
)
}
</div>
);
}
};
ReactDOM.render(<ToggleVisibilityTopicsClosed />, document.getElementById("react-placeholder-toggleVisibility-topics-closed"));
}
if (document.getElementById("react-placeholder-toggleVisibility-topics-assigned") !== null) {
const ToggleVisibilityTopicsAssigned = class extends React.Component {
constructor(props) {
super(props);
this.state = {
visible: false,
language: document.getElementById("react-placeholder-toggleVisibility-topics-assigned").getAttribute("language") // null if not set
};
}
render() {
console.log(this.state.language);
const stringShowLess = this.state.language === "DE" ? "Weniger anzeigen" : "Show less";
const stringShowMore = this.state.language === "DE" ? "Mehr anzeigen" : "Show more";
const toggle = () => this.setState({ visible: !this.state.visible },
(this.state.visible) ? (
() => $(".toggle-visibility-topics-assigned").addClass("hide")
) : (
() => $(".toggle-visibility-topics-assigned").removeClass("hide")
)
);
return (
<div className="u-cursor-pointer" onClick={toggle}>
{
(this.state.visible) ? (
stringShowLess
) : (
stringShowMore
)
}
</div>
);
}
};
ReactDOM.render(<ToggleVisibilityTopicsAssigned />, document.getElementById("react-placeholder-toggleVisibility-topics-assigned"));
}
// ////////////////////////////////////////////////////////////////////////////
// Render filter input
// ////////////////////////////////////////////////////////////////////////////
......
---
layout: text
regenerate: true
---
<script src="https://www.x3dom.org/release/x3dom.js"></script>
......@@ -73,92 +74,11 @@ layout: text
</div>
{% endif %}
<br>
<br>
{% comment %} Refactor the if statement below to reduce code duplication {% endcomment %}
{% if page.projects %}
{% assign counter = 0 %}
{% assign maxVisibleCount = 5 %}
{% assign visibility = "" %}
{% for projectDescription in page.projects %}
{% for project in site.projects %}
{% if project.title == projectDescription.title %}
{% if counter > maxVisibleCount %}
{% assign visibility = "toggle-visibility hide" %}
{% endif %}
{% assign date = project.date | date_to_string %}
{% if counter == 0 %}<h2>Projects</h2><div class="column-layout">{% endif %}
{% if project.enddate %}
{% capture meta %}{{ project.startdate | date:"%Y" }} &ndash; {{ project.enddate | date:"%Y" }}{% endcapture %}
{% else %}
{% capture meta %}Since {{ project.startdate | date:"%Y" }}{% endcapture %}
{% endif %}
{% include block class=visibility image=project.image title=project.title teaser=project.teaser external_url=project.external_url url=project.url meta=meta%}
{% assign counter = counter | plus: 1 %}
{% endif %}
{% endfor %}
{% endfor %}
{% assign mod = counter | modulo: 3 %}
{% if mod == 1 %}
{% include block url = "none" class=visibility%}
{% include block url = "none" class=visibility%}
{% endif %}
{% if mod == 2 %}
{% include block url = "none" class=visibility%}
{% endif %}
{% if counter > 0 %}</div>{% endif %}
{% if counter > maxVisibleCount %}<div id="react-placeholder-toggleVisibility"></div>{% endif %}
{% else %}
{% assign sortedProjects = site.projects | sort: 'startdate' | reverse %}
{% assign counter = 0 %}
{% assign maxVisibleCount = 5 %}
{% assign visibility = "" %}
{% for project in sortedProjects %}
{% assign fullname = page.lastName| append: ' ' | append: page.firstNames %}
{% if project.members contains fullname %}
{% if counter > maxVisibleCount %}
{% assign visibility = "toggle-visibility hide" %}
{% endif %}
{% assign date = project.date | date_to_string %}
{% if counter == 0 %}<h2>Projects</h2><div class="column-layout">{% endif %}
{% if project.enddate %}
{% capture meta %}{{ project.startdate | date:"%Y" }} &ndash; {{ project.enddate | date:"%Y" }}{% endcapture %}
{% else %}
{% capture meta %}Since {{ project.startdate | date:"%Y" }}{% endcapture %}
{% endif %}
{% include block class=visibility image=project.image title=project.title teaser=project.teaser external_url=project.external_url url=project.url meta=meta%}
{% assign counter = counter | plus: 1 %}
{% endif %}
{% endfor %}
{% assign mod = counter | modulo: 3 %}
{% if mod == 1 %}
{% include block url = "none" class=visibility%}
{% include block url = "none" class=visibility%}
{% endif %}
{% if mod == 2 %}
{% include block url = "none" class=visibility%}
{% endif %}
{% if counter > 0 %}</div>{% endif %}
{% if counter > maxVisibleCount %}<div id="react-placeholder-toggleVisibility"></div>{% endif %}
{% if page.tags %}
{% include projects tags=page.tags maxItems=6 headline="<h2>Projects</h2>" %}
{% endif %}
......
......@@ -26,3 +26,7 @@ layout: text
{% unless page.blank == true %}{% include image src=page.image dimension="wide" %}{% endunless %}
{{ content }}
{% if page.tags %}
{% include projects tags=page.tags maxItems=6 noToggle="true" %}
{% endif %}
\ No newline at end of file
......@@ -5,13 +5,39 @@ layout: text
{{ content | markdownify }}
{% if page.tags %}
{% include news tags=page.tags maxItems=6 headline="<h2>News</h2>" %}
{% include topics tags=page.tags headline="<h2>Theses and projects</h2>" %}
{% include topics tags=page.tags maxItems=6 status = "open" headline="<h3>Open</h3>" %}
{% include topics tags=page.tags maxItems=6 status = "assigned" headline="<h3>Assigned</h3>" %}
{% include topics tags=page.tags maxItems=6 status = "closed" headline="<h3>Closed</h3>" %}
{% include jobs tags=page.tags maxItems=6 headline="<h2>Open positions</h2>"%}
{% endif %}
{% if page.funding%}
<h2> Funding and Collaboration </h2>
{% assign cf = 0 %}
<div class="column-layout">
{% for funder in page.funding %}
<div>
{% include block image=funder.logo title=funder.name external_url=funder.url teaser=funder.description%}
</div>
{% assign cf = cf | plus: 1 %}
{% endfor %}
{% include placeholderBlocks itemListLength=cf %}
</div>
{% endif %}
{% if page.hideteam %}
{% else %}
{% if page.team %}
{% assign counter = 0 %}
<h2> Team </h2>
<h2>Team</h2>
<div class="column-layout">
{% for member in page.team %}
{% assign name = member.title %}
......@@ -21,8 +47,9 @@ layout: text
{% assign image = member.image %}
{% else %}
{% for staff in site.people %}
{% capture fullname %}{{staff.firstNames}} {{staff.lastName}}{% endcapture %}
{% if staff.firstNames == name or staff.lastName == name or fullname == name %}
{% capture fullname %}{{staff.firstNames}} {{staff.lastName}}{% endcapture %}
{% if staff.firstNames == name or staff.lastName == name or fullname == name %}
{% capture fullname %}{{staff.firstNames}} {{staff.lastName}}{% endcapture %}
{% capture name %}{{staff.titlePrefix}} {{staff.firstNames}} {{staff.lastName}}{{staff.titleSuffix}}{% endcapture %}
{% assign image = staff.image %}
{% assign url = staff.url %}
......@@ -33,13 +60,23 @@ layout: text
{% assign counter = counter | plus: 1 %}
{% endfor %}
{% assign mod = counter | modulo: 3 %}
{% if mod == 1 %}
{% include block url = "none" %}
{% include block url = "none" %}
{% elsif mod == 2 %}
{% include block url = "none" %}
{% endif %}
</div>
{% include placeholderBlocks itemListLength=counter %}
</div>
{% endif %}
{% endif %}
{% if page.contact %}
<h3>Contact</h3>
{{ page.contact | markdownify}}
{% endif %}
{% if page.filterTag %}
<h2>Publications</h2>
{% if page.bibsonomyUrl %}
<div class="bibsonomy" bibType="ref-list" bibsonomyUrl="{{page.bibsonomyUrl}}" filter="" filterTag="{{page.filterTag}}"></div>
{% else %}
<div class="bibsonomy" bibType="ref-list" bibsonomyUrl="user/hci-uwb" filter="" filterTag="{{page.filterTag}}"></div>
{% endif %}
{% endif %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment