@@ -52,6 +52,13 @@ const annotationCount = annotationsPage
52
52
</Tooltip >
53
53
</div >
54
54
55
+ <div class =" announcement" >
56
+ <a href =" #jetbrains-install" >
57
+ <span class =" tag" >NEW</span >
58
+ <span class =" description" >JetBrains IntelliJ Plugin</span >
59
+ </a >
60
+ </div >
61
+
55
62
<p >
56
63
The Lua Language Server uses the <ExternalLink
57
64
url =" https://microsoft.github.io/language-server-protocol/"
@@ -429,15 +436,20 @@ exec "<path-to-directory>/bin/lua-language-server" "$@"
429
436
}
430
437
431
438
// If URL is targeting a specific install method, set it as active and scroll to it.
432
- const target = window.location.hash;
433
- if (target) {
434
- const tabName = target.replace("#", "");
435
- const tab = document.querySelector(`#install .tab-content #${tabName}`);
436
- if (tab) {
437
- setTabActive(tabName);
438
- tabs[tabName].content?.scrollIntoView();
439
+ const onHashChange = () => {
440
+ const target = window.location.hash;
441
+ if (target) {
442
+ const tabName = target.replace("#", "");
443
+ const tab = document.querySelector(`#install .tab-content #${tabName}`);
444
+ if (tab) {
445
+ setTabActive(tabName);
446
+ tabs[tabName].content?.scrollIntoView();
447
+ }
439
448
}
440
- }
449
+ };
450
+
451
+ onHashChange();
452
+ window.addEventListener("hashchange", onHashChange);
441
453
</script >
442
454
443
455
<style lang =" scss" >
@@ -509,6 +521,44 @@ exec "<path-to-directory>/bin/lua-language-server" "$@"
509
521
}
510
522
}
511
523
524
+ .announcement {
525
+ width: fit-content;
526
+ margin: 1em auto auto auto;
527
+ border: 0.1em #2d8ae3 solid;
528
+ border-radius: 99em;
529
+ background-color: #16436e00;
530
+ box-shadow: #16436e 0px 0px 0.5em 0px;
531
+
532
+ a {
533
+ color: white;
534
+ }
535
+
536
+ span {
537
+ padding: 0.1em 0.5em;
538
+ }
539
+
540
+ span.tag {
541
+ background-color: #2d8ae3;
542
+ border-radius: 1em 0px 0px 1em;
543
+ position: relative;
544
+ padding-left: 0.75em;
545
+
546
+ &::after {
547
+ content: "";
548
+ position: absolute;
549
+ top: 0px;
550
+ right: -0.25em;
551
+ width: 0.25em;
552
+ height: 100%;
553
+ background: linear-gradient(90deg, #2d8ae3, #00000000);
554
+ }
555
+ }
556
+
557
+ span.description {
558
+ margin: 0px 0.25em;
559
+ }
560
+ }
561
+
512
562
.quick-links {
513
563
margin-top: 2em;
514
564
grid-column: 1/3;
0 commit comments