mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
Style header links to be heavier when active
This commit is contained in:
parent
8da3194e26
commit
45c5392b2e
7 changed files with 122 additions and 7 deletions
|
|
@ -29,6 +29,10 @@ $ideal: #C0FF73;
|
|||
color: $white;
|
||||
}
|
||||
|
||||
.color-blue {
|
||||
color: $blue;
|
||||
}
|
||||
|
||||
.bg-color-beige {
|
||||
background-color: $beige;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@
|
|||
}
|
||||
|
||||
.link {
|
||||
@extend .font-cabin;
|
||||
@extend .weight-600;
|
||||
font-size: 16px;
|
||||
color: $blue;
|
||||
@extend .color-blue;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
|
|
|||
104
app/assets/stylesheets/reset.scss
Normal file
104
app/assets/stylesheets/reset.scss
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
// reset.css
|
||||
|
||||
html,
|
||||
body,
|
||||
div,
|
||||
span,
|
||||
applet,
|
||||
object,
|
||||
iframe,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p,
|
||||
blockquote,
|
||||
pre,
|
||||
a,
|
||||
abbr,
|
||||
acronym,
|
||||
address,
|
||||
big,
|
||||
cite,
|
||||
code,
|
||||
del,
|
||||
dfn,
|
||||
em,
|
||||
img,
|
||||
ins,
|
||||
kbd,
|
||||
q,
|
||||
s,
|
||||
samp,
|
||||
small,
|
||||
strike,
|
||||
strong,
|
||||
sub,
|
||||
sup,
|
||||
tt,
|
||||
var,
|
||||
b,
|
||||
u,
|
||||
i,
|
||||
center,
|
||||
dl,
|
||||
dt,
|
||||
dd,
|
||||
ol,
|
||||
ul,
|
||||
li,
|
||||
fieldset,
|
||||
form,
|
||||
label,
|
||||
legend,
|
||||
table,
|
||||
caption,
|
||||
tbody,
|
||||
tfoot,
|
||||
thead,
|
||||
tr,
|
||||
th,
|
||||
td,
|
||||
article,
|
||||
aside,
|
||||
canvas,
|
||||
details,
|
||||
embed,
|
||||
figure,
|
||||
figcaption,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
menu,
|
||||
nav,
|
||||
output,
|
||||
ruby,
|
||||
section,
|
||||
summary,
|
||||
time,
|
||||
mark,
|
||||
audio,
|
||||
video {
|
||||
border: 0;
|
||||
font: inherit;
|
||||
font-size: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
menu,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@ $spacers: (
|
|||
);
|
||||
|
||||
@import "bootstrap";
|
||||
@import "reset";
|
||||
@import "fonts";
|
||||
@import "colors";
|
||||
@import "borders";
|
||||
|
|
|
|||
|
|
@ -16,6 +16,10 @@ module HeaderHelper
|
|||
dashboard_link(district_slug: school.district.slug, school_slug: school.slug, academic_year_range: academic_year.range, uri_path: request.fullpath)
|
||||
end
|
||||
|
||||
def link_weight(path:)
|
||||
active?(path: path) ? 'weight-700' : 'weight-400'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def dashboard_link(district_slug:, school_slug:, academic_year_range:, uri_path:)
|
||||
|
|
@ -25,4 +29,8 @@ module HeaderHelper
|
|||
"/districts/#{district_slug}/schools/#{school_slug}/browse/teachers-and-leadership?year=#{academic_year_range}"
|
||||
end
|
||||
|
||||
def active?(path:)
|
||||
request.fullpath.include? path
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<div>
|
||||
<h2 class="h1 color-red">Distance from benchmark</h2>
|
||||
<p class="body-large">This graph shows how much a score is above or below the benchmark of any given scale.</p>
|
||||
<p class="body-large mb-6">This graph shows how much a score is above or below the benchmark of any given scale.</p>
|
||||
</div>
|
||||
|
||||
<%= render partial: "variance_graph", locals: { presenters: @presenters } %>
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
<div class="col d-flex justify-content-start align-items-center">
|
||||
<p class="me-6"><%= link_to image_tag('logo.png', class: 'height-56'), root_path %></p>
|
||||
<p class="me-4">
|
||||
<a class="h3" href="<%= link_to_dashboard(district: @district, school: @school, academic_year: @academic_year) %>">Dashboard</a>
|
||||
<a class="h3 link <%= link_weight(path: 'dashboard') %>" href="<%= link_to_dashboard(district: @district, school: @school, academic_year: @academic_year) %>">Dashboard</a>
|
||||
</p>
|
||||
<p>
|
||||
<a class="h3" href="<%= link_to_browse(district: @district, school: @school, academic_year: @academic_year) %>">Browse</a>
|
||||
<a class="h3 link <%= link_weight(path: 'browse') %>" href="<%= link_to_browse(district: @district, school: @school, academic_year: @academic_year) %>">Browse</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue