_login.scss 5.9 KB

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