浏览代码

Added styles to profile page.

KrisVos130 7 年之前
父节点
当前提交
d97368147b
共有 3 个文件被更改,包括 68 次插入17 次删除
  1. 19 17
      frontend/app/js/views/Profile/index.jsx
  2. 1 0
      frontend/app/styles/main.scss
  3. 48 0
      frontend/app/styles/profile.scss

+ 19 - 17
frontend/app/js/views/Profile/index.jsx

@@ -110,24 +110,26 @@ export default class Profile extends Component {
 				<main id="profile">
 				<main id="profile">
 					<h1>{user.username}</h1>
 					<h1>{user.username}</h1>
 					<CustomMessages onRef={ref => (this.messages = ref)}/>
 					<CustomMessages onRef={ref => (this.messages = ref)}/>
-					<p>{ t("profile:aMemberSince") } {user.joinDatePretty}</p>
-					<span>
-						<b>{ t("profile:likedSongs") }:</b>
-						<span>{ user.likes }</span>
-					</span>
-					<span>
-						<b>{ t("profile:dislikedSongs") }</b>
-						<span>{ user.dislikes }</span>
-					</span>
-					<span>
-						<b>{ t("profile:songsRequested") }</b>
-						<span>{ user.songsRequested }</span>
-					</span>
-					<span>
-						<b>{ t("profile:rank") }</b>
-						<span>{ user.rolePretty }</span>
-					</span>
 					<img src={ user.image }/>
 					<img src={ user.image }/>
+					<p>{ t("profile:aMemberSince") } {user.joinDatePretty}</p>
+					<div className="profile-details-list">
+						<span>
+							<b>{ t("profile:likedSongs") }:</b>
+							<span>{ user.likes }</span>
+						</span>
+						<span>
+							<b>{ t("profile:dislikedSongs") }</b>
+							<span>{ user.dislikes }</span>
+						</span>
+						<span>
+							<b>{ t("profile:songsRequested") }</b>
+							<span>{ user.songsRequested }</span>
+						</span>
+						<span>
+							<b>{ t("profile:rank") }</b>
+							<span>{ user.rolePretty }</span>
+						</span>
+					</div>
 					{ this.promoteDemoteButton() }
 					{ this.promoteDemoteButton() }
 				</main>
 				</main>
 			)
 			)

+ 1 - 0
frontend/app/styles/main.scss

@@ -7,6 +7,7 @@
 @import "setPassword";
 @import "setPassword";
 @import "settings";
 @import "settings";
 @import "termsPrivacy";
 @import "termsPrivacy";
+@import "profile";
 @import "specific/button";
 @import "specific/button";
 @import "specific/form";
 @import "specific/form";
 @import url("https://fonts.googleapis.com/css?family=Roboto:100,400,500,700");
 @import url("https://fonts.googleapis.com/css?family=Roboto:100,400,500,700");

+ 48 - 0
frontend/app/styles/profile.scss

@@ -0,0 +1,48 @@
+@import "colors";
+@import "breakpoints";
+
+main#profile {
+	color: $musare_color_primary_gray;
+
+	img {
+		width: 128px;
+		height: 128px;
+		display: block;
+		margin: 0 auto 16px;
+		border-radius: 100%;
+	}
+
+	p {
+		text-align: center;
+
+		font-size: 17px;
+		line-height: 22px;
+		margin-bottom: 16px;
+	}
+
+	.profile-details-list {
+		margin-bottom: 24px;
+
+		> span {
+			display: block;
+			margin-bottom: 16px;
+
+			b, span {
+				display: block;
+				text-align: center;
+			}
+
+			b {
+				font-weight: 600;
+				font-size: 18px;
+				line-height: 24px;
+				margin-bottom: 8px;
+			}
+
+			span {
+				font-size: 16px;
+				line-height: 21px;
+			}
+		}
+	}
+}