Skip to content

Commit f8df081

Browse files
add LSP to downloads page (#3692)
* add LSP to downloads page * grouped download tables in div * add styling, fix text * improve letter casing Co-authored-by: Vladimir Panteleev <CyberShadow@users.noreply.github.com> --------- Co-authored-by: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
1 parent a9b478c commit f8df081

File tree

3 files changed

+99
-7
lines changed

3 files changed

+99
-7
lines changed

css/style.css

Lines changed: 73 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -718,41 +718,100 @@ td.param_desc
718718
font-style: italic;
719719
}
720720

721+
.download-tables > .download-compilers {
722+
flex-grow: 1;
723+
flex-shrink: 0;
724+
}
725+
726+
.download-tables {
727+
display: flex;
728+
gap: 2.5em;
729+
align-items: center;
730+
}
731+
732+
@media screen and (max-width: 65em) {
733+
.download-tables {
734+
flex-direction: column;
735+
}
736+
}
737+
738+
table.lsp {
739+
max-width: 30em;
740+
background-color: white;
741+
border: none;
742+
border-radius: 0.5em;
743+
border-top-left-radius: 0.25em;
744+
border-top-right-radius: 0.25em;
745+
/* TODO: currently with shadow, since it's new and shiny, make this fit with the other content eventually */
746+
box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 5px 7px rgba(0,0,0,0.2);
747+
position: relative;
748+
}
749+
750+
table.lsp tbody > tr:nth-child(1) > td:before {
751+
display: block;
752+
content: "";
753+
position: absolute;
754+
top: 0;
755+
left: 0;
756+
width: 100%;
757+
height: 0.5em;
758+
background-color: #B03931;
759+
border-top-left-radius: 0.25em;
760+
border-top-right-radius: 0.25em;
761+
}
762+
763+
table.lsp img {
764+
background-color: white;
765+
border-radius: 0.5em;
766+
padding: 0.5em;
767+
}
768+
769+
table.lsp td {
770+
padding: 1em;
771+
}
772+
773+
table.lsp tbody > tr:nth-child(1) > td {
774+
padding-bottom: 0;
775+
padding-top: 1.5em;
776+
}
777+
721778
table.download-compilers
722779
{
723780
width: 100%;
724781
max-width: 50em;
725782
table-layout: fixed;
726783
}
727784

728-
table.download-compilers td
785+
.download-tables table td
729786
{
730787
border: none;
731788
}
732789

733-
table.download-compilers h2
790+
.download-tables h2
734791
{
735792
margin: 0;
793+
margin-bottom: 4pt;
794+
text-align: center;
736795
}
737796

738-
table.download-compilers > tbody > tr:first-child > td
797+
.download-tables table > tbody > tr:first-child > td
739798
{
740799
text-align: center;
741800
vertical-align: middle;
742801
}
743802

744-
table.download-compilers > tbody > tr:nth-child(2) > td
803+
.download-tables table > tbody > tr:nth-child(2) > td
745804
{
746805
text-align: left;
747806
}
748807

749-
table.download-compilers > tbody > tr:nth-child(2) > td > ul
808+
.download-tables table > tbody > tr:nth-child(2) > td > ul
750809
{
751810
margin-bottom: 0;
752811
padding-left: 1em;
753812
}
754813

755-
table.download-compilers div.download-link
814+
.download-tables table div.download-link
756815
{
757816
text-align: center;
758817
margin-bottom: 1em;
@@ -763,7 +822,14 @@ table.download-compilers img
763822
width: 100%;
764823
}
765824

766-
table.download-compilers h3
825+
table.lsp img
826+
{
827+
width: 100%;
828+
max-width: 8em;
829+
margin: 0;
830+
}
831+
832+
.download-tables table h3
767833
{
768834
margin-top: 0;
769835
text-align: center;

download.dd

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ Ddoc
22

33
$(D_S Downloads,
44

5+
$(DIVC download-tables,
6+
57
$(TABLEC download-compilers,
68
$(T caption,
79
$(DIVID download-choose, ($(LINK2 https://wiki.dlang.org/Compilers, more information)))
@@ -60,6 +62,30 @@ $(TABLEC download-compilers,
6062
)
6163
)
6264

65+
$(TABLEC lsp,
66+
$(TR
67+
$(TD $(LINK2 https://github.com/Pure-D/serve-d/#usage, $(IMG lsp-served-logo.png)))
68+
)
69+
$(TR
70+
$(TD
71+
$(H3 Language Server)
72+
$(P
73+
To start coding effectively, we recommend using an editor supporting the
74+
Language Server Protocol. For $(B VSCode) you can immediately install the
75+
$(LINK2 https://marketplace.visualstudio.com/items?itemName=webfreak.code-d, VSCode extension $(B code-d))
76+
<sup>$(LINK2 https://open-vsx.org/extension/webfreak/code-d, [openvsx])</sup>
77+
)
78+
)
79+
)
80+
$(TR
81+
$(TD
82+
$(DIVC download-link, $(LINK2 https://github.com/Pure-D/serve-d/#usage, About) &middot; $(LINK2 https://github.com/Pure-D/serve-d/releases, Download))
83+
)
84+
)
85+
)
86+
87+
)
88+
6389
$(DIVC download_channels,
6490
$(DIVC download_channel,
6591
$(H2 $(LNAME2 dmd,DMD $(DMDV2)))

images/lsp-served-logo.png

22.8 KB
Loading

0 commit comments

Comments
 (0)