_login.scss 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  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. .collapse-oauth {
  86. overflow: hidden;
  87. &:not(.in) {
  88. height: 0;
  89. padding: 0 !important;
  90. }
  91. form {
  92. flex: 1;
  93. @media(min-width: 350px) {
  94. flex: 0.49;
  95. }
  96. }
  97. .spacer {
  98. height: 10px;
  99. }
  100. }
  101. // button style
  102. .btn-login.fcbtn, .btn-register.fcbtn, .btn-login-oauth.fcbtn, .btn-collapse-oauth {
  103. border: none;
  104. color: white;
  105. background-color: rgba(lighten(black, 20%), 0.4);
  106. .btn-label {
  107. margin: -8px 20px -8px -20px;
  108. padding: 9px 15px;
  109. }
  110. &:focus {
  111. border: none;
  112. }
  113. }
  114. .btn-login-oauth {
  115. flex: 1;
  116. .btn-label-text {
  117. flex: 1;
  118. }
  119. }
  120. .btn-login.fcbtn {
  121. .btn-label {
  122. background-color: rgba($brand-danger, 0.4);
  123. }
  124. &:after {
  125. background-color: #7e4153;
  126. }
  127. }
  128. .btn-login-oauth.fcbtn#google {
  129. .btn-label {
  130. background: rgba(#f13d25, 0.4);
  131. }
  132. &:after {
  133. background-color: #555;
  134. }
  135. }
  136. .btn-login-oauth.fcbtn#github {
  137. .btn-label {
  138. background-color: rgba(#24292e, 0.4);
  139. }
  140. &:after {
  141. background-color: #555;
  142. }
  143. }
  144. .btn-login-oauth.fcbtn#facebook {
  145. .btn-label {
  146. background-color: rgba(#29487d, 0.4);
  147. }
  148. &:after {
  149. background-color: #555;
  150. }
  151. }
  152. .btn-login-oauth.fcbtn#twitter {
  153. .btn-label {
  154. background-color: rgba(#1da1f2, 0.4);
  155. }
  156. &:after {
  157. background-color: #555;
  158. }
  159. }
  160. .btn-login-oauth.fcbtn#saml {
  161. .btn-label {
  162. background-color: rgba(#55a79a, 0.4);
  163. }
  164. &:after {
  165. background-color: #555;
  166. }
  167. }
  168. .btn-register.fcbtn {
  169. .btn-label {
  170. background-color: rgba($brand-success, 0.4);
  171. }
  172. &:after {
  173. background-color: #3f7263;
  174. }
  175. }
  176. hr {
  177. margin: 10px 0;
  178. border-color: #ccc;
  179. }
  180. // footer link text
  181. .link-growi-org {
  182. color: rgba(black, 0.4);
  183. font-weight: bold;
  184. font-size: smaller;
  185. &, .growi, .org {
  186. transition: color 0.8s;
  187. }
  188. &:hover, &.focus {
  189. color: black;
  190. .growi {
  191. color: darken($growi-green, 20%);
  192. }
  193. .org {
  194. color: darken($growi-blue, 15%);
  195. }
  196. }
  197. }
  198. .link-switch {
  199. color: $gray-lighter;
  200. &:hover {
  201. color: white;
  202. }
  203. }
  204. }
  205. .login-page {
  206. // layout
  207. .main .row {
  208. @media(min-width: 350px) {
  209. .col-sm-offset-4 {
  210. margin-left: calc(50% - 160px);
  211. }
  212. .col-sm-4 {
  213. width: 320px;
  214. }
  215. }
  216. }
  217. .link-growi-org {
  218. position: absolute;
  219. z-index: 2;
  220. bottom: 9px;
  221. }
  222. // flip animation
  223. .login-dialog.flipper {
  224. transition: min-height 0.2s;
  225. &.to-flip {
  226. min-height: 295px;
  227. // has-error
  228. &.has-error {
  229. min-height: #{295px + 32px};
  230. }
  231. }
  232. .front, .back {
  233. transition: 0.4s;
  234. backface-visibility: hidden;
  235. transform-style: preserve-3d;
  236. // fix https://github.com/weseek/growi/issues/330
  237. -webkit-backface-visibility: hidden;
  238. -webkit-transform-style: preserve-3d;
  239. }
  240. .front {
  241. z-index: 2;
  242. }
  243. .back {
  244. position: absolute;
  245. top: 0;
  246. left: 15px;
  247. right: 15px;
  248. }
  249. .back,
  250. &.to-flip .front {
  251. transform: rotateY(180deg);
  252. // fix https://github.com/weseek/growi/issues/330
  253. // 'backface-visibility: hidden' and 'z-index: -1' breaks layout in iOS
  254. .fcbtn:after {
  255. z-index: 0;
  256. opacity: 0.3;
  257. }
  258. }
  259. &.to-flip .back {
  260. transform: rotateY(0deg);
  261. }
  262. }
  263. }
  264. .installer, .invited, .nologin.error {
  265. // layout
  266. .main .row {
  267. @media(min-width: 510px) {
  268. .col-sm-offset-4 {
  269. margin-left: calc(50% - 240px);
  270. }
  271. .col-sm-4 {
  272. width: 480px;
  273. }
  274. }
  275. }
  276. }
  277. .nologin.error {
  278. .alert h2 {
  279. line-height: 1em;
  280. }
  281. }