-
Notifications
You must be signed in to change notification settings - Fork 0
Add section navigation to resume page #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,16 +13,49 @@ | |
| <!-- Middle area --> | ||
| <div class="grow"> | ||
| <div class="max-w-[700px]"> | ||
| <section> | ||
| <!-- Page title --> | ||
| <h1 class="h1 font-aspekta mb-12">My resume</h1> | ||
| <!-- Page content --> | ||
| <div class="text-slate-500 dark:text-slate-400 space-y-12"> | ||
| <EducationPartial v-if="education" :education="education" /> | ||
| <ExperiencePartial v-if="experience" :experience="experience" /> | ||
| <RecommendationPartial v-if="recommendations" :recommendations="recommendations" /> | ||
| </div> | ||
| </section> | ||
| <section> | ||
| <!-- Page title --> | ||
| <h1 class="h1 font-aspekta mb-6 md:mb-8">My resume</h1> | ||
|
|
||
| <nav | ||
| class="flex flex-wrap items-center gap-3 text-sm font-medium text-slate-500 dark:text-slate-400 border border-slate-200 dark:border-slate-800 rounded-full px-4 py-2 mb-10" | ||
| aria-label="Resume sections" | ||
| > | ||
| <a | ||
| class="transition-colors hover:text-slate-700 dark:hover:text-slate-200" | ||
| href="#education" | ||
| > | ||
| Education | ||
| </a> | ||
| <span class="text-slate-300 dark:text-slate-700">·</span> | ||
| <a | ||
| class="transition-colors hover:text-slate-700 dark:hover:text-slate-200" | ||
| href="#work-experience" | ||
| > | ||
| Work experience | ||
| </a> | ||
| <span class="text-slate-300 dark:text-slate-700">·</span> | ||
| <a | ||
| class="transition-colors hover:text-slate-700 dark:hover:text-slate-200" | ||
| href="#recommendations" | ||
| > | ||
| Recommendations | ||
| </a> | ||
| </nav> | ||
|
|
||
| <!-- Page content --> | ||
| <div class="text-slate-500 dark:text-slate-400 space-y-12"> | ||
| <section id="education" class="scroll-mt-24"> | ||
| <EducationPartial v-if="education" :education="education" /> | ||
| </section> | ||
| <section id="work-experience" class="scroll-mt-24"> | ||
| <ExperiencePartial v-if="experience" :experience="experience" /> | ||
| </section> | ||
| <section id="recommendations" class="scroll-mt-24"> | ||
| <RecommendationPartial v-if="recommendations" :recommendations="recommendations" /> | ||
| </section> | ||
|
Comment on lines
+48
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, the To make the code cleaner and avoid rendering empty sections, it's better to conditionally render the entire This change, combined with the dynamic navigation links I suggested earlier, will ensure that links are only shown for sections that actually have content, and those sections are only rendered when they have data. |
||
| </div> | ||
| </section> | ||
|
Comment on lines
+16
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainFix formatting to satisfy CI (Prettier/format check). The “Test Format Workflow” is failing on this file. Run the repo’s formatter and commit the result so CI passes. Try this script to auto-fix and show the diff: 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Try project formatter if available
if command -v pnpm >/dev/null 2>&1; then
pnpm -s run format:check || pnpm -s run format || true
elif command -v npm >/dev/null 2>&1; then
npm run -s format:check || npm run -s format || true
elif command -v yarn >/dev/null 2>&1; then
yarn -s format:check || yarn -s format || true
fi
# Fallback to Prettier directly on the changed file
npx --yes prettier@3 --write "src/pages/ResumePage.vue" || true
# Show the resulting diff for this file
git diff -- src/pages/ResumePage.vueLength of output: 6461 Commit Prettier formatting updates to src/pages/ResumePage.vue 🤖 Prompt for AI Agents |
||
| </div> | ||
| </div> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The navigation links are currently static. This means that even if a section (like 'Recommendations') has no content, the link to it will still be displayed. This can lead to a confusing user experience where a user clicks a link and is scrolled to an empty part of the page.
To improve this, the navigation should be generated dynamically based on the presence of data for each section. I suggest creating a computed property, for example
navLinks, which filters the sections that have content. Then, you can loop through this property to render the links.Here is an example of what the computed property could look like in your
<script>section:With this computed property, you can simplify the template significantly and also hide the navigation bar completely if no sections have content.