Skip to content

Commit 49f6230

Browse files
Put Together New Nav. Logic and Nested Button Styling
1 parent e193325 commit 49f6230

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/assets/stylesheets/application.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,14 @@ a {
5757
padding: var(--space);
5858
}
5959

60-
61-
.nested-page{
60+
.nested-page-button {
6261
font-size: 0.9rem !important;
6362
border-radius: 0px !important;
6463
border-left: 4px solid #dfe6e9 !important;
6564
margin-left: 20px !important;
6665
--space: 24px;
6766
}
6867

69-
7068
/* MARKDOWN */
7169
h2 {
7270
font-family: 'Inter', sans-serif;
@@ -201,7 +199,7 @@ a.social img {
201199
outline: none;
202200

203201
padding: calc(0.25 * var(--space));
204-
border-radius: 4px 0px 0px 4px;
202+
border-radius: 4px;
205203

206204
transition: 0.25s all ease;
207205
cursor: pointer;
@@ -212,6 +210,7 @@ a.social img {
212210

213211
.sidebar button:hover, .mobile-sidebar button:hover {
214212
background-color: rgba(var(--color-light-gray), 0.5);
213+
border-radius: 4px !important;
215214
}
216215

217216
.sidebar button.active, .mobile-sidebar button.active {
@@ -220,6 +219,7 @@ a.social img {
220219
background-color: rgb(var(--color-light-gray));
221220

222221
padding: calc(0.5 * var(--space));
222+
border-radius: 4px !important;
223223
}
224224

225225
.sidebar button.first, .mobile-sidebar button.first {

app/views/articles/index.html.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
<div class='links padding-top'>
1313
<% @nav_tree.each do |key, value| %>
14-
<%= button_tag key, id: value["Index"], class: "nav-button #{value}", data: { action: "click->articles--page#navigate" } %>
14+
<%= button_tag key, id: value["Index"], class: "nav-button #{value['Index']}", data: { action: "click->articles--page#navigate" } %>
1515

1616
<% value.each do |skey, svalue| %>
1717
<% if skey != "Index" %>
18-
<%= button_tag skey, id: svalue["Index"], class: "nav-button #{svalue}", data: { action: "click->articles--page#navigate" } %>
18+
<%= button_tag skey, id: svalue["Index"], class: "nav-button #{svalue['Index']} nested-page-button", data: { action: "click->articles--page#navigate" } %>
1919
<% end %>
2020
<% end %>
2121
<% end %>

0 commit comments

Comments
 (0)