_login.scss 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. .nologin {
  2. $gray-dark-for-login: darken(white, 30%);
  3. // background color
  4. background:
  5. linear-gradient(45deg, darken($inverse, 30%) 0%, hsla(340, 100%, 55%, 0) 70%),
  6. linear-gradient(135deg, $growi-green 10%, hsla(225, 95%, 50%, 0) 70%),
  7. linear-gradient(225deg, $growi-blue 10%, hsla(140, 90%, 50%, 0) 80%),
  8. linear-gradient(315deg, darken($inverse, 25%) 100%, hsla(35, 95%, 55%, 0) 70%);
  9. #page-wrapper {
  10. background: none;
  11. }
  12. // layout
  13. #wrapper {
  14. height: 100vh;
  15. #page-wrapper {
  16. height: 100vh;
  17. display: flex;
  18. align-items: center;
  19. .main {
  20. width: 100vw;
  21. > .row {
  22. margin-right: 20px;
  23. margin-left: 20px;
  24. }
  25. .login-header {
  26. padding-top: 30px;
  27. padding-bottom: 10px;
  28. display: flex;
  29. flex-direction: column;
  30. align-items: center;
  31. }
  32. .login-form-errors {
  33. width: 100%;
  34. .alert {
  35. margin-top: 10px;
  36. margin-bottom: 0;
  37. padding: 5px;
  38. ul {
  39. padding-left: 1.5em;
  40. }
  41. }
  42. }
  43. } // .main
  44. } // #page-wrapper
  45. } // #wrapper
  46. // styles
  47. .login-header {
  48. background-color: rgba(white, 0.5);
  49. .logo {
  50. .group1, .group2 {
  51. fill: rgba(black, 0.5);
  52. }
  53. }
  54. h1 {
  55. color: rgba(black, 0.5);
  56. font-size: 22px;
  57. line-height: 1em;
  58. }
  59. }
  60. .login-dialog {
  61. background-color: rgba(white, 0.5);
  62. }
  63. .input-group {
  64. margin-bottom: 10px;
  65. .input-group-addon {
  66. text-align: center;
  67. border: none;
  68. border-radius: 0;
  69. color: $gray-dark-for-login;
  70. background-color: rgba(black, 0.4);
  71. }
  72. .form-control {
  73. color: white;
  74. background-color: rgba(lighten(black, 10%), 0.4);
  75. &::placeholder {
  76. color: $gray-dark-for-login;
  77. }
  78. }
  79. }
  80. .input-group:not(.has-error) {
  81. .form-control {
  82. border: transparent;
  83. }
  84. }
  85. // button style
  86. .btn-login.fcbtn, .btn-register.fcbtn, .btn-login-oauth.fcbtn {
  87. border: none;
  88. color: white;
  89. background-color: rgba(lighten(black, 20%), 0.4);
  90. .btn-label {
  91. margin: -8px 20px -8px -20px;
  92. padding: 9px 15px;
  93. }
  94. &:focus {
  95. border: none;
  96. }
  97. }
  98. .btn-login.fcbtn {
  99. .btn-label {
  100. background-color: rgba($brand-danger, 0.4);
  101. }
  102. &:after {
  103. background-color: #7e4153;
  104. }
  105. }
  106. .btn-login-oauth.fcbtn#google {
  107. .btn-label {
  108. background: linear-gradient(to bottom right, darken(#db3236, 20%), darken(#f4c20d, 20%), darken(#3cba54, 20%), darken(#4885ed, 20%));
  109. }
  110. &:after {
  111. background-color: #555;
  112. }
  113. }
  114. .btn-login-oauth.fcbtn#github {
  115. .btn-label {
  116. background-color: rgba(#24292e, 0.4);
  117. }
  118. &:after {
  119. background-color: #555;
  120. }
  121. }
  122. .btn-login-oauth.fcbtn#facebook {
  123. .btn-label {
  124. background-color: rgba(#29487d, 0.4);
  125. }
  126. &:after {
  127. background-color: #555;
  128. }
  129. }
  130. .btn-login-oauth.fcbtn#twitter {
  131. .btn-label {
  132. background-color: rgba(#1da1f2, 0.4);
  133. }
  134. &:after {
  135. background-color: #555;
  136. }
  137. }
  138. .btn-register.fcbtn {
  139. .btn-label {
  140. background-color: rgba($brand-success, 0.4);
  141. }
  142. &:after {
  143. background-color: #3f7263;
  144. }
  145. }
  146. hr {
  147. margin: 10px 0;
  148. border-color: #ccc;
  149. }
  150. // footer link text
  151. .link-growi-org {
  152. color: rgba(black, 0.4);
  153. font-weight: bold;
  154. font-size: smaller;
  155. &, .growi, .org {
  156. transition: color 0.8s;
  157. }
  158. &:hover, &.focus {
  159. color: black;
  160. .growi {
  161. color: darken($growi-green, 20%);
  162. }
  163. .org {
  164. color: darken($growi-blue, 15%);
  165. }
  166. }
  167. }
  168. .link-switch {
  169. color: $gray-lighter;
  170. &:hover {
  171. color: white;
  172. }
  173. }
  174. }
  175. .login-page {
  176. // layout
  177. .main .row {
  178. @media(min-width: 350px) {
  179. .col-sm-offset-4 {
  180. margin-left: calc(50% - 160px);
  181. }
  182. .col-sm-4 {
  183. width: 320px;
  184. }
  185. }
  186. }
  187. .link-growi-org {
  188. position: absolute;
  189. z-index: 2;
  190. bottom: 9px;
  191. }
  192. // flip animation
  193. .login-dialog.flipper {
  194. transition: min-height 0.2s;
  195. &.to-flip {
  196. min-height: 295px;
  197. // has-error
  198. &.has-error {
  199. min-height: #{295px + 32px};
  200. }
  201. }
  202. .front, .back {
  203. transition: 0.4s;
  204. backface-visibility: hidden;
  205. transform-style: preserve-3d;
  206. // fix https://github.com/weseek/growi/issues/330
  207. -webkit-backface-visibility: hidden;
  208. -webkit-transform-style: preserve-3d;
  209. }
  210. .front {
  211. z-index: 2;
  212. }
  213. .back {
  214. position: absolute;
  215. top: 0;
  216. left: 15px;
  217. right: 15px;
  218. }
  219. .back,
  220. &.to-flip .front {
  221. transform: rotateY(180deg);
  222. // fix https://github.com/weseek/growi/issues/330
  223. // 'backface-visibility: hidden' and 'z-index: -1' breaks layout in iOS
  224. .fcbtn:after {
  225. z-index: 0;
  226. opacity: 0.3;
  227. }
  228. }
  229. &.to-flip .back {
  230. transform: rotateY(0deg);
  231. }
  232. }
  233. }
  234. .installer, .invited, .nologin.error {
  235. // layout
  236. .main .row {
  237. @media(min-width: 510px) {
  238. .col-sm-offset-4 {
  239. margin-left: calc(50% - 240px);
  240. }
  241. .col-sm-4 {
  242. width: 480px;
  243. }
  244. }
  245. }
  246. }
  247. .nologin.error {
  248. .alert h2 {
  249. line-height: 1em;
  250. }
  251. }