From 2ef69f0894df964574974f49d2087ba38e034471 Mon Sep 17 00:00:00 2001 From: razonyang Date: Sun, 29 Jan 2023 13:50:59 +0800 Subject: [PATCH] style: footer menu --- assets/main/scss/_footer.scss | 4 ++++ layouts/partials/footer/menu.html | 16 ++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/assets/main/scss/_footer.scss b/assets/main/scss/_footer.scss index e0da9b4ae..cbdaf0ca5 100644 --- a/assets/main/scss/_footer.scss +++ b/assets/main/scss/_footer.scss @@ -2,4 +2,8 @@ .social-link { font-size: 1.5em; } + + .nav-link { + text-overflow: ellipsis; + } } diff --git a/layouts/partials/footer/menu.html b/layouts/partials/footer/menu.html index 3121cebe9..e65a78e1c 100644 --- a/layouts/partials/footer/menu.html +++ b/layouts/partials/footer/menu.html @@ -5,21 +5,21 @@ {{- end -}} @@ -29,10 +29,14 @@ {{- end -}} {{- define "footer-menu-item" -}} -{{- $class := default "nav-link" .class -}} +{{- $class := default "nav-link text-nowrap overflow-hidden" .class -}} +{{- $title := partial "helpers/menu-name" .item }} {{- if .item.URL -}} -{{ partial "helpers/menu-name" .item }} + + {{- $title -}} + {{- else -}} -{{ partial "helpers/menu-name" .item }} +{{ $title }} {{- end -}} {{- end -}}