Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Development section #54

Merged
merged 6 commits into from
Sep 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added _data/whitelist_version.yml
Empty file.
66 changes: 59 additions & 7 deletions _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,65 @@
<a class="color-type-secondary" href="{{ '/screenshots' | absolute_url }}">Screenshots</a>
</li>

<li class="dropdown" data-proofer-ignore>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Development <i class="glyph glyph-chevron-down-2"></i></a>
<ul class="dropdown-menu" role="menu">
<li><a href="{{ 'development/code-documentation/' | absolute_url }}">Code documentation</a></li>
<li class="divider"></li>
<li><a href="{{ 'development/coverage/' | absolute_url }}">Coverage</a></li>
<li><a href="{{ 'development/test-reports/' | absolute_url }}">Test report</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Development<i class="glyph glyph-chevron-down-2"></i></a>
<ul class="dropdown-menu dropdown-menu2" role="menu">

<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Code Documentation <i class="glyph glyph-chevron-down-2"></i>
</a>
<ul class="dropdown-menu">
<li>
<a href="{{ 'development/code-documentation/develop/' | absolute_url }}">Develop</a>
</li>
<li>
<a href="{{ 'development/code-documentation/master/' | absolute_url }}">Master</a>
</li>
{% for version in site.data.whitelist_version %}
<li>
<a href="{{ 'development/code-documentation/support/' | absolute_url }}{{ version }}">{{ version }}</a>
</li>
{% endfor %}
</ul>
</li>

<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Coverage <i class="glyph glyph-chevron-down-2"></i>
</a>
<ul class="dropdown-menu">
<li>
<a href="{{ 'development/coverage/develop/' | absolute_url }}">Develop</a>
</li>
<li>
<a href="{{ 'development/coverage/master/' | absolute_url }}">Master</a>
</li>
{% for version in site.data.whitelist_version %}
<li>
<a href="{{ 'development/coverage/support/' | absolute_url }}{{ version }}">{{ version }}</a>
</li>
{% endfor %}
</ul>
</li>
<li class="dropdown-submenu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Test Report <i class="glyph glyph-chevron-down-2"></i>
</a>
<ul class="dropdown-menu">
<li>
<a href="{{ 'development/test-report/develop/' | absolute_url }}">Develop</a>
</li>
<li>
<a href="{{ 'development/test-report/master/' | absolute_url }}">Master</a>
</li>
{% for version in site.data.whitelist_version %}
<li>
<a href="{{ 'development/test-report/support/' | absolute_url }}{{ version }}">{{ version }}</a>
</li>
{% endfor %}
</ul>
</li>
</ul>
</li>

Expand Down
24 changes: 24 additions & 0 deletions _sass/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@ header {
}
}

.dropdown-submenu {
display: list-item;
position: relative;

&>.dropdown-menu {
left: 100%;
margin-top: -52px;
top: 0;
}

.pull-left {
float: none;

&>.dropdown-menu {
left: -100%;
}
}

i {
font-size: 6px;
line-height: 15px;
}
}

@media (max-width: 1084px) {
.logo {
height: 30px;
Expand Down
46 changes: 46 additions & 0 deletions ci/update_version_list.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash

COMMIT_MESSAGE=$(git log --pretty=oneline -n 1 $CIRCLE_SHA1)

# only update list when documentation is updated
if [[ $COMMIT_MESSAGE == *"ci(docs): generate documentation with jazzy for version"* && -z "$CIRCLE_PULL_REQUEST" ]]; then

# check if support folder exists
if [ -d "development/code-documentation/support" ]; then

# remove list to create a new one and not duplicate folders
rm ./_data/whitelist_version.yml

# create fresh list
touch ./_data/whitelist_version.yml

# set path to directory where the versions folders are
FOLDER_PATH="development/code-documentation/support"

# get folders in release directory
DIRS=`ls $FOLDER_PATH`

# add version folders to list
for DIR in $DIRS
do
echo - ${DIR} >> ./_data/whitelist_version.yml
done
# if the list has changed commit and push changes
if [ -n "$(git status --porcelain _data/whitelist_version.yml)" ]; then

echo "Updating version list"

# configure git
git config --global user.email "[email protected]"
git config --global user.name "Teclib' bot"

# add new remote to push changes
git remote remove origin
git remote add origin https://$GITHUB_USER:[email protected]/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git

git add _data/whitelist_version.yml && git commit -m "ci(list): update version list"
git push origin gh-pages
fi
fi

fi
5 changes: 5 additions & 0 deletions development/code-documentation/master/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: coverage
---

<h3>Coming soon...</h3>
5 changes: 5 additions & 0 deletions development/coverage/master/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: coverage
---

<h3>Coming soon...</h3>
5 changes: 5 additions & 0 deletions development/test-report/master/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: coverage
---

<h3>Coming soon...</h3>
7 changes: 7 additions & 0 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@
});
})();

// Dropdown sub-menu
$('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) {
event.preventDefault();
event.stopPropagation();
$(this).parent().siblings().removeClass('open');
$(this).parent().toggleClass('open');
});

// Tooltips
$('[data-toggle="tooltip"]').tooltip({
Expand Down
Loading