Skip to content

Commit

Permalink
add a slider component to the library page (#4360)
Browse files Browse the repository at this point in the history
* add a slider component to the library page

* add breakpoints to slider in library, add mock data

* update library page title with new dark design

* update library card to new design

* update content on library page as given in feedback

* add hover transition for library cards and align images in library card at the end

* add css mask for background image fade out in library page title

---------

Co-authored-by: Artem Korotkikh <105195369+artkorotkikh-dfinity@users.noreply.github.com>
  • Loading branch information
1 parent 9bd3c41 commit 5166eda
Show file tree
Hide file tree
Showing 18 changed files with 379 additions and 93 deletions.
172 changes: 108 additions & 64 deletions roadmap/roadmap.json
Original file line number Diff line number Diff line change
Expand Up @@ -1530,94 +1530,94 @@
"description": "The security of ICP is based on the elimination of central points of control. A user interacting with ICP shall not need to rely on a single party. Besides architectural aspects, such as the edge infrastructure, this also encompasses operational aspects, complementing the DAO-based governance of ICP.",
"milestones": [
{
"name": "Edge Infrastructure is Fully Decentralized",
"milestone_id": "Solenoid",
"description": "ICP is accessible through a decentralized edge infrastructure, which is split into NNS-controlled API Boundary Nodes and HTTP Gateways. The NNS will appoint node machines to run API Boundary Nodes and anyone will be able to run HTTP Gateways, enabling a much more decentralized ICP edge infrastructure with a diverse set of service providers.",
"eta": "January 2025",
"name": "Decentralized access logs and metrics",
"milestone_id": "Levitron",
"description": "This milestone establishes visibility into the Internet Computer's edge infrastructure by making aggregated API boundary node access logs publicly accessible. This provides developers with valuable insights into their dapps' usage patterns and facilitates the generation of user statistics, offering key information on traffic sources. To guarantee the integrity of these logs, the milestone focuses on leveraging trusted execution environments, specifically AMD SEV-SNP.",
"eta": null,
"status": "in_progress",
"elements": [
{
"title": "HTTP Gateways",
"overview": "The HTTP Gateway becomes a standalone component as part of the new Boundary Node architecture.",
"forum": "https://forum.dfinity.org/t/boundary-node-roadmap/15562",
"title": "SEV-SNP-protected API Boundary Nodes",
"overview": "Security for API boundary nodes is improved using trusted execution (AMD SEV-SNP), enabling anyone to attest that the correct software is running.",
"forum": "https://forum.dfinity.org/t/long-term-r-d-boundary-nodes-proposal/9401",
"proposal": "https://dashboard.internetcomputer.org/proposal/35671",
"docs": "",
"eta": "",
"status": "in_progress",
"is_community": false,
"milestone_id": "Levitron",
"status": "upcoming",
"is_community": true,
"in_beta": false,
"milestone_id": "Solenoid",
"imported": true
},
{
"title": "Incident Handling under the New Boundary Node Architecture",
"overview": "To protect the core of the Internet Computer, processes must be established to configure temporary rate limits at API boundary nodes during incidents.",
"forum": "https://forum.dfinity.org/t/incident-handling-with-the-new-boundary-node-architecture/36390",
"proposal": "https://dashboard.internetcomputer.org/proposal/134031",
"title": "Public API Boundary Node logs and metrics",
"overview": "Anyone can analyze the API boundary node access logs to gain insights into app usage patterns etc.",
"forum": "",
"proposal": "",
"milestone_id": "Levitron",
"docs": "",
"eta": "",
"status": "in_progress",
"status": "",
"is_community": false,
"in_beta": false,
"milestone_id": "Solenoid",
"imported": true
},
"in_beta": false
}
]
},
{
"name": "Edge Infrastructure is Fully Decentralized",
"milestone_id": "Solenoid",
"description": "ICP is accessible through a decentralized edge infrastructure, which is split into NNS-controlled API Boundary Nodes and HTTP Gateways. The NNS will appoint node machines to run API Boundary Nodes and anyone will be able to run HTTP Gateways, enabling a much more decentralized ICP edge infrastructure with a diverse set of service providers.",
"eta": "January 2025",
"status": "deployed",
"elements": [
{
"title": "Community-owned HTTP Gateways",
"overview": "As part of the new boundary-node architecture, the HTTP gateway is turned into a standalone service, which is easily deployable by anyone, including end users.",
"title": "API Boundary Nodes (NNS controlled)",
"overview": "In the new boundary-node architecture, API boundary nodes are placed under the full control of the NNS and function as the edge of the IC.",
"status": "deployed",
"forum": "https://forum.dfinity.org/t/boundary-node-roadmap/15562",
"proposal": "https://dashboard.internetcomputer.org/proposal/35671",
"docs": "https://github.com/dfinity/ic-gateway",
"eta": "",
"status": "in_progress",
"docs": "https://github.com/dfinity/ic/tree/master/rs/boundary_node/ic_boundary",
"is_community": false,
"in_beta": false,
"milestone_id": "Solenoid"
},
{
"title": "API Boundary Nodes (NNS controlled)",
"overview": "In the new boundary-node architecture, API boundary nodes are placed under the full control of the NNS and function as the edge of the IC.",
"status": "deployed",
"title": "Community-owned HTTP Gateways",
"overview": "As part of the new boundary-node architecture, the HTTP gateway is turned into a standalone service, which is easily deployable by anyone, including end users.",
"forum": "https://forum.dfinity.org/t/boundary-node-roadmap/15562",
"proposal": "https://dashboard.internetcomputer.org/proposal/35671",
"docs": "https://github.com/dfinity/ic/tree/master/rs/boundary_node/ic_boundary",
"docs": "https://github.com/dfinity/ic-gateway",
"eta": "",
"status": "deployed",
"is_community": false,
"in_beta": false,
"milestone_id": "Solenoid"
}
]
},
{
"name": "Decentralized access logs and metrics",
"milestone_id": "Levitron",
"description": "This milestone establishes visibility into the Internet Computer's edge infrastructure by making aggregated API boundary node access logs publicly accessible. This provides developers with valuable insights into their dapps' usage patterns and facilitates the generation of user statistics, offering key information on traffic sources. To guarantee the integrity of these logs, the milestone focuses on leveraging trusted execution environments, specifically AMD SEV-SNP.",
"eta": null,
"status": "future",
"elements": [
},
{
"title": "SEV-SNP-protected API Boundary Nodes",
"overview": "Security for API boundary nodes is improved using trusted execution (AMD SEV-SNP), enabling anyone to attest that the correct software is running.",
"forum": "https://forum.dfinity.org/t/long-term-r-d-boundary-nodes-proposal/9401",
"proposal": "https://dashboard.internetcomputer.org/proposal/35671",
"title": "Incident Handling under the New Boundary Node Architecture",
"overview": "To protect the core of the Internet Computer, processes must be established to configure temporary rate limits at API boundary nodes during incidents.",
"forum": "https://forum.dfinity.org/t/incident-handling-with-the-new-boundary-node-architecture/36390",
"proposal": "https://dashboard.internetcomputer.org/proposal/134031",
"docs": "",
"eta": "",
"milestone_id": "Levitron",
"status": "upcoming",
"is_community": true,
"status": "deployed",
"is_community": false,
"in_beta": false,
"milestone_id": "Solenoid",
"imported": true
},
{
"title": "Public API Boundary Node logs and metrics",
"overview": "Anyone can analyze the API boundary node access logs to gain insights into app usage patterns etc.",
"forum": "",
"proposal": "",
"milestone_id": "Levitron",
"title": "HTTP Gateways",
"overview": "The HTTP Gateway becomes a standalone component as part of the new Boundary Node architecture.",
"forum": "https://forum.dfinity.org/t/boundary-node-roadmap/15562",
"proposal": "https://dashboard.internetcomputer.org/proposal/35671",
"docs": "",
"eta": "",
"status": "",
"status": "deployed",
"is_community": false,
"in_beta": false
"in_beta": false,
"milestone_id": "Solenoid",
"imported": true
}
]
},
Expand Down Expand Up @@ -3654,15 +3654,15 @@
]
},
{
"name": "Code Authoring and Development Workflows",
"name": "Coding and Development in ICP Ninja",
"milestone_id": "Coulomb",
"description": "This milestone introduces new products that make building on ICP fast, fun, and educational.",
"eta": null,
"description": "This milestone focuses on ICP Ninja to make building on ICP fast, fun, and educational.",
"eta": "March 2025",
"status": "in_progress",
"elements": [
{
"title": "ICP Ninja BETA",
"overview": "ICP Ninja is your go-to online platform for developing and deploying smart contracts on the Internet Computer (ICP).",
"overview": "ICP Ninja is your go-to online platform for developing and deploying smart contracts on ICP.",
"status": "deployed",
"forum": "https://forum.dfinity.org/t/announcing-icp-ninja/36396",
"proposal": "",
Expand All @@ -3672,30 +3672,74 @@
"milestone_id": "Coulomb"
},
{
"title": "ICP Ninja User Experience Enhancements",
"overview": "ICP Ninja will receive a number of new user experience enhancements, such as dark mode and the ability to modify the file tree.",
"title": "Developer Productivity Enhancements",
"overview": "The first wave of improvements brings a completely redesigned editor, live compilation feedback, canister logs, and more.",
"status": "deployed",
"forum": "https://forum.dfinity.org/t/icp-ninja-christmas-market-release/39118",
"proposal": "",
"docs": "",
"is_community": false,
"in_beta": false,
"milestone_id": "Coulomb"
},
{
"title": "AI Learning Assistant",
"overview": "An integrated AI Learning Assistant is available in ICP Ninja and can answer any question about development on ICP, help and explain canister code, and much more.",
"status": "deployed",
"forum": "https://forum.dfinity.org/t/icp-ninja-christmas-market-release/39118",
"proposal": "",
"docs": "",
"is_community": false,
"in_beta": false,
"milestone_id": "Coulomb"
},
{
"title": "Landing Page Revamp",
"overview": "Discover a revamped landing page where users feel right at home with their projects. Users create new dapps with options for a frontend, backend, or both, or start from a curated template.",
"status": "in_progress",
"forum": "",
"proposal": "",
"docs": "",
"is_community": false,
"in_beta": true,
"in_beta": false,
"milestone_id": "Coulomb"
},
{
"title": "ICP Ninja Developer Productivity Enhancements",
"overview": "ICP Ninja will get additional features that improve developer productivity, such as the ability to view logs and see live compilation feedback.",
"title": "Project Sharing",
"overview": "Projects can be shared with others by generating a link.",
"status": "in_progress",
"forum": "",
"proposal": "",
"docs": "",
"is_community": false,
"in_beta": true,
"in_beta": false,
"milestone_id": "Coulomb"
},
{
"title": "Login with Internet Identity or GitHub",
"overview": "Users can sign into ICP Ninja with their Internet Identity or GitHub to create an account to get access to even more features on the platform.",
"status": "in_progress",
"forum": "",
"proposal": "",
"docs": "",
"is_community": false,
"in_beta": false,
"milestone_id": "Coulomb"
},
{
"title": "Saving Projects",
"overview": "Users can store their projects directly on ICP Ninja, allowing them to continue working on their projects from other devices, or simply return to them at a later time.",
"status": "in_progress",
"forum": "",
"proposal": "",
"docs": "",
"is_community": false,
"in_beta": false,
"milestone_id": "Coulomb"
},
{
"title": "Revamped Onboarding",
"overview": "The developer documentation will receive a number of updates focused on improving the onboarding journey for first time ICP developers.",
"title": "Exporting Projects to GitHub",
"overview": "ICP Ninja allows users to export their projects to their GitHub account as a new repository.",
"status": "in_progress",
"forum": "",
"proposal": "",
Expand Down
3 changes: 3 additions & 0 deletions src/components/LibraryPage/VideoSlider/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.slick-list {
overflow: visible;
}
144 changes: 144 additions & 0 deletions src/components/LibraryPage/VideoSlider/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
import "./index.css";

import React, { useRef } from "react";

import Link from "@docusaurus/Link";
import Slider from "react-slick";
import { motion } from "framer-motion";
import transitions from "@site/static/transitions.json";

const sliderData = [
{
title: "ICP World Computer Show 2024",
image: "/img/library/video-slider/world-computer-day.avif",
link: "https://www.youtube.com/watch?v=2s2amSYj26U",
},
{
title: "Acumen Media | DAVOS Interviews | The Self-Writing & Sovereign Internet Paradigm",
image: "/img/library/video-slider/acumen-media-davos-interviews-the-self-writing-sovereign-internet-paradigm.avif",
link: "https://www.youtube.com/watch?v=PlJxuRAsEOE",
},
{
title: "Where AI Builds: Unlocking the Power of Imagination through Chat - with Dominic Williams",
image: "/img/library/video-slider/where-ai-builds-unlocking-the-power-of-imagination-through-chat-with-dominic-williams.avif",
link: "https://www.youtube.com/watch?v=9q13cFGxEb0",
},
{
title: "B3YOND THE BLOCKCHAIN – ICP 3rd Anniversary Recap",
image: "/img/library/video-slider/B3YOND-THE-BLOCKCHAIN–icp-3rd-anniversary-recap.avif",
link: "https://www.youtube.com/watch?v=4ZmgVD71SOw",
},
];

const MotionLink = motion(Link);

export const CardWithImage: React.FC<{
children?: React.ReactNode;
image: string;
href: string;
}> = ({ children, image, href }) => {
return (
<MotionLink
variants={transitions.item}
to={href}
className="text-black hover:no-underline hover:-translate-y-2 transition-transform"
>
<article className="flex flex-col justify-start gap-3 group relative overflow-hidden">

<div
className="rounded-xl w-100 aspect-[16/9] bg-gray-200 bg-cover bg-no-repeat bg-center flex items-center justify-center"
style={{ backgroundImage: `url(${image})` }}>
<svg className="backdrop-blur-lg rounded-full" width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 32C0 14.3269 14.3269 0 32 0C49.6731 0 64 14.3269 64 32C64 49.6731 49.6731 64 32 64C14.3269 64 0 49.6731 0 32Z" fill="white" fill-opacity="0.3"/>
<path d="M39.376 32.4161L28.7774 39.4818C28.5476 39.635 28.2372 39.5729 28.084 39.3432C28.0292 39.261 28 39.1645 28 39.0658V24.9343C28 24.6582 28.2239 24.4343 28.5 24.4343C28.5987 24.4343 28.6952 24.4635 28.7774 24.5183L39.376 31.584C39.6057 31.7372 39.6678 32.0477 39.5146 32.2774C39.478 32.3323 39.4309 32.3795 39.376 32.4161Z" fill="white"/>
</svg>
</div>

<div className="p-2 pt-0">
{children}
</div>

</article>

</MotionLink>
);
};

export const VideoSlider = () => {
let sliderRef = useRef(null);
const next = () => {
sliderRef.slickNext();
};
const previous = () => {
sliderRef.slickPrev();
};
const settings = {
dots: false,
infinite: false,
slidesToShow: 2.5,
slidesToScroll: 1,
autoplay: false,
autoplaySpeed: 2000,
pauseOnHover: true,
centerMode: false,
padding: "20px",
centerPadding: "20px",
swipeToSlide: true,
arrows: false,
responsive: [
{
breakpoint: 960,
settings: {
slidesToShow: 2.25,
},
},
{
breakpoint: 768,
settings: {
slidesToShow: 1.5,
},
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
},
},
],
};
return (
<div className="slider-container">

<aside className="gap-4 justify-end mb-6 hidden md:flex">
<button className="bg-transparent w-12 h-12 p-0 inline-flex justify-center items-center rounded-full border border-white-20 border-solid outline-none" onClick={previous} aria-label="Previous">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.82843 6.9999H16V8.9999H3.82843L9.1924 14.3638L7.7782 15.778L0 7.9999L7.7782 0.22168L9.1924 1.63589L3.82843 6.9999Z" fill="#AE9EFF"/>
</svg>
</button>
<button className="bg-transparent w-12 h-12 p-0 inline-flex justify-center items-center rounded-full border border-white-20 border-solid outline-none" onClick={next} aria-label="Next">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.1716 6.9999L6.8076 1.63589L8.2218 0.22168L16 7.9999L8.2218 15.778L6.8076 14.3638L12.1716 8.9999H0V6.9999H12.1716Z" fill="#AE9EFF"/>
</svg>
</button>
</aside>

<Slider ref={(slider) => (sliderRef = slider)} {...settings}>
{sliderData.map((data, index) => (
<div key={index} className="border-box pr-6">
<CardWithImage href={data.link} image={data.image}>
<div className="h-8">
<h1 className="tw-heading-7 md:tw-heading-7 mb-0 line-clamp-1 text-white">
{data.title}
</h1>
</div>
</CardWithImage>
</div>
))}
</Slider>

</div>
);
};
export default VideoSlider;
Loading

0 comments on commit 5166eda

Please sign in to comment.