Merge pull request 'poster-improvements' (#11) from poster-improvements into main

Reviewed-on: #11
This commit is contained in:
Edward Tirado Jr 2025-06-19 04:17:46 +00:00
commit 1b44f10460
10 changed files with 124 additions and 53 deletions

17
.idea/workspace.xml generated
View file

@ -4,13 +4,7 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="5e320804-68c9-4504-97d5-d421de3438b2" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/jsLibraryMappings.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/nuxt.config.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/nuxt.config.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/lists/[id].vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/lists/[id].vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/types/movie.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/types/movie.ts" afterDir="false" />
</list>
<list default="true" id="5e320804-68c9-4504-97d5-d421de3438b2" name="Changes" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -66,7 +60,7 @@
"RunOnceActivity.git.unshallow": "true",
"WebServerToolWindowFactoryState": "false",
"code.cleanup.on.save": "true",
"git-widget-placeholder": "main",
"git-widget-placeholder": "poster-improvements",
"junie.onboarding.icon.badge.shown": "true",
"last_opened_file_path": "/home/tiradoe/Projects/MovieNight/movie-night-web",
"list.type.of.created.stylesheet": "CSS",
@ -78,7 +72,7 @@
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"npm.dev.executor": "Run",
"prettierjs.PrettierConfiguration.Package": "/home/tiradoe/Projects/movie-night/web/src/node_modules/prettier",
"prettierjs.PrettierConfiguration.Package": "/home/tiradoe/Projects/MovieNight/movie-night-web/src/node_modules/prettier",
"rearrange.code.on.save": "true",
"settings.editor.selected.configurable": "configurable.group.editor",
"ts.external.directory.path": "/home/tiradoe/Projects/MovieNight/movie-night-web/src/node_modules/typescript/lib",
@ -117,8 +111,8 @@
<component name="SharedIndexes">
<attachedChunks>
<set>
<option value="bundled-js-predefined-d6986cc7102b-6a121458b545-JavaScript-PS-251.25410.148" />
<option value="bundled-php-predefined-a98d8de5180a-c5828cf854d9-com.jetbrains.php.sharedIndexes-PS-251.25410.148" />
<option value="bundled-js-predefined-d6986cc7102b-b26f3e71634d-JavaScript-PS-251.26094.133" />
<option value="bundled-php-predefined-a98d8de5180a-c5828cf854d9-com.jetbrains.php.sharedIndexes-PS-251.26094.133" />
</set>
</attachedChunks>
</component>
@ -147,6 +141,7 @@
<workItem from="1745366610986" duration="319000" />
<workItem from="1745366940811" duration="4297000" />
<workItem from="1748541588253" duration="2587000" />
<workItem from="1750288132986" duration="18089000" />
</task>
<servers />
</component>

View file

@ -2,3 +2,5 @@ Movie Night Web
=
![cinema corona list page](screenshot.png "Screenshot")
Uses filmstrip icon by momentbloom (https://www.vecteezy.com/vector-art/36659391-filmstrip)

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="1413.5 192.80002 108.59998 149.10001"
width="108.59998"
height="149.10001"
version="1.1"
id="svg1"
sodipodi:docname="poster-placeholder.svg"
inkscape:export-filename="poster-placeholder2.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:export-bgcolor="#ffffffff">
<inkscape:page
x="0"
y="0"
width="108.59998"
height="149.10001"
id="page2"
margin="0"
bleed="0" />
</sodipodi:namedview>
<rect
style="fill:#5c5b79;fill-opacity:1"
id="rect1"
width="108.28388"
height="148.72725"
x="1413.6864"
y="193.17278" />
<path
fill="#cccccc"
d="m 1413.5,242.5 c 0,16.6 0,33.1 0,49.7 36.2,49.7 72.4,-49.7 108.6,0 0,-16.6 0,-33.1 0,-49.7 -36.2,-49.7 -72.4,49.7 -108.6,0 z m 8.7,56.7 c -1.6,-1.3 -3.3,-2.8 -4.9,-4.6 0,-1.6 0,-3.3 0,-4.9 1.6,1.8 3.3,3.3 4.9,4.6 0,1.7 0,3.3 0,4.9 z m 0,-39.8 c -1.6,-1.3 -3.3,-2.8 -4.9,-4.6 0,-1.6 0,-3.3 0,-4.9 1.6,1.8 3.3,3.3 4.9,4.6 0,1.6 0,3.3 0,4.9 z m 9.6,44.4 c -1.6,-0.4 -3.3,-0.9 -4.9,-1.7 0,-1.6 0,-3.3 0,-4.9 1.6,0.8 3.3,1.4 4.9,1.7 0,1.7 0,3.3 0,4.9 z m 0,-39.8 c -1.6,-0.4 -3.3,-0.9 -4.9,-1.7 0,-1.6 0,-3.3 0,-4.9 1.6,0.8 3.3,1.4 4.9,1.7 0,1.7 0,3.3 0,4.9 z m 9.6,39.8 c -1.6,0.3 -3.3,0.5 -4.9,0.5 0,-1.6 0,-3.3 0,-4.9 1.6,0 3.3,-0.2 4.9,-0.5 0,1.7 0,3.3 0,4.9 z m 0,-39.8 c -1.6,0.3 -3.3,0.5 -4.9,0.5 0,-1.6 0,-3.3 0,-4.9 1.6,0 3.3,-0.2 4.9,-0.5 0,1.6 0,3.3 0,4.9 z m 9.6,36.4 c -1.6,0.8 -3.3,1.5 -4.9,2.1 0,-1.6 0,-3.3 0,-4.9 1.6,-0.6 3.3,-1.3 4.9,-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,1.7 0,3.3 0,4.9 z m 0,-39.8 c -1.6,0 -3.3,0.2 -4.9,0.6 0,-1.6 0,-3.3 0,-4.9 1.6,-0.3 3.3,-0.5 4.9,-0.6 0,1.6 0,3.3 0,4.9 z m 14.2,0 c 1.6,1.2 3.3,2.7 4.9,4.5 0,1.6 0,3.3 0,4.9 -1.6,-1.8 -3.3,-3.2 -4.9,-4.5 0,-1.6 0,-3.2 0,-4.9 z m 0,39.8 c 1.6,1.2 3.3,2.7 4.9,4.5 0,1.6 0,3.3 0,4.9 -1.6,-1.8 -3.3,-3.2 -4.9,-4.5 0,-1.6 0,-3.2 0,-4.9 z m -9.6,-44.2 c 1.6,0.3 3.3,0.9 4.9,1.6 0,1.6 0,3.3 0,4.9 -1.6,-0.8 -3.3,-1.3 -4.9,-1.6 0,-1.7 0,-3.3 0,-4.9 z m 0,39.8 c 1.6,0.3 3.3,0.9 4.9,1.6 0,1.6 0,3.3 0,4.9 -1.6,-0.8 -3.3,-1.3 -4.9,-1.6 0,-1.7 0,-3.3 0,-4.9 z"
id="path1" />
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -1,12 +1,14 @@
<template>
<div v-show="visible" id="movie-modal" class="movie-modal movie-card p-5">
<div v-show="visible" id="movie-modal" class="movie-modal movie-card">
<div class="max-w-4xl mx-auto flex flex-col px-2 sm:px-0">
<span
class="hover-pointer font-bold w-full block text-right sm:pr-5 pb-3 pt-5"
class="hover-pointer font-bold self-end pr-1 sm:pr-5 pt-5 pb-5 sm:pb-0"
@click="toggleModal()"
>
X
<span class="bg-red-600 p-2 rounded">X</span>
</span>
<slot class=""></slot>
<slot></slot>
</div>
</div>
</template>

View file

@ -0,0 +1,36 @@
<script lang="ts" setup>
import placeholderPoster from "assets/img/poster-placeholder.svg";
const imgRef = ref<HTMLImageElement | null>(null);
const props = defineProps(["image"]);
const handleImageError = function (event: Event) {
(event.target as HTMLImageElement).classList.remove("lazyload");
(event.target as HTMLImageElement).classList.add("object-cover");
(event.target as HTMLImageElement).src = placeholderPoster;
};
watch(
() => props.image,
(newImage) => {
if (imgRef.value && newImage) {
imgRef.value.classList.add("lazyload");
imgRef.value.setAttribute("data-src", newImage);
}
},
);
</script>
<template>
<div class="aspect-[2/3] w-full text-blue-300">
<img
ref="imgRef"
:data-src="props.image"
alt="Movie Details"
class="lazyload hover-pointer w-full h-full"
@error="handleImageError"
/>
</div>
</template>
<style scoped></style>

View file

@ -8,12 +8,7 @@
</form>
<ul class="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-5 gap-4">
<li v-for="movie in movies" class="p-1 movie-card">
<img
:src="movie.poster"
alt="movie poster"
class="neon-border hover-pointer"
@click="showModal(movie)"
/>
<MoviePoster :image="movie.poster" @click="showModal(movie)" />
<div class="p-2">
<h5 class="text-center">{{ movie.title }} ({{ movie.year }})</h5>
</div>

View file

@ -1,22 +1,18 @@
<template>
<div v-if="props.movie != null" class="sm:m-5 p-10 movie-card neon-border">
<div>
<h2 id="modal-title" class="row pb-3">
<h2 id="modal-title" class="row pb-10">
{{ movie.title }} ({{ movie.year }})
</h2>
<div class="grid sm:grid-cols-2">
<div class="grid sm:grid-cols-2 gap-5">
<!-- MODAL POSTER -->
<div class="text-end">
<img
id="modal-poster"
:src="movie.poster"
alt="poster"
class="pt-5"
<MoviePoster
:image="movie.poster"
class="max-h-80 max-w-72 sm:max-h-none sm:max-w-none mx-auto sm:mx-none"
/>
</div>
<div class="pt-5">
<div class="mx-auto sm:mx-none">
<label class="" for="list-picker">Add To List</label><br />
<select id="list-picker" v-model="list_id" class="p-1 text-black">
<option v-for="list in lists" :value="list.id">

View file

@ -2,14 +2,13 @@
<div class="sm:m-5 p-10 movie-card neon-border">
<div>
<LoadingIcon v-if="updating" />
<h2 class="text-xl pb-3 text-center sm:text-left">
<h2 class="text-xl pb-10 text-center sm:text-left">
{{ movie.title }} ({{ movie.year }})
</h2>
<div class="sm:inline-flex sm:space-x-5">
<img
:src="movie.poster"
alt="movie poster"
class="mx-auto sm:mx-0 neon-border"
<MoviePoster
:image="movie.poster"
class="max-h-80 max-w-72 mx-auto sm:mx-none"
/>
<div class="pt-5 sm:pt-0">
<p>{{ movie.plot }}</p>

View file

@ -1,16 +1,14 @@
<template>
<div class="container mx-auto">
<Navbar />
<NuxtPage/>
<NuxtPage class="mb-32" />
</div>
</template>
<script>
export default {
name: "default",
}
};
</script>
<style scoped>
</style>
<style scoped></style>

View file

@ -41,16 +41,15 @@
<li
v-for="movie in filtered_movies"
:key="movie.poster"
class="rounded movie-card neon-border"
class="rounded movie-card neon-border flex flex-col overflow-hidden"
>
<!-- POSTER -->
<img
:data-src="movie.poster"
alt="movie poster"
class="lazyload p-3 movie-poster hover-pointer mx-auto"
<MoviePoster
:image="movie.poster"
class="flex-shrink-0"
@click="showModal(movie)"
/>
<div class="p-5 flex flex-col">
<div class="p-5 flex flex-col justify-between flex-1">
<!-- TITLE -->
<span class="font-bold text-center mb-1">{{ movie.title }}</span>
<span
@ -74,6 +73,7 @@ import type { Movie } from "~/types/movie";
import Modal from "~/components/Modal.vue";
import { useCookie } from "#app";
import { $fetch } from "ofetch";
import MoviePoster from "~/components/MoviePoster.vue";
const list_id = ref(0);
const list = defineModel<MovieList>("movie_list", { default: [] });