Commit 6d7c63d4 authored by Laurent Sittler's avatar Laurent Sittler ©
Browse files

feat: support member button from HeaderSuiteBar

parents edb205ce b97b231e
Pipeline #1086 failed with stages
in 1 minute and 21 seconds
......@@ -1451,6 +1451,32 @@ html[data-theme=dark] #HeaderSuiteBar #CenterRegion #topButtonsRegion #MainLink_
font-size: 16px;
}
#HeaderSuiteBar #HeaderRightRegion #MainLink_Me>button {
vertical-align: middle;
position: relative;
overflow: hidden;
top: -2px;
}
#HeaderSuiteBar #HeaderRightRegion #MainLink_Me>button>#MainLink_MePhoto {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
#HeaderSuiteBar #HeaderRightRegion #MainLink_Me>button>#MainLink_MeInitials {
top: 0;
bottom: 0;
left: 0;
right: 0;
padding-top: 10%;
text-transform: uppercase;
}
/*
* SiteHeader
*/
......
......@@ -314,9 +314,27 @@ fluentui.headersuitebar = (function () {
}
}
/**
* Display member initials behind the member image when the member is logged in
*/
function memberInitials() {
var name = document.getElementById('MainLink_MeHiddenName');
if (name) {
var initialsElem = document.getElementById('MainLink_MeInitials');
if (initialsElem) {
var words = name.innerText.trim().split(' ');
var letterOne = words[0].charAt(0);
var letterTwo = words.length > 1 ? words[words.length - 1].charAt(0) : '';
var initialDisplayed = letterOne + '' + letterTwo;
initialsElem.innerText = initialDisplayed;
}
}
}
return {
init: function () {
_appsPanelListener = false;
memberInitials();
setDocTheme();
addBtnThemeEventListener();
searchClearBtnEvent();
......
......@@ -42,7 +42,7 @@ services:
# https://www.geeek.org/installer-elasticsearch-logstash-site-internet/
ghost-elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1
ports:
- 9200:9200
- 9300:9300
......@@ -63,7 +63,7 @@ services:
restart: always
ghost-elastic-logstash:
image: docker.elastic.co/logstash/logstash:7.10.1
image: docker.elastic.co/logstash/logstash:7.12.1
command: logstash -f /usr/share/logstash/pipeline/logstash.conf
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
......
......@@ -73,12 +73,26 @@
</div>
</div>
<div id="HeaderRightRegion">
{{!--
<div>
<button class="login-button" type="button" role="button" title="Login" aria-label="Login">
<span class="ms-Icon ms-Icon--UserOptional" role="button"></span>
</button>
</div>
--}}
{{#if @member}}
<div id="MainLink_Me">
<button type="button" role="button" title="Account manager for {{@member.name}}" aria-label="Account manager for {{@member.name}}" data-automation-id="MainLink_Me" class="gh-portal-open" data-portal="account">
<span class="ms-hide" id="MainLink_MeHiddenName">
{{#if @member.name}}
{{@member.name}}
{{else}}
{{@member.email}}
{{/if}}
</span>
<span id="MainLink_MeInitials"></span>
<img id="MainLink_MePhoto" src="{{@member.avatar_image}}" />
</button>
</div>
{{else}}
<div id="HeaderButtonRegion_SignIn">
<button type="button" role="button" title="Sign in" aria-label="signin" data-automation-id="signin" data-portal="signin">
<span class="ms-Icon ms-Icon--Signin" role="button"></span>
</button>
</div>
{{/if}}
</div>
</div>
\ No newline at end of file
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