Skip to content

Commit

Permalink
Finish v1 Website Frontend
Browse files Browse the repository at this point in the history
Update README.md
Add FAQs Page
OpenVic2 -> OpenVic
Add Basic News Page
Add Static FAQs
  • Loading branch information
BrickPi committed May 16, 2023
1 parent 1b28f28 commit c37f948
Show file tree
Hide file tree
Showing 17 changed files with 116 additions and 34 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OpenVic2-Website
Website for the OpenVic2 project.
# OpenVic-Website
Website for the OpenVic project.

frontend in /frontend
backend to be added to /backend
frontend uses SvelteKit, in /frontend
backend uses ASP.NET, in /backend
2 changes: 2 additions & 0 deletions backend/GameDevPortal.WebAPI/GameDevPortal.WebAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<PropertyGroup Condition=" '$(RunConfiguration)' == 'https' " />
<PropertyGroup Condition=" '$(RunConfiguration)' == 'http' " />
<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.4" />
Expand Down
12 changes: 6 additions & 6 deletions backend/GameDevPortal.WebAPI/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
Expand All @@ -11,23 +11,23 @@
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5059",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7154;http://localhost:5059",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"dotnetRunMessages": true
},
"IIS Express": {
"commandName": "IISExpress",
Expand All @@ -38,4 +38,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
},
"JwtSettings": {
"validIssuer": "GameDevPortalAPI",
"validAudience": "openvic2.com"
"validAudience": "openvic.com"
}
}
2 changes: 1 addition & 1 deletion frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The OpenVic2 Website Frontend
# The OpenVic Website Frontend
The frontend is pretty simple, using [sveltekit](https://kit.svelte.dev) for the UI and routing. If you see something and think it could be a good change, feel free to either suggest it in #issues, the discord, or to simply fork the repo, make the change, and open a PR.

## Developing
Expand Down
2 changes: 1 addition & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ov2-website",
"name": "openvic-website",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<link rel="stylesheet" href="%sveltekit.assets%/global.css">
<meta name="viewport" content="width=device-width" />
<title>OpenVic2</title>
<title>OpenVic</title>
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
Expand Down
39 changes: 39 additions & 0 deletions frontend/src/lib/FAQ.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<script>
export let q;
export let a;
let showing = false;
function onClick() {
showing = !showing;
}
</script>

<div>
{#if showing}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<h2 on:click={onClick}>{q}</h2>
<p>{a}</p>
{:else}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<h2 on:click={onClick}>{q}</h2>
{/if}
</div>

<style>
div {
margin: 0vw 1vw;
}
p {
background-color: #00000090;
box-shadow: 0vw 0vw 0.5vw 0.5vw #00000090;
border-radius: 2vw;
font-size: 1.5vw;
padding: 1vw;
}
h2:hover {
cursor: pointer;
text-decoration: underline;
color: #CD7F32;
}
</style>
20 changes: 9 additions & 11 deletions frontend/src/lib/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@
}
</script>

<main>
<div id="header-background">
<div id="header">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<img src="/ov2.png" on:click={goHome} id="ov2img" alt="OpenVic2 Logo" width="8%" height="8%">
<a href="/faqs">faqs</a>
<a href="/news">news</a>
<a href="/about">about</a>
<a href="/contribute">contribute</a>
</div>
<div id="header-background">
<div id="header">
<!-- svelte-ignore a11y-click-events-have-key-events -->
<img src="/ov2.png" on:click={goHome} id="ov2img" alt="OpenVic Logo" width="8%" height="8%">
<a href="/faqs">faqs</a>
<a href="/news">news</a>
<a href="/about">about</a>
<a href="/contribute">contribute</a>
</div>
</main>
</div>

<style>
#header-background {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/+error.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h1>oops, looks like that doesn't exist!</h1>
<h3>if you're sure you've got the link right, try reloading or going back</h3>
{:else}
<h1>oops, theres some sort of issue</h1>
<h1>oops, there's some sort of issue</h1>
<h3>try reloading, and if that doesn't work contact us!</h3>
{/if}
<a href="/">go home</a>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
</script>

<Header/>
<a href="/news">
<img src="/terrain-map-4-5-23.png" alt="OpenVic2 Terrain Map Mode, Centered on Europe" width="1000"><br>
<a href="https://storageopenvic2.blob.core.windows.net/dev-diaries/Dev_diary_4.pdf" target="_blank" rel="noopener noreferrer">
<img src="/terrain-map-4-5-23.png" alt="OpenVic Terrain Map Mode, Centered on Europe" width="1000"><br>
Dev Diary IV: the Map
</a>

Expand Down
6 changes: 4 additions & 2 deletions frontend/src/routes/about/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
</script>

<Header/>
<h1 id="top">About OpenVic2</h1>
<p>OpenVic2 aims to faithfully recreate Victoria 2: Heart of Darkness with a focus on enhancing performance, stability, and modability. We will support loading Victoria 2 mods with zero modifications in a classic / compatibility mode, which will be availible if you own a legitimate copy of Victoria 2. OpenVic2's default mode will be completely free, with our own graphics, content, data, and soundtrack, keeping the overall feel, playstyle, and balance as Victoria 2. OpenVic2 will have it's own modding api, allowing for extremely detailed and deep mods, while being easier to mod and easier for users to find and install mods. If you are interested in helping, see the contribute page, and if you want to stay up to date between dev diaries, check out <a href="https://www.github.com/OpenVic2Project/OpenVic2" target="_blank" rel="noopener noreferrer">the GitHub</a> and join <a href="https://discord.com/invite/vM4E3BFkqH" target="_blank" rel="noopener noreferrer">the Discord</a>, we can't wait to get to know you.</p>
<h1 id="top">About OpenVic</h1>
<p>OpenVic aims to faithfully recreate Victoria 2: Heart of Darkness with a focus on enhancing performance, stability, and modability. We will support loading Victoria 2 mods with zero modifications in a classic / compatibility mode, which will be availible if you own a legitimate copy of Victoria 2. OpenVic's default mode will be completely free, with our own graphics, content, data, and soundtrack, keeping the overall feel, playstyle, and balance as Victoria 2. OpenVic will have it's own modding api, allowing for extremely detailed and deep mods, while being easier to mod and easier for users to find and install mods. If you are interested in helping, see the contribute page, and if you want to stay up to date between dev diaries, check out <a href="https://www.github.com/OpenVicProject/OpenVic" target="_blank" rel="noopener noreferrer">the GitHub</a> and join <a href="https://discord.com/invite/vM4E3BFkqH" target="_blank" rel="noopener noreferrer">the Discord</a>, we can't wait to get to know you.</p>

<style>
#top {
Expand All @@ -15,6 +15,8 @@
}
p {
background-color: #00000090;
box-shadow: 0vw 0vw 0.5vw 0.5vw #00000090;
border-radius: 2vw;
margin: 0vw 1vw;
}
</style>
4 changes: 3 additions & 1 deletion frontend/src/routes/contribute/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div>
<ul>
<li>Join the team! If you have any experience in C++, art, networking, Godot, or design, we'd love to have you! <a href="https://forms.gle/VdFgD8W5pkDhGWQV7" target="_blank" rel="noopener noreferrer">Fill out the form</a></li>
<li>Test it out! If you poke around at what we've got so far, report any bugs in <a href="https://discord.com/invite/vM4E3BFkqH" target="_blank" rel="noopener noreferrer">the Discord</a> or open an issue <a href="https://www.github.com/OpenVic2Project/OpenVic2" target="_blank" rel="noopener noreferrer">on GitHub</a>.</li>
<li>Test it out! If you poke around at what we've got so far, report any bugs in <a href="https://discord.com/invite/vM4E3BFkqH" target="_blank" rel="noopener noreferrer">the Discord</a> or open an issue <a href="https://www.github.com/OpenVic/Project/OpenVic" target="_blank" rel="noopener noreferrer">on GitHub</a>.</li>
<li>Write events and decisions. Love your LARP? Not enough flavour for your nation? Over on <a href="https://discord.com/invite/vM4E3BFkqH" target="_blank" rel="noopener noreferrer">the Discord</a> you can submit your own events and decisions.</li>
<li>Översätt (that's Swedish for translate)! We aren't to a point where we need translators yet, but eventually we'll need your help.</li>
</ul>
Expand All @@ -20,6 +20,8 @@
}
div {
background-color: #00000090;
box-shadow: 0vw 0vw 0.5vw 0.5vw #00000090;
border-radius: 2vw;
margin: 0vw 1vw;
}
</style>
22 changes: 21 additions & 1 deletion frontend/src/routes/faqs/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
<script>
import Header from "$lib/Header.svelte";
import FAQ from "$lib/FAQ.svelte";
import { json } from "@sveltejs/kit"
import { onMount } from "svelte"
//let faqs = [];
//onMount(async () => {
// const res = await fetch("/api/faq");
// faqs = await res.json();
//});
</script>

<Header/>
<Header/>
<!--{#each faqs as faq}
<FAQ q={faq.question} a={faq.answer}/>
{/each}!-->
<FAQ q="Are you guys Open-Source?" a="Yes! Our project is licensed under GPL3."/>
<FAQ q="What does this mean for Victoria 2 Mods?" a="We will create our own system of modding that is leagues more powerful and intuitive than PDX's current modding system for Victoria 2. However, we also plan to include full backwards compatibility for mods for Victoia 2. This means you will be able to drag your Mod files straight into OpenVic2, and they will work perfectly."/>
<FAQ q="Will OpenVic be free?" a="OpenVic will be free for anyone to play, forever."/>
<FAQ q="How much will you guys change?" a="We plan to emulate Victoria 2 as close as possible, even the quirks, although after 1.0, we will make improvements to the game that can be disabled."/>
<FAQ q="Doesn't this violate copyright?" a="No, everything included in OpenVic is entirely created by the team or open-source."/>
<FAQ q="Won't Paradox sue you anyway?" a="No, we have communicated with Paradox and recieved their sanction to go ahead without the threat of undeserved legal action."/>
<FAQ q="What can I do to help?" a="See 'Contributing'"/>
<FAQ q="How long will it take to finish?" a="A while. Quality development takes time, and for something the scope of this project that means likely in the neighbourhood of 2 years."/>
15 changes: 14 additions & 1 deletion frontend/src/routes/news/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,17 @@
import Header from "$lib/Header.svelte";
</script>

<Header/>
<Header/>
<h1>Dev Diaries</h1>
<a href="https://storageopenvic2.blob.core.windows.net/dev-diaries/Dev_diary_4.pdf" target="_blank" rel="noopener noreferrer">Dev Diary 4</a><br>
<a href="https://storageopenvic2.blob.core.windows.net/dev-diaries/Dev_diary_3.pdf" target="_blank" rel="noopener noreferrer">Dev Diary 3</a><br>
<a href="https://storageopenvic2.blob.core.windows.net/dev-diaries/Dev_diary_2.pdf" target="_blank" rel="noopener noreferrer">Dev Diary 2</a><br>
<a href="https://storageopenvic2.blob.core.windows.net/dev-diaries/Dev_diary_1.pdf" target="_blank" rel="noopener noreferrer">Dev Diary 1</a><br>

<style>
a {
font-family: 'Varela Round';
font-size: 3vw;
color: dodgerblue;
}
</style>
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c37f948

Please sign in to comment.