index : sparkle-git.git

ascending towards madness

author holly sparkles <sparkles@holly.sh> 2023-12-08 19:40:04.0 +00:00:00
committer holly sparkles <sparkles@holly.sh> 2024-05-14 6:40:47.0 +00:00:00
commit
24ad49309be5f3dbe1f18087406ee6f2a46d4599 [patch]
tree
7e7d05bd45f62aada1865d465bd5b1967b4a8256
parent
b0cf401350321d5ecd000392ba923112656d30d1
download
24ad49309be5f3dbe1f18087406ee6f2a46d4599.tar.gz

feat: add toggling display of extra links on the index



Diff

 statics/sass/style.scss |  5 +++++
 templates/index.html    | 10 ++++++++++
 2 files changed, 15 insertions(+)

diff --git a/statics/sass/style.scss b/statics/sass/style.scss
index 58012fe..0be2ab2 100644
--- a/statics/sass/style.scss
+++ b/statics/sass/style.scss
@@ -99,3 +99,8 @@ a {
    text-decoration: underline;
  }
}

.index-link {
  font-size: 80%;
  padding: 0em 0.5em;
}
diff --git a/templates/index.html b/templates/index.html
index bab4878..285fc85 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -11,6 +11,9 @@
            <th>Owner</th>
            {% endif %}
            <th>Idle</th>
            {% if config.enable_index_links %}
            <th>Links</th>
            {% endif %}
        </tr>
        </thead>

@@ -53,6 +56,13 @@
                        </time>
                    </a>
                </td>
                {% if config.enable_index_links %}
                <td>
                    <a class="index-link" href="{% if let Some(path) = path %}{{ path }}/{% endif %}{{ repository.name }}">summary</a> 
                    <a class="index-link" href="{% if let Some(path) = path %}{{ path }}/{% endif %}{{ repository.name }}/log">log</a> 
                    <a class="index-link" href="{% if let Some(path) = path %}{{ path }}/{% endif %}{{ repository.name }}/tree">tree</a>
                </td>
                {% endif %}
            </tr>
            {%- endfor -%}
        {%- endfor %}