diff --git a/static/scss/legislature.scss b/static/scss/legislature.scss index 1c8c30db8262d9c1f04722c0010e4f786a122732..8ea30ef42da743cba53dc9dde419b2b718de3510 100644 --- a/static/scss/legislature.scss +++ b/static/scss/legislature.scss @@ -65,4 +65,17 @@ text-indent: 10px; } } +} + +.representative_item.inactive, +.representative.inactive { + .photo img { + -webkit-filter: greyscale(1); + -moz-filter: grayscale(1); + -ms-filter: grayscale(1); + -o-filter: grayscale(1); + filter: grayscale(1); + + opacity: 0.5; + } } \ No newline at end of file diff --git a/templates/representatives/_representative_block.haml b/templates/representatives/_representative_block.haml index 429e2834d4cbcecd8b0bf3e2927a89243ff5ddfb..a49830ebe55ee01b9202e7210abb3a48094561c0 100644 --- a/templates/representatives/_representative_block.haml +++ b/templates/representatives/_representative_block.haml @@ -3,7 +3,7 @@ - load representatives_recommendations_tags - load humanize -.representative +.representative{'class': '{{ representative.active|yesno:"active,inactive" }}' } %h1.name< ={representative.full_name} diff --git a/templates/representatives/representative_grid.haml b/templates/representatives/representative_grid.haml index bc50ad49a8fc9b364edec25111f07aff128a4b37..2680906b810330d0c07264a6e08175d93b7b2eae 100644 --- a/templates/representatives/representative_grid.haml +++ b/templates/representatives/representative_grid.haml @@ -8,7 +8,7 @@ .representative_grid - for representative in object_list - .representative_item + .representative_item{'class': '{{ representative.active|yesno:"active,inactive" }}'} %p.photo %a{'href': "{% url 'representative-detail' representative.slug %}"} %img{'src': '={representative.photo}', 'width': '80'}/ diff --git a/templates/representatives/representative_list.haml b/templates/representatives/representative_list.haml index af5c96213594481130d88492b830b55c8440ac92..4badc2c22d560aaddf54d34dc98dae48cf2d9abe 100644 --- a/templates/representatives/representative_list.haml +++ b/templates/representatives/representative_list.haml @@ -38,8 +38,8 @@ - trans 'Score' - for representative in object_list - %tr - %td + %tr.representative_item{'class': '{{ representative.active|yesno:"active,inactive" }}'} + %td.photo %a{'href': "{% url 'representative-detail' representative.slug %}"} %img{'src': '={representative.photo}', 'width': '80'}/