feat: Optimise profile image
All checks were successful
Build Docker / BuildImage (push) Successful in 55s
All checks were successful
Build Docker / BuildImage (push) Successful in 55s
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 12 KiB |
BIN
templates/assets/img/profile.webp
Normal file
BIN
templates/assets/img/profile.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -49,7 +49,7 @@
|
|||||||
<link rel="stylesheet" href="/assets/css/Social-Icons.min.css">
|
<link rel="stylesheet" href="/assets/css/Social-Icons.min.css">
|
||||||
<link rel="stylesheet" href="/assets/css/swiper.min.css">
|
<link rel="stylesheet" href="/assets/css/swiper.min.css">
|
||||||
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
<link rel="me" href="https://mastodon.woodburn.au/@nathanwoodburn" />
|
||||||
<script async src="https://umami.woodburn.au/script.js" data-website-id="6a55028e-aad3-481c-9a37-3e096ff75589"></script>
|
<script async src="https://umami.woodburn.au/script.js" data-website-id="6a55028e-aad3-481c-9a37-3e096ff75589"></script><link rel="preload" as="image" href="/assets/img/bg/BlueMountains.jpg" type="image/jpeg">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77"><script>
|
<body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77"><script>
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
<div class="text-end d-none d-xl-block d-xxl-block" id="downtime"><blockquote class="speech bubble"><em>G'day!</em><br>
|
<div class="text-end d-none d-xl-block d-xxl-block" id="downtime"><blockquote class="speech bubble"><em>G'day!</em><br>
|
||||||
Some services are down.<br>
|
Some services are down.<br>
|
||||||
Check them out here!</blockquote><img class="img-fluid" src="/assets/img/pfront.webp"></div>
|
Check them out here!</blockquote><img class="img-fluid" src="/assets/img/pfront.webp"></div>
|
||||||
<header class="masthead main" style="background: url("/assets/img/bg/BlueMountains.jpg") center / cover;position: relative;height: 400px;">
|
<header class="masthead main" style="position: relative;height: 400px;background: url("/assets/img/bg/BlueMountains.jpg") center / cover;">
|
||||||
<div class="intro-body text parallax">
|
<div class="intro-body text parallax">
|
||||||
<div class="name-container" style="padding-right: 1em;">
|
<div class="name-container" style="padding-right: 1em;">
|
||||||
<div class="slider">
|
<div class="slider">
|
||||||
@@ -95,7 +95,7 @@ Check them out here!</blockquote><img class="img-fluid" src="/assets/img/pfront.
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-8 mx-auto">
|
<div class="col-lg-8 mx-auto">
|
||||||
<h2>About ME</h2>
|
<h2>About ME</h2>
|
||||||
<div class="profile-container" style="margin-bottom: 2em;"><img class="profile background" src="/assets/img/profile.jpg" style="border-radius: 50%;" alt="My Profile"><img class="profile foreground" src="/assets/img/pfront.webp" alt=""></div>
|
<div class="profile-container" style="margin-bottom: 2em;"><img class="profile background" src="/assets/img/profile.webp" style="border-radius: 50%;" alt="My Profile"><img class="profile foreground" src="/assets/img/pfront.webp" alt=""></div>
|
||||||
<p style="margin-bottom: 5px;">Hi, I'm Nathan Woodburn and I live in Canberra, Australia.<br>I've been home schooled all the way to Yr 12.<br>I'm currently studying a Bachelor of Computer Science.<br>I create tons of random projects so this site is often behind.<br>I'm one of the founders of <a href="https://hns.au" target="_blank">Handshake AU</a> working to increase Handshake adoption in Australia.</p>
|
<p style="margin-bottom: 5px;">Hi, I'm Nathan Woodburn and I live in Canberra, Australia.<br>I've been home schooled all the way to Yr 12.<br>I'm currently studying a Bachelor of Computer Science.<br>I create tons of random projects so this site is often behind.<br>I'm one of the founders of <a href="https://hns.au" target="_blank">Handshake AU</a> working to increase Handshake adoption in Australia.</p>
|
||||||
<p title="{{repo_description}}" style="margin-bottom: 0px;display: inline-block;">I'm currently working on</p>
|
<p title="{{repo_description}}" style="margin-bottom: 0px;display: inline-block;">I'm currently working on</p>
|
||||||
<p data-bs-toggle="tooltip" data-bss-tooltip="" title="{{repo_description}}" style="display: inline-block;">{{repo | safe}}</p>
|
<p data-bs-toggle="tooltip" data-bss-tooltip="" title="{{repo_description}}" style="display: inline-block;">{{repo | safe}}</p>
|
||||||
@@ -127,7 +127,7 @@ Check them out here!</blockquote><img class="img-fluid" src="/assets/img/pfront.
|
|||||||
<div class="swiper">
|
<div class="swiper">
|
||||||
<div class="swiper-wrapper">{% for project in projects %}
|
<div class="swiper-wrapper">{% for project in projects %}
|
||||||
<div class="swiper-slide site" data-url="{{ project.html_url }}">
|
<div class="swiper-slide site" data-url="{{ project.html_url }}">
|
||||||
<img class="site-img" src="{{ project.avatar_url }}" />
|
<img class="site-img" src="{{ project.avatar_url }}" alt="{{ project.name }} Icon" />
|
||||||
<div class="site-body">
|
<div class="site-body">
|
||||||
<div class="site-detail" style="width: 100%;">
|
<div class="site-detail" style="width: 100%;">
|
||||||
<h2 class="site-name" style="text-align: left;">{{ project.name }}</h2>
|
<h2 class="site-name" style="text-align: left;">{{ project.name }}</h2>
|
||||||
|
|||||||
17
tools.py
17
tools.py
@@ -12,6 +12,21 @@ HTTP_OK = 200
|
|||||||
HTTP_BAD_REQUEST = 400
|
HTTP_BAD_REQUEST = 400
|
||||||
HTTP_NOT_FOUND = 404
|
HTTP_NOT_FOUND = 404
|
||||||
|
|
||||||
|
CRAWLERS = [
|
||||||
|
"Googlebot",
|
||||||
|
"Bingbot",
|
||||||
|
"Chrome-Lighthouse",
|
||||||
|
"Slurp",
|
||||||
|
"DuckDuckBot",
|
||||||
|
"Baiduspider",
|
||||||
|
"YandexBot",
|
||||||
|
"Sogou",
|
||||||
|
"Exabot",
|
||||||
|
"facebot",
|
||||||
|
"ia_archiver",
|
||||||
|
"Twitterbot"
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def getClientIP(request: Request) -> str:
|
def getClientIP(request: Request) -> str:
|
||||||
"""
|
"""
|
||||||
@@ -88,7 +103,7 @@ def isCrawler(request: Request) -> bool:
|
|||||||
"""
|
"""
|
||||||
if request.headers and request.headers.get("User-Agent"):
|
if request.headers and request.headers.get("User-Agent"):
|
||||||
user_agent = request.headers.get("User-Agent", "")
|
user_agent = request.headers.get("User-Agent", "")
|
||||||
return "Googlebot" in user_agent or "Bingbot" in user_agent
|
return any(crawler in user_agent for crawler in CRAWLERS)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@cache
|
@cache
|
||||||
|
|||||||
Reference in New Issue
Block a user