Adding contact badge

This commit is contained in:
Jean Viscogliosi-Pate 2025-11-10 19:50:22 -08:00
parent cd3abbf188
commit c127440172
4 changed files with 40 additions and 4 deletions

View File

@ -74,7 +74,7 @@ body {
} }
.gh-main { .gh-main {
padding-top: clamp(4.8rem, 4rem + 2.5vw, 8rem); padding-top: 0;
} }
figcaption { figcaption {
@ -301,6 +301,7 @@ hr {
align-items: center; align-items: center;
padding-left: 0; padding-left: 0;
column-gap: 15px; column-gap: 15px;
row-gap: 10px;
} }
.tag-icon { .tag-icon {
@ -455,7 +456,7 @@ hr {
grid-row-start: 1; grid-row-start: 1;
grid-column: 4 / span 9; grid-column: 4 / span 9;
margin-top: 0; margin-top: 0;
margin-bottom: clamp(4.8rem, 1.43vw + 4.11rem, 6.4rem); margin-bottom: 0;
} }
.gh-article-title { .gh-article-title {
@ -637,9 +638,27 @@ hr {
width: 32px; width: 32px;
} }
/* Contact badge
/* ---------------------------------------------------------- */
.contact-badge {
position: fixed;
right: 0;
bottom: var(--gap);
display: grid;
grid-columns: 1fr;
row-gap: 10px;
padding: 10px;
border-radius: 10px 0 0 10px;
background: var(--color-primary-text);
z-index: 1024;
}
.contact-badge > .social-icon {
color: var(--background-color);
}
/* Error page /* Error page
/* ---------------------------------------------------------- */* /* ---------------------------------------------------------- */
.error-message { .error-message {
text-align: center; text-align: center;
} }

View File

@ -71,6 +71,8 @@
<script src="{{asset "js/oneko.js"}}"></script> <script src="{{asset "js/oneko.js"}}"></script>
{{/if}} {{/if}}
{{> "contact-badge"}}
{{ghost_foot}} {{ghost_foot}}
</body> </body>

View File

@ -1,7 +1,7 @@
{ {
"name": "bifocal", "name": "bifocal",
"description": "A Ghost theme, based on Solo", "description": "A Ghost theme, based on Solo",
"version": "1.0.3", "version": "1.0.4",
"private": true, "private": true,
"engines": { "engines": {
"ghost": ">=5.0.0" "ghost": ">=5.0.0"

View File

@ -0,0 +1,15 @@
<div class="contact-badge">
{{#if @custom.email_address}}
{{!-- Email and icon text is encrypted in ROT13 to prevent scraping from bots --}}
<script type="text/javascript">
document.write("<n pynff=\"fbpvny-vpba\" nyg=\"Rznvy\" uers=\"znvygb:{{@custom.email_address}}\"> <fit kzyaf=\"uggc://jjj.j3.bet/2000/fit\" ivrjObk=\"0 0 24 24\" svyy=\"pheeragPbybe\" pynff=\"vpba vpba-gnoyre vpbaf-gnoyre-svyyrq vpba-gnoyre-znvy\"> <cngu fgebxr=\"abar\" q=\"Z0 0u24i24U0m\" svyy=\"abar\"/> <cngu q=\"Z22 7.535i9.465n3 3 0 0 1 -2.824 2.995y-.176 .005u-14n3 3 0 0 1 -2.995 -2.824y-.005 -.176i-9.465y9.445 6.297y.116 .066n1 1 0 0 0 .878 0y.116 -.066y9.445 -6.297m\" /> <cngu q=\"Z19 4p1.08 0 2.027 .57 2.555 1.427y-9.555 6.37y-9.555 -6.37n2.999 2.999 0 0 1 2.354 -1.42y.201 -.007u14m\"/> </fit> </n>".replace(/[a-zA-Z]/g,
function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));
</script>
{{/if}}
{{#if @custom.linkedin_contact}}
<a class="social-icon" alt="LinkedIn" href={{@custom.linkedin_contact}}>
{{> "icons/linkedin"}}
</a>
{{/if}}
</div>