Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index page lists all portals #196

Closed
wants to merge 3 commits into from
Closed
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
49 changes: 49 additions & 0 deletions _includes/allportals.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{% for portals in site.data.portals %}

{% assign groups = portals[1] %}
{% for group in groups %}

{% assign groupidx = forloop.index %}
<div class="portal-group" hidden>
<h2>{{ group.groupName }}</h2>
{% for portal in group.portals %}
<div class="portal">
<span class="portal-name">
<span class="portal-add" id="{{groupidx}}.{{forloop.index}}">❤ </span>
{{portal.portalName}} {% if portal.note %}
<span class="portal-note">{{ portal.note }}</span>
{% endif %}
</span>
<div class="portal-details">
<span class="portal-url">
<a href="{{portal.primaryURL}}" target="_blank">{{portal.primaryURL}}</a>
</span>
{% if portal.secondaryURLs %}
<span class="portal-secondary-urls">
&ensp;• {% for secondary in portal.secondaryURLs %}<a class="btn-aka-ms btn" href="{{secondary.url}}"
target="_blank">{{secondary.icon}}</a>&thinsp;{% endfor %}
</span>
{% endif %}
</div>
</div>
{% endfor %}
</div>
{% endfor %}
{% endfor %}

<script type="text/javascript">

const alldata = {{ site.data.portals | jsonify}}
var keys = Object.keys(alldata).filter(key => key != "PortalGroupschema")
var data = [].concat(...[...keys.map(key => alldata[key])])
const portals = [].concat(...[...data.map(i => { return i.portals })])

Array.from(document.getElementsByClassName("portal-add")).forEach((e) =>
e.addEventListener("click", (event) => {
let arrayLocation = event.target.id.split(".").map(i => i - 1)
let newLink = data[arrayLocation[0]].portals[arrayLocation[1]]
newLink.groupName = data[arrayLocation[0]].groupName
addLinkToLocalStorage(newLink)
})
);
</script>
3 changes: 2 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ <h2>{{ site.description | default: site.github.project_tagline }}</h2>
<a href="{{ site.github.zip_url }}" class="btn">Download as .zip</a>
<a href="{{ site.github.tar_url }}" class="btn">Download as .tar.gz</a>
{% endif %}
<a href="{{ site.baseurl }}/" class="btn btn-github"><span class="icon"></span>Home</a>
<a href="{{ site.baseurl }}/" class="btn btn-github"><span class="icon"></span>All</a>
<a href="{{ site.baseurl }}/admin" class="btn btn-github"><span class="icon"></span>Admin</a>
<a href="{{ site.baseurl }}/userportals" class="btn btn-github"><span class="icon"></span>End User</a>
<a href="{{ site.baseurl }}/3rdparty" class="btn btn-github"><span class="icon"></span>3rd Party</a>
<a href="{{ site.baseurl }}/usgovt" class="btn btn-github"><span class="icon"></span>US Govt</a>
Expand Down
10 changes: 10 additions & 0 deletions admin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
layout: page
title: Administrator Portals
---

Welcome to this community driven project to list all of Microsoft's portals in one place.

{% include portal.html portal="admin" %}

The ![aka.ms button](.\images\akamsicon.png) icon is an aka.ms link - a Microsoft owned domain used for shortlinks.
4 changes: 2 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
layout: page
title: Administrator Portals
title: All Portals
---

Welcome to this community driven project to list all of Microsoft's portals in one place.

{% include portal.html portal="admin" %}
{% include allportals.html %}

The ![aka.ms button](.\images\akamsicon.png) icon is an aka.ms link - a Microsoft owned domain used for shortlinks.