forked from canonical/anbox-cloud-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request canonical#12 from s-makin/feedback-button
Add docs feedback button
- Loading branch information
Showing
5 changed files
with
81 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.github-issue-link-container { | ||
padding-right: 0.5rem; | ||
} | ||
.github-issue-link { | ||
font-size: var(--font-size--small); | ||
font-weight: bold; | ||
background-color: #DD4814; | ||
padding: 13px 23px; | ||
text-decoration: none; | ||
} | ||
.github-issue-link:link { | ||
color: #FFFFFF; | ||
} | ||
.github-issue-link:visited { | ||
color: #FFFFFF | ||
} | ||
.muted-link.github-issue-link:hover { | ||
color: #FFFFFF; | ||
text-decoration: underline; | ||
} | ||
.github-issue-link:active { | ||
color: #FFFFFF; | ||
text-decoration: underline; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
window.onload = function() { | ||
const link = document.createElement("a"); | ||
link.classList.add("muted-link"); | ||
link.classList.add("github-issue-link"); | ||
link.text = "Give feedback"; | ||
link.href = ( | ||
github_url | ||
+ "/issues/new?" | ||
+ "title=docs%3A+TYPE+YOUR+QUESTION+HERE" | ||
+ "&body=*Please describe the question or issue you're facing with " | ||
+ `"${document.title}"` | ||
+ ".*" | ||
+ "%0A%0A%0A%0A%0A" | ||
+ "---" | ||
+ "%0A" | ||
+ `*Reported+from%3A+${location.href}*` | ||
); | ||
link.target = "_blank"; | ||
|
||
const div = document.createElement("div"); | ||
div.classList.add("github-issue-link-container"); | ||
div.append(link) | ||
|
||
const container = document.querySelector(".article-container > .content-icon-container"); | ||
container.prepend(div); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% extends "furo/base.html" %} | ||
|
||
{% block theme_scripts %} | ||
<script> | ||
const github_url = "{{ github_url }}"; | ||
</script> | ||
{% endblock theme_scripts %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters