Coder Social home page Coder Social logo

sinazzzz / project-ts Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 1.84 MB

Project collection with typescript

HTML 17.87% JavaScript 16.39% CSS 36.54% TypeScript 29.21%
bootstrap css html javascript json-server mui nodejs react reactrouterdom redux-toolkit tailwind typescript zustand api js json query redux rtk

project-ts's Introduction

Project collection with typescript

In this collection, we have various projects that are based on typescript.

Current projects

Login

Html / Css / ts

Add Task

Html / Css / ts

Add Person

Html / Css / ts

Dashboard

Html / Css / ts / Tailwind

Todo List

React / Redux / Ts

Form

React / useReducer / Ts / Formic / Yup

Swiper

Html / Css / Ts / Swiper

project-ts's People

Contributors

sinazzzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

project-ts's Issues

add Task

<div id="addtask-content" class="content ">
            <h1 class="text-4xl font-bold">Add Task</h1>
            <div class="flex justify-center items-center  h-[100vh] w-full">
                <form method="get" class="form">
                    <div>
                        <label for="username" class="text-2xl font-bold">Username : </label>
                        <input type="text" class="h-10 rounded-lg pl-2" id="username" placeholder="username">
                    </div>
                    <div>
                        <label for="task" class="text-2xl font-bold">Task : </label>
                        <input type="text" id="task" class="h-10 rounded-lg pl-2 mt-3" placeholder="Task">
                    </div>
                    <button id="submit" class="bg-violet-500 rounded-lg mt-3 h-10 w-20 text-white">Submit</button>
                </form>
            </div>
        </div>

sidbar >> select and choose nav

select and choose nav

Hide all content except the default one

document.addEventListener('DOMContentLoaded', function () {
    const navLinks: NodeListOf<HTMLAnchorElement> = document.querySelectorAll('.nav-link');
    const contents: NodeListOf<HTMLElement> = document.querySelectorAll('.content');

    // Hide all content except the default one
    contents.forEach(function (content) {
        if (!content.classList.contains('block')) {
            content.style.display = 'none';
        }
    });

    navLinks.forEach(function (link) {
        link.addEventListener('click', function (event) {
            event.preventDefault();
            const target: string | null = this.getAttribute('data-target');

            contents.forEach(function (content) {
                content.style.display = 'none';
            });

            if (target) {
                const targetContent: HTMLElement | null = document.getElementById(target + '-content');
                if (targetContent) {
                    targetContent.style.display = 'block';
                }
            }
        });
    });
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.