Nav fixes (#766)
* Update README.md Added a link to the db dump and IRC channels. * Minor fix * Update README.md * disabling email links * Killed github autolinking * Update README.md * Removed database link * fixed a FF only bug with the carets * added a static size to pagination * worked on the pagination widget * fixed the arrow buttons too * fixed appearance on pages over 1000
Cette révision appartient à :
Parent
dd0736f8b4
révision
9286653905
2 fichiers modifiés avec 6 ajouts et 7 suppressions
|
@ -271,11 +271,11 @@ th { border-bottom-width: 2px; }
|
|||
.pagination li {
|
||||
border: 1px solid;
|
||||
display: inline-block;
|
||||
padding: 0.4rem 0.5rem;
|
||||
padding: 0.4rem;
|
||||
border-right-width: 0;
|
||||
list-style-type: none;
|
||||
text-align: center;
|
||||
width: 35px;
|
||||
min-width: 35px;
|
||||
}
|
||||
|
||||
.pagination li:first-child { border-radius: 3px 0 0 3px; }
|
||||
|
|
|
@ -110,7 +110,7 @@ var FuncMap = template.FuncMap{
|
|||
|
||||
if nav.CurrentPage-1 > 0 {
|
||||
url, _ := Router.Get(nav.Route).URL("page", "1")
|
||||
ret = ret + "<li><a id=\"page-prev\" href=\"" + url.String() + "?" + currentUrl.RawQuery + "\" aria-label=\"Previous\"><span aria-hidden=\"true\">«</span></a></li>"
|
||||
ret = ret + "<a id=\"page-prev\" href=\"" + url.String() + "?" + currentUrl.RawQuery + "\" aria-label=\"Previous\"><li><span aria-hidden=\"true\">«</span></li></a>"
|
||||
}
|
||||
startValue := 1
|
||||
if nav.CurrentPage > pagesSelectable/2 {
|
||||
|
@ -126,16 +126,15 @@ var FuncMap = template.FuncMap{
|
|||
for i := startValue; i <= endValue; i++ {
|
||||
pageNum := strconv.Itoa(i)
|
||||
url, _ := Router.Get(nav.Route).URL("page", pageNum)
|
||||
ret = ret + "<li"
|
||||
ret = ret + "<a href=\"" + url.String() + "?" + currentUrl.RawQuery + "\">" + "<li"
|
||||
if i == nav.CurrentPage {
|
||||
ret = ret + " class=\"active\""
|
||||
}
|
||||
|
||||
ret = ret + "><a href=\"" + url.String() + "?" + currentUrl.RawQuery + "\">" + strconv.Itoa(i) + "</a></li>"
|
||||
ret = ret + ">" + strconv.Itoa(i) + "</li></a>"
|
||||
}
|
||||
if nav.CurrentPage < int(maxPages) {
|
||||
url, _ := Router.Get(nav.Route).URL("page", strconv.Itoa(nav.CurrentPage+1))
|
||||
ret = ret + "<li><a id=\"page-next\" href=\"" + url.String() + "?" + currentUrl.RawQuery + "\" aria-label=\"Next\"><span aria-hidden=\"true\">»</span></a></li>"
|
||||
ret = ret + "<a id=\"page-next\" href=\"" + url.String() + "?" + currentUrl.RawQuery + "\" aria-label=\"Next\"><li><span aria-hidden=\"true\">»</span></li></a>"
|
||||
}
|
||||
itemsThisPageStart := nav.MaxItemPerPage*(nav.CurrentPage-1) + 1
|
||||
itemsThisPageEnd := nav.MaxItemPerPage * nav.CurrentPage
|
||||
|
|
Référencer dans un nouveau ticket