Skip to content

Commit 5806424

Browse files
committed
Fix view & edit buttons
1 parent 3ffa76f commit 5806424

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!--
2+
Copyright (c) 2016-2023 Martin Donath <[email protected]>
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to
5+
deal in the Software without restriction, including without limitation the
6+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7+
sell copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
The above copyright notice and this permission notice shall be included in
10+
all copies or substantial portions of the Software.
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
14+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
16+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
17+
IN THE SOFTWARE.
18+
-->
19+
20+
<!-- Actions -->
21+
{% if page.edit_url %}
22+
23+
<!-- Edit button -->
24+
{% if "content.action.edit" in features %}
25+
<a
26+
href="{{ page.edit_url }}"
27+
title="{{ lang.t('action.edit') }}"
28+
class="md-content__button md-icon"
29+
>
30+
{% set icon = config.theme.icon.edit or "material/file-edit-outline" %}
31+
{% include ".icons/" ~ icon ~ ".svg" %}
32+
</a>
33+
{% endif %}
34+
35+
<!-- View button -->
36+
{% if "content.action.view" in features %}
37+
<a
38+
href="{{ page.edit_url | replace('edit', 'blob') }}"
39+
title="{{ lang.t('action.view') }}"
40+
class="md-content__button md-icon"
41+
>
42+
{% set icon = config.theme.icon.view or "material/file-eye-outline" %}
43+
{% include ".icons/" ~ icon ~ ".svg" %}
44+
</a>
45+
{% endif %}
46+
{% endif %}

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ site_description: Documentation of the open-source Linktree alternative
33
site_url: 'https://docs.littlelink-custom.com'
44

55
repo_url: https://github.com/JulianPrieber/littlelink-custom
6-
edit_uri: https://github.com/LittleLink-Custom/docs/blob/main/docs
6+
edit_uri: https://github.com/LittleLink-Custom/docs/edit/main/docs
77
repo_name: LittleLink Custom
88

99
theme:

0 commit comments

Comments
 (0)