diff --git a/public/style.css b/public/style.css index 95c3d13..32d6649 100644 --- a/public/style.css +++ b/public/style.css @@ -86,10 +86,10 @@ summary { visibility: hidden; } .score form.link-btn input { - display: block; + display: inline-block; color: #b7b7b7; font-size: 20px; - line-height: 16px; + line-height: 15px; } .dark .score form.link-btn input { color: #646464; @@ -104,10 +104,6 @@ summary { color: #eb445a; } -.score form div { - position: relative; - top: 2px; -} .title a { font-size: medium; text-decoration: none; @@ -174,7 +170,7 @@ summary { margin: 0px 0px 5px 15px; border: 1px solid #e6e6e6; border-radius: 3px; - padding: 5px 10px 5px 5px; + padding: 5px 10px 5px 7px; } .dark .comment { border-color: #333; @@ -395,8 +391,8 @@ form.nsfw div { #loadmore.show { display: block; } -#loadmore[disabled] { - visibility: visible; +#end { + visibility: hidden; } .buttons li { display: inline; @@ -505,6 +501,9 @@ form.nsfw div { .expando.open{ display: block; } +.expando .embed { + text-align: center; +} .expando .image { display: block; overflow: hidden; diff --git a/public/utils.js b/public/utils.js index 5af1ba4..0ed006a 100644 --- a/public/utils.js +++ b/public/utils.js @@ -122,6 +122,7 @@ function loadMore(e) { } var loadmore = document.getElementById("loadmore") if (loadmore) loadmore.className = "show" + insert_youtube() } else { e.target.outerHTML = '' @@ -263,18 +264,21 @@ function toggle_images(open) { } } -var posts = document.getElementsByClassName("post") -for (var i = 0; i < posts.length; i++) { - var url = posts[i].getElementsByClassName("url")[0].href - if (id = parse_youtube(url)) { - var btn = posts[i].getElementsByClassName("expando-button")[0] - if (btn.className.indexOf("open") > -1) { - posts[i].getElementsByClassName("embed")[0].innerHTML = youtube_iframe(id) - } else { - btn.className = "expando-button" +function insert_youtube() { + var posts = document.getElementsByClassName("post") + for (var i = 0; i < posts.length; i++) { + var url = posts[i].getElementsByClassName("url")[0].href + if (id = parse_youtube(url)) { + var btn = posts[i].getElementsByClassName("expando-button")[0] + if (btn.className.indexOf("open") > -1) { + posts[i].getElementsByClassName("embed")[0].innerHTML = youtube_iframe(id) + } else { + btn.className = "expando-button" + } } } } +insert_youtube() if (localStorage.getItem("endlessScrolling") == "true") { var pager = document.getElementsByClassName("pager") diff --git a/templates/frontpage.html b/templates/frontpage.html index 806e152..f2c504e 100644 --- a/templates/frontpage.html +++ b/templates/frontpage.html @@ -2,7 +2,7 @@ {{ if and .Community (ne .Community.CommunityView.Community.Title "")}}{{.Community.CommunityView.Community.Title}}{{else if ne .CommunityName ""}}/c/{{.CommunityName}}{{ else if .User}}overview for {{.User.PersonView.Person.Name}}{{else}}{{ host .Host }}{{end}} - + diff --git a/templates/main.html b/templates/main.html index 6cc7a1e..acdaae4 100644 --- a/templates/main.html +++ b/templates/main.html @@ -3,7 +3,7 @@ {{if and .Posts .PostID }}{{ (index .Posts 0).Post.Name}} : {{.CommunityName}}{{else if and .Community (ne .Community.CommunityView.Community.Title "")}}{{.Community.CommunityView.Community.Title}}{{else if ne .CommunityName ""}}/c/{{.CommunityName}}{{ else if .User}}overview for {{.User.PersonView.Person.Name}}{{else}}{{ host .Host }}{{end}} - +