Update Git info CSS (#10496)
parent
207aa49500
commit
4a6a022e61
|
@ -15,85 +15,13 @@
|
|||
<section id="encyclopedia">
|
||||
{{ block "side-menu" . }}<div id="docsToc" style="display:none;"></div>{{ end }}
|
||||
<div id="{{ block "content-id" . }}docsContent{{ end }}">
|
||||
{{ block "content" . }}{{ end }}
|
||||
{{ if not .Params.hide_feedback }}
|
||||
<h2>Feedback</h2>
|
||||
<p class="feedback--prompt">Was this page helpful?</p>
|
||||
<button class="button feedback--yes">Yes</button>
|
||||
<button class="button feedback--no">No</button>
|
||||
<p class="feedback--response feedback--response__hidden">
|
||||
Thanks for the feedback. If you have a specific, answerable question about how to use Kubernetes,
|
||||
ask it on <a target="_blank" rel="noopener"
|
||||
href="https://stackoverflow.com/questions/tagged/kubernetes">Stack Overflow</a>. Open
|
||||
an issue in the GitHub repo if you want to <a class="feedback--link" target="_blank" rel="noopener"
|
||||
href="https://github.com/kubernetes/website/issues/new?title=Issue%20with%20k8s.io">report a problem</a> or
|
||||
<a class="feedback--link" target="_blank" rel="noopener"
|
||||
href="https://github.com/kubernetes/website/issues/new?title=Improvement%20for%20k8s.io">suggest an improvement</a>.
|
||||
</p>
|
||||
<script>
|
||||
const yes = document.querySelector('.feedback--yes');
|
||||
const no = document.querySelector('.feedback--no');
|
||||
document.querySelectorAll('.feedback--link').forEach(link => {
|
||||
link.href = link.href + window.location.pathname;
|
||||
});
|
||||
const sendFeedback = (value) => {
|
||||
if (!gtag) { console.log('!gtag'); }
|
||||
gtag('event', 'click', {
|
||||
'event_category': 'Helpful',
|
||||
'event_label': window.location.pathname,
|
||||
value
|
||||
});
|
||||
};
|
||||
const disableButtons = () => {
|
||||
yes.disabled = true;
|
||||
yes.classList.add('feedback--button__disabled');
|
||||
no.disabled = true;
|
||||
no.classList.add('feedback--button__disabled');
|
||||
};
|
||||
yes.addEventListener('click', () => {
|
||||
sendFeedback(1);
|
||||
disableButtons();
|
||||
document.querySelector('.feedback--response').classList.remove('feedback--response__hidden');
|
||||
});
|
||||
no.addEventListener('click', () => {
|
||||
sendFeedback(0);
|
||||
disableButtons();
|
||||
document.querySelector('.feedback--response').classList.remove('feedback--response__hidden');
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ block "content" . }}{{ end }}
|
||||
|
||||
{{ partial "feedback.html" . }}
|
||||
|
||||
{{ partial "git-info.html" . }}
|
||||
</div>
|
||||
</section>
|
||||
<div id="pre-footer"> <!-- This is at the bottom of every topic underneath the TOC and content -->
|
||||
<div class="issue-button-container">
|
||||
<p><a href=""><img src="https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/{{ .Path }}?pixel" alt="Analytics" /></a></p>
|
||||
{{ if and (ne .Kind "404") (not (strings.Contains .Path "search")) }}
|
||||
{{ if not .Params.no_issue }}
|
||||
<script type="text/javascript">
|
||||
PDRTJS_settings_8345992 = {
|
||||
"id" : "8345992",
|
||||
"unique_id" : "{{ .RelPermalink }}",
|
||||
"title" : "{{ .Title }}",
|
||||
"permalink" : "{{ .Permalink }}"
|
||||
};
|
||||
(function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/js/rating/rating.js':'http://i0.poll.fm/js/rating/rating.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-rating-js'));
|
||||
</script>
|
||||
<a href="" onclick="window.open('https://github.com/kubernetes/website/issues/new?title=Issue%20with%20' +
|
||||
'k8s.io'+window.location.pathname)" class="button issue">{{ T "main_github_create_an_issue" }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not .Params.noedit }}
|
||||
<a href="https://github.com/kubernetes/website/edit/master/content/{{ .Site.Language.Lang }}/{{ .File.Path }}" class="button issue">{{ T "main_edit_this_page" }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if not .Params.showcommit }}
|
||||
{{ if $.GitInfo }}
|
||||
<div id="lastedit" class="lastedit issue-button-container">
|
||||
{{ T "main_page_last_modified_on" }} {{ .GitInfo.AuthorDate.Format "January 02, 2006 at 3:04 PM PST" }} {{ T "main_by" }} <a href="https://github.com/kubernetes/website/commit/{{ .GitInfo.Hash }}/">{{ .GitInfo.Subject }}</a> (<a href="https://github.com/kubernetes/website/commits/master/content/en/{{ .File.Path }}">{{ T "main_page_history" }}</a>)
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ partialCached "footer.html" . }}
|
||||
{{ partialCached "footer-scripts.html" . }}
|
||||
<script language="application/javascript">
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{{ define "content" }}
|
||||
{{ with .Content }}
|
||||
{{ partial "docs/content_page" (dict "ctx" $ "page" $ ) }}
|
||||
{{ partial "docs/content-page" (dict "ctx" $ "page" $ ) }}
|
||||
{{ else }}
|
||||
{{ if ge (len .Pages) 1 }}
|
||||
{{ $page := index .Pages 0 }}
|
||||
{{ partial "docs/content_page" (dict "ctx" $ "page" $page) }}
|
||||
{{ partial "docs/content-page" (dict "ctx" $ "page" $page) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
{{ define "content" }}
|
||||
{{ partial "docs/content_page" (dict "ctx" . "page" .) }}
|
||||
{{ partial "docs/content-page" (dict "ctx" . "page" .) }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "side-menu" }}
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
<p><a href="https://github.com/kubernetes/website/edit/master/content/{{ .page.Lang }}/{{ .page.File.Path }}" id="editPageButton" target="_blank">Edit This Page</a></p>
|
||||
{{- $filepath := .page.File.Path }}
|
||||
{{- $editLink := printf "https://github.com/kubernetes/website/edit/master/content/en/%s" $filepath }}
|
||||
<p>
|
||||
<a href="{{ $editLink }}" id="editPageButton" target="_blank">
|
||||
Edit This Page
|
||||
</a>
|
||||
</p>
|
||||
{{ if not .page.Params.notitle }}
|
||||
<h1>{{ .page.Title }}</h1>
|
||||
{{ end }}
|
||||
|
@ -9,4 +15,4 @@
|
|||
{{ .page.TableOfContents }}
|
||||
{{ end }}
|
||||
{{ .page.Content }}
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -0,0 +1,46 @@
|
|||
{{ if not .Params.hide_feedback }}
|
||||
<h2>Feedback</h2>
|
||||
<p class="feedback--prompt">Was this page helpful?</p>
|
||||
<button class="button feedback--yes">Yes</button>
|
||||
<button class="button feedback--no">No</button>
|
||||
<p class="feedback--response feedback--response__hidden">
|
||||
Thanks for the feedback. If you have a specific, answerable question about how to use Kubernetes,
|
||||
ask it on <a target="_blank" rel="noopener"
|
||||
href="https://stackoverflow.com/questions/tagged/kubernetes">Stack Overflow</a>. Open
|
||||
an issue in the GitHub repo if you want to <a class="feedback--link" target="_blank" rel="noopener"
|
||||
href="https://github.com/kubernetes/website/issues/new?title=Issue%20with%20k8s.io">report a problem</a> or
|
||||
<a class="feedback--link" target="_blank" rel="noopener"
|
||||
href="https://github.com/kubernetes/website/issues/new?title=Improvement%20for%20k8s.io">suggest an improvement</a>.
|
||||
</p>
|
||||
<script>
|
||||
const yes = document.querySelector('.feedback--yes');
|
||||
const no = document.querySelector('.feedback--no');
|
||||
document.querySelectorAll('.feedback--link').forEach(link => {
|
||||
link.href = link.href + window.location.pathname;
|
||||
});
|
||||
const sendFeedback = (value) => {
|
||||
if (!gtag) { console.log('!gtag'); }
|
||||
gtag('event', 'click', {
|
||||
'event_category': 'Helpful',
|
||||
'event_label': window.location.pathname,
|
||||
value
|
||||
});
|
||||
};
|
||||
const disableButtons = () => {
|
||||
yes.disabled = true;
|
||||
yes.classList.add('feedback--button__disabled');
|
||||
no.disabled = true;
|
||||
no.classList.add('feedback--button__disabled');
|
||||
};
|
||||
yes.addEventListener('click', () => {
|
||||
sendFeedback(1);
|
||||
disableButtons();
|
||||
document.querySelector('.feedback--response').classList.remove('feedback--response__hidden');
|
||||
});
|
||||
no.addEventListener('click', () => {
|
||||
sendFeedback(0);
|
||||
disableButtons();
|
||||
document.querySelector('.feedback--response').classList.remove('feedback--response__hidden');
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
|
@ -0,0 +1,32 @@
|
|||
<div id="pre-footer"> <!-- This is at the bottom of every topic underneath the TOC and content -->
|
||||
<hr />
|
||||
|
||||
<div class="issue-button-container">
|
||||
<p><a href=""><img src="https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/{{ .Path }}?pixel" alt="Analytics" /></a></p>
|
||||
{{ if and (ne .Kind "404") (not (strings.Contains .Path "search")) }}
|
||||
{{ if not .Params.no_issue }}
|
||||
<script type="text/javascript">
|
||||
PDRTJS_settings_8345992 = {
|
||||
"id" : "8345992",
|
||||
"unique_id" : "{{ .RelPermalink }}",
|
||||
"title" : "{{ .Title }}",
|
||||
"permalink" : "{{ .Permalink }}"
|
||||
};
|
||||
(function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/js/rating/rating.js':'http://i0.poll.fm/js/rating/rating.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-rating-js'));
|
||||
</script>
|
||||
<a href="" onclick="window.open('https://github.com/kubernetes/website/issues/new?title=Issue%20with%20' +
|
||||
'k8s.io'+window.location.pathname)" class="button issue">{{ T "main_github_create_an_issue" }}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if not .Params.noedit }}
|
||||
<a href="https://github.com/kubernetes/website/edit/master/content/{{ .Site.Language.Lang }}/{{ .File.Path }}" class="button issue">{{ T "main_edit_this_page" }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ if and (not .Params.showcommit) $.GitInfo }}
|
||||
|
||||
<div id="lastedit" class="lastedit issue-button-container">
|
||||
{{ T "main_page_last_modified_on" }} {{ .GitInfo.AuthorDate.Format "January 02, 2006 at 3:04 PM PST" }} {{ T "main_by" }}
|
||||
<a href="https://github.com/kubernetes/website/commit/{{ .GitInfo.Hash }}/">{{ .GitInfo.Subject }}</a> (<a href="https://github.com/kubernetes/website/commits/master/content/en/{{ .File.Path }}">{{ T "main_page_history" }}</a>)
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
|
@ -1831,3 +1831,17 @@ $feature-box-div-margin-bottom: 40px
|
|||
cursor: pointer
|
||||
color: #0000CC
|
||||
margin-right: 8px
|
||||
|
||||
// GitHub info/edit buttons
|
||||
#pre-footer
|
||||
margin-top: 2rem
|
||||
|
||||
.button
|
||||
font-size: 1.1rem
|
||||
|
||||
&:first-of-type
|
||||
margin-right: .75rem
|
||||
|
||||
.lastedit
|
||||
margin-top: 1rem
|
||||
font-size: 1rem
|
||||
|
|
|
@ -264,29 +264,6 @@ $video-section-height: 550px
|
|||
&:hover
|
||||
background-position: -250px 100%
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#community, .gridPage
|
||||
#hero
|
||||
text-align: left
|
||||
|
@ -299,9 +276,6 @@ $video-section-height: 550px
|
|||
background-color: $blue
|
||||
padding: 0 20px
|
||||
|
||||
|
||||
|
||||
|
||||
#bigSocial
|
||||
div
|
||||
width: calc(25% - 18px)
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue