register.blade.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. @extends('home.layouts.app')
  2. @section('css_ext')
  3. <style>
  4. :root {
  5. --input-padding-x: .75rem;
  6. --input-padding-y: .75rem;
  7. }
  8. html,
  9. body {
  10. height: 100%;
  11. }
  12. body {
  13. display: -ms-flexbox;
  14. display: -webkit-box;
  15. display: flex;
  16. -ms-flex-align: center;
  17. -ms-flex-pack: center;
  18. -webkit-box-align: center;
  19. align-items: center;
  20. -webkit-box-pack: center;
  21. justify-content: center;
  22. padding-top: 40px;
  23. padding-bottom: 40px;
  24. background-color: #f5f5f5;
  25. }
  26. .form-signin {
  27. width: 100%;
  28. max-width: 420px;
  29. padding: 15px;
  30. margin: 0 auto;
  31. }
  32. .form-label-group {
  33. position: relative;
  34. margin-bottom: 1rem;
  35. }
  36. .form-label-group > input,
  37. .form-label-group > label {
  38. padding: var(--input-padding-y) var(--input-padding-x);
  39. }
  40. .form-label-group > label {
  41. position: absolute;
  42. top: 0;
  43. left: 0;
  44. display: block;
  45. width: 100%;
  46. margin-bottom: 0; /* Override default `<label>` margin */
  47. line-height: 1.5;
  48. color: #495057;
  49. border: 1px solid transparent;
  50. border-radius: .25rem;
  51. transition: all .1s ease-in-out;
  52. }
  53. .form-label-group input::-webkit-input-placeholder {
  54. color: transparent;
  55. }
  56. .form-label-group input:-ms-input-placeholder {
  57. color: transparent;
  58. }
  59. .form-label-group input::-ms-input-placeholder {
  60. color: transparent;
  61. }
  62. .form-label-group input::-moz-placeholder {
  63. color: transparent;
  64. }
  65. .form-label-group input::placeholder {
  66. color: transparent;
  67. }
  68. .form-label-group input:not(:placeholder-shown) {
  69. padding-top: calc(var(--input-padding-y) + var(--input-padding-y) * (2 / 3));
  70. padding-bottom: calc(var(--input-padding-y) / 3);
  71. }
  72. .form-label-group input:not(:placeholder-shown) ~ label {
  73. padding-top: calc(var(--input-padding-y) / 3);
  74. padding-bottom: calc(var(--input-padding-y) / 3);
  75. font-size: 12px;
  76. color: #777;
  77. }
  78. </style>
  79. @endsection
  80. @section('content')
  81. <form class="form-signin" method="post" action="{{ route('register') }}">
  82. @csrf
  83. <div class="text-center mb-4">
  84. <h1 class="h3 mb-3 font-weight-normal">欢迎注册 Vien Blog</h1>
  85. <a href="{{ route('login') }}">已有账号? 直接登录</a></p>
  86. </div>
  87. <div class="form-label-group">
  88. <input type="text" id="name" name="name" class="form-control form-control-lg{{ $errors->has('name') ? ' is-invalid' : '' }}" placeholder="Name"
  89. value="{{ old('name') }}" required autofocus>
  90. <label for="name">Name</label>
  91. @if ($errors->has('name'))
  92. <span class="invalid-feedback" role="alert">
  93. <strong>{{ $errors->first('name') }}</strong>
  94. </span>
  95. @endif
  96. </div>
  97. <div class="form-label-group">
  98. <input type="email" id="email" name="email" class="form-control form-control-lg{{ $errors->has('email') ? ' is-invalid' : '' }}" placeholder="Email address"
  99. value="{{ old('email') }}" required autofocus>
  100. <label for="email">Email address</label>
  101. @if ($errors->has('email'))
  102. <span class="invalid-feedback" role="alert">
  103. <strong>{{ $errors->first('email') }}</strong>
  104. </span>
  105. @endif
  106. </div>
  107. <div class="form-label-group">
  108. <input type="password" id="password" name="password" class="form-control form-control-lg{{ $errors->has('password') ? ' is-invalid' : '' }}" placeholder="Password"
  109. value="{{ old('password') }}" required>
  110. @if ($errors->has('password'))
  111. <span class="invalid-feedback" role="alert">
  112. <strong>{{ $errors->first('password') }}</strong>
  113. </span>
  114. @endif
  115. <label for="password">Password</label>
  116. </div>
  117. <div class="form-label-group">
  118. <input type="password" id="password-confirm" name="password_confirmation" class="form-control form-control-lg{{ $errors->has('password-confirm') ? ' is-invalid' : '' }}" placeholder="Password Confirm" required>
  119. <label for="password-confirm">Password Confirm</label>
  120. </div>
  121. <button class="btn btn-lg btn-primary btn-block" type="submit">注册</button>
  122. <p class="mt-5 mb-3 text-muted text-center">&copy; {{ date('Y') }} <a href="https://vienblog.com">vienblog.com</a> </p>
  123. </form>
  124. @endsection