1
mirror of https://gitlab.com/commento/commento.git synced 2025-06-29 22:56:37 -04:00

frontend, api: allow custom emails as commenters

I'm really sorry this came out as one huge commit, but I'm afraid
I can't split this up.

Closes https://gitlab.com/commento/commento-ce/issues/9
This commit is contained in:
Adhityaa
2018-06-10 22:45:56 +05:30
parent e42f77b4eb
commit 2020405e8b
25 changed files with 837 additions and 267 deletions

View File

@ -14,9 +14,9 @@ input[type=text]::placeholder {
textarea::placeholder {
color: #aaa;
font-size: 22px;
padding-top: 13px;
font-size: 20px;
display: flex;
line-height: 80px;
justify-content: center;
align-items: center;
text-align: center;
@ -28,7 +28,7 @@ textarea {
padding: 8px;
outline: none;
overflow: auto;
min-height: 75px;
min-height: 100px;
width: 100%;
}
@ -41,65 +41,42 @@ textarea {
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-submit-button {
transform: none;
}
}
.commento-buttons-container {
display: inline-block;
position: absolute;
z-index: 1;
opacity: 1;
.commento-oauth-buttons-container {
display: flex;
justify-content: center;
}
.commento-mobile-buttons-container::before,
.commento-buttons-container::before {
content: "Authenticate with";
display: inline-flex;
.commento-oauth-buttons,
.commento-create-container {
display: flex;
flex-direction: column;
align-items: center;
position: absolute;
z-index: 1;
}
.commento-oauth-buttons {
display: contents;
}
.commento-create-container::before {
content: "Want to add to the discussion?";
display: block;
text-align: center;
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;
@ -118,31 +95,25 @@ textarea {
color: #fff;
width: 100px;
margin-left: 5px;
margin-left: 5px;
opacity: 0;
}
.commento-opaque {
opacity: 1;
}
.commento-opaque::before {
opacity: 1;
margin-right: 5px;
}
.commento-google-button {
transition: all 0.3s;
background: #dd4b39;
text-transform: uppercase;
font-size: 12px;
}
.commento-github-button {
transition: all 0.3s;
background: #000000;
text-transform: uppercase;
font-size: 12px;
}
.commento-anonymous-button {
transition: all 0.3s;
background: #096fa6;
text-transform: uppercase;
font-size: 12px;
}
.commento-blurred-textarea {
@ -152,7 +123,6 @@ textarea {
align-items: center;
justify-content: center;
justify-content: space-between;
transition: 0.3s all;
will-change: transform;
}
@ -160,7 +130,6 @@ textarea {
.commento-delete-button,
.commento-submit-button {
margin-top: 10px;
opacity: 1;
font-size: 14px;
width: -moz-fit-content;
width: -webkit-fit-content;
@ -169,6 +138,11 @@ textarea {
width: fit-content;
}
.commento-create-button {
width: 150px;
background: $pink-9;
}
.commento-submit-button {
float: right;
background: $indigo-7;

View File

@ -5,6 +5,7 @@
text-align: left;
margin-bottom: 16px;
position: relative;
height: 38px;
.commento-logout {
cursor: pointer;
@ -23,15 +24,7 @@
font-weight: bold;
position: absolute;
top: 6px;
left: 64px;
}
.commento-photo {
width: 32px;
height: 32px;
border-radius: 50%;
margin-left: 16px;
margin-right: 16px;
left: 48px;
}
}
}

View File

@ -0,0 +1,92 @@
@import "colors-main.scss";
.commento-login-box-container {
display: flex;
justify-content: center;
position: relative;
width: 100%;
height: 0px;
overflow: visible;
.commento-login-box {
width: 90%;
max-width: 500px;
min-height: 125px;
background: $gray-1;
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;
z-index: 100;
position: absolute;
top: 8px;
padding: 16px;
opacity: 1;
transition: opacity 0.2s;
hr {
border: none;
background: $gray-2;
height: 1px;
}
.commento-login-box-header {
font-size: 20px;
font-weight: 200;
text-align: center;
color: $pink-8;
margin: 16px;
}
.commento-login-box-subtitle {
color: $gray-6;
text-align: center;
font-size: 15px;
margin: 12px 0px;
}
@import "email-main.scss";
.commento-login-link-container {
margin: 16px;
width: calc(100% - 32px);
text-align: center;
.commento-login-link {
font-size: 15px;
font-weight: bold;
border-bottom: none;
}
}
.commento-login-box-close {
position: absolute;
right: 16px;
top: 16px;
width: 16px;
height: 16px;
opacity: 0.3;
}
.commento-login-box-close:hover {
opacity: 1;
cursor: pointer;
}
.commento-login-box-close:before, .commento-login-box-close:after {
position: absolute;
left: 7px;
content: ' ';
height: 17px;
width: 2px;
background-color: $gray-7;
}
.commento-login-box-close:before {
transform: rotate(45deg);
}
.commento-login-box-close:after {
transform: rotate(-45deg);
}
}
}

View File

@ -1,11 +1,14 @@
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro');
#commento {
font-family: "Source Sans Pro", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
font-size: 14px;
font-size: 15px;
line-height: 1.5;
color: #50596c;
overflow-x: hidden;
text-rendering: optimizeLegibility;
padding: 8px;
min-height: 350px;
@import "colors-main.scss";
@import "common-main.scss";
@ -15,11 +18,20 @@
@import "commento-input.scss";
@import "commento-logged.scss";
@import "commento-buttons.scss";
@import "commento-login.scss";
.commento-hidden {
display: none;
}
.commento-blurred {
filter: blur(4px);
}
.commento-main-area {
transition: filter 0.2s;
}
.commento-error-box {
width: 100%;
border-radius: 4px;
@ -43,6 +55,32 @@
background: $blue-1;
}
.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-card {
padding: 12px 0px 0px 12px;
margin-top: 16px;
@ -52,32 +90,6 @@
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;

View File

@ -105,60 +105,7 @@ body {
}
}
.email-container {
display: flex;
justify-content: center;
width: 100%;
.email {
@extend .shadow;
border-radius: 4px;
background: $white;
width: 100%;
max-width: 400px;
.input {
height: 40px;
background: $white;
border: none;
outline: none;
padding: 5px;
padding-left: 10px;
width: 250px;
}
.input::placeholder {
color: $gray-5;
}
.email-button {
height: 40px;
min-width: 110px;
float: right;
background: $white;
border: none;
outline: none;
padding: 0px 10px 0px 10px;
border-left: 1px solid $gray-1;
font-size: 12px;
text-transform: uppercase;
text-align: center;
font-weight: bold;
color: $blue-7;
cursor: pointer;
transition: all 0.2s;
}
.email-button:hover {
color: $blue-6;
}
.email-button:disabled {
cursor: default;
color: $gray-6;
}
}
}
@import "email-main.scss";
.mod-emails-container {
display: flex;

View File

@ -0,0 +1,58 @@
@import "colors-main.scss";
@import "common-main.scss";
.commento-email-container {
display: flex;
justify-content: center;
width: 100%;
margin: 8px 0px;
.commento-email {
@extend .shadow;
border-radius: 4px;
background: $white;
width: 100%;
max-width: 400px;
.commento-input {
height: 40px;
background: $white;
border: none;
outline: none;
padding: 5px;
padding-left: 10px;
width: calc(100% - 120px);
}
.commento-input::placeholder {
color: $gray-5;
}
.commento-email-button {
height: 40px;
min-width: 110px;
float: right;
background: $white;
border: none;
outline: none;
padding: 0px 10px 0px 10px;
border-left: 1px solid $gray-1;
font-size: 12px;
text-transform: uppercase;
text-align: center;
font-weight: bold;
color: $blue-7;
cursor: pointer;
transition: all 0.2s;
}
.commento-email-button:hover {
color: $blue-6;
}
.commento-email-button:disabled {
cursor: default;
color: $gray-6;
}
}
}