소스 검색

POST for Mobile #81

Yoginth 7 년 전
부모
커밋
21bcb7c08f
3개의 변경된 파일17개의 추가작업 그리고 10개의 파일을 삭제
  1. 1 1
      public/css/gitote.min.css
  2. 0 3
      public/less/_user.less
  3. 16 6
      templates/user/profile.tmpl

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1 - 1
public/css/gitote.min.css


+ 0 - 3
public/less/_user.less

@@ -70,9 +70,6 @@
 
 	&.profile {
 		.ui.card {
-			.profile-avatar {
-				height: 287px;
-			}
 			.header {
 				word-break: break-all;
 			}

+ 16 - 6
templates/user/profile.tmpl

@@ -80,9 +80,19 @@
 		{{if and .IsLogged (ne .LoggedUserName .Owner.Name)}}
 			<div class="follow">
 				{{if .LoggedUser.IsFollowing .Owner.ID}}
-					<a class="ui basic red button mobile-card follow" href="{{.Link}}/action/unfollow?redirect_to={{$.Link}}"><i class="menu-icon octicon">👦🏽</i>{{.i18n.Tr "user.unfollow"}}</a>
+					<form action="{{.Link}}/action/unfollow?redirect_to={{$.Link}}" method="POST">
+						{{.CSRFTokenHTML}}
+						<button class="uui basic red button mobile-card follow">
+							<i class="menu-icon octicon">👦🏽</i> {{.i18n.Tr "user.unfollow"}}
+						</button>
+					</form>
 				{{else}}
-					<a class="ui basic green button mobile-card follow" href="{{.Link}}/action/follow?redirect_to={{$.Link}}"><i class="menu-icon octicon">👦</i>{{.i18n.Tr "user.follow"}}</a>
+					<form action="{{.Link}}/action/follow?redirect_to={{$.Link}}" method="POST">
+						{{.CSRFTokenHTML}}
+						<button class="ui basic green button mobile-card follow">
+							<i class="menu-icon octicon">👦</i> {{.i18n.Tr "user.follow"}}
+						</button>
+					</form>
 				{{end}}
 			</div>
 		{{end}}
@@ -94,12 +104,12 @@
 			<div class="ui five wide column">
 				<div class="ui card" style="border: 2px solid {{.Owner.ThemeColor}};box-shadow: 5px 6px 0px {{.Owner.ThemeColor}}"> 
 					{{if eq .LoggedUserName .Owner.Name}}
-						<a class="profile-avatar image poping up" href="{{AppSubURL}}/user/settings/avatar" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
-							<img src="{{AppendAvatarSize .Owner.RelAvatarLink 287}}" title="{{.Owner.Name}}"/>
+						<a class="image poping up" href="{{AppSubURL}}/user/settings/avatar" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
+							<img src="{{AppendAvatarSize .Owner.RelAvatarLink 290}}" title="{{.Owner.Name}}"/>
 						</a>
 					{{else}}
-						<span class="profile-avatar image">
-							<img src="{{AppendAvatarSize .Owner.RelAvatarLink 287}}" title="{{.Owner.Name}}"/>
+						<span class="image">
+							<img src="{{AppendAvatarSize .Owner.RelAvatarLink 290}}" title="{{.Owner.Name}}"/>
 						</span>
 					{{end}}
 					<div class="content">