Skip to content

Commit

Permalink
feat: added pressStart2P font, renamed dapp to RiVES, and changed fav…
Browse files Browse the repository at this point in the history
…icon
  • Loading branch information
arthuravianna authored and arthuravianna committed Jan 22, 2024
1 parent c2ddd8a commit 253b0a4
Show file tree
Hide file tree
Showing 13 changed files with 132 additions and 40 deletions.
5 changes: 3 additions & 2 deletions frontend/app/components/CartridgeDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import { useContext } from 'react';
import { selectedCartridgeContext } from '../cartridges/selectedCartridgeProvider';
import { fontPressStart2P } from '../utils/font';

function CartridgeDescription() {
const {selectedCartridge} = useContext(selectedCartridgeContext);
Expand All @@ -15,12 +16,12 @@ function CartridgeDescription() {
<div>
<fieldset>
<legend className='font-bold text-xl'>Sumary</legend>
<p>{selectedCartridge.info?.summary}</p>
<p className='text-sm'>{selectedCartridge.info?.summary}</p>
</fieldset>

<fieldset>
<legend className='font-bold text-xl'>Description</legend>
<pre style={{whiteSpace: "pre-wrap"}}>
<pre className={`${fontPressStart2P.className} text-sm`} style={{whiteSpace: "pre-wrap"}}>
{selectedCartridge.info?.description}
</pre>
</fieldset>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/components/CartridgeInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function CartridgeInfo() {
<legend className="ms-2 px-1">
<span className='cartridge-title-text'>{selectedCartridge.name}</span>
<br/>
<span className='muted-text text-sm'>
<span className='muted-text text-xs'>
Uploaded by {selectedCartridge.user_address} on {new Date(selectedCartridge.created_at*1000).toLocaleString()}
</span>
</legend>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/components/CartridgeScoreboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function CartridgeScoreboard({cartridge_id}:{cartridge_id:string}) {
</th>
</tr>
</thead>
<tbody>
<tbody className='text-xs'>
{
generalScores.map((scoreInfo, index) => {
return (
Expand Down
8 changes: 3 additions & 5 deletions frontend/app/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ function Navbar() {
return (
<header className='header'>
<Link href={"/"} className='font-semibold title-color'>
<span>World</span>
<br/>
<span className='ps-2'>Arcade</span>
<span>RiVES</span>
</Link>

<nav className='flex text-lg gap-7 font-medium'>
<nav className='flex text-sm gap-7 font-medium'>
<Link href={"/cartridges"} className={ pathname === "/cartridges" ? "link-active" : "link-2step-hover" }>
<p>Cartridges</p>
</Link>
Expand All @@ -28,7 +26,7 @@ function Navbar() {
</Link>
</nav>

<div className='flex space-x-8'>
<div className='flex space-x-6'>
<ThemeSwitch/>

<button className='web3-connect-btn' disabled={connecting}
Expand Down
17 changes: 12 additions & 5 deletions frontend/app/components/Title.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
import Link from 'next/link'
import React from 'react'
// import Image from 'next/image'
// import rivesLogo from '../../public/logo.png';

function Title() {
return (
<div className="grid grid-cols-1">
<h1 className='title-text'>
<span>World</span>
<br/>
<span className='ps-16'>Arcade</span>
<span>RiVES</span>
</h1>
<span className="subtitle-text justify-self-end">Powered by <Link className="link-2step-hover" href="https://cartesi.io/">Cartesi</Link></span>
<span className="subtitle-text">RiscV Verifiable Entertainment System</span>
</div>

// <div className="flex space-x-2">
// {/* <h1 className='title-text'>
// <span>RiVES</span>
// </h1> */}
// <Image width={250} src={rivesLogo} alt='RiVES logo'/>
// <span className="subtitle-text">RiscV Verifiable Entertainment System</span>
// </div>
)
}

Expand Down
Binary file modified frontend/app/favicon.ico
Binary file not shown.
23 changes: 5 additions & 18 deletions frontend/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ body {
--background-start-rgb: 36, 36, 36;
--background-end-rgb: 105, 105, 105;
--background-end-rgba0: rgba(100, 100, 100, 0.4);
--highlight-text-start-hex: #BFFFFC;
--highlight-text-end-hex: #12B8FF;
--highlight-text-end-rgba0: rgba(18, 184, 255, 0.4);
--highlight-text-end-rgba1: rgba(18, 184, 255, 0.3);
--highlight-text-end-rgba2: rgba(18, 184, 255, 0.2);
--highlight-text-end-rgba3: rgba(18, 184, 255, 0.1);
--highlight-text-end-rgba4: rgba(18, 184, 255, 0.05);
}
}
:root[data-theme="dark"] {
Expand All @@ -69,13 +62,6 @@ body {
--background-start-rgb: 36, 36, 36;
--background-end-rgb: 105, 105, 105;
--background-end-rgba0: rgba(100, 100, 100, 0.4);
--highlight-text-start-hex: #BFFFFC;
--highlight-text-end-hex: #12B8FF;
--highlight-text-end-rgba0: rgba(18, 184, 255, 0.4);
--highlight-text-end-rgba1: rgba(18, 184, 255, 0.3);
--highlight-text-end-rgba2: rgba(18, 184, 255, 0.2);
--highlight-text-end-rgba3: rgba(18, 184, 255, 0.1);
--highlight-text-end-rgba4: rgba(18, 184, 255, 0.05);
}
}

Expand Down Expand Up @@ -231,6 +217,7 @@ body {
transform: translateY(225%) translateX(-50%);
height: 14px;
line-height: 13px;
font-size: 60%;
}

.button-57:disabled,
Expand Down Expand Up @@ -284,15 +271,15 @@ body {
}

.title-text {
@apply 2xl:text-9xl xl:text-8xl md:text-6xl sm:text-3xl font-semibold font-poppins title-color leading-none;
@apply 2xl:text-8xl xl:text-7xl md:text-3xl sm:text-2xl font-semibold title-color leading-none;
}

.subtitle-text {
@apply font-semibold 2xl:text-3xl xl:text-xl md:text-lg sm:text-base relative font-poppins;
@apply font-semibold 2xl:text-2xl xl:text-lg md:text-sm sm:text-base relative;
}

.cartridge-title-text {
@apply font-semibold sm:text-4xl text-xl relative font-poppins title-color;
@apply font-semibold sm:text-4xl text-xl relative title-color;
}

.games-list-item {
Expand Down Expand Up @@ -345,7 +332,7 @@ body {


.web3-connect-btn {
@apply rounded p-2 shadow-sm shadow-current;/*bg-gradient-to-r from-[var(--highlight-text-start-hex)] to-[var(--highlight-text-end-hex)];*/
@apply rounded text-sm p-2 shadow-sm shadow-current;/*bg-gradient-to-r from-[var(--highlight-text-start-hex)] to-[var(--highlight-text-end-hex)];*/
}

.web3-connect-btn:hover {
Expand Down
10 changes: 4 additions & 6 deletions frontend/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'
import Navbar from '@/app/components/Navbar';
import {Web3OnboardProviderClient} from './utils/web3OnboardProvider';

const inter = Inter({ subsets: ['latin'] })
import { fontPressStart2P } from './utils/font';

export const metadata: Metadata = {
title: 'World Arcade',
description: 'Generated by create next app',
title: 'RiVES',
description: 'RiscV Verifiable Entertainment System',
}

export default function RootLayout({
Expand All @@ -19,7 +17,7 @@ export default function RootLayout({
return (
<html lang="en-US">
<Web3OnboardProviderClient>
<body className={inter.className}>
<body className={fontPressStart2P.className}>
<Navbar></Navbar>
{children}
</body>
Expand Down
8 changes: 8 additions & 0 deletions frontend/app/utils/font.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import localFont from 'next/font/local'


// Font files can be colocated inside of `app`
export const fontPressStart2P = localFont({
src: '../../public/Press_Start_2P/PressStart2P-Regular.ttf',
weight: '400'
})
4 changes: 2 additions & 2 deletions frontend/app/utils/web3-onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const chains = [ethereumRopsten, polygonMainnet]
const wallets = [injectedModule()]

const appMetadata = {
name: 'World Arcade',
name: 'RiVES',
icon: '<svg>My App Icon</svg>',
description: 'The World Arcade allows users to play riscv-binaries of games on a RISC-V Cartesi Machine on the browser. The game moves are submited onchain so the session can be replayed in a Cartesi Rollups DApp to generate a provable score.',
description: 'RiVES allows users to play riscv-binaries of games on a RISC-V Cartesi Machine on the browser. The game moves are submited onchain so the session can be replayed in a Cartesi Rollups DApp to generate a provable score.',
recommendedInjectedWallets: [
{ name: 'MetaMask', url: 'https://metamask.io' },
{ name: 'Coinbase', url: 'https://wallet.coinbase.com/' }
Expand Down
93 changes: 93 additions & 0 deletions frontend/public/Press_Start_2P/OFL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Copyright 2012 The Press Start 2P Project Authors ([email protected]), with Reserved Font Name "Press Start 2P".

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.
Binary file added frontend/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 253b0a4

Please sign in to comment.