Skip to content

Commit

Permalink
templates: move rel="stylesheet" first
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Jun 13, 2020
1 parent 4d911e7 commit 2b317aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions test/test_helpers.js
Expand Up @@ -147,15 +147,15 @@ function assertAuthors(res, cb) {
}

function cssHTML(uri, sri) {
return htmlEncode(`<link href="${uri}" rel="stylesheet" integrity="${sri}" crossorigin="anonymous">`);
return htmlEncode(`<link rel="stylesheet" href="${uri}" integrity="${sri}" crossorigin="anonymous">`);
}

function cssPug(uri, sri) {
return htmlEncode(`link(href="${uri}", rel="stylesheet", integrity="${sri}", crossorigin="anonymous")`);
return htmlEncode(`link(rel="stylesheet", href="${uri}", integrity="${sri}", crossorigin="anonymous")`);
}

function cssHAML(uri, sri) {
return htmlEncode(`%link{href: "${uri}", rel: "stylesheet", integrity: "${sri}", crossorigin: "anonymous"}`);
return htmlEncode(`%link{rel: "stylesheet", href: "${uri}", integrity: "${sri}", crossorigin: "anonymous"}`);
}

function jsHTML(uri, sri) {
Expand Down
6 changes: 3 additions & 3 deletions views/_partials/csscode.pug
Expand Up @@ -4,19 +4,19 @@
-var formId = `html_${name}`;
label.font-weight-bold(for=formId)
a(href='https://www.w3.org/html/', rel='noopener', target='_blank') HTML
input.form-control(id=formId, type='text', readonly, value=`<link href="${file}" rel="stylesheet" integrity="${sri}" crossorigin="anonymous">`)
input.form-control(id=formId, type='text', readonly, value=`<link rel="stylesheet" href="${file}" integrity="${sri}" crossorigin="anonymous">`)
span.form-text.text-muted Click to copy
.form-group
-var formId = `pug_${name}`;
label.font-weight-bold(for=formId)
a(href='https://pugjs.org/', rel='noopener', target='_blank') Pug
input.form-control(id=formId, type='text', readonly, value=`link(href="${file}", rel="stylesheet", integrity="${sri}", crossorigin="anonymous")`)
input.form-control(id=formId, type='text', readonly, value=`link(rel="stylesheet", href="${file}", integrity="${sri}", crossorigin="anonymous")`)
span.form-text.text-muted Click to copy
.form-group.mb-4
-var formId = `haml_${name}`;
label.font-weight-bold(for=formId)
a(href='http://haml.info/', rel='noopener', target='_blank') Haml
input.form-control(id=formId, type='text', readonly, value=`%link{href: "${file}", rel: "stylesheet", integrity: "${sri}", crossorigin: "anonymous"}`)
input.form-control(id=formId, type='text', readonly, value=`%link{rel: "stylesheet", href: "${file}", integrity: "${sri}", crossorigin: "anonymous"}`)
span.form-text.text-muted Click to copy

//- vim: ft=pug sw=4 sts=4 et:

0 comments on commit 2b317aa

Please sign in to comment.