When I press the button, picture doesnt show up

im making a simple application that has 4 buttons that supposed to display pictures if flowers. But when I press the first button nothing happenes and this error pops up lowerPics%C3%B075__30056__32169.1663778062.1280.1280.webp:1 GET http://127.0.0.1:5500/Chapter%201/lowerPics%C3%B075__30056__32169.1663778062.1280.1280.webp 404 (Not Found)

I have no idea what this is, google either.

let dendelionSrc =
  "flowerPics36075__30056__32169.1663778062.1280.1280.webp";
let rose = "flowerPicssingle-red-rose.jpg";
let tulip = "flowerPicstulip-types-for-spring-garden-1315804-hero- 
5 c10c927e00c459eb24c702be447e50d.jpg ";
let mayflower = "flowerPicsMayflowerTrailingArbutus.webp";
img {
  display: block;
}

button {
  margin-top: 10px;
}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Flower Pictures</title>
</head>

<body>
  <div>
    <img id='picture' width="250" height="250" src="#">

    <button id='dendelion' class="btn" onclick="document.getElementById('picture').src =  
                   dendelionSrc">Dendelion</button> //ERROR HERE

    <button id="rose">Rose</button>

    <button id="tulip">Tulip</button>

    <button id="mayflower">Mayflower</button>

  </div>


</body>

</html>

Change the color of an element on mouseenter

i want to make the nav color change every time there’s a mouseenter until it reaches 4 different colors. So far im able to change only the background color of the first nav element, even when usingvquerySelectorAll().

This is the CSS
nav {
z-index: 1;
position: fixed;
width: 52px;
height: 299px;
font-family: 'News Cycle';
font-style: bold;
font-weight:600;
font-size: 20px;
line-height: 33px;
text-align: center;

color: #000000;

}

nav li {
    list-style: none;
    padding-top: 30px;
    padding-right: 10px;
    
}

nav a {
    color: rgba(5, 5, 5);
    text-decoration: none;
}


and this is the javascript i have



const colors = ['red', 'green', 'blue', 'yellow'];
let currentIndex = 0;
const myElement = document.getElementById('info');

myElement.addEventListener('mouseenter', () => {
  myElement.style.color = colors[currentIndex];
  currentIndex = (currentIndex + 1) % colors.length;
});

I want the code to select the text color of ALL the nav elements but only works for backgroundColor for the first nav, if that makes sense

Show File Modified Date With HTML File Running Off Network Drive – No Server

I have an html page running off a Windows network drive (no web server). The page has a hyperlinks to other network files. Is there any way for me to return the last modified date of the files that the hyperlinks are pointing to and display it on the page? This is as web page running off a network drive without a web server? I am open to all and any out-of-the-box suggestions.

I thought maybe I could use a JavaScript fetch command but was not able to make it work. Is that due to JavaScript limitations accessing the Windows files?

render Start Error: Cannot find module ‘node:events’

I’m tying to deploy my discord bot dashboard on render I get this error

Apr 12 11:42:20 PM  ==> Starting service with 'node src/app.js'
Apr 12 11:42:26 PM  internal/modules/cjs/loader.js:888
Apr 12 11:42:26 PM    throw err;
Apr 12 11:42:26 PM    ^
Apr 12 11:42:26 PM  
Apr 12 11:42:26 PM  Error: Cannot find module 'node:events'
Apr 12 11:42:26 PM  Require stack:
Apr 12 11:42:26 PM  - /opt/render/project/src/node_modules/discord.js/src/client/BaseClient.js
Apr 12 11:42:26 PM  - /opt/render/project/src/node_modules/discord.js/src/index.js
Apr 12 11:42:26 PM  - /opt/render/project/src/src/routers/dashboard.js
Apr 12 11:42:26 PM  - /opt/render/project/src/src/app.js
Apr 12 11:42:26 PM      at Function.Module._resolveFilename 

I tried to update every version to last update still the same issue

Full Calendar looping infinite datesSet React

I’m trying to get the month and year when I click on the FullCalendar library Toolbar, using “datesSet” to identify where the user is according to the page render. How can I fix this error below?

It is returning this error. It seems that the DataSet is returning an infinite loop. How can I fix this?

Error:
Uncaught Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

import { AdaptableCard, CalendarView } from "components/shared";
import React, { useCallback, useState } from "react";




const Calendario = (props) => {
  const [eventosComite] = useState([]);
  const [dados, setData] = useState({
    start: "",
    end: "",
  });

  const onDatesChange = useCallback(
    (arg) => {
      const { start, end } = arg;

      setData({
        start: start,
        end: end,
      });
    },
    [setData]
  );

  console.log(dados);

  return (
    <AdaptableCard className="h-full mb-5" bodyClass="h-full">
      <div className="lg:flex items-center justify-between mb-4">
        <h3 className="mb-4 lg:mb-0">Calendário</h3>
      </div>

      <CalendarView
        editable
        selectable
        events={eventosComite}
        datesSet={onDatesChange}
      />
    </AdaptableCard>
  );
};

export default Calendario;

Versions lib:

 "@fullcalendar/core": "^6.1.4",
    "@fullcalendar/daygrid": "^5.11.4",
    "@fullcalendar/interaction": "^5.11.4",
    "@fullcalendar/moment": "^6.1.4",
    "@fullcalendar/react": "^5.10.1",
    "@fullcalendar/timegrid": "^5.11.4",
    ````




How do I make my array change when clicking theme changing button?

I’m writing a word guessing game and I have a few variables to select the targetted word from an array of words. But I’m also trying to implement theme choosing for the game as well. However, when I click on the theme selector button, it doesn’t seem to be updating the targetted word at all. Please have a look at my code and help if you are able to!

/**
 * This array will contain the words that will be used as answer the of game.
 * The words will be coming from runGame function when user select theme of the game.
 */ 
let targetWords = []

/**
 * This array will take on the one word from the tagetWords array so the user can guess.
 * This should change with the theme
 */
const targetWord = runGame()

/**
 * Logic for the game to select which theme the target word needs to be
 */
document.addEventListener('DOMContentLoaded', function () {
    let buttons = document.getElementsByTagName('button');

    for (let button of buttons) {
        button.addEventListener('click', function () {
            let gameTheme = this.getAttribute('data-type');
            runGame(gameTheme);
        })
    }
    runGame();
})


/**
 * Starts the game and select which targetWords list to use based on what the theme user selected.
 */
function runGame(gameTheme) {
    // if the user select fruit theme, the target word will be from this array
    if (gameTheme === "fruit") {
        targetWords = ["acorn", "carob", "dates", "gourd", "grape", "lemon", "limes", "mango", "melon", "olive", "peach", "pears", "plums", "prune", "salak"];
    }

    // if the user select vegatable theme, the target word will be from this array
    if (gameTheme === "vegetable") {
        targetWords = ["azuki", "basil", "beans", "caper", "chard", "dulse", "enoki", "grain", "groat", "maize", "morel", "pinto", "ramps", "thyme", "wheat"];
    }
    console.log(targetWords)

    const chosenWord = targetWords[Math.floor(Math.random() * 15)];
    return chosenWord;

/**
 * Starts the app and let user able to click or press key to enter their guess.
 */
function startGame() {
    document.addEventListener("click", handleMouseClick);
    document.addEventListener("keydown", handleKeyPress);
    runGame();
}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="assets/css/style.css">
    <title>Foodle</title>
</head>

<body>
    <header class="title-container">
        <h1>FOODle</h1>
        <button><i class="fa-solid fa-question"></i></button>
        <hr>
    </header>
    <div class="alert-container" data-alert-container>
    </div>
    <div class="theme-area">
        <button data-type="fruit" class="btn">Fruit Words</button>
        <button data-type="vegetable"class="btn">Vegetable Words</button>
    </div>
    <div data-game-area id="game-area">
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
        <div class="tile"></div>
    </div>
    <div data-keyboard id="keyboard-area">
        <button class="key" data-key="Q">Q</button>
        <button class="key" data-key="W">W</button>
        <button class="key" data-key="E">E</button>
        <button class="key" data-key="R">R</button>
        <button class="key" data-key="T">T</button>
        <button class="key" data-key="Y">Y</button>
        <button class="key" data-key="U">U</button>
        <button class="key" data-key="I">I</button>
        <button class="key" data-key="O">O</button>
        <button class="key" data-key="P">P</button>
        <div class="space"></div>
        <button class="key" data-key="A">A</button>
        <button class="key" data-key="S">S</button>
        <button class="key" data-key="D">D</button>
        <button class="key" data-key="F">F</button>
        <button class="key" data-key="G">G</button>
        <button class="key" data-key="H">H</button>
        <button class="key" data-key="J">J</button>
        <button class="key" data-key="K">K</button>
        <button class="key" data-key="L">L</button>
        <div class="space"></div>
        <button data-enter class="key large">Enter</button>
        <button class="key" data-key="Z">Z</button>
        <button class="key" data-key="X">X</button>
        <button class="key" data-key="C">C</button>
        <button class="key" data-key="V">V</button>
        <button class="key" data-key="B">B</button>
        <button class="key" data-key="N">N</button>
        <button class="key" data-key="M">M</button>
        <button data-delete class="key large">&#10094;&#10094;</button>
    </div>

    <!------------ Font Awesome Script ------------>

    <script src="https://kit.fontawesome.com/2c7a82bc8a.js" crossorigin="anonymous"></script>
    <script src="assets/js/script.js"></script>
</body>

</html>

The blank targetWords array should take on either “fruit” words or “vegetable” words depending on which theme the user selected. But at the moment its not doing that

regex to remove accents, special caracteres but preserve dash, underline and extension

I’m trying to remove accents and special caracteres except dash(-), underline(_) and preserve the extension the string for exemple:

ÁÉÍÓÚáéíóúâêîôûàèìòùÇãç.,~!@#$%&_-12345.png

to:

AEIOUaeiouaeiouaeiouCac_-12345.png

I came to this result but the problem is that it’s ignoring all dots. I need to ignore only last occurence to preserve the extension from filename.

“ÁÉÍÓÚáéíóúâêîôûàèìòùÇãç.,~!@#$%&-12345.png”.normalize(‘NFD’).replace(/[^a-zA-Z0-9-]/g, “”)

I already tried negative look behind like this:

/[^a-zA-Z0-9-]+(?<!.)/g

using this reference but I didn’t have success.

"ÁÉÍÓÚáéíóúâêîôûàèìòùÇãç.,~!@#$%&-12.34.5.png".normalize('NFD').replace(/[^a-zA-Z0-9-]+(?<!.)/g, '')

If i have more than a dot in this case it only removes the first .

TailwindCSS – content larger than screen when adding components

I am in the progress of learning React and TailwindCSS. I am currently trying to build a simple portfolio with a front page and a nav bar for some other pages. I have created the skeleton for my front page, but when I add the nav bar (header) the content gets larger then the screen in both height and width which adds whitespace in the bottom and to the right.

I’ve tried messing around with the h-screen/w-screen and h-full/w-full tags, but I am unable to make anything work.

My App.js looks like this:

import React from "react";
import About from "./components/About";
import Navbar from "./components/Navbar";

export default function App() {
  return (
    <main className="m-0 w-screen h-screen bg-gray-50 body-font text-gray-600 font-display">
      {/* <Navbar /> <-- Adding this causes the issue */}
      <About />
    </main>
  );
}

My Navbar.js component looks like this:

import React from "react";

export default function Navbar() {
  return (
    <header className="bg-gray-50 md:sticky top-0 z-10">
      <div className="container mx-auto flex p-5 flex-col items-end">
        <nav className="md:mr-4 md:py-1 md:pl-4 flex flex-wrap items-center text-base justify-center">
          <a href="#projects" className="mr-5 hover:text-blue-500">
            Past Work
          </a>
          <a href="#skills" className="mr-5 hover:text-blue-500">
            Skills
          </a>
          <a href="#testimonials" className="mr-5 hover:text-blue-500">
            Testimonials
          </a>
        </nav>
      </div>
    </header>
  );
}

And my frontpage (About.js) looks like this:

import React from "react";

export default function About() {
    return (
      <section id="about" className="h-full w-full">
        <div className="container h-full w-full mx-auto my-auto flex px-10 py-20 md:flex-row flex-col items-center">
          <div className="lg:flex-grow md:w-1/2 lg:pr-24 md:pr-16 flex flex-col md:items-start md:text-left mb-16 md:mb-0 items-center text-center">
            <h1 className="title-font sm:text-5xl text-4xl mb-4 font-extrabold text-blue-500">
              NAME HERE
            </h1>
            <p className="mb-8 leading-relaxed">
              Developer
            </p>
            <div className="flex flex-col justify-center">
              <a href="mailto:[email protected]">[email protected]</a>
            </div>
          </div>
        </div>
      </section>
    );
  }

All help is appreciated, thanks!

How do I index into an array type in Typescript?

Let’s say there is a type

type Groceries = {
  totalCost: number;
  items: Array<{
    name: string;
    price: number;
  }>

And I want to index into the nested type of price
How can I achieve this?

Doing Groceries["items"]["price"] is throwing an error, I believe because it is an Array type. How can I index into the individual types defined in the Array type?

Tried indexing by doing Groceries["items"]["price"]

How to prevent scrolling until a CSS animation is completed

I am working on a web project where I am starting off my page load with a full page div that animates with a fade-out animation using CSS. I am using a bootstrap spinner to display a loading image on top of the full page div, and I want to disable scrolling until the animation is completed. I know there’s probably more elegant ways of coding this, but I am working on this project for a class where we are implementing bootstrap as much as possible, so I want to go this route for this reason. This is the basic solution that I came up with, but it doesn’t seem to work.

CSS

body {
  overflow-y: hidden;
  overflow-x: hidden;
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  background-color: #532146;
  height: 100svh;
  width: 100vw;
  z-index: 101;
}

JS

const fullPage = getElementByTagName('body');
const overlay = getElementByID('overlay');

setTimeout(() => {
    fullPage.style.removeProperty('overflow-y');
    overlay.classList.remove('overlay');
}, 7000);

Any ideas for how I can include the bootstrap spinner while the images load are appreciated.

Google Visualization Stacked Combo Chart with Dual Y Axis has bar stacks are overlapping

I have a Combo Chart with dual Y axis.

Bolivia and Equador are stacked ontargetAxisIndex: 0.

Madagascar and Ethiopia are also stacked on targetAxisIndex: 1.

Madagascar/Ethiopia stack (total 45) is overlapped in front of the Bolivia/Equador stack (total 25).

How can I get the two stacks side by side? Bolivia/Equador is currently hidden behind Madagascar/Ethiopia.

Any hints are most appreciated!

google.charts.load('current', {'packages':['corechart']});
      google.charts.setOnLoadCallback(drawVisualization);

      function drawVisualization() {
        // Some raw data (not necessarily accurate)
        var data = google.visualization.arrayToDataTable([
          ['Month', 'Bolivia', 'Ecuador', 'Madagascar',  'Ethiopia', 'Average'],
          ['2004/05',  10, 15, 20, 25, 18],
          ['2005/06',  10, 15, 20, 25, 18],
          ['2006/07',  10, 15, 20, 25, 18],
          ['2007/08',  10, 15, 20, 25, 18],
          ['2008/09',  10, 15, 20, 25, 18]
        ]);

        var options = {
          title : 'Monthly Coffee Production by Country',
          vAxis: {title: 'Cups'},
          hAxis: {title: 'Month'},
          seriesType: 'bars',
           vAxis: {
              viewWindow: {
                max: 35,
              }   
            },
          series: {
            0: {type: 'bar', targetAxisIndex: 0},
            1: {type: 'bar', targetAxisIndex: 0},
            2: {type: 'bar', targetAxisIndex: 1},
            3: {type: 'bar', targetAxisIndex: 1},
            4: {type: 'line',targetAxisIndex: 0},
          },
          isStacked: true
        };

        var chart = new google.visualization.ComboChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<div id="chart_div" style="width: 900px; height: 500px;"></div>

Node.js and Express: Incomplete server information displayed in Discord bot dashboard

I’m working on a Discord bot dashboard using Node.js and Express. I’ve run into an issue with displaying server information on the /guilds path. Sometimes, not all server information is rendered properly, and the information only displays after refreshing the page with F5. I’ve tried using Promise.All, but the issue persists. I’m wondering if this issue is caused by Discord API limitations or if there’s something else at play. Does anyone have any insights or suggestions?

    const user = req.session.user;
    const guilds = req.session.guilds;
    const botGuilds = [];

    if (!user) {
        return res.redirect('/auth/discord');
    }

    await client.guilds.fetch();

    const botGuildIds = client.guilds.cache.map((guild) => guild.id);

    for (const guild of guilds) {
        if (botGuildIds.includes(guild.id)) {
            const botGuild = await client.guilds.fetch(guild.id);
            botGuilds.push(botGuild);
        }
    }

    res.render('guilds', { user: user, guilds: botGuilds });
});```

I've already tried using try-catch blocks, Promise.All and various console.log statements to arrive at the error somehow.

How to prevent websockets from reconnecting on page switch?

How can I prevent websockets from disconnecting and connecting again when I switch a page in NextJS 13 beta(app folder). Will even pay for the solution, telegram: @itszhu

I switch pages using next/link, pages don’t seem to refresh with this option neither.

My app/dashboard/page.js is a server component.

I’m wrapping the page.js with:

import LayoutApp from '@/server/LayoutApp';
import DashboardPage from './DashboardPage';

export default function Dashboard() {
  return (
    <>
      <LayoutApp render={(session) => <DashboardPage session={session} />} />
    </>
  );
}

And this is my LayoutApp.js:

import HeaderBE from '@/layout/be/HeaderBE';
import { LayoutWithTopbar } from '@/layout/be/LayoutWithTopbar';
import meAuth from '@/server/auth';
import { WrapWebsocket } from '@/hoc/withWebsocket';

export default async function LayoutApp({ render }, req) {
  const session = await meAuth(); // server component

  return (
    <main className="h-full w-full flex">
      <WrapWebsocket session={session}>
        <HeaderBE session={session} boss={boss} />
        <LayoutWithTopbar session={session}>{render(session)}</LayoutWithTopbar>
      </WrapWebsocket>
    </main>
  );
}

And this is my websocket context:

'use client';

import React, {
  createContext,
  useEffect,
  useState,
  useCallback,
  useRef,
} from 'react';
import useWebSocket, { ReadyState } from 'react-use-websocket';

export const WebSocketContext = createContext(null);

export const WrapWebsocket = ({ children, session }) => {
  const url = `ws://api.site.test:${process.env.PORT || 3000}`;
  const [isConnected, setIsConnected] = useState(false);
  const pingInterval = useRef(null);

  const handleOpen = () => {
    setIsConnected(true);
    console.log('Connected');
  };

  const handleClose = () => {
    setIsConnected(false);
    console.log('close ws');
  };

  const messageHandlers = useRef([]);

  const addMessageHandler = (handler) => {
    messageHandlers.current.push(handler);
  };

  const removeMessageHandler = (handler) => {
    messageHandlers.current = messageHandlers.current.filter(
      (h) => h !== handler
    );
  };

  const handleMessage = useCallback(
    (event) => {
      console.log('Received message:', event.data); // Add this line
      messageHandlers.current.forEach((handler) => handler(event));
    },
    [messageHandlers]
  );

  const { sendMessage, lastMessage } = useWebSocket(url, {
    onOpen: handleOpen,
    onClose: handleClose,
    share: true,
    retryOnError: true,
    shouldReconnect: (closeEvent) => true,
    reconnectAttempts: 25,
    reconnectInterval: 15000,
  });

  const startPingInterval = () => {
    return setInterval(() => {
      sendMessage(JSON.stringify({ type: 'ping' }));
    }, 30000); // Send ping every 30 seconds
  };

  useEffect(() => {
    if (isConnected) {
      try {
        const credentials = {
          wsId: session.user.sessionId,
        };
        sendMessage(JSON.stringify(credentials));
      } catch (error) {
        console.log(error);
      }
      pingInterval.current = startPingInterval();

      return () => {
        clearInterval(pingInterval.current);
      };
    }
  }, [isConnected, sendMessage]);

  useEffect(() => {
    if (lastMessage) {
      handleMessage(lastMessage);
    }
  }, [lastMessage, handleMessage]);

  useEffect(() => {
    const handleVisibilityChange = () => {
      if (isConnected) {
        clearInterval(pingInterval.current);
        pingInterval.current = startPingInterval();
      }
    }; //document.visibilityState === 'visible' &&

    document.addEventListener('visibilitychange', handleVisibilityChange);

    return () => {
      document.removeEventListener('visibilitychange', handleVisibilityChange);
    };
  }, [isConnected, pingInterval]);

  return (
    <WebSocketContext.Provider
      value={{ isConnected, addMessageHandler, removeMessageHandler }}
    >
      {children}
    </WebSocketContext.Provider>
  );
};

I tried putting WrapWebsocket around the main layout file which crashed the app.
I tried putting it around the layout file that wraps the app folder, which also didn’t work and it kept reconnecting everytime I switched pages.

Is there a JS event to see if user has scrolled to end of slider?

I’m working on a uni project where I have to make a movie ticket website. A boiled down version of what I have now for the homepage can be seen below. Part of the exercise is to incorporate ajax/fetch into the website, I want to do this the following way:

  1. the user sees 10 movies on the homepage
  2. the user scrolls to the end of this array of movies
  3. ajax or fetch requests 5 more movies from the server
  4. the site now shows 15 movies and the user can scroll on

I’m having trouble with step 2; I need some kind of “reached-end” event triggered from the scrollable flexbox. I did some searching and couldn’t find anything like this. Does anyone perhaps know how this can be done? Any help at all is appreciated!!

class Movie {
  constructor(title, image, description, duration, release, age, schedule, seats) {
    this.title = title;
    this.image = image;
    this.description = description;
    this.duration = duration;
    this.release = release;
    this.age = age;
    this.schedule = schedule; //dictionary met alle tijden per dag.
    this.seats = seats;
  }
}

const blankMovie = new Movie(
  "Blank",
  "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/Grey_background.jpg/636px-Grey_background.jpg?20140113173544",
  "blank",
  "0 minutes",
  100
);

var allMovies = [];

for (let i = 0; i < 10; i++) {
  allMovies.push(blankMovie)
}

function populatewith(movies) {
  const homePage = document.getElementById("movie-slider");

  for (let i = 0; i < allMovies.length; i++) {
    const movieDiv = document.createElement("div");
    movieDiv.className = "movie-banner";

    const movieTitle = document.createElement("span");
    movieTitle.className = "movie-banner__title";
    movieTitle.textContent = allMovies[i].title;

    const movieImage = document.createElement("img");
    movieImage.className = "movie-banner__image";
    movieImage.src = allMovies[i].image;

    const movieDur = document.createElement("span");
    movieDur.className = "movie-banner__desc";
    movieDur.textContent = allMovies[i].duration;

    homePage.appendChild(movieDiv);
    movieDiv.appendChild(movieTitle);
    movieDiv.appendChild(movieImage);
    movieDiv.appendChild(movieDur);
  }
}

populatewith(allMovies);
body {
  margin: 0;
  font-family: 'Teko', sans-serif;
}

.float-right {
  float: right;
}

.content {
  transition: margin-top 0.4s;
}

.content {
  background: fixed;
  background-image: url("/images/homepage_background.jpg");
  background-position: center;
  background-size: cover;
  min-height: 100vh;
}

#movie-slider {
  display: flex;
  flex-direction: row;
  align-items: end;
  overflow: auto;
  gap: 10px;
  padding: 10vh 10%;
}

.movie-banner {
  margin-top: 50px;
  margin-bottom: 150px;
  flex-basis: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.movie-banner__image {
  object-fit: cover;
  height: 400px;
}

.movie-banner__title {
  color: wheat;
  text-align: center;
  font-family: 'Bebas Neue', cursive;
  font-size: 1.5em;
  padding: 10px
}

.movie-banner__desc {
  color: wheat;
  font-size: 1.3em;
  text-align: center;
}
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Movie Tickets</title>
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Teko:wght@300&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="/css/index.css">
  <link rel="stylesheet" href="/css/general.css">
</head>

<body>
  <article class="content">
    <section id="movie-slider">
    </section>
  </article>
  <script src="/js/index.js" type="module"></script>
  <script src="/js/general.js" type="module"></script>
</body>

</html>