diff --git a/README.md b/README.md index ab1dca5..d0e6c85 100644 --- a/README.md +++ b/README.md @@ -410,6 +410,7 @@ These are frameworks that do not force you to apply their classes to many elemen A class-light variant of a CSS framework with classes. Made for Ruby on Rails. * [Repository](https://github.com/lazaronixon/sass-zero) ![GitHub stars](https://img.shields.io/github/stars/lazaronixon/sass-zero?style=flat-square) ![GitHub contributors](https://img.shields.io/github/contributors-anon/lazaronixon/sass-zero?style=flat-square) ![Last commit](https://img.shields.io/github/last-commit/lazaronixon/sass-zero?style=flat-square) ![GitHub open issues](https://img.shields.io/github/issues-raw/lazaronixon/sass-zero?style=flat-square) ![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/lazaronixon/sass-zero?style=flat-square) + [![sass-zero.png](thumbnail/sass-zero.png)](screenshot/sass-zero.png) diff --git a/gen-readme.ts b/gen-readme.ts index 1ab770f..dbda954 100755 --- a/gen-readme.ts +++ b/gen-readme.ts @@ -39,18 +39,25 @@ const renderItem = ( `[![${filename}](thumbnail/${filename})](screenshot/${filename})` ).join("\n"); - return `### ${name}\n\n` + - (note === "" ? "" : `${note}\n\n`) + - (website === "" ? "" : `* [Website](${website})\n`) + - (github === "" - ? "" - : `* [Repository](https://github.com/${github}) ![GitHub stars](https://img.shields.io/github/stars/${github}?style=flat-square) ` + + const lines: string[] = []; + lines.push(`### ${name}`, ""); + if (note !== "") { + lines.push(note, ""); + } + if (website !== "") lines.push(`* [Website](${website})`); + if (github !== "") { + lines.push( + `* [Repository](https://github.com/${github}) ![GitHub stars](https://img.shields.io/github/stars/${github}?style=flat-square) ` + `![GitHub contributors](https://img.shields.io/github/contributors-anon/${github}?style=flat-square) ` + `![Last commit](https://img.shields.io/github/last-commit/${github}?style=flat-square) ` + `![GitHub open issues](https://img.shields.io/github/issues-raw/${github}?style=flat-square) ` + - `![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/${github}?style=flat-square)\n`) + - (demo === "" ? "" : `* [Demo](${demo})\n\n`) + - screenshotMarkdown; + `![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/${github}?style=flat-square)`, + ); + } + if (demo !== "") lines.push(`* [Demo](${demo})`); + lines.push("", screenshotMarkdown); + + return lines.join("\n"); }; try {