Skip to content

Commit e4928f2

Browse files
authored
Merge pull request #117 from cs50/move-navbar
Move navbar
2 parents 0c43ca4 + 8f34aa3 commit e4928f2

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

compare50/_renderer/static/match.css

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ body, h1, h4, h5 {
88

99
body {
1010
font-family: Proxima-Nova, sans-serif;
11+
overflow: hidden;
1112
}
1213

1314
.wrapper {
14-
margin-left: 10em;
15+
margin-bottom: 3em;
1516
}
1617

1718
.view {
@@ -30,7 +31,7 @@ body {
3031

3132
.sub_name {
3233
margin-top: 0.33em;
33-
padding-right: 0px;
34+
padding-left: 10px;
3435
}
3536

3637
.row {
@@ -56,7 +57,7 @@ pre {
5657
border-top: 0;
5758
max-width:100%;
5859
width: 100%;
59-
height: 100%;
60+
height: 90vh;
6061
}
6162

6263
.right {
@@ -67,7 +68,7 @@ pre {
6768
border-top: 0;
6869
max-width:100%;
6970
width: 100%;
70-
height: 100%;
71+
height: 90vh;
7172
}
7273

7374
.fragment:before {
@@ -119,36 +120,36 @@ pre {
119120
font-family: Consolas, monospace;
120121
}
121122

122-
#sidebar {
123-
padding-left: 5px;
124-
padding-right: 5px;
125-
margin-left: -10em;
126-
left: 10em;
127-
width: 10em;
123+
#botbar {
128124
position: fixed;
129-
height: 100%;
125+
bottom: 0;
126+
width: 100%;
127+
display: flex;
128+
justify-content: space-between;
129+
align-items: center;
130+
padding: 0.5em 1em;
130131
z-index: 1000;
131132
}
132133

133-
#next_prev_match {
134-
margin-top: .4em;
134+
.botbar-right {
135+
display: flex;
136+
align-items: center;
137+
gap: 0.5em;
135138
}
136139

137-
#passes {
138-
margin-top: 10%;
139-
margin-bottom: 10%;
140+
#next_prev_match {
141+
margin: 0;
140142
}
141143

142-
.matches_group {
143-
margin-bottom: .4em;
144+
#passes {
145+
margin: 0;
144146
}
145147

146148
.brand {
147149
text-align: center;
148150
vertical-align: middle;
149-
width: 100%;
150151
height: 2.20em;
151-
margin-top: 0.13em;
152+
margin: 0;
152153
}
153154

154155
a.index-link {

compare50/_renderer/templates/match_page.html

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,21 @@
1111
</head>
1212
<body>
1313
<div class="wrapper" id="page">
14-
<nav class="bg-dark text-center" id="sidebar">
14+
<nav class="bg-dark text-light" id="botbar">
1515
<div class="brand text-light">
1616
<h4><a href="index.html" class="index-link"><b>compare50</b></a></h4>
1717
</div>
18-
<br/>
19-
<div class="text-light id" id="{{id}}">{{id}} / {{max_id}}</div>
20-
<div class="btn-group" role="group" aria-label="NextPrev" id="next_prev_match">
21-
<button type="button" class="btn btn-outline-light prev_match" id="prev_match" {{'disabled' if id <= 1 else ''}}><<</button>
22-
<button type="button" class="btn btn-outline-light next_match" id="next_match" {{'disabled' if id >= max_id else ''}}>>></button>
23-
</div>
24-
<div class="btn-group-vertical" role="group" aria-label="Views" id="passes">
25-
{% for pass_ in passes %}
26-
<button type="button" class="btn btn-outline-light view_selector" id="{{pass_.__name__}}selector" title="{{pass_.__doc__}}">{{pass_.__name__}}</button>
27-
{% endfor %}
28-
</div>
29-
<div id="group_nav">
18+
<div class="botbar-right">
19+
<div class="text-light id" id="{{id}}">{{id}} / {{max_id}}</div>
20+
<div class="btn-group" role="group" aria-label="NextPrev" id="next_prev_match">
21+
<button type="button" class="btn btn-outline-light prev_match" id="prev_match" {{'disabled' if id <= 1 else ''}}><<</button>
22+
<button type="button" class="btn btn-outline-light next_match" id="next_match" {{'disabled' if id >= max_id else ''}}>>></button>
23+
</div>
24+
<div class="btn-group" role="group" aria-label="Views" id="passes">
25+
{% for pass_ in passes %}
26+
<button type="button" class="btn btn-outline-light view_selector" id="{{pass_.__name__}}selector" title="{{pass_.__doc__}}">{{pass_.__name__}}</button>
27+
{% endfor %}
28+
</div>
3029
<div class="btn-group" role="group" aria-label="NextPrevGroup">
3130
<button type="button" class="btn btn-outline-light matches_group" id="previous_group">&lt;</button>
3231
<button type="button" class="btn btn-outline-light matches_group" id="next_group">&gt;</button>

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
packages=find_packages(exclude=["tests"]),
2323
scripts=["bin/compare50"],
2424
url="https://github.com/cs50/compare50",
25-
version="1.2.15",
25+
version="1.2.14",
2626
include_package_data=True,
2727
)

0 commit comments

Comments
 (0)