Skip to content

Commit

Permalink
Added github icon to gh pages
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhRahul committed Nov 9, 2020
1 parent 48b01c3 commit 59b5b51
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Binary file added GitHub-Mark-64px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added GitHub-Mark-Light-64px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 14 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,20 @@
function toggleTheme(){
const theme_to_disable = darkTheme? 'dark-theme' : 'light-theme'
const theme_to_enable = !darkTheme? 'dark-theme' : 'light-theme'
for(element of document.getElementsByClassName(theme_to_disable))
element.setAttribute('disabled', '')

for(element of document.getElementsByClassName(theme_to_enable))
element.removeAttribute('disabled')
for(element of document.getElementsByClassName(theme_to_disable))
element.setAttribute('disabled', '')

darkTheme = !darkTheme
if(darkTheme){
document.getElementById('github-icon').src = 'GitHub-Mark-Light-64px.png'
}
else{
document.getElementById('github-icon').src = 'GitHub-Mark-64px.png'
}

}
</script>

Expand Down Expand Up @@ -96,6 +105,9 @@ <h2>Enter the url to preview:</h2>
<button type="button" class="btn btn-primary ml-1 mt-2" data-toggle="collapse" data-target="#settings">Collapse</button>
</div>
<hr style="background: #3498db; margin-bottom:0; margin-top:0.7rem"/>
<a href="https://github.com/AnirudhRahul/Reddit-Embed" target="_blank">
<img src="GitHub-Mark-Light-64px.png" id="github-icon" style="position: fixed; bottom: 0.4rem; right: 0.35rem; width: 48px"/>
</a>
<div id="out" class="reddit-embed center"></div>


Expand Down

0 comments on commit 59b5b51

Please sign in to comment.