Allegations page

This commit is contained in:
Martín González
2016-12-12 19:36:38 +01:00
committed by Amaia Castro
parent 23211337ef
commit daba441178
11 changed files with 1058 additions and 8 deletions

Binary file not shown.

View File

@@ -56,6 +56,8 @@
<glyph glyph-name="arrow-right" unicode="&#85;" d="M329 256c0-5-2-9-5-13l-128-128c-4-3-8-5-13-5-5 0-9 2-13 5-4 4-5 8-5 13l0 256c0 5 1 9 5 13 4 3 8 5 13 5 5 0 9-2 13-5l128-128c3-4 5-8 5-13z"/>
<glyph glyph-name="check-circle" unicode="&#86;" d="M256 480c-124 0-224-100-224-224 0-124 100-224 224-224 124 0 224 100 224 224 0 124-100 224-224 224z m115-149l-139-179c-1-1-3-3-5-3-3 0-4 1-5 3-2 1-79 76-79 76l-2 1c0 1-1 2-1 3 0 2 1 3 1 4 1 0 1 0 1 1 8 8 24 24 25 25 1 2 2 3 4 3 3 0 5-2 6-3 1-1 45-43 45-43l111 143c1 0 2 1 4 1 1 0 2 0 3-1l31-24c0-1 1-3 1-4 0-1 0-2-1-3z"/>
<glyph glyph-name="arrow-top" unicode="&#87;" d="M402 165c0-5-2-10-5-13-4-4-8-6-13-6l-256 0c-5 0-9 2-13 6-3 3-5 8-5 13 0 5 2 9 5 12l128 128c4 4 8 6 13 6 5 0 9-2 13-6l128-128c3-3 5-7 5-12z"/>
<glyph glyph-name="help-1" unicode="&#88;" d="M345 435c-27 21-58 28-98 28-29 0-55-6-75-20-30-20-44-54-44-108l77 0c0 14-2 30 7 43 8 13 20 24 40 24 20 0 31-6 41-18 8-11 11-23 11-36 0-12-5-22-12-32-4-5-9-10-15-15 0 0-42-25-56-48-11-18-15-40-16-66 0-2 0-5 7-5 7 0 56 0 62 0 6 0 7 4 7 6 0 9 2 24 3 29 4 11 10 20 20 28l21 14c18 15 33 26 40 36 11 15 19 34 19 57 0 36-13 64-39 83z m-103-293c-26 1-47-17-48-46-1-28 19-46 45-47 27-1 48 17 49 45 1 28-19 47-46 48z"/>
<glyph glyph-name="checkmark-circle" unicode="&#89;" d="M171 296l-29-30 93-93 208 208-29 29-179-178z m251-40c0-92-74-166-166-166-92 0-166 74-166 166 0 92 74 166 166 166 16 0 31-2 46-6l32 32c-24 11-50 16-78 16-114 0-208-94-208-208 0-114 94-208 208-208 114 0 208 94 208 208z"/>
<glyph glyph-name="minus-square" unicode="&#88;" d="M357 402c17 0 32-6 45-18 12-13 19-28 19-46l0-201c0-17-7-32-19-45-13-13-28-19-45-19l-202 0c-17 0-32 6-45 19-12 13-19 28-19 45l0 201c0 18 7 33 19 46 13 12 28 18 45 18z m27-265l0 201c0 8-3 14-8 20-5 5-12 8-19 8l-202 0c-7 0-14-3-19-8-5-6-8-12-8-20l0-201c0-7 3-14 8-19 5-6 12-8 19-8l202 0c7 0 14 2 19 8 5 5 8 12 8 19z m-46 119c3 0 5-1 7-3 2-1 2-3 2-6l0-18c0-3 0-5-2-7-2-2-4-3-7-3l-164 0c-3 0-5 1-7 3-2 2-2 4-2 7l0 18c0 3 0 5 2 6 2 2 4 3 7 3z"/>
<glyph glyph-name="plus-square" unicode="&#90;" d="M347 247l0-18c0-3 0-5-2-7-2-2-4-3-7-3l-64 0 0-64c0-2-1-4-2-6-2-2-4-3-7-3l-18 0c-3 0-5 1-7 3-1 2-2 4-2 6l0 64-64 0c-3 0-5 1-7 3-2 2-2 4-2 7l0 18c0 3 0 5 2 6 2 2 4 3 7 3l64 0 0 64c0 3 1 5 2 7 2 1 4 2 7 2l18 0c3 0 5-1 7-2 1-2 2-4 2-7l0-64 64 0c3 0 5-1 7-3 2-1 2-3 2-6z m37-110l0 201c0 8-3 14-8 20-5 5-12 8-19 8l-202 0c-7 0-14-3-19-8-5-6-8-12-8-20l0-201c0-7 3-14 8-19 5-6 12-8 19-8l202 0c7 0 14 2 19 8 5 5 8 12 8 19z m37 201l0-201c0-17-7-32-19-45-13-13-28-19-45-19l-202 0c-17 0-32 6-45 19-12 13-19 28-19 45l0 201c0 18 7 33 19 46 13 12 28 18 45 18l202 0c17 0 32-6 45-18 12-13 19-28 19-46z"/>
<glyph glyph-name="expand" unicode="&#48;" d="M26 168l-26-158c0-2 1-5 3-7 0 0 0 0 0 0 2-2 5-3 7-3l158 27c3 0 6 3 7 6 1 3 0 7-3 9l-30 31 82 82c4 4 4 9 0 13l-57 57c-3 3-9 3-12 0l-83-83-31 31c-2 2-5 3-9 2-3-1-5-4-6-7z m460 176l26 158c0 2-1 5-3 7 0 0 0 0 0 0-2 2-5 3-7 3l-158-27c-3 0-6-3-7-6-1-3 0-7 3-9l30-31-82-82c-4-4-4-9 0-13l57-57c3-3 9-3 12 0l83 83 31-31c2-2 5-3 9-2 3 1 5 4 6 7z"/>
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,16 @@
App.Allegations =
toggle_comments: ->
$('.draft-allegation').toggleClass('comments-on');
toggle_index: ->
$('.draft-allegation').toggleClass('comments-on');
initialize: ->
$('#js-toggle-allegation-comments').on
click: ->
App.Allegations.toggle_comments()
$('#js-toggle-allegation-index').on
click: ->
App.Allegations.toggle_index()

View File

@@ -48,6 +48,7 @@
//= require social_share
//= require markdown-it
//= require markdown_editor
//= require allegations
//= require custom
var initialize_modules = function() {
@@ -71,6 +72,7 @@ var initialize_modules = function() {
App.Banners.initialize();
App.SocialShare.initialize();
App.MarkdownEditor.initialize();
App.Allegations.initialize();
};
$(function(){

View File

@@ -1,5 +1,4 @@
@charset "UTF-8";
@font-face {
font-family: 'icons';
src: font-url('icons.eot');
@@ -10,7 +9,6 @@
font-weight: normal;
font-style: normal;
}
[data-icon]:before {
font-family: "icons" !important;
content: attr(data-icon);
@@ -23,7 +21,6 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
[class^="icon-"]:before,
[class*=" icon-"]:before {
font-family: "icons" !important;
@@ -36,7 +33,6 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-angle-down:before {
content: "\61";
}
@@ -163,6 +159,12 @@
.icon-whatsapp:before {
content: "\50";
}
.icon-zip:before {
content: "\4f";
}
.icon-banner:before {
content: "\51";
}
.icon-arrow-down:before {
content: "\52";
}
@@ -172,6 +174,21 @@
.icon-arrow-right:before {
content: "\55";
}
.icon-check-circle:before {
content: "\56";
}
.icon-arrow-top:before {
content: "\57";
}
.icon-checkmark-circle:before {
content: "\59";
}
.icon-minus-square:before {
content: "\58";
}
.icon-plus-square:before {
content: "\5a";
}
.icon-expand:before {
content: "\30";
}

View File

@@ -6,6 +6,7 @@
// 04. Debate list
// 05. Debate quiz
// 06. Legislation draft
// 07. Legislation allegations
//
// 01. Utils
@@ -123,7 +124,7 @@
li {
cursor: pointer;
margin-left: 1rem;
margin-left: 0;
display: inline-block;
margin-bottom: 1rem;
@@ -347,3 +348,553 @@
}
}
}
// 07. Legislation allegations
// -----------------
.legislation-allegation {
padding-top: 1rem;
margin-bottom: 2rem;
.headline {
margin-bottom: 0;
}
.button-circle {
line-height: 0;
padding: 0.5em;
border-radius: 50%;
}
.icon-checkmark-circle {
font-size: 1.5rem;
vertical-align: bottom;
color: $text-medium;
margin-right: 0.5rem;
}
.button-subscribed {
margin-top: 1rem;
border: 1px solid #D1D1D1;
background: #F2F2F2;
h3 {
display: inline-block;
color: $text;
margin-bottom: 0;
}
p {
margin-bottom: 0;
font-size: $small-font-size;
}
&:hover h3 {
color: $text;
}
@include breakpoint(medium) {
padding: 0.5em 1em;
}
}
}
.draft-panels {
padding: 2rem 0;
.draft-chooser {
margin-bottom: 2rem;
h3 {
vertical-align: top;
display: inline-block;
font-weight: 400;
margin-right: 0.5rem;
}
span {
margin-left: 0.75rem;
font-style: italic;
font-size: $small-font-size;
color: $text-medium;
vertical-align: top;
@include breakpoint(medium) {
margin-left: 1rem;
}
}
.select-box {
position: relative;
@include breakpoint(medium) {
display: inline-block;
}
select {
margin-bottom: 0;
display: block;
}
span {
vertical-align: inherit;
font-style: normal;
a {
text-decoration: underline;
color: $text-medium
}
}
}
.button {
margin-top: 1rem;
@include breakpoint(medium) {
margin-top: 0;
}
}
}
.draft-allegation {
@include breakpoint(medium) {
display: flex;
padding-left: 0.9375rem;
padding-right: 0.9375rem;
}
.calc-index {
.draft-panel {
cursor: pointer;
}
.draft-index-rotated {
display: none;
}
}
// Panel calcs for desktop
@media screen and (min-width: 40em) {
.calc-index {
transition: all 0.25s;
width: calc(25% - 25px);
}
.calc-text {
transition: all 0.25s;
width: calc(75% - 25px)
}
.calc-comments {
transition: all 0.25s;
cursor: pointer;
background: #F2F2F2;
width: 50px;
.draft-panel {
.panel-title {
display: none;
}
}
}
}
.border-right {
@include breakpoint(medium) {
border-right: 1px solid $border;
}
}
.draft-panel {
text-transform: uppercase;
font-weight: 700;
padding: 0.5rem 1rem;
color: #696969;
background: #F2F2F2;
font-size: $small-font-size;
.icon-comments {
margin-right: 0.25rem;
}
.icon-banner {
line-height: 0;
color: $text-medium;
vertical-align: sub;
margin-right: 0.25rem;
}
}
.draft-index {
table {
tbody {
border: none;
tr {
background: white;
td {
padding: 0.25rem 1rem;
.icon-plus-square,
.icon-minus-square {
color: $text-medium;
cursor: pointer;
vertical-align: sub;
}
a {
color: $brand;
text-decoration: underline;
font-size: $small-font-size;
}
}
.collapse-all {
padding: 1rem;
a {
color: $text-medium;
}
.icon-plus-square,
.icon-minus-square {
color: $text-medium;
}
}
}
.child_group {
td {
padding: 0 1rem;
table {
margin-bottom: 0.5rem;
}
}
}
}
}
}
.draft-text {
position: relative;
padding: 1rem;
@include breakpoint(medium) {
padding: 2rem 2rem 2rem 3rem;
};
h2 {
font-weight: 400;
margin-bottom: 2rem;
margin-top: 2rem;
}
h3 {
font-weight: 400;
margin-bottom: 1rem;
}
.anchor::before {
display: none;
content: "#";
color: $text-medium;
position: absolute;
left: 1.5rem;
}
a {
color: $text;
&:hover,
&:active,
&:focus {
text-decoration: none;
h3 {
color: $text;
}
.anchor::before {
display: block;
}
}
}
}
.calc-comments {
position: relative;
.comment-box {
display: none;
}
.draft-comments-rotated {
@include breakpoint(medium) {
font-size: $small-font-size;
text-transform: uppercase;
font-weight: 700;
color: #696969;
margin-top: 4rem;
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
}
}
}
.comments-on {
.calc-index {
width: 50px;
background: #F2F2F2;
cursor: pointer;
.panel-title {
display: none;
}
.draft-index {
display: none;
}
.draft-index-rotated {
@include breakpoint(medium) {
display: block;
font-size: $small-font-size;
text-transform: uppercase;
font-weight: 700;
color: #696969;
margin-top: 1rem;
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
.panel-title {
display: block;
}
}
}
}
.calc-text {
width: calc(65% - 25px);
border-right: none;
.show-comments {
width: 105%;
background: #FAFAFA;
padding: 0.25rem 2.5rem 0.25rem 0.25rem;
border: 1px solid $border;
margin-bottom: 1rem;
p {
margin-bottom: 0;
}
}
}
.calc-comments {
background: white;
cursor: auto;
width: calc(35% - 25px);
.draft-panel {
cursor: pointer;
}
.draft-comments-rotated {
display: none;
}
.comment-box {
width: 375px;
padding: 1rem;
background: #F9F9F9;
border: 1px solid $border;
display: block;
position: absolute;
top: 230px;
.button {
font-size: $small-font-size;
padding: 0.5em 1em;
}
.publish-comment {
float: right;
}
.comment-header {
color: #838383;
padding-bottom: 0.5rem;
margin-bottom: 1rem;
border-bottom: 1px solid $border;
.comment-number {
color: $text;
display: inline-block;
}
.icon-comment {
margin-right: 0.5rem;
}
a .icon-expand {
color: #838383;
font-size: $small-font-size;
float: right;
}
}
.comment-input {
padding-bottom: 4rem;
margin-bottom: 1rem;
margin-top: 1rem;
border-bottom: 1px solid $border;
.comment-advice {
border-top: 1px solid #D0D0D0;
border-right: 1px solid #D0D0D0;
border-left: 1px solid #D0D0D0;
width: 100%;
padding: 0.5rem;
display: inline-block;
font-size: $small-font-size;
background: #DFDFDF;
.icon-proposals {
color: #838383;
}
a {
color: #87A3B9;
text-decoration: underline;
}
}
textarea {
border-radius: 0;
box-shadow: none;
border-top: none;
border-bottom: 1px solid #D0D0D0;
border-right: 1px solid #D0D0D0;
border-left: 1px solid #D0D0D0;
width: 100%;
height: 200px;
margin-bottom: 0.5rem;
}
.comment-actions {
.cancel-comment {
color: #87A3B9;
text-decoration: underline;
font-size: $small-font-size;
display: inline-block;
}
}
}
.comment {
border-bottom: 1px solid $border;
padding-bottom: 0.75rem;
margin-bottom: 1rem;
font-size: $small-font-size;
.comment-text {
margin-bottom: 0.5rem;
p {
line-height: 1.5;
font-size: $small-font-size;
&:last-child {
margin-bottom: 0.5rem;
}
}
}
.comment-meta {
.comment-more-info {
display: inline-block;
.comment-expand {
display: inline-block;
&::after {
content: "|";
color: #838383;
}
}
.comment-replies {
display: inline-block;
}
}
.comment-votes {
color: #838383;
float: right;
display: inline-block;
.comment-votes-number {
margin-right: 0.25rem;
display: inline-block;
&::after {
margin-left: 0.25rem;
content: "|";
}
}
.icon-like,
.icon-unlike {
cursor: pointer;
color: #C7C7C7;
&:hover,
&:active,
&:focus {
color: #838383;
}
}
.icon-like {
margin-right: 0.25rem;
}
}
}
}
}
.comment-box:nth-child(4) {
top: 838px;
}
.comment-box:nth-child(5) {
top: 2035px;
}
.draft-panel {
background: #E5E5E5;
border-left: 1px solid #D4D4D4;
.panel-title {
display: inline-block;
}
}
.show-for-medium {
.panel-title {
display: none;
}
}
}
}
}