new file: public/img/youtube.png

modified:   src/app/page.tsx
	modified:   src/pages/api/podcasts/all.ts
master
joker 2 years ago
parent ead9e7f025
commit b37d5b0ec8
  1. BIN
      public/img/youtube.png
  2. 17
      src/app/page.tsx
  3. 2
      src/pages/api/podcasts/all.ts

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -23,6 +23,7 @@ type Props = {
link_plafthorm_ya: string; link_plafthorm_ya: string;
link_plafthorm_go: string; link_plafthorm_go: string;
link_plafthorm_ap: string; link_plafthorm_ap: string;
link_plafthorm_yu: string;
title_items: string; title_items: string;
children: Node; children: Node;
datePub: string; datePub: string;
@ -38,7 +39,7 @@ const Views = async (e : number) =>{
} }
const PodcastBlocks: React.FC<Props> = ({id, audio, description, urlImg, title_items, datePub, link_plafthorm_ya, link_plafthorm_go, link_plafthorm_ap}) => ( const PodcastBlocks: React.FC<Props> = ({id, audio, description, urlImg, title_items, datePub, link_plafthorm_ya, link_plafthorm_go, link_plafthorm_ap, link_plafthorm_yu}) => (
<> <>
<div className="m-3 card lg:card-side bg-base-100 shadow-xl"> <div className="m-3 card lg:card-side bg-base-100 shadow-xl">
<div className="flex flex-col items-center bg-white border border-gray-200 rounded-lg shadow md:flex-row "> <div className="flex flex-col items-center bg-white border border-gray-200 rounded-lg shadow md:flex-row ">
@ -61,7 +62,7 @@ const PodcastBlocks: React.FC<Props> = ({id, audio, description, urlImg, title_i
onPlay={e => Views(id)} onPlay={e => Views(id)}
/> />
</div> </div>
<p className="mt-3"> Дата публикации: {datePub} </p> <p className="mt-3"> Дата публикации: {datePub} | Прослушали: {100} </p>
<div className="flex flex-row"> <div className="flex flex-row">
<div className="basis-1/4"> <div className="basis-1/4">
<a href={link_plafthorm_ya}> <a href={link_plafthorm_ya}>
@ -99,6 +100,18 @@ const PodcastBlocks: React.FC<Props> = ({id, audio, description, urlImg, title_i
/> />
</a> </a>
</div> </div>
<div className="basis-1/4">
<a href={link_plafthorm_yu}>
<Image
src={'/img/youtube.png'}
alt={title_items}
width="0"
height="0"
sizes="200vw"
className="w-auto row-span-2"
/>
</a>
</div>
</div> </div>
</div> </div>

@ -1,7 +1,7 @@
import Select from "../../../server/db/select"; import Select from "../../../server/db/select";
import type { NextApiRequest, NextApiResponse } from 'next'; import type { NextApiRequest, NextApiResponse } from 'next';
const sql = "SELECT items.id, podcasts.link_plafthorm_ya, podcasts.link_plafthorm_go, podcasts.link_plafthorm_ap, urlImg,items.description, items.title_items, items.audio, DATE_FORMAT(items.pubDate, '%d - %m - %Y') as datePub FROM podcasts, items WHERE podcasts.id=items.id_podcasts and items.status=1 ORDER BY items.pubDate DESC"; const sql = "SELECT items.id, podcasts.link_plafthorm_ya, podcasts.link_plafthorm_yu, podcasts.link_plafthorm_go, podcasts.link_plafthorm_ap, urlImg,items.description, items.title_items, items.audio, DATE_FORMAT(items.pubDate, '%d - %m - %Y') as datePub FROM podcasts, items WHERE podcasts.id=items.id_podcasts and items.status=1 ORDER BY items.pubDate DESC";
export default function handler( export default function handler(
req: NextApiRequest, req: NextApiRequest,

Loading…
Cancel
Save