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