Style blockquote
This commit is contained in:
parent
db8cbc421d
commit
2829964530
12
html/main.js
12
html/main.js
@ -17,20 +17,20 @@ const toggleMedia = e => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("load", function() {
|
window.addEventListener("load", function() {
|
||||||
const postsSection = document.querySelector(".posts-section");
|
const postsSection = document.querySelector(".posts-section");
|
||||||
const commentsSection = document.querySelector(".comments-section");
|
const commentsSection = document.querySelector(".comments-section");
|
||||||
if (commentsSection) {
|
if (commentsSection) {
|
||||||
commentsSection.style.display = "none";
|
commentsSection.style.display = "none";
|
||||||
const toggleButton = document.createElement("button");
|
const toggleButton = document.createElement("button");
|
||||||
toggleButton.innerText = "toggle";
|
toggleButton.innerText = "toggle";
|
||||||
toggleButton.addEventListener("click", toggleView);
|
toggleButton.addEventListener("click", toggleView);
|
||||||
document.body.insertBefore(toggleButton, postsSection);
|
document.body.insertBefore(toggleButton, postsSection);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let preview of document.querySelectorAll(".preview")) {
|
for (let preview of document.querySelectorAll(".preview")) {
|
||||||
const media = preview.querySelector("img") || preview.querySelector("video");
|
const media = preview.querySelector("img") || preview.querySelector("video");
|
||||||
if (media) {
|
if (media) {
|
||||||
media.addEventListener("click", toggleMedia);
|
media.addEventListener("click", toggleMedia);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
@ -12,7 +12,7 @@
|
|||||||
</section>
|
</section>
|
||||||
<section class="comments-section">
|
<section class="comments-section">
|
||||||
<h1>Saved Comments</h1>
|
<h1>Saved Comments</h1>
|
||||||
</section>
|
|
||||||
<!--comments-->
|
<!--comments-->
|
||||||
|
</section>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -46,6 +46,21 @@ code {
|
|||||||
white-space: pre;
|
white-space: pre;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
blockquote {
|
||||||
|
font-style: italic;
|
||||||
|
padding-left: 8px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote:before {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
width: 4px;
|
||||||
|
content: "";
|
||||||
|
height: 100%;
|
||||||
|
background-color: #16a085;
|
||||||
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
@ -101,11 +101,16 @@ def save_media(post, location):
|
|||||||
if domain == "redd.it":
|
if domain == "redd.it":
|
||||||
downloader = Downloader(max_q=True, log=False)
|
downloader = Downloader(max_q=True, log=False)
|
||||||
downloader.url = url
|
downloader.url = url
|
||||||
|
current = os.getcwd()
|
||||||
|
try:
|
||||||
name = downloader.download()
|
name = downloader.download()
|
||||||
extension = name.split(".")[-1]
|
extension = name.split(".")[-1]
|
||||||
filename = f"{readable_name}_{post.id}.{extension}"
|
filename = f"{readable_name}_{post.id}.{extension}"
|
||||||
os.rename(name, os.path.join(location, "media", filename))
|
os.rename(name, os.path.join(location, "media", filename))
|
||||||
return filename
|
return filename
|
||||||
|
except:
|
||||||
|
os.chdir(current)
|
||||||
|
return None
|
||||||
|
|
||||||
# Is it a gfycat link that redirects? Update the URL if possible
|
# Is it a gfycat link that redirects? Update the URL if possible
|
||||||
if domain == "gfycat.com":
|
if domain == "gfycat.com":
|
||||||
|
Loading…
Reference in New Issue
Block a user