Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for the overflow problem on screens with viewport width of 360px and below #28

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ 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
32 changes: 17 additions & 15 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,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 @@ -78,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'
textAlign: 'center',
paddingInline: '25px'
}}
>
MAIN FEATURES AND MORE INFO
Expand All @@ -107,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 @@ -139,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 @@ -172,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 @@ -182,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 @@ -204,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 @@ -236,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 @@ -300,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 @@ -335,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
15 changes: 11 additions & 4 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 @@ -10,6 +10,13 @@ body {
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
}
/*added flex style to main*/
main {
display: flex;
flex-direction: column;
overflow: hidden;
align-items: center;
}

a {
color: inherit;
Expand Down
8 changes: 4 additions & 4 deletions styles/heroic.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ footer {
width: 212px;
}



.heroicPreview {
width: 1130px;
}
Expand Down Expand Up @@ -162,15 +160,17 @@ a {
color: #0d101c;
}

/*changed the width 100% instead of a hardcoded value*/
@media screen and (max-width: 414px) {
.feature {
width: 374px;
width: 100%;

margin-bottom: 42px;
}

.heroicPreview,
.feature img {
width: 374px;
width: 100%;
}
}

Expand Down
73 changes: 37 additions & 36 deletions styles/media.css
Original file line number Diff line number Diff line change
@@ -1,47 +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 {
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 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;
}
}
2,426 changes: 2,423 additions & 3 deletions styles/pico.min.css

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions styles/styles.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@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');
Loading