mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-29 22:56:37 -04:00
frontend: add commento embed js and scss
This commit is contained in:
99
frontend/sass/commento-buttons.scss
Normal file
99
frontend/sass/commento-buttons.scss
Normal file
@ -0,0 +1,99 @@
|
||||
@import "colors-main.scss";
|
||||
|
||||
@mixin mask-image($image) {
|
||||
-webkit-mask-image: url($image);
|
||||
mask-image: url($image);
|
||||
}
|
||||
|
||||
.commento-option-button {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
padding: 0px;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
z-index: 3;
|
||||
background: $gray-4;
|
||||
}
|
||||
|
||||
.commento-option-reply {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
@include mask-image('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8"?><svg version="1.1" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><g transform="matrix(1.7358 0 0 1.7335 4.2642 15.217)"><path d="m10 2.5 1e-6 -4.4421-9 7.4421 9 6.5759-1e-6 -4.6759c6.4194-1.4839 11.739 2.1762 11.739 2.1762s-2.0774-6.5475-11.739-7.0762z" fill="#abbac4"/></g></svg>');
|
||||
margin: 9px 3px 9px 3px;
|
||||
right: 32px;
|
||||
}
|
||||
|
||||
.commento-option-cancel {
|
||||
height: 13px;
|
||||
width: 13px;
|
||||
@include mask-image('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8"?><svg enable-background="new 0 0 129 129" version="1.1" viewBox="0 0 129 129" xmlns="http://www.w3.org/2000/svg"><path d="m7.6 121.4c0.8 0.8 1.8 1.2 2.9 1.2s2.1-0.4 2.9-1.2l51.1-51.1 51.1 51.1c0.8 0.8 1.8 1.2 2.9 1.2 1 0 2.1-0.4 2.9-1.2 1.6-1.6 1.6-4.2 0-5.8l-51.1-51.1 51.1-51.1c1.6-1.6 1.6-4.2 0-5.8s-4.2-1.6-5.8 0l-51.1 51.1-51.1-51.1c-1.6-1.6-4.2-1.6-5.8 0s-1.6 4.2 0 5.8l51.1 51.1-51.1 51.1c-1.6 1.6-1.6 4.2 0 5.8z" fill="#abbac4"/></svg>');
|
||||
margin: 12px 6px 12px 6px;
|
||||
right: 32px;
|
||||
background: $gray-5;
|
||||
}
|
||||
|
||||
.commento-option-collapse {
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
@include mask-image('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8"?><svg enable-background="new 0 0 42 42" version="1.1" viewBox="0 0 42 42" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><polygon points="42 20 0 20 0 22 20 22 22 22 42 22" fill="#1e2127"/></svg>');
|
||||
margin: 12px 6px 12px 6px;
|
||||
right: 0px;
|
||||
background: $gray-7;
|
||||
}
|
||||
|
||||
.commento-option-uncollapse {
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
@include mask-image('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8"?><svg enable-background="new 0 0 42 42" version="1.1" viewBox="0 0 42 42" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><polygon points="42 20 22 20 22 0 20 0 20 20 0 20 0 22 20 22 20 42 22 42 22 22 42 22" fill="#1e2127"/></svg>');
|
||||
margin: 12px 6px 12px 6px;
|
||||
right: 0px;
|
||||
background: $gray-7;
|
||||
}
|
||||
|
||||
.commento-option-upvote,
|
||||
.commento-option-downvote {
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
@include mask-image('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8"?><svg enable-background="new 0 0 284.929 284.929" version="1.1" viewBox="0 0 284.93 284.93" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="m282.08 195.28-133.05-133.04c-1.901-1.903-4.088-2.856-6.562-2.856s-4.665 0.953-6.567 2.856l-133.04 133.04c-1.906 1.906-2.856 4.093-2.856 6.568 0 2.474 0.953 4.664 2.856 6.566l14.272 14.271c1.903 1.903 4.093 2.854 6.567 2.854s4.664-0.951 6.567-2.854l112.2-112.2 112.21 112.21c1.902 1.903 4.093 2.848 6.563 2.848 2.478 0 4.668-0.951 6.57-2.848l14.274-14.277c1.902-1.902 2.847-4.093 2.847-6.566 1e-3 -2.476-0.944-4.666-2.846-6.569z" fill="#abbac4"/></svg>');
|
||||
margin: 12px 6px 12px 6px;
|
||||
}
|
||||
|
||||
.commento-option-upvote {
|
||||
right: 96px;
|
||||
}
|
||||
|
||||
.commento-option-downvote {
|
||||
transform: rotate(180deg);
|
||||
right: 64px;
|
||||
}
|
||||
|
||||
.commento-upvoted {
|
||||
background: $orange-7;
|
||||
}
|
||||
|
||||
.commento-downvoted {
|
||||
background: $indigo-6;
|
||||
}
|
||||
|
||||
.commento-option-remove {
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
@include mask-image('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8"?><svg enable-background="new 0 0 59 59" version="1.1" viewBox="0 0 59 59" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g fill="#1e2127"> <path d="m29.5 51c0.552 0 1-0.447 1-1v-33c0-0.553-0.448-1-1-1s-1 0.447-1 1v33c0 0.553 0.448 1 1 1z"/> <path d="m19.5 51c0.552 0 1-0.447 1-1v-33c0-0.553-0.448-1-1-1s-1 0.447-1 1v33c0 0.553 0.448 1 1 1z"/> <path d="m39.5 51c0.552 0 1-0.447 1-1v-33c0-0.553-0.448-1-1-1s-1 0.447-1 1v33c0 0.553 0.448 1 1 1z"/> <path d="M52.5,6H38.456c-0.11-1.25-0.495-3.358-1.813-4.711C35.809,0.434,34.751,0,33.499,0H23.5c-1.252,0-2.31,0.434-3.144,1.289 C19.038,2.642,18.653,4.75,18.543,6H6.5c-0.552,0-1,0.447-1,1s0.448,1,1,1h2.041l1.915,46.021C10.493,55.743,11.565,59,15.364,59 h28.272c3.799,0,4.871-3.257,4.907-4.958L50.459,8H52.5c0.552,0,1-0.447,1-1S53.052,6,52.5,6z M21.792,2.681 C22.24,2.223,22.799,2,23.5,2h9.999c0.701,0,1.26,0.223,1.708,0.681c0.805,0.823,1.128,2.271,1.24,3.319H20.553 C20.665,4.952,20.988,3.504,21.792,2.681z M46.544,53.979C46.538,54.288,46.4,57,43.636,57H15.364 c-2.734,0-2.898-2.717-2.909-3.042L10.542,8h37.915L46.544,53.979z"/></g></svg>');
|
||||
margin: 12px 6px 12px 6px;
|
||||
right: 128px;
|
||||
background: $red-8;
|
||||
}
|
||||
|
||||
.commento-option-approve {
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
@include mask-image('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8"?><svg enable-background="new 0 0 26 26" version="1.1" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="m0.3 14c-0.2-0.2-0.3-0.5-0.3-0.7s0.1-0.5 0.3-0.7l1.4-1.4c0.4-0.4 1-0.4 1.4 0l0.1 0.1 5.5 5.9c0.2 0.2 0.5 0.2 0.7 0l13.4-13.9h0.1v-8.8818e-16c0.4-0.4 1-0.4 1.4 0l1.4 1.4c0.4 0.4 0.4 1 0 1.4l-16 16.6c-0.2 0.2-0.4 0.3-0.7 0.3s-0.5-0.1-0.7-0.3l-7.8-8.4-0.2-0.3z" fill="#1e2127"/></svg>');
|
||||
margin: 12px 6px 12px 6px;
|
||||
right: 160px;
|
||||
background: $green-7;
|
||||
}
|
||||
|
||||
.commento-option-button:focus {
|
||||
outline: none;
|
||||
}
|
187
frontend/sass/commento-input.scss
Normal file
187
frontend/sass/commento-input.scss
Normal file
@ -0,0 +1,187 @@
|
||||
@import "colors-main.scss";
|
||||
|
||||
textarea,
|
||||
input[type=text] {
|
||||
background: #ffffff;
|
||||
border: 1px solid rgba(50, 50, 93, .1);
|
||||
border-radius: 3px;
|
||||
color: #525f7f;
|
||||
}
|
||||
|
||||
input[type=text]::placeholder {
|
||||
color: #cacaca;
|
||||
}
|
||||
|
||||
textarea::placeholder {
|
||||
color: #aaa;
|
||||
font-size: 22px;
|
||||
padding-top: 13px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
textarea {
|
||||
display: inline-block;
|
||||
font-family: "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
|
||||
padding: 8px;
|
||||
outline: none;
|
||||
overflow: auto;
|
||||
min-height: 75px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.commento-red-border {
|
||||
border: 1px solid $red-7;
|
||||
}
|
||||
|
||||
.commento-textarea-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
&:hover {
|
||||
.commento-button, .commento-buttons-container::before {
|
||||
opacity: 1;
|
||||
transform: translate(0px,-3px);
|
||||
}
|
||||
|
||||
.commento-submit-button {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.commento-blurred-textarea {
|
||||
opacity: .7;
|
||||
transform: scale(.95);
|
||||
filter: blur(4px);
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 550px) {
|
||||
.commento-buttons-container::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.commento-buttons-container {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.commento-mobile-buttons-container::before,
|
||||
.commento-buttons-container::before {
|
||||
content: "Authenticate with";
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
line-height: 24px;
|
||||
font-size: 14px;
|
||||
padding: 6px;
|
||||
color: $gray-8;
|
||||
transition: all 0.3s;
|
||||
opacity: 0;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.commento-mobile-buttons-container::before {
|
||||
content: "To join the discussion, authenticate with";;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 550px) {
|
||||
.commento-buttons-container::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.commento-button {
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
line-height: 24px;
|
||||
font-size: 14px;
|
||||
padding: 6px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
box-shadow: 0 4px 6px rgba(50,50,93,.11),0 1px 3px rgba(0,0,0,.08);
|
||||
border: 1px solid transparent;
|
||||
border-radius: 3px;
|
||||
color: #fff;
|
||||
width: 100px;
|
||||
margin-left: 5px;
|
||||
margin-left: 5px;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.commento-opaque {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.commento-opaque::before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.commento-google-button {
|
||||
transition: all 0.3s;
|
||||
background: #dd4b39;
|
||||
}
|
||||
|
||||
.commento-github-button {
|
||||
transition: all 0.3s;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
.commento-anonymous-button {
|
||||
transition: all 0.3s;
|
||||
background: #096fa6;
|
||||
}
|
||||
|
||||
.commento-blurred-textarea {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: space-between;
|
||||
transition: 0.3s all;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.commento-approve-button,
|
||||
.commento-delete-button,
|
||||
.commento-submit-button {
|
||||
margin-top: 10px;
|
||||
opacity: 1;
|
||||
font-size: 14px;
|
||||
width: -moz-fit-content;
|
||||
width: -webkit-fit-content;
|
||||
width: -ms-fit-content;
|
||||
width: -o-fit-content;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.commento-submit-button {
|
||||
float: right;
|
||||
background: $indigo-7;
|
||||
}
|
||||
|
||||
.commento-approve-button {
|
||||
background: $green-7;
|
||||
}
|
||||
|
||||
.commento-delete-button {
|
||||
background: $red-7;
|
||||
}
|
||||
|
||||
.commento-button-margin {
|
||||
padding-bottom: 60px;
|
||||
}
|
37
frontend/sass/commento-logged.scss
Normal file
37
frontend/sass/commento-logged.scss
Normal file
@ -0,0 +1,37 @@
|
||||
@import "colors-main.scss";
|
||||
|
||||
.commento-logged-container {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
margin-bottom: 16px;
|
||||
position: relative;
|
||||
|
||||
.commento-logout {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 16px;
|
||||
color: $gray-5;
|
||||
}
|
||||
|
||||
.commento-logged-in-as {
|
||||
position: relative;
|
||||
|
||||
.commento-name {
|
||||
color: $gray-8;
|
||||
border: none;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
left: 64px;
|
||||
}
|
||||
|
||||
.commento-photo {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
38
frontend/sass/commento-logo.scss
Normal file
38
frontend/sass/commento-logo.scss
Normal file
@ -0,0 +1,38 @@
|
||||
@import "colors-main.scss";
|
||||
|
||||
.commento-footer {
|
||||
margin: 36px 0px 12px 0px;
|
||||
border-top: 1px solid $gray-1;
|
||||
padding-right: 12px;
|
||||
|
||||
.commento-logo-container {
|
||||
float: right;
|
||||
|
||||
.commento-logo {
|
||||
border: none;
|
||||
width: auto;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 5px;
|
||||
border-radius: 3px;
|
||||
|
||||
.commento-logo-svg {
|
||||
display: inline;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-right: 8px;
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
|
||||
.commento-logo-text {
|
||||
font-size: 13px;
|
||||
color: $gray-6;
|
||||
display: inline;
|
||||
line-height: 24px;
|
||||
position: relative;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
20
frontend/sass/commento-tags.scss
Normal file
20
frontend/sass/commento-tags.scss
Normal file
@ -0,0 +1,20 @@
|
||||
@import "colors-main.scss";
|
||||
|
||||
code {
|
||||
background: $red-3;
|
||||
font-family: monospace;
|
||||
line-height: 1.5;
|
||||
color: $red-6;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #1f89ff;
|
||||
border-bottom: 1px solid #1f89ff;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:focus {
|
||||
box-shadow: 0 0 0 1px rgba(87, 85, 217, .2);
|
||||
}
|
134
frontend/sass/commento.scss
Normal file
134
frontend/sass/commento.scss
Normal file
@ -0,0 +1,134 @@
|
||||
#commento {
|
||||
font-family: "Source Sans Pro", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
color: #50596c;
|
||||
overflow-x: hidden;
|
||||
text-rendering: optimizeLegibility;
|
||||
padding: 8px;
|
||||
|
||||
@import "colors-main.scss";
|
||||
@import "common-main.scss";
|
||||
|
||||
@import "commento-tags.scss";
|
||||
@import "commento-logo.scss";
|
||||
@import "commento-input.scss";
|
||||
@import "commento-logged.scss";
|
||||
@import "commento-buttons.scss";
|
||||
|
||||
.commento-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.commento-error-box {
|
||||
width: 100%;
|
||||
border-radius: 4px;
|
||||
height: 32px;
|
||||
text-align: center;
|
||||
color: $red-7;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.commento-moderation-notice {
|
||||
width: 100%;
|
||||
border-radius: 4px;
|
||||
height: 32px;
|
||||
text-align: center;
|
||||
color: $orange-7;
|
||||
font-weight: bold;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.commento-dark-card {
|
||||
background: $blue-1;
|
||||
}
|
||||
|
||||
.commento-card {
|
||||
padding: 12px 0px 0px 12px;
|
||||
margin-top: 16px;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
|
||||
.commento-header {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.commento-avatar {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: white;
|
||||
font-size: 22px;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
border: 1px solid #fff;
|
||||
box-shadow: 0px 0px 0px 2px #f00;
|
||||
}
|
||||
|
||||
.commento-avatar-img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.commento-avatar::after {
|
||||
content:"";
|
||||
display:block;
|
||||
}
|
||||
|
||||
.commento-name {
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
color: #555;
|
||||
border: none;
|
||||
display: block;
|
||||
z-index: 1;
|
||||
margin-left: 48px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.commento-subtitle {
|
||||
display: block;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
margin-left: 48px;
|
||||
}
|
||||
|
||||
.commento-score {
|
||||
display: inline;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.commento-score::before {
|
||||
content: "\00a0 \00a0 \00b7 \00a0 \00a0";
|
||||
}
|
||||
|
||||
.commento-body {
|
||||
p {
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.commento-options {
|
||||
float: right;
|
||||
position: relative;
|
||||
height: 38px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.commento-moderation {
|
||||
height: 48px;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user