Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile visuals #2766

Merged
merged 8 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 95 additions & 7 deletions app/assets/v2/css/kudos/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/assets/v2/css/kudos/styles.css.map

Large diffs are not rendered by default.

140 changes: 134 additions & 6 deletions app/assets/v2/css/kudos/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,38 @@ $bg-cellarius: #4D5858;
background: #fff;
border-radius: .25rem;
height: 100%;
overflow: hidden;
// overflow: hidden;
octavioamu marked this conversation as resolved.
Show resolved Hide resolved
transition: all 0.5s ease-in-out;

&:hover {
z-index: 2;
}

> a {
position: relative;
display: block;
}

.sender-avatar {
position: absolute;
width: 50px;
border-radius: 50%;
bottom: 1em;
left: 7%;
width: 18%;

&.right {
left: auto;
right: 5%;
}
}

&:hover,
&:active,
&:focus,
&:focus-within {
.content-hover {
display: flex;
// display: flex;
octavioamu marked this conversation as resolved.
Show resolved Hide resolved
}
}

Expand All @@ -102,9 +126,10 @@ $bg-cellarius: #4D5858;

.kd-content {
font-size: 0.9rem;
padding: 1.3rem 2rem;
padding: 1.3rem 1.3rem 0.7rem;

a {
a,
b {
color: #3e00ff;
}
}
Expand All @@ -118,14 +143,17 @@ $bg-cellarius: #4D5858;
background: rgba($gc-blue,.8);
color: white;
padding: 1rem;
display: none;
overflow-y:auto;
flex-direction: column;
// justify-content: space-between;

a {
color: white;
font-weight: 700;
font-size: 0.9rem;
}

time {
font-size: 0.75rem;
}
}

Expand Down Expand Up @@ -687,3 +715,103 @@ clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
margin-left: -10px;
margin-bottom: -20px;
}

.flip-card {
-webkit-perspective: 1000;
-moz-perspective: 1000;
-o-perspective: 1000;
perspective: 1000px;
position: relative;
outline: none;
background-color: transparent;
display: flex;

&:focus .flip-card__flipper {
transform: rotateY(-10deg);
box-shadow: 2px 0px 7px 1px hsla(0, 0%, 0%, 0.1);
}

&__hold {
// position: absolute;
octavioamu marked this conversation as resolved.
Show resolved Hide resolved
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}
&__flipper {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
transition: 0.6s;
position: relative;
display: flex;
cursor: pointer;
border-radius: 3px;
}
&__front {
position: relative;
background: white;
border-radius: .25rem;
z-index: 2;
transform: rotateY(0);
}


&__flipper:hover {
transform: rotateY(-10deg);
box-shadow: 2px 0px 7px 1px hsla(0, 0%, 0%, 0.1);
}
&.turn .flip-card__flipper {
transform: rotateY(-0.5turn);
}

&__back {
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
transform: rotateY(-0.5turn);
border-radius: .25rem;
}

&__extra-data {
display: flex;
justify-content: space-between;
margin: .5rem 0 1.5rem;

a {
font-size: 0.75rem;
}
}

&__stack-img {
display: flex;
flex-direction: row-reverse;
align-items: flex-end;

img {
border: 1px solid #fff;
height: 30px;
margin-left: -18px;
}
}

}

.bubble {
background: rgba(0,0,0,0.4);
padding: 0.7em;
position: relative;
border-radius: 3px;
margin-top: 1.3em;
line-height: 1.3em;

p {
margin-bottom: 0;
}

&:after {
content: '';
border: 11px solid;
position: absolute;
border-color: transparent transparent rgba(0, 0, 0, 0.4) transparent;
border-width: 0px 0.5em 0.5em 0.5em;
top: -0.5em;
left: 1em;
}
}
11 changes: 10 additions & 1 deletion app/dashboard/templates/profiles/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
</div>
{% endfor %}
</div>
</div>
</div>
{% else %}
{% include 'profiles/none.html' %}
{% endif %}
Expand Down Expand Up @@ -413,6 +413,15 @@
});
}(jQuery));

$('.flip-card').on('click keypress', function(e){
octavioamu marked this conversation as resolved.
Show resolved Hide resolved

if ($(e.target).is('a')) {
e.stopPropagation();
return
}
$(this).toggleClass('turn')
} )

</script>

</body>
Expand Down
43 changes: 32 additions & 11 deletions app/kudos/templates/shared/kudos_card_hover_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,41 @@
{% endcomment %}
{% load i18n static kudos_extras %}
{% load humanize %}
<p>Sent {{relation}}

{% if relation == 'to' %}
<a href="{% url 'profile' kt.username %}">{{kt.username}}</a>
{% else %}
<a href="{% url 'profile' kt.from_username %}">{{kt.from_username}}</a>
{% endif %}
{% for kt in kudos_group.list %}
<div class="d-flex flex-row">

{% if relation == 'to' %}
<img src="/dynamic/avatar/{{ kt.username }}" alt="{{ kt.username }}" class="sender-avatars rounded-circle mr-3" width="45" height="45">
<div class="d-flex flex-column">
<a href="{% url 'profile' kt.username %}" >{{kt.username}}</a>
<time datetime="{{kt.created_on|date:'c'}}" title="{{kt.created_on}}">
{{kt.created_on|naturaltime}}
</time>
</div>
octavioamu marked this conversation as resolved.
Show resolved Hide resolved
{% else %}
<img src="/dynamic/avatar/{{ kt.from_username }}" alt="{{ kt.from_username }}" class="sender-avatars rounded-circle mr-3" width="45" height="45">
<div class="d-flex flex-column">
<a href="{% url 'profile' kt.from_username %}" title="{% trans 'go to profile' %}">{{kt.from_username}}</a>
<time datetime="{{kt.created_on|date:'c'}}" title="{{kt.created_on}}">
{{kt.created_on|naturaltime}}
</time>
</div>
octavioamu marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}

{{kt.created_on|naturaltime}}</p>
<p>
<a href="{% if not kt.network == 'mainnet' %}https://{{ kt.network }}.etherscan.io/tx/{{ kt.txid }}{% else %}https://etherscan.io/tx/{{ kt.txid }}{% endif %}" target="_blank" class="d-block mb-1">{{ kt.txid|humanize_address }}</a>
</p>
</div>
{% if kt.comments_public %}
{% trans "Comment:" %}
<div class="bubble">
<p>{{kt.comments_public}}</p>
</div>
octavioamu marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}

<div class="flip-card__extra-data">
{% if tk.github_url %}
<a href="{{tk.github_url}}" target="_blank">{% trans 'Issue url' %}</a>
{% endif %}
<a title="{% trans 'tx in etherscan' %}" href="{% if not kt.network == 'mainnet' %}https://{{ kt.network }}.etherscan.io/tx/{{ kt.txid }}{% else %}https://etherscan.io/tx/{{ kt.txid }}{% endif %}" target="_blank" class="mb-1">{{ kt.txid|humanize_address }}</a>
</div>


{% endfor %}
Loading