Skip to content

Commit

Permalink
Improved website
Browse files Browse the repository at this point in the history
  • Loading branch information
caderek committed Oct 15, 2021
1 parent 76940a0 commit 84da881
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 24 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ example-responses
example.txt
coverage
bin
assets/css/*.css
assets/css/*.css
assets/css/*.css.map
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ First stable release.

- Fixed CORS in JS API (browser)

## 1.4.6
## 1.4.6 - 1.4.7

- Bundles (esm, esm-min, iife)
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,9 @@ npm i gramma -g

If you prefer a single binary file, you can download it for the most popular platforms:

<!--BIN-->

- [gramma-linux64-v1.4.6.zip](https://github.com/caderek/gramma/releases/download/v1.4.6/gramma-linux64-v1.4.6.zip)
- [gramma-macos-v1.4.6.zip](https://github.com/caderek/gramma/releases/download/v1.4.6/gramma-macos-v1.4.6.zip)
- [gramma-windows64-v1.4.6.zip](https://github.com/caderek/gramma/releases/download/v1.4.6/gramma-windows64-v1.4.6.zip)

<!--/BIN-->
- [gramma-linux64-v1.4.7.zip](https://github.com/caderek/gramma/releases/download/v1.4.7/gramma-linux64-v1.4.7.zip)
- [gramma-macos-v1.4.7.zip](https://github.com/caderek/gramma/releases/download/v1.4.7/gramma-macos-v1.4.7.zip)
- [gramma-windows64-v1.4.7.zip](https://github.com/caderek/gramma/releases/download/v1.4.7/gramma-windows64-v1.4.7.zip)

After downloading and unpacking the binary, add it to your PATH or create a symlink to your executable directory (depending on the platform).

Expand Down
12 changes: 6 additions & 6 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#157878">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- <link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}"> -->
<link rel="stylesheet" href="https://caderek.github.io/gramma/assets/css/style.css?v=01079cd29d3372d7dd9bcddd99fefd1985c256e0">
<link rel="stylesheet" href="/assets/css/style.css">
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<!-- <link rel="stylesheet" href="/assets/css/style.css"> -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/[email protected]/devicon.min.css">
</head>
<body>
<div class="version">v1.4.7</div>
<header class="page-header" role="banner">
<a href="https://github.com/caderek/gramma" class="download__link">
<div class="download">
Expand All @@ -36,19 +36,19 @@
<p>View on NPM</p>
</div>
</a>
<a href="https://github.com/caderek/gramma/releases/download/v1.4.6/gramma-linux64-v1.4.6.zip" class="download__link">
<a href="https://github.com/caderek/gramma/releases/download/v1.4.7/gramma-linux64-v1.4.7.zip" class="download__link">
<div class="download">
<i class="devicon-linux-plain"></i>
<p>Download for Linux</p>
</div>
</a>
<a href="https://github.com/caderek/gramma/releases/download/v1.4.6/gramma-windows64-v1.4.6.zip" class="download__link">
<a href="https://github.com/caderek/gramma/releases/download/v1.4.7/gramma-windows64-v1.4.7.zip" class="download__link">
<div class="download">
<i class="devicon-windows8-original"></i>
<p>Download for Windows</p>
</div>
</a>
<a href="https://github.com/caderek/gramma/releases/download/v1.4.6/gramma-macos-v1.4.6.zip" class="download__link">
<a href="https://github.com/caderek/gramma/releases/download/v1.4.7/gramma-macos-v1.4.7.zip" class="download__link">
<div class="download">
<i class="devicon-apple-original"></i>
<p>Download for MacOS</p>
Expand Down
8 changes: 8 additions & 0 deletions assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,11 @@ body {
.divider {
display: none;
}

.version {
color: white;
position: absolute;
top: 10px;
right: 15px;
font-size: 24px;
}
19 changes: 10 additions & 9 deletions scripts/zipBinaries.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,23 @@ const main = () => {
console.log(`Zip file for ${folder} created!`)
})

const links = folders
.map(
(name) =>
`- [gramma-${name}-v${version}.zip](https://github.com/caderek/gramma/releases/download/v${version}/gramma-${name}-v${version}.zip)`,
)
.join("\n")

const docs = `<!--BIN-->\n\n${links}\n\n<!--/BIN-->`
const versionRegex = /v\d\.\d\.\d/g

const readme = fs
.readFileSync("README.md")
.toString()
.replace(/<!--BIN-->(.|\n)+<!--\/BIN-->/, docs)
.replace(versionRegex, `v${version}`)

fs.writeFileSync("README.md", readme)
console.log("README links updated!")

const website = fs
.readFileSync("_layouts/default.html")
.toString()
.replace(versionRegex, `v${version}`)

fs.writeFileSync("_layouts/default.html", website)
console.log("Website links updated!")
}

main()

0 comments on commit 84da881

Please sign in to comment.