github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/themes/wind/templates/user/avatar.html (about)

     1  {% extends "../base.html" %}
     2  
     3  {% block title %}
     4  <title>{{username}} - {{SiteName}}</title>
     5  {% endblock title %}
     6  
     7  {% block mainland %}
     8      <div id="main" class="container">
     9  
    10          <div class="row">
    11              <div id="content">
    12                  <div class="col-md-3">
    13                      <div class="box">
    14                          <ul class="nav nav-side">
    15                              <li class="cell first">
    16                                  <h4 class="head"> <i class="icon icon-cogs"></i>
    17                                      设置
    18                                  </h4>
    19                              </li>
    20                              <li>
    21                                  <a href="/settings/profile/">个人信息</a>
    22                              </li>
    23                              <li class="active">
    24                                  <a href="/settings/avatar/">我的头像</a>
    25                              </li>
    26                              <li>
    27                                  <a href="/settings/password/">修改密码</a>
    28                              </li>
    29                              <li class="cell last"></li>
    30                          </ul>
    31                      </div>
    32                  </div>
    33                  <div class="col-md-9">
    34                      <div class="box">
    35                          <div class="cell first breadcrumb">
    36                              <a href="/"> <i class="icon icon-home"></i>
    37                              </a>
    38                              <i class="fa fa-caret-right"></i>
    39                              <a href="">我的头像</a>
    40                          </div>
    41                          <div class="cell last slim">
    42                              {% comment %}
    43                              <h3 class="underline">设置头像</h3>
    44                              <div class="row">
    45                                  <div class="col-md-4">
    46                                      <form method="POST" action="/settings/avatar/">
    47  
    48                                          <div class="form-group">
    49  
    50                                              <label class="control-label" for="s2id_autogen1">使用头像类型</label>
    51                                              <div class="select2-container form-control" id="s2id_UserAvatarForm-AvatarType">
    52                                                  <a href="javascript:void(0)" onclick="return false;" class="select2-choice" tabindex="-1">
    53                                                      <span class="select2-chosen">Gravatar头像</span> <abbr class="select2-search-choice-close"></abbr>
    54                                                      <span class="select2-arrow"> <b></b>
    55                                                      </span>
    56                                                  </a>
    57                                                  <input class="select2-focusser select2-offscreen" type="text" id="s2id_autogen1">
    58                                                  <div class="select2-drop select2-display-none select2-with-searchbox">
    59                                                      <div class="select2-search">
    60                                                          <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input"></div>
    61                                                      <ul class="select2-results"></ul>
    62                                                  </div>
    63                                              </div>
    64                                              <select id="UserAvatarForm-AvatarType" name="AvatarType" class="form-control select2-offscreen" rel="select2" tabindex="-1">
    65                                                  %!!(string=
    66                                                  <option></option>
    67                                                  <option value="1" selected="selected">Gravatar头像</option>
    68                                                  <option value="2">自定义头像</option>
    69                                                  )s(MISSING)
    70                                              </select>
    71  
    72                                          </div>
    73  
    74                                          <div class="form-group">
    75                                              <button type="submit" class="btn btn-primary">
    76                                                  保存设置&nbsp;&nbsp;
    77                                                  <i class="icon-chevron-sign-right"></i>
    78                                              </button>
    79                                          </div>
    80                                      </form>
    81                                  </div>
    82                              </div>
    83                              {% endcomment %}
    84  
    85                              <h3 class="underline">设置头像</h3>
    86                              <div class="row">
    87                                  <div class="col-md-8">
    88                                      {% include "../msgerr.html" %}
    89                                      <form method="POST" action="" enctype="multipart/form-data">
    90                                          <div class="form-group">
    91                                              <p> <strong>支持Jpeg/Png/Gif格式,大小500k以内,推荐尺寸200x200px。</strong>
    92                                              </p>
    93                                              <p>{{SiteName}}禁止使用任何低俗或者敏感图片作为头像。如果你是男的,请不要用女人的照片作为头像,这样可能会对其他会员产生误导。</p>
    94                                          </div>
    95                                          <div class="form-group">
    96                                              <div class="text-left">
    97                                                  <span class="btn-group">
    98                                                      <button class="btn btn-s-md btn-success btn-rounded btn-rounded"><i class="icon-chevron-sign-left"></i> 选择图片</button>
    99                                                      <input id="avatar" type="file" name="avatar" style="opacity:0;filter:alpha(opacity=0);position:absolute;width:120px;height:34px;cursor:pointer;top:0;" />
   100                                                      <button type="submit" class="btn btn-s-md btn-dark btn-rounded"> 上传头像&nbsp;&nbsp; <i class="icon-chevron-sign-right"></i> </button>
   101                                                  </span>
   102                                              </div>
   103                                          </div>
   104                                      </form>
   105                                              {% if SignedUser.Avatar %}
   106                                                  <img src="{{File(SignedUser.Avatar)}}" style="width:200px;height:200px;">
   107                                                  {% if SignedUser.AvatarLarge %}
   108                                                      <img src="{{File(SignedUser.AvatarLarge)}}" style="width:100px;height:100px;">
   109                                                  {% endif %}
   110                                                  {% if SignedUser.AvatarMedium %}
   111                                                      <img src="{{File(SignedUser.AvatarMedium)}}" style="width:48px;height:48px;">
   112                                                  {% endif %}
   113                                                  {% if SignedUser.AvatarSmall %}
   114                                                      <img src="{{File(SignedUser.AvatarSmall)}}" style="width:32px;height:32px;">
   115                                                  {% endif %}
   116                                              {% else %}
   117                                                  <img src="/img/d200.png" style="width:200px;height:200px;">
   118                                                  <img class="middle" src="/img/d100.png" style="width:100px;height:100px;">
   119                                                  <img src="/img/d48.png" style="width:48px;height:48px;">
   120                                                  <img src="/img/d32.png" class="middle">
   121                                              {% endif %}
   122                                  </div>
   123                              </div>
   124                              <div class="clearfix"></div>
   125                          </div>
   126                      </div>
   127                  </div>
   128              </div>
   129          </div>
   130      </div>
   131  {% endblock mainland %}