Skip to content

Commit

Permalink
Added a basic template selector
Browse files Browse the repository at this point in the history
  • Loading branch information
webdevsk committed Sep 10, 2023
1 parent 289c28d commit 01aa3c5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const defaultTemplate = "Template2"
const loadComponent = (name) =>
lazy(() => import(/* @vite-ignore */ `./templates/${name}.jsx`))

const resumeTemplates = ["Template1", "Template2"]
function App() {
const url = new URL(window.location.href)
const params = new URLSearchParams(url.search)
Expand All @@ -12,6 +13,18 @@ function App() {

return (
<>
{!printMode && (
<div className="container my-8">
<div className="flex flex-wrap items-center justify-center gap-4 [&_a:hover]:underline">
<h5>Choose Template: </h5>
{resumeTemplates.map((template) => (
<a key={template} href={`?template=${template}`}>
{template}
</a>
))}
</div>
</div>
)}
<div className={!printMode ? "pdf-container" : ""}>
<div id="pdf" className={printMode ? "mx-auto" : ""}>
<Suspense fallback={<div>Loading</div>}>
Expand Down

0 comments on commit 01aa3c5

Please sign in to comment.