_login.scss 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  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. .fcbtn {
  105. position: relative;
  106. overflow: hidden;
  107. color: white;
  108. text-align: center;
  109. cursor: pointer;
  110. background-color: rgba(lighten(black, 20%), 0.4);
  111. border: none;
  112. .btn-label {
  113. position: relative;
  114. z-index: 1;
  115. color: white;
  116. text-decoration: none;
  117. }
  118. .btn-label-text {
  119. position: relative;
  120. z-index: 1;
  121. color: white;
  122. text-decoration: none;
  123. }
  124. // effect
  125. .eff {
  126. position: absolute;
  127. top: -50px;
  128. left: 0px;
  129. z-index: 0;
  130. width: 100%;
  131. height: 100%;
  132. transition: all 0.5s ease;
  133. }
  134. &:hover {
  135. .eff {
  136. top: 0;
  137. }
  138. }
  139. }
  140. // login
  141. .fcbtn.login {
  142. .btn-label {
  143. background-color: rgba($danger, 0.4);
  144. }
  145. .eff {
  146. background-color: rgba(#7e4153, 0.5);
  147. }
  148. }
  149. // google
  150. .fcbtn#google {
  151. .btn-label {
  152. background-color: rgba(#24292e, 0.4);
  153. }
  154. .eff {
  155. background-color: #555;
  156. }
  157. }
  158. // github
  159. .fcbtn#github {
  160. .btn-label {
  161. background-color: rgba(lighten(black, 20%), 0.4);
  162. }
  163. .eff {
  164. background-color: #555;
  165. }
  166. }
  167. // facebook
  168. .fcbtn#facebook {
  169. .btn-label {
  170. background-color: rgba(#29487d, 0.4);
  171. }
  172. .eff {
  173. background-color: #555;
  174. }
  175. }
  176. // twitter
  177. .fcbtn#twitter {
  178. .btn-label {
  179. background-color: rgba(#1da1f2, 0.4);
  180. }
  181. .eff {
  182. background-color: #555;
  183. }
  184. }
  185. // oidc
  186. .fcbtn#oidc {
  187. .btn-label {
  188. background-color: rgba(#24292e, 0.4);
  189. }
  190. .eff {
  191. background-color: #555;
  192. }
  193. }
  194. // saml
  195. .fcbtn#saml {
  196. .btn-label {
  197. background-color: rgba(#55a79a, 0.4);
  198. }
  199. .eff {
  200. background-color: #555;
  201. }
  202. }
  203. // basic
  204. .fcbtn#basic {
  205. .btn-label {
  206. background-color: rgba(#24292e, 0.4);
  207. }
  208. .eff {
  209. background-color: #555;
  210. }
  211. }
  212. // external-auth
  213. .btn-collapse-external-auth {
  214. color: white;
  215. background-color: rgba(lighten(black, 20%), 0.4);
  216. border: none;
  217. .btn-label {
  218. padding: 9px 15px;
  219. margin: -8px 20px -8px -20px;
  220. }
  221. &:focus {
  222. border: none;
  223. }
  224. }
  225. // register
  226. .fcbtn#register {
  227. .btn-label {
  228. background-color: rgba($success, 0.4);
  229. }
  230. .eff {
  231. background-color: rgba(#3f7263, 0.5);
  232. }
  233. }
  234. // footer link text
  235. .link-growi-org {
  236. font-size: smaller;
  237. font-weight: bold;
  238. color: rgba(black, 0.4);
  239. &,
  240. .growi,
  241. .org {
  242. transition: color 0.8s;
  243. }
  244. &:hover,
  245. &.focus {
  246. color: black;
  247. .growi {
  248. color: darken($growi-green, 20%);
  249. }
  250. .org {
  251. color: darken($growi-blue, 15%);
  252. }
  253. }
  254. }
  255. .link-switch {
  256. color: $gray-200;
  257. &:hover {
  258. color: white;
  259. }
  260. }
  261. }
  262. .login-page {
  263. // layout
  264. .main .row {
  265. @media (min-width: 350px) {
  266. .col-sm-offset-4 {
  267. margin-left: calc(50% - 160px);
  268. }
  269. .col-sm-4 {
  270. width: 320px;
  271. }
  272. }
  273. }
  274. .link-growi-org {
  275. position: absolute;
  276. bottom: 9px;
  277. z-index: 2;
  278. }
  279. // flip animation
  280. .login-dialog.flipper {
  281. transition: min-height 0.2s;
  282. &.to-flip {
  283. min-height: 295px;
  284. // has-error
  285. &.has-error {
  286. min-height: #{295px + 32px};
  287. }
  288. }
  289. .front,
  290. .back {
  291. transition: 0.4s;
  292. backface-visibility: hidden;
  293. transform-style: preserve-3d;
  294. // fix https://github.com/weseek/growi/issues/330
  295. -webkit-backface-visibility: hidden;
  296. -webkit-transform-style: preserve-3d;
  297. }
  298. .front {
  299. z-index: 2;
  300. }
  301. .back {
  302. position: absolute;
  303. top: 0;
  304. right: 15px;
  305. left: 15px;
  306. }
  307. .back,
  308. &.to-flip .front {
  309. transform: rotateY(180deg);
  310. // fix https://github.com/weseek/growi/issues/330
  311. // 'backface-visibility: hidden' and 'z-index: -1' breaks layout in iOS
  312. ::after {
  313. z-index: 0;
  314. opacity: 0.3;
  315. }
  316. }
  317. &.to-flip .back {
  318. transform: rotateY(0deg);
  319. }
  320. }
  321. }
  322. .invited,
  323. .nologin.error {
  324. .main .row {
  325. @media (min-width: 510px) {
  326. .col-sm-offset-4 {
  327. margin-left: calc(50% - 240px);
  328. }
  329. .col-sm-4 {
  330. width: 480px;
  331. }
  332. }
  333. }
  334. }
  335. .login-header,
  336. .login-dialog {
  337. max-width: 480px;
  338. }
  339. .nologin.error {
  340. .alert h2 {
  341. line-height: 1em;
  342. }
  343. }