Skip to content

Commit 23f55fc

Browse files
committed
feat: added Claude attribution setting in footer
1 parent 64e79bc commit 23f55fc

6 files changed

Lines changed: 293 additions & 1 deletion

File tree

config/_default/params.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,7 @@ headerStyle:
124124
footerBackgroundStyle:
125125
preset: "subtle-texture" # Options: none, subtle-texture, penn-blue, gradient-footer
126126
# Override preset values:
127-
textureOpacity: 0.15 # Subtle texture on footer
127+
textureOpacity: 0.15 # Subtle texture on footer
128+
129+
# Claude AI attribution in footer
130+
claudeInFooter: true # Set to false to hide Claude logo

layouts/partials/head/custom.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
<!-- Dark mode fixes for Penn Engineering theme -->
44
<link rel="stylesheet" href="{{ "penn-engineering-dark-mode-fixes.css" | absURL }}">
55

6+
<!-- Claude AI footer attribution styles -->
7+
{{ if .Site.Params.claudeInFooter }}
8+
<link rel="stylesheet" href="{{ "claude-footer.css" | absURL }}">
9+
{{ end }}
10+
611
<!-- MathJax for LaTeX rendering (only activated when frontmatter has "latex: true") -->
712
{{ if .Params.latex }}
813
<script type="text/javascript"

layouts/partials/site-footer.html

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<footer class="gdoc-footer">
2+
<nav class="container flex">
3+
<div>
4+
<section class="flex flex-wrap align-center">
5+
<span class="gdoc-footer__item gdoc-footer__item--row">
6+
{{ i18n "footer_build_with" | safeHTML }}
7+
{{ if .Site.Params.claudeInFooter }}
8+
<span class="gdoc-footer__claude">
9+
<span class="gdoc-footer__claude-text">with assistance from</span>
10+
<img
11+
src="{{ "img/Claude_AI_logo_white_letters.svg" | absURL }}"
12+
alt="Claude AI"
13+
class="gdoc-footer__claude-logo gdoc-footer__claude-logo--light"
14+
/>
15+
<img
16+
src="{{ "img/Claude_AI_logo_black_letters.svg" | absURL }}"
17+
alt="Claude AI"
18+
class="gdoc-footer__claude-logo gdoc-footer__claude-logo--dark"
19+
/>
20+
</span>
21+
{{ end }}
22+
</span>
23+
{{ with .Site.Params.geekdocLegalNotice }}
24+
<span class="gdoc-footer__item gdoc-footer__item--row">
25+
<a href="{{ . | relURL }}" class="gdoc-footer__link">
26+
{{ i18n "footer_legal_notice" }}
27+
</a>
28+
</span>
29+
{{ end }}
30+
{{ with .Site.Params.geekdocPrivacyPolicy }}
31+
<span class="gdoc-footer__item gdoc-footer__item--row">
32+
<a href="{{ . | relURL }}" class="gdoc-footer__link">
33+
{{ i18n "footer_privacy_policy" }}
34+
</a>
35+
</span>
36+
{{ end }}
37+
</section>
38+
{{ with .Site.Params.geekdocContentLicense }}
39+
<section class="flex flex-wrap align-center">
40+
<span class="gdoc-footer__item">
41+
{{ i18n "footer_content_license_prefix" }}
42+
<a href="{{ .link }}" class="gdoc-footer__link no-wrap">{{ .name }}</a>
43+
</span>
44+
</section>
45+
{{ end }}
46+
</div>
47+
{{ if (default true .Site.Params.geekdocBackToTop) }}
48+
<div class="flex flex-25 justify-end">
49+
<span class="gdoc-footer__item text-right">
50+
<a class="gdoc-footer__link fake-link" href="#" aria-label="{{ i18n "nav_top" }}">
51+
<svg class="gdoc-icon gdoc_keyboard_arrow_up">
52+
<use xlink:href="#gdoc_keyboard_arrow_up"></use>
53+
</svg>
54+
<span class="hidden-mobile">{{ i18n "nav_top" }}</span>
55+
</a>
56+
</span>
57+
</div>
58+
{{ end }}
59+
</nav>
60+
</footer>

static/claude-footer.css

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/* Claude AI Footer Attribution Styles */
2+
3+
/* Container for Claude attribution */
4+
.gdoc-footer__claude {
5+
display: inline-flex;
6+
align-items: center;
7+
gap: 0.5rem;
8+
margin-left: 0.25rem; /* Tighter spacing after heart */
9+
}
10+
11+
/* Text before logo */
12+
.gdoc-footer__claude-text {
13+
font-size: inherit;
14+
opacity: 0.8;
15+
}
16+
17+
/* Claude logo styles */
18+
.gdoc-footer__claude-logo {
19+
height: 0.9em; /* Smaller, more discrete size */
20+
width: auto;
21+
display: inline-block;
22+
vertical-align: middle;
23+
opacity: 0.7; /* More subtle */
24+
transition: opacity 0.3s ease;
25+
margin-left: 0.25rem;
26+
}
27+
28+
/* Hover effect */
29+
.gdoc-footer__claude:hover .gdoc-footer__claude-logo {
30+
opacity: 1;
31+
}
32+
33+
/* Light/Dark mode logo switching */
34+
/* By default, show light logo (white letters for dark footer) */
35+
.gdoc-footer__claude-logo--dark {
36+
display: none;
37+
}
38+
39+
.gdoc-footer__claude-logo--light {
40+
display: inline-block;
41+
}
42+
43+
/* When footer has light background, show dark logo */
44+
.gdoc-footer--light .gdoc-footer__claude-logo--dark {
45+
display: inline-block;
46+
}
47+
48+
.gdoc-footer--light .gdoc-footer__claude-logo--light {
49+
display: none;
50+
}
51+
52+
/* Dark mode overrides - footer is typically dark in both modes */
53+
@media (prefers-color-scheme: dark) {
54+
.gdoc-footer__claude-logo--dark {
55+
display: none;
56+
}
57+
58+
.gdoc-footer__claude-logo--light {
59+
display: inline-block;
60+
}
61+
}
62+
63+
:root[color-theme="dark"] .gdoc-footer__claude-logo--dark {
64+
display: none;
65+
}
66+
67+
:root[color-theme="dark"] .gdoc-footer__claude-logo--light {
68+
display: inline-block;
69+
}
70+
71+
/* Mobile adjustments */
72+
@media (max-width: 45rem) {
73+
.gdoc-footer__claude {
74+
display: block;
75+
margin-left: 0;
76+
margin-top: 0.5rem;
77+
}
78+
79+
.gdoc-footer__claude-text {
80+
font-size: 0.9em;
81+
}
82+
83+
.gdoc-footer__claude-logo {
84+
height: 1em;
85+
}
86+
}
87+
88+
/* Ensure proper spacing in footer items */
89+
.gdoc-footer__item--row + .gdoc-footer__claude {
90+
margin-left: 0.35rem; /* Reduced for tighter appearance */
91+
}
92+
93+
/* Remove animation for a more professional look */
94+
/* Animation removed - too distracting for a discrete attribution */
Lines changed: 65 additions & 0 deletions
Loading
Lines changed: 65 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)