<header>
    <a href="/">
        <div>
            <img src="https://56462271.oss-cn-beijing.aliyuncs.com/web/logo.png"/>
        </div>
    </a>
    <div>
        <a href="/" id="blogTitle"><span>小海博客</span></a>
        <span id="desc">记录学习成长历程</span>
    </div>


    <div id="loged" *ngIf="userService.userInfo">
        <a nz-dropdown [nzDropdownMenu]="menu" nzTrigger="click" [nzClickHide]="false" [(nzVisible)]="visible">
            {{userService.userInfo.displayName ? userService.userInfo.displayName : userService.userInfo.email}}
            <i nz-icon nzType="down"></i>
        </a>
        <nz-dropdown-menu #menu="nzDropdownMenu">
            <ul nz-menu>
                <li nz-menu-item><a href="../">博客首页</a></li>
                <hr style="margin: 10px 0 5px 0;">
                <li nz-menu-item>
                    <a (click)="logout()">退出登录</a>
                </li>
            </ul>
        </nz-dropdown-menu>
    </div>


    <div id="landr" *ngIf="!userService.userInfo">
        <div class="login">
            <a class="headerButton" style="border-radius: 8px;color: white"
               id="index-topbar-forLogin" (click)="toPage('login')">登录</a>
        </div>
        <div class="registration">
            <a class="headerButton" style="border-radius: 8px;color: white" (click)="toPage('registration')">注册</a>
        </div>
    </div>

</header>
