diff --git a/licenses/ISC.ejs b/licenses/ISC.ejs index 0e6f7b8b..44fc3094 100644 --- a/licenses/ISC.ejs +++ b/licenses/ISC.ejs @@ -1,27 +1,26 @@ - <% include components/header %> - -
- <%- gravatar %> -

The ISC License (ISC)

-

Copyright © <%- info %>

+
+<%- gravatar %> +

The ISC License (ISC)

-

Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies.

+

Copyright © <%- info %>

-

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

-
- <% include components/footer %> +

Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies.

+ +

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

+
+<% include components/footer %> diff --git a/licenses/components/footer.ejs b/licenses/components/footer.ejs index 2107f147..4f857c83 100644 --- a/licenses/components/footer.ejs +++ b/licenses/components/footer.ejs @@ -1,3 +1,3 @@ diff --git a/licenses/components/header.ejs b/licenses/components/header.ejs index 290e278b..3ad2e4ab 100644 --- a/licenses/components/header.ejs +++ b/licenses/components/header.ejs @@ -1,40 +1,38 @@ - MIT License - - - - - - - - +--> + + + diff --git a/middleware/load-options.js b/middleware/load-options.js index d33cbe72..505c70ac 100644 --- a/middleware/load-options.js +++ b/middleware/load-options.js @@ -5,14 +5,12 @@ module.exports = (req, res, next) => { res.locals.options = parts.reduce( (acc, curr) => { - if (!curr) { - return acc; - } + if (!curr) return acc; let match = curr.match(/^@?(\d{4})$/) || []; if (match.length) { - // pinned year + // Pinned year if (curr.startsWith('@')) { acc.pinnedYear = parseInt(curr.substr(1), 10); } else { @@ -38,6 +36,13 @@ module.exports = (req, res, next) => { return acc; } + if (curr.startsWith('+')) { + acc.license = curr + .substr(1) + .toUpperCase(); + return acc; + } + acc.sha = curr; // not actually supported now - 2019-06-19 return acc; }, diff --git a/routes/get.js b/routes/get.js index 9a7447dd..120f7a26 100644 --- a/routes/get.js +++ b/routes/get.js @@ -58,7 +58,7 @@ module.exports = (req, res) => { const year = options.pinnedYear ? options.pinnedYear : [options.startYear, options.endYear].filter(Boolean).join('-'); - const license = (user.license || 'MIT').toUpperCase(); + const license = (options.license || user.license || 'MIT').toUpperCase(); const format = options.format || user.format || 'html'; const args = {