Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/civicsoft/ieddit
Browse files Browse the repository at this point in the history
  • Loading branch information
cc-d committed Dec 22, 2019
2 parents 71dca4b + b653b12 commit c6ae080
Show file tree
Hide file tree
Showing 5 changed files with 309 additions and 283 deletions.
2 changes: 1 addition & 1 deletion app/config.py
Expand Up @@ -81,4 +81,4 @@
AVG_UP_COLOR = '#e5b866'

DEFAULT_LANGUAGE = 'en'
LANGUAGES = ['en', 'fr']
LANGUAGES = ['en', 'fr', 'es']
1 change: 0 additions & 1 deletion app/functions/functions.py
Expand Up @@ -291,7 +291,6 @@ def inline_expansion(text):
'</a>' + \
'</div>' + \
'<div class="inline-expanded-hidden" id="hidden-' + random_id + '">' + \
'<br>' + \
'<img class="inline-image" id="real-' + random_id + '" real-src="' + html.escape(a[1]) + '">' + \
'</div>' + \
'</div>' + \
Expand Down
76 changes: 50 additions & 26 deletions app/static/base.css
Expand Up @@ -40,6 +40,10 @@ textarea {
font-size: 0.8rem;
}

.vote-comment-wrapper {
display: inline-block;
}

.post-image {
margin-left: 0.5rem;
margin-right: 0.5rem!important;
Expand Down Expand Up @@ -249,10 +253,7 @@ textarea {

.top-of-post {
margin-left: 1rem;
}

.top-post-sublink {
color: #212529;
display: inline;
}

.comment-textarea-button {
Expand All @@ -263,7 +264,6 @@ textarea {
.user-icon-link {
margin-left: 0.25rem;
text-decoration: none;
color: #212529;
}

.user-icon-link:hover {
Expand Down Expand Up @@ -308,7 +308,7 @@ textarea {
.comment-post-voting{
margin-left: 1rem;
margin-right: 0.5em;
font-size:16px;
display: inline-block;
}

.top-sort {
Expand Down Expand Up @@ -459,6 +459,34 @@ ul, li{
margin-left: 1rem;
}

.post-flag {
margin-right: 0.5rem;
}

.small-user-and-sub {
display: inline;
}

.user-and-sub {
display: inline;
}

.usertype-admin {
color: red!important;
}

.usertype-mod {
color: lightblue!important;
}

.content-user {
display: inline-block;
}

.small-user {
display: inline-block;
}

.sub-list {
margin-bottom: 0.5rem;
margin-top: 0.5rem;
Expand Down Expand Up @@ -497,10 +525,6 @@ ul, li{
word-break: break-word;
}

.comment-link {
color: #212529;
}

.fa-arrow-up {
color: #212529;
}
Expand Down Expand Up @@ -702,6 +726,7 @@ ul, li{

.expanded-post-image {
margin-bottom: 0.5rem;
max-width: 100%;
}

ul {
Expand Down Expand Up @@ -918,8 +943,16 @@ ul {
display: inline-block;
}

.bottom_inner_row {
margin-left: -23px;
.bottom-post-row {
margin-left: -1rem;
}

.post-position-first {
margin-top: 0.25rem;
}

.post-position-last {
margin-bottom: 0.25rem;
}

.btn-description {
Expand Down Expand Up @@ -1190,15 +1223,8 @@ blockquote {
.sub-post-title-link {
color: #eee;
}
.sub-post-title-url {
color: #ccc;
}

.top-of-post {
color: #ccc;
}

.comment-link {
.sub-post-title-url {
color: #ccc;
}

Expand Down Expand Up @@ -1312,23 +1338,21 @@ blockquote {

.expansion-block {
display: inline;
margin-right: 1rem;
padding-right: 0.5rem;
padding-right: 1rem;
}

.expansion-block-expanded {
display: inline;
margin-right: 0px;
padding-right: 0.5rem;

}

.expansion-block-closed {
display: inline;
margin-right: 0rem;
padding-right: 0.5rem;

}

.inline-expanded {
margin: 0.5rem;
display: block;
max-height: 100%;
max-width: 100%;
Expand Down
8 changes: 6 additions & 2 deletions app/static/expand-post.js
Expand Up @@ -3,6 +3,11 @@ var widthBreak = 768;

$(document).ready(function() {
maxWidth = $('.posts-media-body').first().width();

if (maxWidth === undefined) {
return true;
}

if (maxWidth <= widthBreak) {
maxWidth = maxWidth + 80; // thumbnail will be hidden on expansion, it is 80px
}
Expand Down Expand Up @@ -36,7 +41,6 @@ function maxVidSize() {

// 16 because each side is 0.5rem
width = parseInt(($(widtha).width() - 4));
console.log(width);

if (width > maxW) {
width = maxW;
Expand Down Expand Up @@ -80,7 +84,7 @@ function expandPost(pid, ptype, vid) {
} else {
v = $('#vid-' + pid);
src = v.attr('realsrc');
console.log(src)

v.attr('src', src);
v.html(v);
v.css('display', '');
Expand Down

0 comments on commit c6ae080

Please sign in to comment.