Skip to content

Commit 69ce2bc

Browse files
mechanicpanicclaude
andcommitted
Add profile photo support to header with placeholder
- Added conditional profile photo display in header layout - Created responsive CSS styling for circular profile image - Added placeholder SVG with academic styling - Updated _config.yml with profile_photo setting for easy customization - Updated USER_CONFIG.md documentation - Mobile-responsive design with proper ordering and sizing - Photo appears on left side of header when profile_photo is set in config Users can easily add their photo by: 1. Adding image to assets/images/ 2. Setting profile_photo path in _config.yml 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent c443d31 commit 69ce2bc

File tree

5 files changed

+76
-2
lines changed

5 files changed

+76
-2
lines changed

USER_CONFIG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ title: "Your Name" # ← Your full name
1313
subtitle: "Your Position" # ← Your academic title/position
1414
email: [email protected] # ← Your email address
1515

16+
# Profile photo (add your photo to assets/images/ and update this path)
17+
profile_photo: "/assets/images/your-photo.jpg" # ← Path to your photo
18+
1619
# Social/Academic Profiles
1720
github_username: your_username # ← Your GitHub username
1821
orcid: 0000-0000-0000-0000 # ← Your ORCID ID

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
title: "Dr. Academic Name"
55
subtitle: "Professor of Computer Science"
66
7+
8+
# Profile photo (add your photo to assets/images/ and update this path)
9+
profile_photo: "/assets/images/profile-photo.svg"
710
description: >-
811
Academic website featuring research publications, CV, and professional activities.
912
Built with Jekyll and managed through Obsidian for seamless content creation.

_layouts/default.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@
6767
<header class="header">
6868
<div class="container">
6969
<div class="header-content">
70+
{% if site.profile_photo %}
71+
<div class="header-photo">
72+
<img src="{{ site.profile_photo | relative_url }}" alt="{{ site.title | escape }}" class="profile-image">
73+
</div>
74+
{% endif %}
7075
<div class="header-text">
7176
<h1 class="title">
7277
<a href="{{ "/" | relative_url }}">{{ site.title | escape }}</a>

assets/css/main.scss

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,24 @@ tbody tr:nth-child(even) {
238238
gap: var(--space-8);
239239
}
240240

241+
.header-photo {
242+
flex-shrink: 0;
243+
244+
.profile-image {
245+
width: 120px;
246+
height: 120px;
247+
border-radius: 50%;
248+
object-fit: cover;
249+
border: 3px solid var(--border);
250+
background-color: var(--surface);
251+
transition: border-color 0.2s ease;
252+
253+
&:hover {
254+
border-color: var(--accent-color);
255+
}
256+
}
257+
}
258+
241259
.header-text {
242260
flex: 1;
243261
}
@@ -475,13 +493,29 @@ tbody tr:nth-child(even) {
475493
.header-content {
476494
flex-direction: column;
477495
gap: var(--space-4);
496+
align-items: center;
497+
text-align: center;
498+
}
499+
500+
.header-photo {
501+
order: -1;
502+
503+
.profile-image {
504+
width: 100px;
505+
height: 100px;
506+
}
507+
}
508+
509+
.header-text {
510+
order: 0;
478511
}
479512

480513
.header-contact {
481-
text-align: left;
514+
order: 1;
515+
text-align: center;
482516

483517
.contact-links {
484-
justify-content: flex-start;
518+
justify-content: center;
485519
}
486520
}
487521
}

assets/images/profile-photo.svg

Lines changed: 29 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)