コード例 #1
0
ファイル: header.php プロジェクト: fredyns/yii2-boilerplate
							<?php 
    echo \common\widgets\Gravatar::widget(['email' => Yii::$app->user->identity->email, 'options' => ['class' => 'img-circle', 'alt' => 'Gravatar image', 'title' => 'Gravatar image', 'width' => 25, 'height' => 25], 'linkUrl' => FALSE]);
    ?>

							<span class="hidden-xs">
								<?php 
    echo Yii::$app->user->identity->username;
    ?>
							</span>
						</a>
						<ul class="dropdown-menu">
							<!-- User image -->
							<li class="user-header">

								<?php 
    echo \common\widgets\Gravatar::widget(['email' => Yii::$app->user->identity->email, 'options' => ['class' => 'img-circle', 'alt' => 'Gravatar image', 'title' => 'Gravatar image'], 'linkOptions' => ['style' => "background-color: transparent;"]]);
    ?>

								<p>
									<?php 
    echo Yii::$app->user->identity->username;
    ?>
									<small>
										Member since
										<?php 
    echo date('M. Y', Yii::$app->user->identity->created_at);
    ?>
									</small>
								</p>
							</li>
							<!-- Menu Body -->
コード例 #2
0
<aside class="main-sidebar">

    <section class="sidebar">

        <!-- Sidebar user panel -->
        <div class="user-panel">
            <div class="pull-left image">

				<?php 
echo \common\widgets\Gravatar::widget(['email' => Yii::$app->user->identity->email, 'size' => 45, 'options' => ['class' => 'img-circle', 'alt' => 'Gravatar image', 'title' => 'Gravatar image'], 'linkUrl' => FALSE]);
?>

            </div>
            <div class="pull-left info">
                <p>
					<?php 
echo Yii::$app->user->identity->username;
?>
				</p>

                <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
            </div>
        </div>

        <!-- search form ->
        <form action="#" method="get" class="sidebar-form">
            <div class="input-group">
                <input type="text" name="q" class="form-control" placeholder="Search..."/>
				<span class="input-group-btn">
					<button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i>
					</button>