-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #8 from RealA10N/golang-packages
Host Golang Packages
- Loading branch information
Showing
11 changed files
with
106 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
<script lang="ts"> | ||
import '@fontsource/zilla-slab/300-italic.css'; | ||
export let title: string; | ||
export let description: string; | ||
export let tags: string[] = []; | ||
</script> | ||
|
||
<div class="text-center font-thin italic my-8 bg-zinc-100 dark:bg-zinc-900 z-50"> | ||
<a | ||
href="/" | ||
class="relative before:absolute before:left-0 before:bottom-0 | ||
before:w-full before:h-[2px] before:rounded no-underline | ||
before:bg-red-500 before:transition-transform | ||
before:scale-x-100 before:hover:scale-x-105" | ||
> | ||
Alon Krymgand | ||
</a> | ||
</div> | ||
<header class="flex flex-col items-center mb-4 text-zinc-700 dark:text-zinc-300"> | ||
<h1 class="text-center mt-0">{title}</h1> | ||
<div class="font-medium tracking-wider text-md italic text-center"> | ||
{description} | ||
</div> | ||
|
||
{#if tags.length > 0} | ||
<ul class="flex flex-wrap justify-center mt-1 gap-2"> | ||
{#each tags as tag} | ||
<li class="tag m-0">{tag}</li> | ||
{/each} | ||
</ul> | ||
{/if} | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script lang="ts"> | ||
import '@fontsource/zilla-slab/300-italic.css'; | ||
</script> | ||
|
||
<div class="text-center font-thin italic my-8 bg-zinc-100 dark:bg-zinc-900 z-50"> | ||
<a | ||
href="/" | ||
class="relative before:absolute before:left-0 before:bottom-0 | ||
before:w-full before:h-[2px] before:rounded no-underline | ||
before:bg-red-500 before:transition-transform | ||
before:scale-x-100 before:hover:scale-x-105" | ||
> | ||
Alon Krymgand | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export interface Package { | ||
name: string; | ||
title: string; | ||
description: string; | ||
versionSourceControl: 'bzr' | 'fossil' | 'git' | 'hg' | 'svn'; | ||
sourceUrl: string; | ||
} | ||
|
||
export const packageUrl = (pkg: Package) => { | ||
return 'alon.kr/x/' + pkg.name; | ||
}; | ||
|
||
export const documentationUrl = (pkg: Package) => { | ||
return 'https://pkg.go.dev/' + packageUrl(pkg); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<script lang="ts"> | ||
import { type Package, packageUrl, documentationUrl } from '$src/lib/interfaces/package'; | ||
import Header from '$src/lib/Header.svelte'; | ||
import Metadata from '$src/lib/Metadata.svelte'; | ||
export let pkg: Package; | ||
export const prerender = true; | ||
</script> | ||
|
||
<svelte:head> | ||
<meta name="go-import" content="{packageUrl(pkg)} {pkg.versionSourceControl} {pkg.sourceUrl}" /> | ||
</svelte:head> | ||
|
||
<Metadata title={pkg.title} description={pkg.description} /> | ||
|
||
<Header title={pkg.title} description={pkg.description} /> | ||
|
||
<h2>Get</h2> | ||
<code>go get {packageUrl(pkg)}</code> | ||
|
||
<h2>Source</h2> | ||
<p>can be found <a href={pkg.sourceUrl}>here</a>.</p> | ||
|
||
<h2>Documentation</h2> | ||
<p>can be found <a href={documentationUrl(pkg)}>here</a>.</p> | ||
|
||
<slot /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!-- This is a workaround, since MDSvex does not officially support | ||
preprocessing (typescript and postcss) in layout files. | ||
So, this layout file does not contain any of that, but it directly imports | ||
one does use it. --> | ||
|
||
<script> | ||
import PackageLayout from './PackageLayout.svelte'; | ||
</script> | ||
|
||
<PackageLayout pkg={$$props}> | ||
<slot /> | ||
</PackageLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
layout: package | ||
name: faststringmap | ||
title: Fast String Map | ||
description: A fast (5x) string keyed read-only map - good for keys using a small set of runes. | ||
sourceUrl: https://github.com/RealA10N/faststringmap | ||
versionSourceControl: git | ||
--- |