New styles

This commit is contained in:
Eduard Urbach 2017-07-21 08:09:22 +02:00
parent 06f6fd1e76
commit 8a72b76d27
6 changed files with 58 additions and 19 deletions

View File

@ -19,9 +19,10 @@
padding 0 padding 0
.anime-list-item-image .anime-list-item-image
width 27px width 39px
height 39px height 39px
border-radius 2px border-radius 2px
object-fit cover
.anime-list-item-name .anime-list-item-name
flex 1 flex 1

View File

@ -45,5 +45,23 @@ func Profile(ctx *aero.Context, viewUser *arn.User) string {
}) })
}) })
openGraph := &arn.OpenGraph{
Tags: map[string]string{
"og:title": viewUser.Nick,
"og:image": viewUser.LargeAvatar(),
"og:url": "https://" + ctx.App.Config.Domain + viewUser.Link(),
"og:site_name": "notify.moe",
"og:description": viewUser.Tagline,
"og:type": "profile",
"profile:username": viewUser.Nick,
},
Meta: map[string]string{
"description": viewUser.Tagline,
"keywords": viewUser.Nick + ",profile",
},
}
ctx.Data = openGraph
return ctx.HTML(components.Profile(viewUser, user, animeList, threads, posts, tracks, ctx.URI())) return ctx.HTML(components.Profile(viewUser, user, animeList, threads, posts, tracks, ctx.URI()))
} }

View File

@ -44,6 +44,11 @@ component ProfileHeader(viewUser *arn.User, user *arn.User, uri string)
Icon("rocket") Icon("rocket")
span= arn.Capitalize(viewUser.Role) span= arn.Capitalize(viewUser.Role)
//- .profile-actions
//- button.action(data-action="followUser", data-trigger="click")
//- Icon("user-plus")
//- span Follow
ProfileNavigation(viewUser, uri) ProfileNavigation(viewUser, uri)
component ProfileNavigation(viewUser *arn.User, uri string) component ProfileNavigation(viewUser *arn.User, uri string)

View File

@ -1,7 +1,8 @@
profile-boot-duration = 2s profile-boot-duration = 2s
.profile .profile
horizontal vertical
align-items center
position relative position relative
left calc(content-padding * -1) left calc(content-padding * -1)
@ -18,23 +19,42 @@ profile-boot-duration = 2s
overflow hidden overflow hidden
.profile-field .profile-field
text-align left text-align center
a a
color white color white
< 740px .intro-container
.profile
vertical vertical
align-items center align-items center
margin-top calc(content-padding * 1.5)
.profile-actions
horizontal
> 740px
.profile
horizontal
align-items flex-start
.profile-field .profile-field
text-align center text-align left
.intro-container .intro-container
align-items center align-items flex-start
margin-top calc(content-padding * 1.5) margin-top 0
padding-left content-padding padding content-padding
padding-top 0
padding-left calc(content-padding * 2)
max-width 900px
.profile-actions
vertical
position absolute
top 0
right 0
padding content-padding
// animation appear // animation appear
// 0% // 0%
@ -78,14 +98,6 @@ profile-boot-duration = 2s
border-radius 3px border-radius 3px
overflow hidden overflow hidden
.intro-container
vertical
align-items flex-start
padding content-padding
padding-top 0
padding-left calc(content-padding * 2)
max-width 900px
#nick #nick
margin-bottom 1rem margin-bottom 1rem

View File

@ -14,7 +14,7 @@ export class TouchController {
document.addEventListener("touchmove", evt => this.handleTouchMove(evt), false) document.addEventListener("touchmove", evt => this.handleTouchMove(evt), false)
this.downSwipe = this.upSwipe = this.rightSwipe = this.leftSwipe = () => null this.downSwipe = this.upSwipe = this.rightSwipe = this.leftSwipe = () => null
this.threshold = 5 this.threshold = 3
} }
handleTouchStart(evt) { handleTouchStart(evt) {

View File

@ -19,5 +19,8 @@ remove-margin = 1.1rem
.anime-list-owner .anime-list-owner
display none display none
.anime-list-item-image
width 27px
#navigation #navigation
font-size 0.9rem font-size 0.9rem