From 3a6cfe13f6f795726ba9a9ee3d5bbf9009174a20 Mon Sep 17 00:00:00 2001 From: Jakub Al-Khalili Date: Fri, 25 Oct 2019 10:50:18 +0200 Subject: [PATCH] #157 Fix edit links, add buttons on index page --- website/assets/scss/_pageinfo.scss | 12 ++++++++++++ website/content/en/_index.html | 4 ++-- website/layouts/partials/page-meta-links.html | 19 +++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 website/layouts/partials/page-meta-links.html diff --git a/website/assets/scss/_pageinfo.scss b/website/assets/scss/_pageinfo.scss index 6309524f..b28bc62d 100644 --- a/website/assets/scss/_pageinfo.scss +++ b/website/assets/scss/_pageinfo.scss @@ -18,3 +18,15 @@ width: 77.5%; } +div.row { + div.col-lg-4 { + p { + a { + font-size: 90%; + background-color: #EAAA2C; + padding: 10px 12px; + color: whitesmoke; + } + } + } +} \ No newline at end of file diff --git a/website/content/en/_index.html b/website/content/en/_index.html index 498d1ea0..a9d312bd 100644 --- a/website/content/en/_index.html +++ b/website/content/en/_index.html @@ -61,8 +61,8 @@ Prevent loss of job history {{< blocks/section >}} -{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/jenkinsci/kubernetes-operator" %}} -We do a [Pull Request](https://github.com/jenkinsci/kubernetes-operator/pulls) contributions workflow on **GitHub**. New users are always welcome! +{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/jenkinsci/kubernetes-operator/pulls" %}} +We do a Pull Request contributions workflow on **GitHub**. New users are always welcome! {{% /blocks/feature %}} {{% blocks/feature icon="fas fa-folder-open" title="Documentation" url="/kubernetes-operator/docs" %}} diff --git a/website/layouts/partials/page-meta-links.html b/website/layouts/partials/page-meta-links.html new file mode 100644 index 00000000..16deaefa --- /dev/null +++ b/website/layouts/partials/page-meta-links.html @@ -0,0 +1,19 @@ +{{ if .Path }} + {{ $gh_repo := ($.Param "github_repo") }} + {{ $gh_project_repo := ($.Param "github_project_repo") }} + {{ if $gh_repo }} +
+ {{ $editURL := printf "%s/edit/master/website/content/en/%s" $gh_repo .Path }} + {{ if .Site.IsMultiLingual }} + {{ $editURL = printf "%s/edit/master/website/content/%s/%s" $gh_repo ($.Site.Language.Lang) .Path }} + {{ end }} + {{ $issuesURL := printf "%s/issues/new?title=%s" $gh_repo (htmlEscape $.Title )}} + {{ T "post_edit_this" }} + {{ T "post_create_issue" }} + {{ if $gh_project_repo }} + {{ $project_issueURL := printf "%s/issues/new" $gh_project_repo }} + {{ T "post_create_project_issue" }} + {{ end }} +
+ {{ end }} +{{ end }}