xref: /template/ad-hominem/css/_search.less (revision fa17b5ed0d966cfffc3adfaedd7deaa5555daa68)
1/**
2 * This file provides styles for the search results page (?do=search)
3 * and the AJAX search popup.
4 */
5
6/* general
7********************************************************************/
8
9/* search hit in normal text */
10.dokuwiki .search_hit {
11	color: @ini_text;
12	background-color: __highlight__;
13}
14
15/* "nothing found" at search + media */
16.dokuwiki div.nothing {
17	margin-bottom: 1.4em;
18}
19
20/* search results page
21********************************************************************/
22
23/*____________ advanced search form ____________*/
24.dokuwiki .search-results-form fieldset.search-form {
25	width: 100%;
26	margin: 1em 0;
27
28	input[name="q"] {
29		width: 50%;
30	}
31
32	button.toggleAssistant {
33		float: right;
34	}
35
36	.advancedOptions {
37		padding: 1em 0;
38
39		> div {
40			display: inline-block;
41			position: relative;
42			margin: 0 0.5em;
43		}
44
45		div.toggle {
46			// default closed toggle state
47			div.current {
48				cursor: pointer;
49				max-width: 10em;
50				white-space: nowrap;
51				overflow: hidden;
52				text-overflow: ellipsis;
53
54				&::after {
55					content: '▼';
56					font-size: smaller;
57					color: @ini_text_alt;
58				}
59			}
60			div.changed {
61				font-weight: bold;
62			}
63			ul {
64				display: none;
65				position: absolute;
66				border: 1px solid @ini_border;
67				background-color: @ini_background;
68				padding: 0.25em 0.5em;
69				text-align: left;
70				min-width: 10em;
71				max-width: 15em;
72				max-height: 50vh;
73				overflow: auto;
74				z-index: 100;
75				li {
76					margin: 0.25em 0;
77					list-style: none;
78
79					a {
80						display: block;
81					}
82				}
83			}
84
85			// open toggle state
86			&.open {
87				div.current::after {
88					content: '▲';
89				}
90
91				ul {
92					display: block;
93				}
94			}
95		}
96	}
97}
98
99[dir=rtl] .search-results-form fieldset.search-form .advancedOptions {
100	div.toggle ul {
101		text-align: right;
102	}
103}
104
105/*____________ matching pagenames ____________*/
106
107.dokuwiki div.search_quickresult {
108	margin-bottom: 1.4em;
109
110	ul {
111		padding: 0;
112
113		li {
114			float: left;
115			width: 12em;
116			margin: 0 1.5em;
117		}
118	}
119}
120
121[dir=rtl] .dokuwiki div.search_quickresult ul li {
122	float: right;
123}
124
125/*____________ search results ____________*/
126
127.dokuwiki dl.search_results {
128	margin-bottom: 1.2em;
129
130	/* search heading */
131	dt {
132		font-weight: normal;
133		margin-bottom: .2em;
134	}
135
136	/* last modified line */
137	dd.meta {
138		margin: 0 0 .2em 0;
139	}
140
141	/* search snippet */
142	dd.snippet {
143		color: @ini_text_alt;
144		background-color: inherit;
145		margin: 0 0 1.2em 0;
146
147		/* search hit in search results */
148		strong.search_hit {
149			font-weight: normal;
150			/* color is set in general */
151		}
152
153		/* ellipsis separating snippets */
154		.search_sep {
155			color: @ini_text;
156			background-color: inherit;
157		}
158	}
159}
160
161/* AJAX quicksearch popup
162********************************************************************/
163
164.dokuwiki form.search {
165	div.no {
166		position: relative;
167	}
168
169	/* .JSpopup */
170	div.ajax_qsearch {
171		position: absolute;
172		top: 0;
173		left: -13.5em; /* -( width of #qsearch__in + padding of .ajax_qsearch + a bit more ) */
174		width: 12em;
175		padding: 0.5em;
176		font-size: .9em;
177		z-index: 20;
178		text-align: left;
179		display: none;
180
181		strong {
182			display: block;
183			margin-bottom: .3em;
184		}
185
186		ul {
187			margin: 0 !important;
188			padding: 0 !important;
189
190			li {
191				margin: 0;
192				padding: 0;
193				display: block !important;
194			}
195		}
196	}
197}
198
199[dir=rtl] .dokuwiki form.search div.ajax_qsearch {
200	left: auto;
201	/*right: -13.5em;*/
202	text-align: right;
203}