Skip to content

Commit

Permalink
Updating
Browse files Browse the repository at this point in the history
  • Loading branch information
alankrantas committed Apr 24, 2023
1 parent 6dd90a8 commit bdad803
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 91 deletions.
18 changes: 6 additions & 12 deletions src/components/ViewItemContent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,17 @@
<div class="text-white">
{#if viewItemId == 0}
<AboutMe />
{/if}
{#if viewItemId == 1}
{:else if viewItemId == 1}
<Experience />
{/if}
{#if viewItemId == 2}
{:else if viewItemId == 2}
<Competencies />
{/if}
{#if viewItemId == 3}
{:else if viewItemId == 3}
🚧 WORKING IN PROGRESS 🚧
{/if}
{#if viewItemId == 4}
{:else if viewItemId == 4}
<Hobbies />
{/if}
{#if viewItemId == 5}
{:else if viewItemId == 5}
<Links />
{/if}
{#if viewItemId == 6}
{:else if viewItemId == 6}
<AboutThisSite />
{/if}
</div>
9 changes: 5 additions & 4 deletions src/components/ViewItems/AboutMe.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
{
name: 'Year of birth',
content: `1984 (age ${getAge()})`
content: `1984 (age ${getAge()})`,
footnote: 'The age is computed by JavaScript by the way.'
},
{
name: 'Zodiac sign',
Expand All @@ -43,8 +44,8 @@
},
{
name: 'Marital status',
content: 'Unmarried',
footnote: 'Any takers? 😂'
content: 'Single/unmarried',
footnote: 'Ask me out for a coffee if you dare 😊'
}
];
</script>
Expand Down Expand Up @@ -82,4 +83,4 @@
</p>
<p class="indent">Click the other sections of this website to learn more about me.</p>
<br /><br />
<List title="Personal Facts" list={personalList} />
<List list={personalList} title="Personal Facts" />
13 changes: 7 additions & 6 deletions src/components/ViewItems/Competencies.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{
name: 'English',
content:
'Intermediate to advanced; full-English writing; professional translation between English and Traditional Chinese'
'Intermediate to advanced; fluent full-English writing; professional translation between English and Traditional Chinese'
},
{
name: 'Technical/marketing content writing',
Expand All @@ -45,12 +45,12 @@
{
name: 'Photography & video making',
content:
'Amateur digital and analog film photography; videos shooting; photo and video editing'
'Amateur digital and analog film photography; basic knowledge for using camera hardwares; videos shooting; photo and video editing'
},
{
name: 'Maker projects/electronics prototyping',
content:
'Design and create Raspberry Pi or microcontroller-based devices; use of soldering guns; identify sensor modules and read datasheet'
'Design and create Raspberry Pi or 8-bit/32-bit microcontroller-based devices; use of soldering guns; identify sensor modules and read datasheet'
}
];
</script>
Expand All @@ -60,13 +60,14 @@
<p>
<span class="small"
>*Note: I use Eclipse, Java and several MVC-based J2EE web frameworks (Struts 2, JavaServer
Faces 2, Spring 3) in my first job but I no longer consider them as my skills. I have once tried
Spring Boot for creating testing micrcoservices.</span
Faces 2, Spring 3) in my first job but I no longer consider them as my work skills. I have once
tried Spring Boot for creating testing micrcoservices recently and that's pretty about it.</span
>
</p>
<p>
<span class="small"
>I also revisited Quick Basic and TinyBasic in order to rewrite a code that I wrote as a kid.</span
>I also revisited Quick Basic and TinyBasic in order to rewrite a piece of code I wrote as a
kid.</span
>
</p>
<br /><br />
Expand Down
3 changes: 2 additions & 1 deletion src/components/ViewItems/Hobbies.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
},
{
name: 'Coffee',
content: 'I seldom drink but a cup or two black coffee always make my day.'
content: 'A cup or two black coffee always make my day.',
footnote: "Actually I suspect I'm powered by caffeine..."
},
{
name: 'Photography',
Expand Down
138 changes: 70 additions & 68 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { onMount } from 'svelte';
import { afterUpdate } from 'svelte';
import { fly, fade, crossfade } from 'svelte/transition';
import { flip } from 'svelte/animate';
import { expoOut } from 'svelte/easing';
Expand Down Expand Up @@ -66,12 +66,16 @@
$: selectedViewId = -1;
onMount(() => {
scrollToTop = () => {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
};
ready = true;
afterUpdate(() => {
if (!ready) {
scrollToTop = () => {
window.scrollTo({
top: 0,
behavior: 'auto'
});
};
ready = true;
}
});
const [send, receive] = crossfade({
Expand Down Expand Up @@ -109,9 +113,65 @@
{/each}
</ul>
</div>
{/if}
<!-- main area -->
{#if selectedViewId == -1}
<!--sub view -->
<div
class="col p-1 m-1 ps-2 me-2"
in:receive={{ key: 'subview' }}
out:send={{ key: 'main' }}
>
<!--back to main button -->
<div class="text-end p-1 m-1">
<button
type="button"
class="btn btn-dark rounded-4 shadow"
on:click={() => (selectedViewId = -1)}
>
<span class="h6">Back to main</span>
</button>
</div>
<div>
<br />
</div>
<div>
{#each ViewItems as viewItem (viewItem.id)}
<div animate:flip={{ duration: 500, easing: expoOut }}>
{#if selectedViewId == viewItem.id}
<div in:fade={{ delay: 100, duration: 500, easing: expoOut }}>
<!--sub view head -->
<div class="p-2 m-2">
<ViewItemHead {viewItem} />
</div>
<!--sub view content -->
<div
class="p-2 m-2 pt-2 pb-2 mt-2 mb-2"
in:fly={{ y: 100, delay: 250, duration: 1000, easing: expoOut }}
>
<ViewItemContent viewItemId={viewItem.id} />
</div>
</div>
{/if}
</div>
{/each}
</div>
<div>
<br />
</div>
<!--back to top button -->
<div class="text-end p-1 m-1">
<button type="button" class="btn btn-dark rounded-4 shadow" on:click={scrollToTop}>
<span class="h6">Back to top</span>
</button>
</div>
<div>
<br />
</div>
<!-- footer -->
<div class="p-4 m-4">
<Footer />
</div>
</div>
<!-- main area -->
{:else}
<div class="col p-1 m-1" in:receive={{ key: 'main' }} out:send={{ key: 'subview' }}>
<!-- name title -->
<div class="text-center p-2 m-2 pb-4 mb-4">
Expand Down Expand Up @@ -170,64 +230,6 @@
<Footer />
</div>
</div>
{:else}
<!--sub view -->
<div
class="col p-1 m-1 ps-2 me-2"
in:receive={{ key: 'subview' }}
out:send={{ key: 'main' }}
>
<!--back to main button -->
<div class="text-end p-1 m-1">
<button
type="button"
class="btn btn-dark rounded-4 shadow"
on:click={() => (selectedViewId = -1)}
>
<span class="h6">Back to main</span>
</button>
</div>
<div>
<br />
</div>
<div>
{#each ViewItems as viewItem (viewItem.id)}
<div animate:flip={{ duration: 500, easing: expoOut }}>
{#if selectedViewId == viewItem.id}
<div in:fade={{ delay: 100, duration: 500, easing: expoOut }}>
<!--sub view head -->
<div class="p-2 m-2">
<ViewItemHead {viewItem} />
</div>
<!--sub view content -->
<div
class="p-2 m-2 pt-2 pb-2 mt-2 mb-2"
in:fly={{ y: 100, delay: 250, duration: 1000, easing: expoOut }}
>
<ViewItemContent viewItemId={viewItem.id} />
</div>
</div>
{/if}
</div>
{/each}
</div>
<div>
<br /><br />
</div>
<!--back to top button -->
<div class="text-end p-1 m-1">
<button type="button" class="btn btn-dark rounded-4 shadow" on:click={scrollToTop}>
<span class="h6">Back to top</span>
</button>
</div>
<div>
<br />
</div>
<!-- footer -->
<div class="p-4 m-4">
<Footer />
</div>
</div>
{/if}
</div>
</div>
Expand Down

0 comments on commit bdad803

Please sign in to comment.