Skip to content

Commit

Permalink
some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Kractero committed Aug 24, 2024
1 parent 7b167d0 commit ad84df9
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 86 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Hare offers a suite of tools designed to make managing NationStates puppets more

## Prerequisites

You'd be better off reading [here](https://hare.kractero.com/resources/guides/prereqs) but below is a brief look.

### Mozilla Firefox

Only Firefox supports containers.
Expand Down Expand Up @@ -73,11 +75,11 @@ Many scripts generate an HTML sheet that almost necessitates the use of an autoc
// @match on enact_dilemma as autoclose does not carry over to the issue answered screen
// @exclude on show_dilemma since autoclose should not close the new intermediary screen

(function () {
'use strict';
if (document.querySelector('.deck-loot-box')) return;
window.close();
})();
;(function () {
'use strict'
if (document.querySelector('.deck-loot-box')) return
window.close()
})()
```

A caveat with any autocloser is that it may interfere with normal gameplay. It's recommended to enable or disable it as needed, or alternatively, use a separate browser profile or browser to avoid disruptions.
Expand Down
45 changes: 45 additions & 0 deletions src/lib/components/Guides.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<script lang="ts">
import Post from './Post.svelte'
export let data: any
let non_md = [
{
title: 'Containerise',
author: 'Racoda',
url: 'https://www.nationstates.net/page=dispatch/id=1383002',
keywords: ['guides'],
description: 'Containers? What? Why? A detailed guide.',
},
{
title: 'North Pacific Cards Guide',
author: 'The Northern light',
url: 'https://www.nationstates.net/page=dispatch/id=1301085',
keywords: ['guides'],
description: 'Interested in Building Your Dream Deck?',
},
{
title: 'West Pacific Cards Guide',
author: 'The West Pacific',
url: 'https://www.nationstates.net/page=dispatch/id=1399925',
keywords: ['guides'],
description: "The West Pacific's guide to Trading Cards",
},
]
</script>

<div class="mb-20">
<h2 class="mb-1 text-center text-3xl font-bold">Guides</h2>

<p class="mb-16 text-center text-lg lg:w-auto">
Various guides for setting up tools and prerequisites.
</p>

<div class="mx-auto grid max-w-lg grid-cols-1 justify-center gap-4 sm:grid-cols-2 lg:max-w-5xl">
{#each data.posts as post}
<Post author={post.author} description={post.description} title={post.title} url={post.url} />
{/each}
{#each non_md as post}
<Post author={post.author} description={post.description} title={post.title} url={post.url} />
{/each}
</div>
</div>
2 changes: 1 addition & 1 deletion src/lib/data/finderPresets.json

Large diffs are not rendered by default.

42 changes: 2 additions & 40 deletions src/routes/(cards-resources)/resources/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import Filterer from '$lib/components/Filterer.svelte'
import Guides from '$lib/components/Guides.svelte'
import Head from '$lib/components/Head.svelte'
import Post from '$lib/components/Post.svelte'
import Card from '$lib/components/ResourceCard.svelte'
import ResourceSelect from '$lib/components/ResourceSelect.svelte'
import projects from '$lib/data/projects.json'
Expand All @@ -10,29 +10,6 @@
import type { PageData } from './$types'
export let data: PageData
let non_md = [
{
title: 'Containerise',
author: 'Racoda',
url: 'https://www.nationstates.net/page=dispatch/id=1383002',
keywords: ['guides'],
description: 'Containers? What? Why? A detailed guide.',
},
{
title: 'North Pacific Cards Guide',
author: 'The Northern light',
url: 'https://www.nationstates.net/page=dispatch/id=1301085',
keywords: ['guides'],
description: 'Interested in Building Your Dream Deck?',
},
{
title: 'West Pacific Cards Guide',
author: 'The West Pacific',
url: 'https://www.nationstates.net/page=dispatch/id=1399925',
keywords: ['guides'],
description: "The West Pacific's guide to Trading Cards",
},
]
let sort = 'Last Updated (desc)'
let author = 'All'
let category = 'All'
Expand All @@ -48,22 +25,7 @@
description={'Hub of NationStates guides and search tools, utilities, and scripts.'}
/>

<div class="mb-20">
<h2 class="mb-1 text-center text-3xl font-bold">Guides</h2>

<p class="mb-16 text-center text-lg lg:w-auto">
Various guides for setting up tools and prerequisites.
</p>

<div class="mx-auto grid max-w-lg grid-cols-2 justify-center gap-4 lg:max-w-5xl">
{#each data.posts as post}
<Post author={post.author} description={post.description} title={post.title} url={post.url} />
{/each}
{#each non_md as post}
<Post author={post.author} description={post.description} title={post.title} url={post.url} />
{/each}
</div>
</div>
<Guides {data} />

<div>
<h2 class="mb-1 text-center text-3xl font-bold">Resources</h2>
Expand Down
42 changes: 2 additions & 40 deletions src/routes/(cards-resources)/resources/guides/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,50 +1,12 @@
<script lang="ts">
import Guides from '$lib/components/Guides.svelte'
import Head from '$lib/components/Head.svelte'
import Post from '$lib/components/Post.svelte'
import type { PageData } from './$types'
export let data: PageData
let non_md = [
{
title: 'Containerise',
author: 'Racoda',
url: 'https://www.nationstates.net/page=dispatch/id=1383002',
keywords: ['guides'],
description: 'Containers? What? Why? A detailed guide.',
},
{
title: 'North Pacific Cards Guide',
author: 'The Northern light',
url: 'https://www.nationstates.net/page=dispatch/id=1301085',
keywords: ['guides'],
description: 'Interested in Building Your Dream Deck?',
},
{
title: 'West Pacific Cards Guide',
author: 'The West Pacific',
url: 'https://www.nationstates.net/page=dispatch/id=1399925',
keywords: ['guides'],
description: "The West Pacific's guide to Trading Cards",
},
]
</script>

<Head title={'Hare - Guides'} description={'Various guides for NationStates cards.'} />

<div class="mb-20">
<h2 class="mb-1 text-center text-3xl font-bold">Guides</h2>

<p class="mb-16 text-center text-lg lg:w-auto">
Various guides for setting up tools and prerequisites.
</p>

<div class="grid max-w-lg grid-cols-2 justify-center gap-4 lg:max-w-5xl">
{#each data.posts as post}
<Post author={post.author} description={post.description} title={post.title} url={post.url} />
{/each}
{#each non_md as post}
<Post author={post.author} description={post.description} title={post.title} url={post.url} />
{/each}
</div>
</div>
<Guides {data} />

0 comments on commit ad84df9

Please sign in to comment.