Skip to content

Commit

Permalink
Source favicon and apple-touch-icon from GitHub
Browse files Browse the repository at this point in the history
Remove favicon references from code
  • Loading branch information
dormant-user committed Mar 7, 2024
1 parent 25af651 commit 09b53a2
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 24 deletions.
12 changes: 0 additions & 12 deletions pystream/routers/basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@
router = APIRouter()


@router.get(path="/favicon.ico", include_in_schema=False)
async def get_favicon() -> FileResponse:
"""Gets the favicon.ico and adds to the API endpoint.
Returns:
FileResponse:
Uses FileResponse to send the favicon.ico to support the robinhood script's robinhood.html.
"""
if os.path.isfile('favicon.ico'):
return FileResponse('favicon.ico')


@router.get("/", include_in_schema=False)
async def root(request: Request) -> RedirectResponse:
"""Reads the root request to render HTMl page.
Expand Down
4 changes: 2 additions & 2 deletions pystream/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<meta content="width=device-width, initial-scale=1" name="viewport">
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js"></script>
<!-- Disables 404 for favicon.ico which is a logo on top of the webpage tab -->
<link rel="shortcut icon" href="#">
<link property="og:image" rel="icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.ico">
<link property="og:image" rel="apple-touch-icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.png">
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
Expand Down
4 changes: 2 additions & 2 deletions pystream/templates/land.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<!-- <script src="https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script> -->
<link href="https://vjs.zencdn.net/8.6.1/video-js.css" rel="stylesheet"/>
<script src="https://vjs.zencdn.net/8.6.1/video.min.js" defer></script>
<!-- Disables 404 for favicon.ico which is a logo on top of the webpage tab -->
<link rel="shortcut icon" href="#">
<link property="og:image" rel="icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.ico">
<link property="og:image" rel="apple-touch-icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.png">
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- Button CSS -->
Expand Down
4 changes: 2 additions & 2 deletions pystream/templates/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<meta name="keywords" content="Python, streaming, fastapi, JavaScript, HTML, CSS">
<meta name="author" content="Vignesh Rao">
<meta content="width=device-width, initial-scale=1" name="viewport">
<!-- Disables 404 for favicon.ico which is a logo on top of the webpage tab -->
<link rel="shortcut icon" href="#">
<link property="og:image" rel="icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.ico">
<link property="og:image" rel="apple-touch-icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.png">
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- CSS and JS for night mode -->
Expand Down
6 changes: 4 additions & 2 deletions pystream/templates/logout.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta property="og:type" content="VideoStreaming">
<meta name="keywords" content="Python, streaming, fastapi, JavaScript, HTML, CSS">
<meta name="author" content="Vignesh Rao">
<link property="og:image" rel="icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.ico">
<link property="og:image" rel="apple-touch-icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.png">
<meta content="width=device-width, initial-scale=1" name="viewport">
<style>
img {
Expand Down Expand Up @@ -54,8 +56,8 @@ <h2 style="margin-top:5%">This page requires JavaScript
<h2 style="margin-top:5%">LOGOUT</h2>
<h3>{{ detail }}</h3>
<p>
<img src="https://raw.githubusercontent.com/thevickypedia/open-source/main/images/logout.gif"
onerror="this.src='https://vigneshrao.com/open-source/images/logout.gif'"
<img src="https://thevickypedia.github.io/open-source/images/gif/blended_fusion.gif"
onerror="this.src='https://vigneshrao.com/open-source/images/gif/blended_fusion.gif'"
width="200" height="200" alt="Image" class="center">
</p>
{% if show_login %}
Expand Down
6 changes: 4 additions & 2 deletions pystream/templates/session.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta property="og:type" content="VideoStreaming">
<meta name="keywords" content="Python, streaming, fastapi, JavaScript, HTML, CSS">
<meta name="author" content="Vignesh Rao">
<link property="og:image" rel="icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.ico">
<link property="og:image" rel="apple-touch-icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.png">
<meta content="width=device-width, initial-scale=1" name="viewport">
<style>
img {
Expand Down Expand Up @@ -54,8 +56,8 @@ <h2 style="margin-top:5%">This page requires JavaScript
<h2 style="margin-top:5%">{{ reason }}</h2>
<h3>Authentication doesn't last forever ¯\_(ツ)_/¯ </h3>
<p>
<img src="https://raw.githubusercontent.com/thevickypedia/open-source/main/images/session.gif"
onerror="this.src='https://vigneshrao.com/open-source/images/session.gif'"
<img src="https://thevickypedia.github.io/open-source/images/gif/shattered_fusion.gif"
onerror="this.src='https://vigneshrao.com/open-source/images/gif/shattered_fusion.gif'"
width="200" height="200" alt="Image" class="center">
</p>
<button style="text-align:center" onClick="window.location.href = '/';">LOGIN</button>
Expand Down
6 changes: 4 additions & 2 deletions pystream/templates/unauthorized.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta property="og:type" content="VideoStreaming">
<meta name="keywords" content="Python, streaming, fastapi, JavaScript, HTML, CSS">
<meta name="author" content="Vignesh Rao">
<link property="og:image" rel="icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.ico">
<link property="og:image" rel="apple-touch-icon" href="https://thevickypedia.github.io/open-source/images/logo/fastapi.png">
<meta content="width=device-width, initial-scale=1" name="viewport">
<style>
img {
Expand Down Expand Up @@ -52,8 +54,8 @@ <h2 style="margin-top:5%">This page requires JavaScript
<h2 style="margin-top:5%">LOGIN FAILED</h2>
<h3>USER ERROR - REPLACE USER</h3>
<p>
<img src="https://raw.githubusercontent.com/thevickypedia/open-source/main/images/no_auth.gif"
onerror="this.src='https://vigneshrao.com/open-source/images/no_auth.gif'"
<img src="https://thevickypedia.github.io/open-source/images/gif/lockscape.gif"
onerror="this.src='https://vigneshrao.com/open-source/images/gif/lockscape.gif'"
width="200" height="170" alt="Image" class="center">
</p>
<button style="text-align:center" onClick="window.location.href = '/';">LOGIN</button>
Expand Down

0 comments on commit 09b53a2

Please sign in to comment.