-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub buttons + navigation to submodel templates (#7)
- Added the option navigate between two documentation websites directly within the UI. It is meant to be the main way of navigating between aas-specs and submodels documentation sites. As of now, the submodels site is a deadlink, but it will work as soon as the submodel website gets up. - Added new button to directly report an issue from the website - Added new button to directly see the history of the current source from the website - Added logo for the history button - Added logo for the issue report button - Added logo for the edit this page button - Added logo for the generate pdf button - Created uniform theming for all the buttons - Small fixes and changes
- Loading branch information
monsieuremre
authored
Oct 28, 2024
1 parent
343c2e9
commit 84f3d34
Showing
7 changed files
with
54 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
https://gitlab.com/fedora/docs/docs-website/ui-bundle | ||
*/ | ||
'use strict' | ||
|
||
module.exports = (editUrl, type) => { | ||
if (!editUrl || !type) return false | ||
if (type === 'issue') return editUrl.replace(/\/blob\/([a-zA-Z0-9-_]+)\/(.*)$/, '/issues/new?title=[$1] Doc issue in file $2') | ||
if (type === 'history') return editUrl.replace(/\/blob\//, '/commits/') | ||
return false | ||
} |
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 |
---|---|---|
@@ -1,5 +1,14 @@ | ||
<!-- https://gitlab.com/fedora/docs/docs-website/ui-bundle --> | ||
|
||
{{#if (and page.fileUri (not env.CI))}} | ||
<div class="edit-this-page"><a href="{{page.fileUri}}">Edit this Page</a></div> | ||
{{else if (and page.editUrl (or env.FORCE_SHOW_EDIT_PAGE_LINK (not page.origin.private)))}} | ||
<div class="edit-this-page"><a href="{{page.editUrl}}">Edit this Page</a></div> | ||
{{#if (edit2var page.editUrl "history") }} | ||
<div class="edit-this-page"><a href="{{{edit2var page.editUrl "history"}}}"> <i class="fas fa-history"></i> Page history</a></div> | ||
{{/if}} | ||
<div class="edit-this-page"><a href="{{page.editUrl}}"> <i class="fas fa-edit"></i> Edit this Page</a></div> | ||
{{#if (edit2var page.editUrl "issue") }} | ||
<div class="edit-this-page"><a href="{{{edit2var page.editUrl "issue"}}}"> <i class="fas fa-bug"></i> Report an issue</a></div> | ||
{{/if}} | ||
{{/if}} | ||
|
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{{#unless (eq page.componentVersion.version 'v3.0')}} | ||
<div class="navbar-item"> | ||
<span class="control"> | ||
<button id="downloadButton"><span>Generate PDF</span></button><script src="js/07-download-button.js"></script> | ||
</span> | ||
</div> | ||
|
||
|
||
<div class="download-pdf-button"><a id="downloadButton"><span> <i class="fa-solid fa-file-pdf"></i> Generate PDF </span></a><script src="js/07-download-button.js"></script></div> | ||
|
||
|
||
{{/unless}} | ||
|
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
{{!-- Add additional meta tags here --}} | ||
|
||
<script src=" https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/js/all.min.js "></script> | ||
<link href=" https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/fontawesome.min.css " rel="stylesheet"> | ||
|
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