Reworked the styles for the paging buttons (#117)
Co-authored-by: andrew <andrew.github@grantnet.us>
This commit is contained in:
1 parent
6f3a0fc4c3
commit
faff329962
5 files changed
+82
-15
No files matched your search
@@ -0,0 +1,48 @@
|
||||
.pagination {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#pagebrowse {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.page, .ellipsis {
|
||||
display: inline-block;
|
||||
padding: 6px 1rem;
|
||||
margin: 0;
|
||||
border-left: 1px solid var(--color1);
|
||||
border-right: 1px solid var(--color1);
|
||||
background-color: var(--color2); /* Dark background color */
|
||||
color: var(--color-font2);
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s; /* Add a smooth transition effect to background color */
|
||||
height: 24px; /* This is just an example, adjust according to your needs */
|
||||
line-height: 24px; /* Should be same as height */
|
||||
min-width: 1.6rem;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.page:hover {
|
||||
background-color: var(--color3); /* Darker background color on hover */
|
||||
}
|
||||
|
||||
.previous {
|
||||
border-top-left-radius: 7px;
|
||||
border-bottom-left-radius: 7px;
|
||||
}
|
||||
|
||||
.next {
|
||||
border-top-right-radius: 7px;
|
||||
border-bottom-right-radius: 7px;
|
||||
}
|
||||
|
||||
.ellipsis, .fa-solid {
|
||||
/*margin: 0 4px;*/
|
||||
pointer-events: none; /* Disable click events on ellipsis */
|
||||
vertical-align: middle; /* Ensure icons are vertically centered */
|
||||
}
|
||||
@@ -45,7 +45,7 @@ body, html, main{
|
||||
}
|
||||
|
||||
#content{
|
||||
max-width: calc(min(100%,1200px));
|
||||
max-width: calc(min(100%,1100px));
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
display: inline-block;
|
||||
@@ -192,6 +192,14 @@ body, html, main{
|
||||
background-color: #1C2D40;
|
||||
}
|
||||
|
||||
#content .btn-start {
|
||||
background-color: #384A5F;
|
||||
}
|
||||
|
||||
#content .btn-preset {
|
||||
background-color: #046c52;
|
||||
}
|
||||
|
||||
#content .btn-yellow {
|
||||
background-color: #7A4E09;
|
||||
}
|
||||
@@ -208,6 +216,14 @@ body, html, main{
|
||||
background-color: #2E3F57;
|
||||
}
|
||||
|
||||
#content .btn-start:hover {
|
||||
background-color: #2E3F57;
|
||||
}
|
||||
|
||||
#content .btn-preset:hover {
|
||||
background-color: #11a983;
|
||||
}
|
||||
|
||||
#content .btn-yellow:hover {
|
||||
background-color: #9B6B0F;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<div id="pagebrowse">
|
||||
<div class="mt-3" id="pagebrowse">
|
||||
{% if paging.prev != paging.next %}
|
||||
<a class="page" href="/{{paging.url}}/{{paging.prev}}"><--</a>
|
||||
{% for page in paging.pages %}
|
||||
{% if page != "..." %}
|
||||
<a class="page" href="/{{paging.url}}/{{page}}">{{page}}</a>
|
||||
{% else %}
|
||||
<a class="page"> {{page}} </a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<a class="page" href="/{{paging.url}}/{{paging.next}}">--></a>
|
||||
<div class="pagination">
|
||||
<a class="page previous" href="/{{ paging.url }}/{{ paging.prev }}">
|
||||
<i class="fa-solid fa-arrow-left"></i>
|
||||
</a>
|
||||
<div class="pages">
|
||||
{% for page in paging.pages %}{% if page != "..." %}<a class="page" href="/{{ paging.url }}/{{ page }}">{{ page }}</a>{% else %}<span class="page ellipsis"><i class="fa-solid fa-fw fa-1x fa-ellipsis"></i></span>{% endif %}{% endfor %}
|
||||
</div>
|
||||
<a class="page next" href="/{{ paging.url }}/{{ paging.next }}">
|
||||
<i class="fa-solid fa-arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
@@ -8,6 +8,7 @@
|
||||
<link rel="stylesheet" href="{% static 'style.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'base.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'form.css' %}">
|
||||
<link rel="stylesheet" href="{% static 'paging.css' %}">
|
||||
<link rel="icon" type="image/svg+xml" href="{% static 'logo.svg' %}">
|
||||
<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css' rel='stylesheet'>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,200;0,400;1,100&display=swap" rel="stylesheet">
|
||||
@@ -108,7 +109,7 @@
|
||||
</div>
|
||||
|
||||
<div id="content-parent">
|
||||
<div id="content">
|
||||
<div id="content" class="pb-5">
|
||||
<h2><a class="site-title" href="/">OpenBench Testing Framework</a></h2>
|
||||
{% if error %}<div class="error"><pre>{{error}}</pre></div>{% endif %}
|
||||
{% block content %}
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
btn.onclick = function() { set_test_mode(mode); };
|
||||
{# btn.class = (++index % 2) ? "left-floated" : "right-floated";#}
|
||||
btn.classList.add("anchorbutton")
|
||||
btn.classList.add("btn-yellow")
|
||||
btn.classList.add("btn-preset")
|
||||
btn.classList.add("mr-2")
|
||||
btn.classList.add("mt-2")
|
||||
button_div.append(btn);
|
||||
@@ -272,7 +272,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="submit" class="anchorbutton btn-blue mt-3 ml-3" name="submit" value="Create Engine Test">
|
||||
<input type="submit" class="anchorbutton btn-start mt-3 ml-3 w-100" name="submit" value="Create Engine Test">
|
||||
</form>
|
||||
|
||||
<div class="form">
|
||||
|
||||
Reference in new issue
Block a user