Skip to content

Commit

Permalink
reformating code using prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelBoulhia committed Oct 15, 2024
1 parent ce91a7c commit 426da9f
Show file tree
Hide file tree
Showing 18 changed files with 7,441 additions and 6,833 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,5 @@ yarn-error.log*
# typescript
*.tsbuildinfo



# .idea
.idea
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Setting up a development environment:
2. Clone the repo and enter the cloned folder, for example with the following commands:

```bash
git clone https://github.com/Heroic-Games-Launcher/heroic-website.git
git clone https://github.com/Heroic-Games-Launcher/heroic-website.git
cd heroic-website
```
```

To run the development server:

Expand Down
2 changes: 1 addition & 1 deletion components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function Navbar() {
<span className="contrast link">
<img
src={logo}
title='Heroic Games Launcher'
title="Heroic Games Launcher"
alt="Heroic Games Launcher"
height="32px"
width="32px"
Expand Down
6 changes: 1 addition & 5 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"hosting": {
"public": "out",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
Expand Down
21 changes: 13 additions & 8 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
/** @type {import('next').NextConfig} */
const withPlugins = require('next-compose-plugins');
const optimizedImages = require('next-optimized-images');
const withPlugins = require('next-compose-plugins')
const optimizedImages = require('next-optimized-images')

module.exports = withPlugins([
[optimizedImages, {
optipng: {
optimizationLevel: 3,
},
}], {
[
optimizedImages,
{
optipng: {
optimizationLevel: 3
}
}
],
{
reactStrictMode: true,
images: {
disableStaticImages: true
}
}
}])
])
4 changes: 2 additions & 2 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Html, Head, Main, NextScript } from 'next/document'

export default function Document() {
return (
<Html lang='en'>
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
}
4 changes: 2 additions & 2 deletions pages/api/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const getLatestReleases = async (): Promise<ReleaseUrls> => {
(rel) => rel.prerelease === true
)[0]

console.log({ assetsStable, assetsBeta, tagStable, tagBeta })
console.log({ assetsStable, assetsBeta, tagStable, tagBeta })

const appImageStable =
assetsStable.filter((a) => a.name.endsWith('.AppImage'))[0]
Expand All @@ -70,7 +70,7 @@ export const getLatestReleases = async (): Promise<ReleaseUrls> => {

const isSameMajor = tagStable >= tagBeta.split('-')[0]

/* if (!isSameMajor) {
/* if (!isSameMajor) {
appImageBeta = assetsBeta.filter((a) => a.name.endsWith('.AppImage'))[0]
.browser_download_url
windowsSetupBeta = assetsBeta.filter((a) => a.name.includes('Setup'))[0]
Expand Down
192 changes: 140 additions & 52 deletions pages/cla.tsx

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pages/donate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ const Donate: NextPage = () => {
<h4>GOG.com</h4>
<small>One-time</small>
<p>
Use our link when making purchases on GOG and support the project. Cool right?
Use our link when making purchases on GOG and support the
project. Cool right?
</p>
<footer>
<a href="https://af.gog.com?as=1838482841">
Expand Down
2 changes: 1 addition & 1 deletion pages/downloads.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const Downloads: NextPage = () => {
)}
</footer>
</article>
{/* {releases.WindowsArm && (
{/* {releases.WindowsArm && (
<article className={styles.downloadBoxes}>
<h4>Windows ARM64</h4>
<p>
Expand Down
34 changes: 16 additions & 18 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ const transition = { duration: 0.5 }
const Home: NextPage = () => {
return (
<>




<Head>
<title>Heroic Games Launcher</title>
<meta
Expand Down Expand Up @@ -63,9 +59,10 @@ const Home: NextPage = () => {
}}
>
Heroic is a Free and Open Source <strong>Epic</strong>,{' '}
<strong>GOG</strong> and <strong>Amazon Prime Games</strong> launcher for <strong>Linux</strong>,{' '}
<strong>Windows</strong> and <strong>macOS</strong>. Also available
on the <strong>SteamDeck</strong>!
<strong>GOG</strong> and <strong>Amazon Prime Games</strong>{' '}
launcher for <strong>Linux</strong>, <strong>Windows</strong> and{' '}
<strong>macOS</strong>. Also available on the{' '}
<strong>SteamDeck</strong>!
<p className={styles.buttonContainer}>
<Link href="/downloads" passHref>
<span role="button" className="secondary">
Expand All @@ -82,15 +79,15 @@ const Home: NextPage = () => {
<img
src={img1}
alt="Heroic Games Launcher preview"
title='Heroic Games Launcher preview'
title="Heroic Games Launcher preview"
className="heroicPreview"
/>
</div>
</motion.header>
<h1
style={{
textAlign: 'center',
paddingInline: '25px',
paddingInline: '25px'
}}
>
MAIN FEATURES AND MORE INFO
Expand All @@ -111,7 +108,7 @@ const Home: NextPage = () => {
<img
src={img2}
alt="Game Page"
title='Game Page'
title="Game Page"
aria-label="Game Page"
loading="lazy"
/>
Expand Down Expand Up @@ -143,7 +140,7 @@ const Home: NextPage = () => {
<img
src={img3}
alt="Platform Selection"
title='Platform Selection'
title="Platform Selection"
aria-label="Platform Selection"
loading="lazy"
/>
Expand Down Expand Up @@ -176,7 +173,7 @@ const Home: NextPage = () => {
<a href={img4}>
<img
alt="Epic Store inside Heroic"
title='Epic Store inside Heroic'
title="Epic Store inside Heroic"
aria-label="Epic Store inside Heroic"
src={img4}
loading="lazy"
Expand All @@ -186,8 +183,9 @@ const Home: NextPage = () => {
<div className="description">
<h2>Access to the Stores</h2>
<p>
Go to the Epic, Amazon Prime or GOG store without even leaving Heroic. Get
free games or buy new ones directly from Heroic's interface!
Go to the Epic, Amazon Prime or GOG store without even leaving
Heroic. Get free games or buy new ones directly from Heroic's
interface!
</p>
</div>
</div>
Expand All @@ -208,7 +206,7 @@ const Home: NextPage = () => {
<a href={img8}>
<img
alt="Context Menu"
title='Context Menu'
title="Context Menu"
aria-label="Context Menu"
src={img8}
loading="lazy"
Expand Down Expand Up @@ -240,7 +238,7 @@ const Home: NextPage = () => {
<a href={gif}>
<img
alt="Themes"
title='Themes'
title="Themes"
aria-label="Themes"
src={gif}
loading="lazy"
Expand Down Expand Up @@ -304,7 +302,7 @@ const Home: NextPage = () => {
<a href={img6}>
<img
alt="Wine Settings"
title='Wine Settings'
title="Wine Settings"
aria-label="Wine Settings"
src={img6}
loading="lazy"
Expand Down Expand Up @@ -339,7 +337,7 @@ const Home: NextPage = () => {
<a href={img7}>
<img
alt="Heroic is supported in several languages"
title='Heroic is supported in several languages'
title="Heroic is supported in several languages"
aria-label="Heroic is supported in several languages"
src={img7}
loading="lazy"
Expand Down
2 changes: 0 additions & 2 deletions styles/Home.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.buttonContainer {
margin-bottom: 64px;
margin-top: 32px;

}

.buttonContainer > span {
Expand All @@ -13,7 +12,6 @@
flex-direction: column;
justify-content: space-between;
margin-top: 0px;

}

.features {
Expand Down
11 changes: 5 additions & 6 deletions styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import url("pico.min.css");
@import url("heroic.css");
@import url("media.css");
@import url("colors.css");
@import url('pico.min.css');
@import url('heroic.css');
@import url('media.css');
@import url('colors.css');

html,
body {
Expand All @@ -11,12 +11,11 @@ body {
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
/*added flex style to main*/
main{
main {
display: flex;
flex-direction: column;
overflow: hidden;
align-items: center;

}

a {
Expand Down
6 changes: 0 additions & 6 deletions styles/heroic.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
--primary: #8e24aa;
}





/* Hero */

.hero h1,
Expand Down Expand Up @@ -131,8 +127,6 @@ footer {
width: 212px;
}



.heroicPreview {
width: 1130px;
}
Expand Down
77 changes: 34 additions & 43 deletions styles/media.css
Original file line number Diff line number Diff line change
@@ -1,57 +1,48 @@
@media (min-width: 576px) {

body>footer,
body>header,
body>main,
section {
--block-spacing-vertical: calc(var(--spacing) * 1.2);
}
body > footer,
body > header,
body > main,
section {
--block-spacing-vertical: calc(var(--spacing) * 1.2);
}
}

@media (min-width: 768px) {

body>footer,
body>header,
body>main,
section {
--block-spacing-vertical: calc(var(--spacing) * 1);
}
body > footer,
body > header,
body > main,
section {
--block-spacing-vertical: calc(var(--spacing) * 1);
}
}

@media (min-width: 992px) {

body>footer,
body>header,
body>main,
section {
--block-spacing-vertical: calc(var(--spacing) * 2);
}
body > footer,
body > header,
body > main,
section {
--block-spacing-vertical: calc(var(--spacing) * 2);
}
}


@media (max-width: 990px) {

nav.container-fluid {
display: flex;
flex-direction: column;
align-items: center;
}

nav.container-fluid div {
display: flex;
flex-wrap: wrap;
flex-direction: column-reverse;
align-items: center;

}



nav.container-fluid {
display: flex;
flex-direction: column;
align-items: center;
}

nav.container-fluid div {
display: flex;
flex-wrap: wrap;
flex-direction: column-reverse;
align-items: center;
}
}

/*added a breakpoint for the navbar*/
@media (max-width: 360px) {
nav.container-fluid div a {
font-size: 0.84rem;
}
}
nav.container-fluid div a {
font-size: 0.84rem;
}
}
Loading

0 comments on commit 426da9f

Please sign in to comment.