diff --git a/views/user/info.php b/views/user/info.php new file mode 100644 index 0000000..1854747 --- /dev/null +++ b/views/user/info.php @@ -0,0 +1,81 @@ +title = '个人设置'; +FontAwesomeAsset::register($this); +$this->registerCssFile('@web/css/user-info.css'); +$details = IPLocation::getDetails($model->last_login_ip); +if (is_null($details)) { + echo ''; +} +?> + +
+ +

title) ?>

+ +
+ getGravatar(email: $model->email, s: 100, img: true, atts: ['alt' => 'User Avatar', 'style' => 'border-radius: 50%']) ?> +
+ + +
+
+ + + + field($model, 'username')->textInput(['maxlength' => true]) ?> + + field($model, 'password')->passwordInput(['maxlength' => true]) ?> + + field($model, 'bio')->textarea(['rows' => 6]) ?> + +
+ 'btn btn-success']) ?> +
+ + + +
\ No newline at end of file diff --git a/web/css/user-info.css b/web/css/user-info.css new file mode 100644 index 0000000..24f1ab9 --- /dev/null +++ b/web/css/user-info.css @@ -0,0 +1,59 @@ +.user-profile { + display: flex; + flex-direction: row; + align-items: center; /* Add this line */ + margin-top: 42px; + margin-bottom: 30px; +} + +.user-details { + display: flex; + justify-content: space-between; + align-items: center; /* Add this line */ + width: 100%; /* Take up the remaining width */ + margin-left: 10px; +} + +.user-details p { + margin-bottom: 0; +} + +#p-username { + font-size: 1.25rem; +} + +.user-details .user-info p { + font-size: 0.95rem; + line-height: 1.25; +} + +.user-login-info { + display: flex; + justify-content: space-between; + width: 40%; +} + +.user-last-login i, .user-last-login-ip i { + font-size: 1.5em; + margin-right: 10px; +} + +.user-last-login, .user-last-login-ip { + display: flex; + align-items: center; + flex-direction: row; +} + +.user-last-login p, .user-last-login-ip p { + margin: 0; +} +.login-info-dv{ + margin-left: 5px; +} +.login-info-dv .user-login-info-title{ + font-weight: bold; +} +.login-info-dv .user-login-info-content{ + color: rgb(100,96,100); + font-size: 0.95rem; +} \ No newline at end of file