File tree Expand file tree Collapse file tree 7 files changed +119
-1
lines changed
Expand file tree Collapse file tree 7 files changed +119
-1
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,11 @@ async component Footer {
165165 "Packages"
166166 </a >
167167
168+ <a href = "/tools" >
169+ TablerIcons .TOOLS
170+ "Tools"
171+ </a >
172+
168173 <a href = "/from/" >
169174 TablerIcons .TRANSFORM
170175 "From … ?"
Original file line number Diff line number Diff line change @@ -77,6 +77,12 @@ component Header {
7777 label : "Packages" ,
7878 disabled : false ,
7979 target : "" ),
80+ MenuItem .Link (
81+ icon : TablerIcons .TOOLS ,
82+ href : "/tools" ,
83+ label : "Tools" ,
84+ disabled : false ,
85+ target : "" ),
8086 MenuItem .Divider ,
8187 MenuItem .Group (
8288 icon : TablerIcons .BOOK ,
Original file line number Diff line number Diff line change 1+ module Data {
2+ const TOOLS =
3+ [
4+ {
5+ description : "A code generation utility that converts OpenAPI 3.0 specifications into idiomatic Mint language client code." ,
6+ name : "mint-oapi-codegen" ,
7+ url : "https://github.com/saviorand/mint-oapi-codegen"
8+ }
9+ ]
10+ }
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ component Pages.Packages {
5858 "Here are some curated packages for your next project!"
5959
6060 if isMobile {
61- <></ >
61+ <span > " " </ span >
6262 } else {
6363 <br />
6464 }
Original file line number Diff line number Diff line change 1+ component Pages .Tools {
2+ connect Application exposing { isMobile }
3+
4+ // The tools to display.
5+ property tools : Array (Tool )
6+
7+ // Styles for the grid.
8+ style grid {
9+ grid-template-columns : repeat (auto-fill , minmax (300px , 1fr ));
10+ align-content : start ;
11+ grid-gap : 2em ;
12+ display : grid ;
13+
14+ if is Mobile {
15+ margin-top : 20px ;
16+ grid-gap : 15px ;
17+ }
18+ }
19+
20+ // Styles for the root element.
21+ style card {
22+ border : 1px solid var (--border-color );
23+ background : var (--background-color );
24+ text-decoration : none ;
25+ border-radius : 5px ;
26+ color : inherit ;
27+ min-width : 0 ;
28+
29+ & :hover {
30+ outline : 2px solid var (--color-mintgreen );
31+ outline-offset : 2px ;
32+ }
33+ }
34+
35+ // Style for the description.
36+ style description {
37+ font-size : 14px ;
38+ line-height : 1.5 ;
39+ color : var (--text-secondary-color );
40+
41+ padding : 10px ;
42+ padding-top : 5px ;
43+ }
44+
45+ // Styles for the title of the card.
46+ style title {
47+ font-weight : bold ;
48+ font-size : 18px ;
49+
50+ padding : 10px ;
51+ padding-bottom : 0 ;
52+ }
53+
54+ // Renders the component.
55+ fun render : Html {
56+ <div >
57+ <PageHero title = "Tools" >
58+ "Here are some curated tools for working with Mint!"
59+
60+ if isMobile {
61+ <span >" " </span >
62+ } else {
63+ <br />
64+ }
65+
66+ "To add your tool here reach out on "
67+
68+ ContentInstrumenter .instrument (
69+ <a href = "https://discord.gg/NXFUJs2" >"Discord" </a >)
70+
71+ "."
72+ </PageHero >
73+
74+ <div :: grid >
75+ for tool of tools {
76+ <a :: card href = {tool .url } target = "_blank" key = {tool .name }>
77+ <div :: title >tool .name </div >
78+ <div :: description >tool .description </div >
79+ </a >
80+ }
81+ </div >
82+ </div >
83+ }
84+ }
Original file line number Diff line number Diff line change @@ -33,6 +33,12 @@ routes {
3333 Packages .load (path )
3434 }
3535
36+ // Tools
37+ // ---------------------------------------------------------------------------
38+ /tools {
39+ Application .setPage (Page .Page ("Tools ", < Pages .Tools tools = {Data .TOOLS }/ >))
40+ }
41+
3642 // API documentation.
3743 // ---------------------------------------------------------------------------
3844 /api*path (path : String) await {
Original file line number Diff line number Diff line change @@ -212,6 +212,13 @@ type Package {
212212 url : String
213213}
214214
215+ // Data structure for a tool.
216+ type Tool {
217+ description : String ,
218+ name : String ,
219+ url : String
220+ }
221+
215222// Type for an item for a language comparison.
216223type FromItem {
217224 String (String )
You can’t perform that action at this time.
0 commit comments