mirror of https://git.FreeBSD.org/doc.git
Documentation - Theme: Fix edit button
Approved by: carlavilla@ Pull Request: https://github.com/freebsd/freebsd-doc/pull/396
This commit is contained in:
parent
8f7c6e897a
commit
a39610b552
|
@ -47,9 +47,10 @@
|
|||
{{ $docType := index $pathSections 1 }}
|
||||
{{ $docName := index $pathSections 2 }}
|
||||
{{ $pdfFilename := printf "%s_%s.pdf" $docName $docLang }}
|
||||
{{ $adocFileName := printf "%s.adoc" $.Page.File }}
|
||||
{{ $pdfUrl := printf "%s%s/%s/%s/%s" $.Site.Params.downloadBaseUrl $docLang $docType $docName $pdfFilename }}
|
||||
<li><i class="fa fa-file-pdf-o" aria-hidden="true" title="{{ i18n "download-pdf" }}"></i><a href="{{ $pdfUrl }}">{{ i18n "download-pdf" }}</a></li>
|
||||
{{ $editUrl := printf "%s%s/%s" $.Site.Params.editBaseUrl $.Site.Home.Language .Page.File }}
|
||||
{{ $editUrl := printf "%s%s/%s/%s/%s" $.Site.Params.editBaseUrl $docLang $docType $docName $adocFileName }}
|
||||
<li><i class="fa fa-pencil-square-o" aria-hidden="true" title="{{ i18n "edit-page" }}"></i><a href="{{ $editUrl }}" target="_blank">{{ i18n "edit-page" }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -133,11 +133,19 @@
|
|||
{{ $docLang := $.Site.Home.Language.Lang }}
|
||||
{{ $docType := index $pathSections 1 }}
|
||||
{{ $docName := index $pathSections 2 }}
|
||||
{{ $sectionName := index $pathSections 3 }}
|
||||
{{ $pdfFilename := printf "%s_%s.pdf" $docName $docLang }}
|
||||
{{ $adocFileName := printf "%s.adoc" $.Page.File }}
|
||||
{{ $pdfUrl := printf "%s%s/%s/%s/%s" $.Site.Params.downloadBaseUrl $docLang $docType $docName $pdfFilename }}
|
||||
<li><i class="fa fa-file-pdf-o" aria-hidden="true" title="{{ i18n "download-pdf" }}"></i><a href="{{ $pdfUrl }}">{{ i18n "download-pdf" }}</a></li>
|
||||
{{ $editUrl := printf "%s%s/%s" $.Site.Params.editBaseUrl $.Site.Home.Language .Page.File }}
|
||||
<li><i class="fa fa-pencil-square-o" aria-hidden="true" title="{{ i18n "edit-page" }}"></i><a href="{{ $editUrl }}" target="_blank">{{ i18n "edit-page" }}</a></li>
|
||||
{{ if $sectionName }}
|
||||
{{ $editUrl := printf "%s%s/%s/%s/%s/%s" $.Site.Params.editBaseUrl $docLang $docType $docName $sectionName $adocFileName }}
|
||||
<li><i class="fa fa-pencil-square-o" aria-hidden="true" title="{{ i18n "edit-page" }}"></i><a href="{{ $editUrl }}" target="_blank">{{ i18n "edit-page" }}</a></li>
|
||||
{{ else }}
|
||||
{{ $editUrl := printf "%s%s/%s/%s/%s" $.Site.Params.editBaseUrl $docLang $docType $docName $adocFileName }}
|
||||
<li><i class="fa fa-pencil-square-o" aria-hidden="true" title="{{ i18n "edit-page" }}"></i><a href="{{ $editUrl }}" target="_blank">{{ i18n "edit-page" }}</a></li>
|
||||
{{ end }}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -134,9 +134,10 @@
|
|||
{{ $docType := index $pathSections 1 }}
|
||||
{{ $docName := index $pathSections 2 }}
|
||||
{{ $pdfFilename := printf "%s_%s.pdf" $docName $docLang }}
|
||||
{{ $adocFileName := printf "%s.adoc" $.Page.File }}
|
||||
{{ $pdfUrl := printf "%s%s/%s/%s/%s" $.Site.Params.downloadBaseUrl $docLang $docType $docName $pdfFilename }}
|
||||
<li><i class="fa fa-file-pdf-o" aria-hidden="true" title="{{ i18n "download-pdf" }}"></i><a href="{{ $pdfUrl }}">{{ i18n "download-pdf" }}</a></li>
|
||||
{{ $editUrl := printf "%s%s/%s" $.Site.Params.editBaseUrl $.Site.Home.Language .Page.File }}
|
||||
{{ $editUrl := printf "%s%s/%s/%s/%s" $.Site.Params.editBaseUrl $docLang $docType $docName $adocFileName }}
|
||||
<li><i class="fa fa-pencil-square-o" aria-hidden="true" title="{{ i18n "edit-page" }}"></i><a href="{{ $editUrl }}" target="_blank">{{ i18n "edit-page" }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue