]>
Commit | Line | Data |
---|---|---|
8cbc40b2 C |
1 | @use 'sass:math'; |
2 | @use '_variables' as *; | |
3 | @use '_mixins' as *; | |
66b16caf | 4 | |
b15fe00f K |
5 | $nav-preview-tab-height: 30px; |
6 | $base-padding: 15px; | |
b15fe00f K |
7 | $input-border-radius: 3px; |
8 | ||
3031971e C |
9 | .root { |
10 | display: flex; | |
11 | flex-direction: column; | |
b15fe00f | 12 | |
3031971e C |
13 | textarea { |
14 | @include peertube-textarea(100%, 150px); | |
b15fe00f | 15 | |
3031971e | 16 | background-color: pvar(--markdownTextareaBackgroundColor); |
f33dc6ab | 17 | |
3031971e C |
18 | font-family: monospace; |
19 | font-size: 13px; | |
20 | border-bottom: 0; | |
21 | border-bottom-left-radius: 0; | |
22 | border-bottom-right-radius: 0; | |
23 | } | |
a077482f | 24 | |
3031971e C |
25 | .nav-preview { |
26 | padding: 10px; | |
27bc9586 | 27 | |
3031971e C |
28 | border: 1px solid $input-border-color; |
29 | border-top: 1px dashed $input-border-color; | |
b15fe00f | 30 | |
3031971e C |
31 | border-bottom-right-radius: $input-border-radius; |
32 | border-bottom-left-radius: $input-border-radius; | |
b15fe00f | 33 | |
3031971e C |
34 | display: flex; |
35 | flex-grow: 1; | |
36 | border-bottom-left-radius: unset; | |
37 | border-bottom-right-radius: unset; | |
38 | border-bottom: 2px solid pvar(--mainColor); | |
b15fe00f | 39 | |
3031971e C |
40 | .maximize-button { |
41 | @include margin-left(15px); | |
66b16caf | 42 | |
3031971e C |
43 | opacity: 0.6; |
44 | cursor: default; | |
a077482f | 45 | |
3031971e C |
46 | &:not(.disabled) { |
47 | cursor: pointer; | |
66b16caf | 48 | |
3031971e C |
49 | &:hover, |
50 | &:active { | |
51 | opacity: 1; | |
52 | } | |
53 | } | |
b15fe00f K |
54 | } |
55 | } | |
b15fe00f | 56 | |
3031971e C |
57 | .nav-pills { |
58 | display: flex; | |
59 | align-items: center; | |
60 | justify-content: flex-end; | |
b15fe00f | 61 | |
3031971e C |
62 | > * { |
63 | font-size: 0.9em !important; | |
64 | } | |
65 | } | |
931d3430 | 66 | |
3031971e C |
67 | .tab-content { |
68 | min-height: 75px; | |
69 | max-height: 210px; | |
70 | padding: $base-padding; | |
b15fe00f | 71 | |
3031971e C |
72 | overflow-y: auto; |
73 | word-wrap: break-word; | |
27bc9586 | 74 | |
3031971e | 75 | border: 1px solid $input-border-color; |
931d3430 | 76 | border-top: 0; |
b15fe00f | 77 | |
3031971e C |
78 | border-bottom-left-radius: $input-border-radius; |
79 | border-bottom-right-radius: $input-border-radius; | |
b15fe00f K |
80 | } |
81 | ||
3031971e C |
82 | &.maximized { |
83 | z-index: #{z(header) - 1}; | |
84 | position: fixed; | |
85 | top: $header-height; | |
86 | left: $menu-width; | |
b15fe00f | 87 | |
b15fe00f K |
88 | max-height: none !important; |
89 | max-width: none !important; | |
3031971e C |
90 | width: calc(100% - #{$menu-width}); |
91 | height: calc(100vh - #{$header-height}); | |
b15fe00f | 92 | |
3031971e C |
93 | display: grid; |
94 | grid-template-rows: auto 1fr; | |
95 | grid-template-columns: 1fr 1fr; | |
b15fe00f | 96 | |
3031971e | 97 | background-color: pvar(--mainBackgroundColor); |
b15fe00f | 98 | |
b15fe00f | 99 | .nav-preview { |
3031971e C |
100 | grid-row: 1; |
101 | grid-column: 1 / 3; | |
b15fe00f | 102 | |
3031971e C |
103 | border: 0; |
104 | border-bottom: 2px solid pvar(--mainColor); | |
b15fe00f | 105 | |
3031971e C |
106 | padding: 20px 0; |
107 | width: 100% !important; | |
b15fe00f | 108 | |
3031971e C |
109 | .maximize-button { |
110 | @include margin-right(15px); | |
b15fe00f K |
111 | } |
112 | } | |
b15fe00f | 113 | |
3031971e C |
114 | textarea { |
115 | grid-column: 1; | |
116 | ||
117 | border: 0; | |
118 | border-right: 1px dashed $input-border-color; | |
119 | ||
120 | resize: none; | |
b15fe00f K |
121 | } |
122 | ||
123 | ::ng-deep .tab-content { | |
3031971e | 124 | grid-column: 2; |
b15fe00f | 125 | |
3031971e | 126 | border: 0; |
b15fe00f | 127 | |
b15fe00f | 128 | display: block; |
3031971e C |
129 | overflow-y: auto; |
130 | word-wrap: break-word; | |
b15fe00f | 131 | |
3031971e | 132 | scrollbar-color: pvar(--actionButtonColor) pvar(--mainBackgroundColor); |
b15fe00f | 133 | } |
b15fe00f | 134 | |
3031971e C |
135 | textarea, |
136 | ::ng-deep .tab-content { | |
137 | grid-row: 2; | |
b15fe00f | 138 | |
3031971e C |
139 | height: 100% !important; |
140 | max-height: none !important; | |
141 | border-radius: 0; | |
b15fe00f | 142 | |
3031971e C |
143 | padding: 15px; |
144 | } | |
145 | ||
146 | @media screen and (max-width: $mobile-view) { | |
147 | grid-template-rows: auto 45% 1fr; | |
148 | grid-template-columns: 1fr; | |
149 | ||
150 | .nav-preview { | |
151 | grid-column: 1; | |
152 | } | |
b15fe00f | 153 | |
3031971e C |
154 | textarea { |
155 | grid-row: 2; | |
156 | grid-column: 1; | |
157 | border: 0; | |
158 | border-bottom: 1px dashed $input-border-color;; | |
159 | } | |
931d3430 | 160 | |
3031971e C |
161 | ::ng-deep .tab-content { |
162 | grid-column: 1; | |
163 | grid-row: 3; | |
164 | } | |
165 | } | |
b15fe00f | 166 | } |
b15fe00f K |
167 | } |
168 | ||
3031971e C |
169 | :host-context(.main-col.expanded) { |
170 | .root.maximized { | |
171 | left: 0; | |
172 | width: 100%; | |
66b16caf C |
173 | } |
174 | } |