diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..62c8935 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ \ No newline at end of file diff --git a/UE01/AllVideos.php b/UE01/AllVideos.php new file mode 100644 index 0000000..f676fe0 --- /dev/null +++ b/UE01/AllVideos.php @@ -0,0 +1,44 @@ +titel = $titel; + $this->einbetten = $einbetten; + $this->quelle = $quelle; + } + + public function getTitel() + { + return $this->titel; + } + + public function getQuelle() + { + return $this->quelle; + } + + public function getEmbettet() + { + return $this->einbetten; + } +} + +*/ + +require_once 'VideoAbstract.php'; + +class AllVideos extends VideoAbstract +{ + public function getEmbettet() + { + return $this->einbetten; + } +} diff --git a/UE01/InterfaceVideo.php b/UE01/InterfaceVideo.php new file mode 100644 index 0000000..4a2425f --- /dev/null +++ b/UE01/InterfaceVideo.php @@ -0,0 +1,6 @@ +einbetten . '" title="YouTube video player" allowfullscreen>'; + } +} diff --git a/UE01/UserStory7/index.php b/UE01/UserStory7/index.php new file mode 100644 index 0000000..f510738 --- /dev/null +++ b/UE01/UserStory7/index.php @@ -0,0 +1,20 @@ +'; + echo '

' . $video->getTitel() . '

'; + echo '

Quelle: ' . $video->getQuelle() . '

'; + echo $video->getEmbettet(); + echo ''; +} +?> diff --git a/UE01/UserStory8/VimeoVideo.php b/UE01/UserStory8/VimeoVideo.php new file mode 100644 index 0000000..a94e087 --- /dev/null +++ b/UE01/UserStory8/VimeoVideo.php @@ -0,0 +1,11 @@ +einbetten . '" title="Vimeo video player" allowfullscreen>'; + } +} diff --git a/UE01/UserStory8/index.php b/UE01/UserStory8/index.php new file mode 100644 index 0000000..378de74 --- /dev/null +++ b/UE01/UserStory8/index.php @@ -0,0 +1,20 @@ +'; + echo '

' . $video->getTitel() . '

'; + echo '

Quelle: ' . $video->getQuelle() . '

'; + echo $video->getEmbettet(); + echo ''; +} +?> diff --git a/UE01/VCS_Erklaerung.pdf b/UE01/VCS_Erklaerung.pdf new file mode 100644 index 0000000..6a5a6ec Binary files /dev/null and b/UE01/VCS_Erklaerung.pdf differ diff --git a/UE01/VideoAbstract.php b/UE01/VideoAbstract.php new file mode 100644 index 0000000..cb7af87 --- /dev/null +++ b/UE01/VideoAbstract.php @@ -0,0 +1,29 @@ +titel = $titel; + $this->einbetten = $einbetten; + $this->quelle = $quelle; + } + + public function getTitel() + { + return $this->titel; + } + + public function getQuelle() + { + return $this->quelle; + } + + abstract public function getEmbettet(); +} diff --git a/UE01/fonts/youmurdererbb_reg.ttf b/UE01/fonts/youmurdererbb_reg.ttf new file mode 100644 index 0000000..91e402b Binary files /dev/null and b/UE01/fonts/youmurdererbb_reg.ttf differ diff --git a/UE01/index.html b/UE01/index.html new file mode 100644 index 0000000..f9f2366 --- /dev/null +++ b/UE01/index.html @@ -0,0 +1,96 @@ + + + + + + + Movie Trailer Portal + + + + +

Acolytes of Ash

+
+
+

THE STRANGERS

+

Source: YouTube

+ +
+ +
+

TERRIFIER 2

+

Source: YouTube

+ +
+ +
+

Smile

+

Source: YouTube

+ +
+ +
+

No One Gets Out Alive

+

Source: YouTube

+ +
+ +
+

The Strays

+

Source: YouTube

+ +
+ +
+

BARBARIAN

+

Source: YouTube

+ +
+ +
+

Night Swim

+

Source: YouTube

+ +
+ +
+

Talk To Me

+

Source: YouTube

+ +
+ +
+

Sister Death

+

Source: YouTube

+ +
+ +
+

Hypnotic

+

Source: YouTube

+ +
+
+ + + diff --git a/UE01/index.php b/UE01/index.php new file mode 100644 index 0000000..ba056d3 --- /dev/null +++ b/UE01/index.php @@ -0,0 +1,47 @@ + + + + + + + Movie Trailer Portal + + + + +

Acolytes of Ash

+
+ + '; + echo '

' . $video->getTitel() . '

'; + echo '

Quelle: ' . $video->getQuelle() . '

'; + echo $video->getEmbettet(); + echo '
'; + } + + ?> + + + + + + \ No newline at end of file diff --git a/UE01/styles.css b/UE01/styles.css new file mode 100644 index 0000000..da36613 --- /dev/null +++ b/UE01/styles.css @@ -0,0 +1,114 @@ +@font-face { + font-family: 'YouMurdererBB'; + src: url('fonts/youmurdererbb_reg.ttf') format('truetype'); +} + +body { + font-family: 'YouMurdererBB'; + margin: 20px; + background-color: #353638; + font-size: 25px; +} + +h2 { + text-align: center; + font-size: 75px; + color: red; +} + +p { + text-align: center; + font-size: 30px; +} + +.container { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 50px; + margin: 50px; +} + +.YTVideo { + flex: 0 1 45%; + background-color: #464e46; + border-radius: 10px; + box-shadow: #151515; + overflow: hidden; + padding: 10px; + max-width: 480px; +} + +.YTVideo h2 { + font-size: 40px; + margin: 10px 0; +} + +.YTVideo iframe { + width: 100%; + height: 250px; +} + +/* Media Queries für kleinere Bildschirme */ +@media screen and (max-width: 1200px) { + h2 { + font-size: 60px; + } + + .YTVideo { + flex: 0 1 48%; /* Größere Videos bei mittleren Bildschirmen */ + } + + p { + font-size: 25px; + } +} + +@media screen and (max-width: 768px) { + h2 { + font-size: 50px; + } + + p { + font-size: 20px; + } + + .YTVideo { + flex: 0 1 100%; /* Videos nehmen die gesamte Breite ein */ + max-width: 100%; /* Max-Breite anpassen für mobile Bildschirme */ + } + + .YTVideo h2 { + font-size: 30px; + } + + .YTVideo iframe { + height: 200px; /* Iframe-Größe für kleinere Bildschirme anpassen */ + } +} + +@media screen and (max-width: 480px) { + body { + font-size: 20px; + } + + h2 { + font-size: 40px; + } + + p { + font-size: 18px; + } + + .YTVideo { + padding: 5px; + } + + .YTVideo h2 { + font-size: 25px; + } + + .YTVideo iframe { + height: 180px; /* Kleinere Höhe für ganz kleine Bildschirme */ + } +} diff --git a/UE02/JSON/OST.php b/UE02/JSON/OST.php new file mode 100644 index 0000000..b0963b1 --- /dev/null +++ b/UE02/JSON/OST.php @@ -0,0 +1,32 @@ + +id = $id; + $this->name = $name; + $this->videoGameName = $videoGameName; + $this->releaseYear = $releaseYear; + $this->trackList = $trackList; + } + + public function addTrack(Song $song) { + $this->trackList[] = $song; + } + + public function toArray() { + return [ + 'id' => $this->id, + 'name' => $this->name, + 'videoGameName' => $this->videoGameName, + 'releaseYear' => $this->releaseYear, + 'trackList' => array_map(fn($song) => $song->toArray(), $this->trackList) + ]; + } +} diff --git a/UE02/JSON/index.php b/UE02/JSON/index.php new file mode 100644 index 0000000..1aee8a0 --- /dev/null +++ b/UE02/JSON/index.php @@ -0,0 +1,43 @@ +generateData(); + + +if (isset($_GET['ost_id']) && $_GET['ost_id'] > 0 && $_GET['ost_id'] <= count($data)) { + $ostId = $_GET['ost_id'] - 1; + header('Content-Type: application/json'); + echo json_encode($data[$ostId]); + exit; +} + +if (isset($_GET['ost_id']) && ($_GET['ost_id'] < 0 || $_GET['ost_id'] >= count($data))) { + header('Content-Type: application/json'); + echo json_encode('Oh Oh die OST gibt es nicht!'); +} + + +if (isset($_GET['all']) || !isset($_GET['ost_id'])) { + header('Content-Type: application/json'); + echo json_encode($data); + exit; +} + + + + +/* +foreach ($data as $ost) { + echo "OST Name: {$ost->name}
"; + echo "Video Game Name: {$ost->videoGameName}
"; + echo "Release Year: {$ost->releaseYear}
"; + echo "Track List:
"; + foreach ($ost->trackList as $song) { + echo "- {$song->name} by {$song->artist}
"; + } + echo "
"; +} \ No newline at end of file diff --git a/UE02/JSON/seeder.php b/UE02/JSON/seeder.php new file mode 100644 index 0000000..09de05c --- /dev/null +++ b/UE02/JSON/seeder.php @@ -0,0 +1,30 @@ + +id = $id; + $this->name = $name; + $this->artist = $artist; + $this->trackNumber = $trackNumber; + $this->duration = $duration; + } + + public function toArray() { + return [ + 'id' => $this->id, + 'name' => $this->name, + 'artist' => $this->artist, + 'trackNumber' => $this->trackNumber, + 'duration' => $this->duration + ]; + } +} diff --git a/UE02/demo.php b/UE02/demo.php new file mode 100644 index 0000000..f036168 --- /dev/null +++ b/UE02/demo.php @@ -0,0 +1,18 @@ +createOSTs(); + +$ostArray = []; + +foreach ($osts as $ost) { + $ostArray[] = $ost->toArray(); +} + +echo json_encode($ostArray, JSON_PRETTY_PRINT); +?> diff --git a/UE02/index.php b/UE02/index.php new file mode 100644 index 0000000..3ed77cf --- /dev/null +++ b/UE02/index.php @@ -0,0 +1,98 @@ +id = $id; + $this->name = $name; + $this->videoGameName = $videoGameName; + $this->releaseYear = $releaseYear; + $this->tracklist = $tracklist; + } + + public function addTrack(Song $song) { + $this->tracklist[] = $song; + } + + public function toArray() { + $tracklistArray = []; + foreach ($this->tracklist as $track) { + $tracklistArray[] = $track->toArray(); + } + + return [ + 'id' => $this->id, + 'name' => $this->name, + 'videoGameName' => $this->videoGameName, + 'releaseYear' => $this->releaseYear, + 'tracklist' => $tracklistArray + ]; + } +} + +class Song { + private $id; + private $name; + private $artist; + private $trackNumber; + private $duration; + + public function __construct($id, $name, $artist, $trackNumber, $duration) { + $this->id = $id; + $this->name = $name; + $this->artist = $artist; + $this->trackNumber = $trackNumber; + $this->duration = $duration; + } + + public function toArray() { + return [ + 'id' => $this->id, + 'name' => $this->name, + 'artist' => $this->artist, + 'trackNumber' => $this->trackNumber, + 'duration' => $this->duration + ]; + } +} + +$song1 = new Song(1, 'Dragonborn', 'Jeremy Soule', 1, '4:30'); +$song2 = new Song(2, 'The Bannered Mare', 'Jeremy Soule', 2, '2:55'); +$song3 = new Song(3, 'Far Horizons', 'Jeremy Soule', 3, '3:20'); +$song4 = new Song(4, 'Civil War', 'Jeremy Soule', 4, '4:10'); +$song5 = new Song(5, 'Unbound', 'Jeremy Soule', 5, '3:50'); + +$ost = new OST(1, 'Skyrim Soundtrack', 'The Elder Scrolls V: Skyrim', 2011, [$song1, $song2, $song3, $song4, $song5]); + +echo json_encode($ost->toArray(), JSON_PRETTY_PRINT); + +class Seeder { + public static function createOSTs() { + + $song1 = new Song(1, 'Dragonborn', 'Jeremy Soule', 1, '4:30'); + $song2 = new Song(2, 'The Bannered Mare', 'Jeremy Soule', 2, '2:55'); + $song3 = new Song(3, 'Far Horizons', 'Jeremy Soule', 3, '3:20'); + $song4 = new Song(4, 'Civil War', 'Jeremy Soule', 4, '4:10'); + $song5 = new Song(5, 'Unbound', 'Jeremy Soule', 5, '3:50'); + $song6 = new Song(6, 'Reign of the Septims', 'Jeremy Soule', 1, '4:15'); + $song7 = new Song(7, 'Under the Stars', 'Jeremy Soule', 2, '3:10'); + $song8 = new Song(8, 'The Age of Oppression', 'Jeremy Soule', 3, '5:05'); + $song9 = new Song(9, 'Battle for Whiterun', 'Jeremy Soule', 4, '4:20'); + $song10 = new Song(10, 'Tiber Septim', 'Jeremy Soule', 1, '4:25'); + $song11 = new Song(11, 'Dovahkiin', 'Jeremy Soule', 2, '3:45'); + $song12 = new Song(12, 'Pillar of the Cloud', 'Jeremy Soule', 3, '3:30'); + + $ost1 = new OST(1, 'Skyrim Soundtrack', 'The Elder Scrolls V: Skyrim', 2011, [$song1, $song2, $song3, $song4, $song5]); + $ost2 = new OST(2, 'Skyrim Special Edition Soundtrack', 'The Elder Scrolls V: Skyrim Special Edition', 2016, [$song6, $song7, $song8, $song9]); + $ost3 = new OST(3, 'Skyrim: Dawnguard Soundtrack', 'The Elder Scrolls V: Skyrim Dawnguard', 2012, [$song10, $song11, $song12]); + + return [$ost1, $ost2, $ost3]; + } +} +