mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
clipboard: move head styles to stylesheet #286
to keep it all in place and maybe later use caching for partials
This commit is contained in:
parent
8ff2bbe9eb
commit
3b97db45e1
3 changed files with 11 additions and 13 deletions
|
@ -24,7 +24,7 @@
|
|||
{{- partial "stylesheet.html" . }}
|
||||
{{- partial "custom-header.html" . }}
|
||||
</head>
|
||||
<body class="mobile-support{{ if eq (.Scratch.Get "relearnOutputFormat") "PRINT" }} print{{ end }}" data-url="{{ .RelPermalink }}">
|
||||
<body class="mobile-support{{ if eq (.Scratch.Get "relearnOutputFormat") "PRINT" }} print{{ end }}{{- if .Site.Params.disableInlineCopyToClipBoard }} disableInlineCopyToClipboard{{ end }}" data-url="{{ .RelPermalink }}">
|
||||
<div id="body" class="default-animation">
|
||||
<div id="sidebar-overlay"></div>
|
||||
<div id="toc-overlay"></div>
|
||||
|
|
|
@ -12,18 +12,6 @@
|
|||
<link href="{{"css/ie.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
||||
<link href="{{"css/variant.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
||||
<link href="{{"css/print.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet"{{ if ne (.Scratch.Get "relearnOutputFormat") "PRINT" }} media="print"{{ end }}>
|
||||
{{- if .Site.Params.disableInlineCopyToClipBoard }}
|
||||
<style>
|
||||
:not(pre) > code.copy-to-clipboard-code + span.copy-to-clipboard-button {
|
||||
display: none;
|
||||
}
|
||||
:not(pre) > code.copy-to-clipboard-code {
|
||||
border-bottom-right-radius: 2px;
|
||||
border-top-right-radius: 2px;
|
||||
border-right-width: 1px;
|
||||
}
|
||||
</style>
|
||||
{{- end }}
|
||||
<script src="{{"js/variant.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}"></script>
|
||||
<script>
|
||||
{{ "// hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic:" | safeJS }}
|
||||
|
|
|
@ -980,6 +980,16 @@ pre .copy-to-clipboard-button {
|
|||
top: 4px;
|
||||
}
|
||||
|
||||
.disableInlineCopyToClipboard :not(pre) > code.copy-to-clipboard-code + span.copy-to-clipboard-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.disableInlineCopyToClipboard :not(pre) > code.copy-to-clipboard-code {
|
||||
border-bottom-right-radius: 2px;
|
||||
border-top-right-radius: 2px;
|
||||
border-right-width: 1px;
|
||||
}
|
||||
|
||||
#homelinks {
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 4px;
|
||||
|
|
Loading…
Reference in a new issue