_navigation.scss 9.6 KB

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