Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/gohugoioTheme2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-03 17:03:59 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-03-03 18:07:15 +0300
commit53dbfdb3cbf70d9444d50fa8ad9b0e58a1153405 (patch)
tree31e041d941cee0beeedfd541e44319a9fa8da4b8
parentd14d1b6ac55a70d25fbe444abd3d88bf6f7d9dfe (diff)
Make prev/next regular links
-rw-r--r--.prettierrc21
-rw-r--r--layouts/partials/previous-next-links-in-section.html56
2 files changed, 54 insertions, 23 deletions
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..6da6623
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,21 @@
+{
+ "overrides": [
+ {
+ "files": ["*.html"],
+ "options": {
+ "parser": "go-template"
+ }
+ },
+ {
+ "files": ["*.js", "*.ts"],
+ "options": {
+ "useTabs": true,
+ "printWidth": 120,
+ "singleQuote": true,
+ "spaceBeforeFunctionParen": false
+ }
+ }
+ ],
+ "goTemplateBracketSpacing": true,
+ "bracketSameLine": true
+ } \ No newline at end of file
diff --git a/layouts/partials/previous-next-links-in-section.html b/layouts/partials/previous-next-links-in-section.html
index 2bf9be4..d821496 100644
--- a/layouts/partials/previous-next-links-in-section.html
+++ b/layouts/partials/previous-next-links-in-section.html
@@ -1,30 +1,40 @@
{{ if or .PrevInSection .NextInSection }}
<span class="relative z-0 inline-flex shadow-sm rounded-md">
- {{with .NextInSection}}
- <form style="display: inline" action="{{ .RelPermalink }}" method="get">
- <button type="submit" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-steel-500 focus:border-steel-500">
- <span class="sr-only">
- Previous
- </span>
- <!-- solid/chevron-left -->
- <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
- <path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
- </svg>
- </button>
- </form>
+ {{ with .NextInSection }}
+ <a
+ href="{{ .RelPermalink }}"
+ class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-steel-500 focus:border-steel-500">
+ <span class="sr-only"> Previous </span>
+ <svg
+ class="h-5 w-5"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 20 20"
+ fill="currentColor"
+ aria-hidden="true">
+ <path
+ fill-rule="evenodd"
+ d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
+ clip-rule="evenodd" />
+ </svg>
+ </a>
{{ end }}
{{ with .PrevInSection }}
- <form style="display: inline" action="{{ .RelPermalink }}" method="get">
- <button type="submit" class="-ml-px relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-steel-500 focus:border-steel-500">
- <span class="sr-only">
- Next
- </span>
- <!-- solid/chevron-right -->
- <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
- <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
- </svg>
- </button>
- </form>
+ <a
+ href="{{ .RelPermalink }}"
+ class="-ml-px relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-steel-500 focus:border-steel-500">
+ <span class="sr-only"> Next </span>
+ <svg
+ class="h-5 w-5"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 20 20"
+ fill="currentColor"
+ aria-hidden="true">
+ <path
+ fill-rule="evenodd"
+ d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
+ clip-rule="evenodd" />
+ </svg>
+ </a>
{{ end }}
</span>
{{ end }}