<script lang="ts">
    export interface ChangelogEntry {
        date: string;
        time: string;

        content: string;
        link?: string;
    }
    
    let {
        entry,
    }: {
        entry: ChangelogEntry;
    } = $props();
</script>

<div class="changelog-entry">    
    <span class="changelog-entry-timestamp">{entry.date}, {entry.time} ::</span>
    <p>
        {entry.content}
        {#if entry.link}
            <a class="changelog-entry-link" href="{entry.link}">»</a>
        {/if}
    </p>
</div>

<style>
    .changelog-entry * {
        margin: 0;
    }

    .changelog-entry {
        display: flex;
        flex-direction: row;
        gap: 8px;
        margin: 4px 0;
    }

    .changelog-entry-timestamp {
        font-family: var(--font-mono);
        font-size: 0.9rem;
        color: var(--color-highlight);
        min-width: fit-content;
    }

    .changelog-entry-link {
        font-family: var(--font-mono);
        font-size: 1.3rem;
        color: var(--color-highlight);
        text-decoration: none;
        line-height: 1rem;
    }

    .changelog-entry-link:hover {
        font-weight: 700;
    }
</style>