_navigation.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. // Separator for navigation items
  2. @mixin nav-item-separator {
  3. border-bottom: 1px solid $border-grey;
  4. }
  5. #navigation-topheader {
  6. display: flex;
  7. flex-direction: row;
  8. align-items: center;
  9. justify-content: center;
  10. z-index: 21;
  11. box-shadow: -2px 2px 4px -2px rgba(0, 0, 0, .8);
  12. background-color: #424242;
  13. padding: 0 $main-padding 0 (2 * $main-padding);
  14. min-height: 68px;
  15. color: #ffffff;
  16. .my-identity {
  17. flex-grow: 1;
  18. width: 85%;
  19. span {
  20. display: inline-block;
  21. cursor: pointer;
  22. max-width: 100%;
  23. overflow: hidden;
  24. text-shadow: .5px .5px 1px rgba(0, 0, 0, .25);
  25. text-overflow: ellipsis;
  26. white-space: nowrap;
  27. font-size: 16pt;
  28. word-wrap: break-word;
  29. word-break: break-all;
  30. }
  31. }
  32. }
  33. #navigation-header {
  34. z-index: 18;
  35. box-shadow: -2px 2px 4px -2px rgba(0, 0, 0, .4);
  36. background-color: #f5f5f5;
  37. .main {
  38. display: flex;
  39. flex-direction: row;
  40. align-items: center;
  41. justify-content: flex-start;
  42. .md-nav-item {
  43. :first-of-type {
  44. margin-left: 0;
  45. }
  46. }
  47. .md-button {
  48. min-width: 42px;
  49. }
  50. }
  51. .search {
  52. $duration-opacity: .1s;
  53. $duration-height: .2s;
  54. transition: opacity $duration-opacity linear,
  55. max-height $duration-height ease-out $duration-opacity,
  56. visibility 0s linear $duration-height;
  57. visibility: hidden;
  58. opacity: 0;
  59. // Animation when disappearing
  60. max-height: 0;
  61. input {
  62. &[type='text'] {
  63. margin: 0;
  64. border: 1px solid #dddddd;
  65. border-radius: $material-radius;
  66. background-color: #ffffff;
  67. padding: $main-padding;
  68. width: 100%;
  69. box-sizing: border-box;
  70. .md-errors-spacer {
  71. display: none;
  72. }
  73. }
  74. }
  75. &.visible {
  76. transition: visibility 0s,
  77. max-height $duration-height ease-in,
  78. opacity $duration-opacity linear $duration-height;
  79. visibility: visible;
  80. opacity: 1;
  81. padding: $main-padding;
  82. // Animation when appearing
  83. max-height: 50px;
  84. }
  85. }
  86. }
  87. #navigation-conversations,
  88. #navigation-contacts {
  89. @include scrollbar;
  90. .empty {
  91. margin-top: 1em;
  92. margin-left: 16px;
  93. color: $material-grey;
  94. font-size: 1.2em;
  95. font-weight: 300;
  96. }
  97. }
  98. #navigation-conversations {
  99. $border-width: 4px;
  100. $border-count: 2;
  101. flex: 1;
  102. background-color: #ffffff;
  103. overflow-y: auto;
  104. .loading-element {
  105. margin-top: 50px;
  106. }
  107. .conversation-wrapper {
  108. @include nav-item-separator;
  109. display: block;
  110. .conversation {
  111. display: flex;
  112. flex-direction: row;
  113. align-items: center;
  114. border-left: $border-width * $border-count solid #ffffff;
  115. padding: (1.5 * $main-padding) $main-padding - ($border-width * ($border-count - 1));
  116. &.active,
  117. &:hover {
  118. border-color: $dark-background-color;
  119. background-color: $dark-background-color;
  120. }
  121. &:hover {
  122. &:not(.active) {
  123. cursor: pointer;
  124. }
  125. }
  126. // Only unread
  127. &.unread {
  128. border-image: linear-gradient(
  129. to right,
  130. $status-error,
  131. $status-error 50%,
  132. #ffffff 50%,
  133. #ffffff 100%
  134. ) 1 100%;
  135. &.active {
  136. border-image: linear-gradient(
  137. to right,
  138. $status-error,
  139. $status-error 50%,
  140. $dark-background-color 50%,
  141. $dark-background-color 100%
  142. ) 1 100%;
  143. }
  144. }
  145. // Only starred
  146. &.starred {
  147. border-image: linear-gradient(
  148. to right,
  149. $status-starred,
  150. $status-starred 50%,
  151. #ffffff 50%,
  152. #ffffff 100%
  153. ) 1 100%;
  154. &.active {
  155. border-image: linear-gradient(
  156. to right,
  157. $status-starred,
  158. $status-starred 50%,
  159. $dark-background-color 50%,
  160. $dark-background-color 100%
  161. ) 1 100%;
  162. }
  163. }
  164. // Both starred and unread
  165. &.starred.unread {
  166. border-image: linear-gradient(
  167. to right,
  168. $status-error,
  169. $status-error 50%,
  170. $status-starred 50%,
  171. $status-starred 100%
  172. ) 1 100%;
  173. }
  174. .avatar-box {
  175. position: relative;
  176. margin-right: 8px;
  177. .loading {
  178. position: absolute;
  179. }
  180. }
  181. .conversation-box {
  182. display: flex;
  183. flex-direction: column;
  184. flex-grow: 1;
  185. overflow: hidden;
  186. .receiver-box,
  187. .message-box {
  188. flex-wrap: nowrap;
  189. line-height: 1.4em;
  190. }
  191. .receiver-box {
  192. display: flex;
  193. flex-direction: row;
  194. flex-grow: 1;
  195. justify-content: space-between;
  196. color: #000000;
  197. font-weight: bold;
  198. .title {
  199. flex: 1;
  200. margin-right: $main-padding;
  201. overflow: hidden;
  202. text-overflow: ellipsis;
  203. white-space: nowrap;
  204. }
  205. .disabled {
  206. text-decoration: line-through;
  207. }
  208. .notification-settings {
  209. margin: 1px 0 0 4px;
  210. padding: 0;
  211. height: 20px;
  212. }
  213. }
  214. .message-box {
  215. flex-grow: 1;
  216. .latest-message {
  217. display: flex;
  218. flex-direction: row;
  219. align-items: center;
  220. justify-content: space-between;
  221. color: $material-grey;
  222. .left {
  223. display: flex;
  224. overflow: hidden;
  225. text-overflow: ellipsis;
  226. white-space: nowrap;
  227. }
  228. .right {
  229. flex-shrink: 0;
  230. margin-left: 24px;
  231. text-align: right;
  232. .draft {
  233. color: #c62828;
  234. }
  235. }
  236. .message-name,
  237. .message-text {
  238. line-height: 1.7em;
  239. }
  240. .message-name {
  241. &::after {
  242. margin-right: 4px;
  243. content: ':';
  244. }
  245. }
  246. .message-text {
  247. overflow: hidden;
  248. text-overflow: ellipsis;
  249. white-space: nowrap;
  250. }
  251. &.is-hidden {
  252. .no-hidden {
  253. display: none;
  254. }
  255. }
  256. &.is-typing {
  257. .no-typing {
  258. display: none;
  259. }
  260. }
  261. &.show-draft {
  262. .no-draft {
  263. display: none;
  264. }
  265. }
  266. &:not(.is-typing) {
  267. .typing {
  268. display: none;
  269. }
  270. }
  271. &:not(.show-draft) {
  272. .draft {
  273. display: none;
  274. }
  275. }
  276. &:not(.is-hidden) {
  277. .hidden {
  278. display: none;
  279. }
  280. }
  281. }
  282. }
  283. }
  284. .badge.unread-count {
  285. margin-left: 4px;
  286. border-radius: 5px;
  287. background-color: $status-error;
  288. padding: 0 5px;
  289. color: #ffffff;
  290. font-size: .9em;
  291. }
  292. }
  293. }
  294. }
  295. #navigation-contacts {
  296. flex: 1;
  297. overflow-y: scroll;
  298. .contact {
  299. @include nav-item-separator;
  300. display: flex;
  301. flex-direction: row;
  302. align-items: center;
  303. justify-content: flex-start;
  304. border-left: 4px solid #ffffff;
  305. padding: 12px 8px;
  306. .avatar-box {
  307. padding-right: 8px;
  308. }
  309. .left {
  310. display: flex;
  311. flex-direction: column;
  312. flex-grow: 1;
  313. }
  314. .right {
  315. display: flex;
  316. flex-direction: column;
  317. align-items: flex-end;
  318. }
  319. .name {
  320. font-weight: bold;
  321. }
  322. .nickname {
  323. font-size: .8em;
  324. }
  325. &:hover {
  326. background-color: #f5f5f5;
  327. cursor: pointer;
  328. }
  329. }
  330. .contact.inactive {
  331. opacity: .5;
  332. }
  333. .hide-inactive .contact.inactive {
  334. display: none;
  335. }
  336. }
  337. #navigation-fab {
  338. position: relative;
  339. md-icon {
  340. color: #ffffff;
  341. }
  342. .fab-button-add-contact {
  343. background-color: #d32f2f;
  344. }
  345. .fab-button-add-group {
  346. background-color: #ff9800;
  347. }
  348. .fab-button-add-distribution-list {
  349. background-color: #3f51b5;
  350. }
  351. }