File tree 3 files changed +19
-5
lines changed
3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 3
3
one : Land
4
4
many : Länder
5
5
other : Länder
6
- search-placeholder : Gib ein Land oder Bahnunternehmen ein
7
- search-button : Suchen
6
+ search-placeholder : Suche
8
7
footer-love :
9
8
text : Made with ♥️ in Frankfurt & Köln
10
9
aria-label : Made with love in Frankfurt & Köln
Original file line number Diff line number Diff line change 3
3
one : country
4
4
many : countries
5
5
other : countries
6
- search-placeholder : Type in a country or train operator
7
- search-button : Search
6
+ search-placeholder : Search
8
7
footer-love :
9
8
text : Made with ♥️ in Frankfurt & Cologne
10
9
aria-label : Made with love in Frankfurt & Cologne
Original file line number Diff line number Diff line change 1
1
< script >
2
2
window . addEventListener ( 'DOMContentLoaded' , ( event ) => {
3
- new PagefindUI ( { element : "#search" , highlightParam : "highlight" , showSubResults : true } ) ;
3
+ new PagefindUI ( {
4
+ element : "#search" ,
5
+ highlightParam : "highlight" ,
6
+ showSubResults : true ,
7
+ translations : {
8
+ placeholder : '{{ print (T "search-placeholder") " (CTRL + K)" }}'
9
+ }
10
+ } ) ;
11
+ } ) ;
12
+ document . addEventListener ( 'keydown' , ( e ) => {
13
+ if ( e . ctrlKey && e . key === 'k' ) {
14
+ e . preventDefault ( ) ;
15
+ const searchElement = document . querySelector ( '#search input' ) ;
16
+ if ( searchElement ) {
17
+ searchElement . focus ( ) ;
18
+ }
19
+ }
4
20
} ) ;
5
21
</ script >
6
22
You can’t perform that action at this time.
0 commit comments