fix menu, docs, and posts to work with strict Content-Security-Policy
When the Content-Security-Policy header has "style-src 'self';" inine style elements like style="display: none" are not honored by browsers, so style them display: none
This commit is contained in:
parent
99bd271b35
commit
438f011ff5
3 changed files with 8 additions and 3 deletions
|
@ -54,6 +54,11 @@ img {
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// hide menu checkbox with CSS
|
||||||
|
#menu-control {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
aside nav ul {
|
aside nav ul {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<input type="checkbox" style="display: none" id="menu-control" />
|
<input type="checkbox" id="menu-control" />
|
||||||
<main class="flex container">
|
<main class="flex container">
|
||||||
|
|
||||||
<aside class="book-menu fixed">
|
<aside class="book-menu fixed">
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
{{ template "toc" . }}
|
{{ template "toc" . }}
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{{ partial "docs/inject/body" . }}
|
{{ partial "docs/inject/body" . }}
|
||||||
{{ template "_internal/google_analytics_async.html" . }}
|
{{ template "_internal/google_analytics_async.html" . }}
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<input type="checkbox" style="display: none" id="menu-control" />
|
<input type="checkbox" id="menu-control" />
|
||||||
<main class="flex container">
|
<main class="flex container">
|
||||||
<aside class="book-menu fixed">
|
<aside class="book-menu fixed">
|
||||||
{{ partial "docs/menu" . }}
|
{{ partial "docs/menu" . }}
|
||||||
|
|
Loading…
Reference in a new issue