Website: mankapuas.sch.id

Instagram : man_kapuas
FB : MAN Kapuas
Youtube : MAN KAPUAS
MAN KAPUAS : Akreditasi : A
Website Dalam Pengembangan
Tampilkan postingan dengan label Web. Tampilkan semua postingan

Jam JS

 //Informatika MAN Kapuas 

const deg = 6;

const hour = document.querySelector(".hour");

const min = document.querySelector(".min");

const sec = document.querySelector(".sec");

const setClock = () => {

let day = new Date();

let hh = day.getHours() * 30;

let mm = day.getMinutes() * deg;

let ss = day.getSeconds() * deg;

hour.style.transform = `rotateZ(${hh + mm / 12}deg)`;

min.style.transform = `rotateZ(${mm}deg)`;

sec.style.transform = `rotateZ(${ss}deg)`;

};

// first time

setClock();

// Update every 1000 ms

setInterval(setClock, 1000);

const switchTheme = (evt) => {

const switchBtn = evt.target;

if (switchBtn.textContent.toLowerCase() === "light") {

switchBtn.textContent = "dark";

// localStorage.setItem("theme", "dark");

document.documentElement.setAttribute("data-theme", "dark");

} else {

switchBtn.textContent = "light";

// localStorage.setItem("theme", "light"); //add this

document.documentElement.setAttribute("data-theme", "light");

}

};

const switchModeBtn = document.querySelector(".switch-btn");

switchModeBtn.addEventListener("click", switchTheme, false);

let currentTheme = "dark";

// currentTheme = localStorage.getItem("theme")

// ? localStorage.getItem("theme")

// : null;

if (currentTheme) {

document.documentElement.setAttribute("data-theme", currentTheme);

switchModeBtn.textContent = currentTheme;

}




Jam CSS

 :root {

--main-bg-color: #fff;

--main-text-color: #888888;

}

[data-theme="dark"] {

--main-bg-color: #1e1f26;

--main-text-color: #ccc;

}

* {

box-sizing: border-box;

/* transition: all ease 0.2s; */

}

body {

margin: 0;

height: 100vh;

display: flex;

flex-direction: column;

justify-content: space-between;

align-items: center;

font-size: 16px;

background-color: var(--main-bg-color);

position: relative;

transition: all ease 0.2s;

}

.page-header {

font-size: 2rem;

color: var(--main-text-color);

padding: 2rem 0;

font-family: monospace;

text-transform: uppercase;

letter-spacing: 4px;

transition: all ease 0.2s;

}

.clock {

min-height: 18em;

min-width: 18em;

display: flex;

justify-content: center;

align-items: center;

background-color: var(--main-bg-color);

background-image: url("https://imvpn22.github.io/analog-clock/clock.png");

background-position: center center;

background-size: cover;

border-radius: 50%;

border: 4px solid var(--main-bg-color);

box-shadow: 0 -15px 15px rgba(255, 255, 255, 0.05),

inset 0 -15px 15px rgba(255, 255, 255, 0.05), 0 15px 15px rgba(0, 0, 0, 0.3),

inset 0 15px 15px rgba(0, 0, 0, 0.3);

transition: all ease 0.2s;

}

.clock:before {

content: "";

height: 0.75rem;

width: 0.75rem;

background-color: var(--main-text-color);

border: 2px solid var(--main-bg-color);

position: absolute;

border-radius: 50%;

z-index: 1000;

transition: all ease 0.2s;

}

.hour,

.min,

.sec {

position: absolute;

display: flex;

justify-content: center;

border-radius: 50%;

}

.hour {

height: 10em;

width: 10em;

}

.hour:before {

content: "";

position: absolute;

height: 50%;

width: 6px;

background-color: var(--main-text-color);

border-radius: 6px;

}

.min {

height: 12em;

width: 12em;

}

.min:before {

content: "";

height: 50%;

width: 4px;

background-color: var(--main-text-color);

border-radius: 4px;

}

.sec {

height: 13em;

width: 13em;

}

.sec:before {

content: "";

height: 60%;

width: 2px;

background-color: #f00;

border-radius: 2px;

}

/* Style for theme switch btn */

.switch-cont {

margin: 2em auto;

/* position: absolute; */

bottom: 0;

}

.switch-cont .switch-btn {

font-family: monospace;

text-transform: uppercase;

outline: none;

padding: 0.5rem 1rem;

background-color: var(--main-bg-color);

color: var(--main-text-color);

border: 1px solid var(--main-text-color);

border-radius: 0.25rem;

cursor: pointer;

transition: all ease 0.3s;

}



Jam HTML

 <!--  

Materi Coding Mapel Informatika MAN Kapuas 

-->

<div class="page-header"> MAN KAPUAS </div>

<div class="clock">

<div class="hour"></div>

<div class="min"></div>

<div class="sec"></div>

</div>

<div class="switch-cont">

<button class="switch-btn"> Light </button>

</div>




Membuat Animasi Teks bag 2

  <!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Latihan Membuat Animasi 2 Informatika</title>

<styl>

/* 

Weight axis: 100 – 700

Width axis: 85 – 100

*/

/* @import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Text:wght@100..900&display=swap */


@font-face {

  font-family: 'Heading Now'; 

  src: url('https://fonts.vdhazel.com/headingnow/Heading-Now-Variable-Regular-trial.woff2') format('woff2'); 

  font-weight: normal; 

  font-style: normal; 

}


* {

box-sizing: border-box;

}

body {

font-family: "Heading Now", sans-serif;

  font-optical-sizing: auto;

  font-style: normal;

   display: flex;

align-items: center;

justify-content: center;

text-align: center;

min-height: 100vh;

background-color: #000;

  color: #fff;

}

        .animated-text {

            display: flex;

            justify-content: center;

            align-items: center;

            font-size: 3rem;

          font-size: 10vw;

line-height: 10vw;

        }

.letter {

            display: inline-block;

            --wght: 100;

            --wdth: 85;

            --opacity: 0.25;

            --letter-spacing: 0;

            --font-size: 10vw;

            font-variation-settings: "wght" var(--wght), "wdth" var(--wdth);

            opacity: var(--opacity);

            letter-spacing: var(--letter-spacing);

            font-size: var(--font-size);

            transition: 

                font-variation-settings 1s ease-in-out,

                opacity 1s ease-in-out,

                letter-spacing 2s ease-in-out,

                font-size 1s ease-in-out;

        }

</style>

</head>

<body>

<script>    document.addEventListener("DOMContentLoaded", () => {

            const text = "INFORMATIKA";

            const container = document.getElementById("animatedText");  

           // Create spans for each letter

    text.split("").forEach(char => {

        const span = document.createElement("span");

        span.className = "letter";

        span.innerHTML = char === " " ? "&nbsp;" : char; // Use &nbsp; for spaces

        container.appendChild(span);

    });

            const letters = document.querySelectorAll(".letter");

            const totalLetters = letters.length;

            const delayIncrement = 100; // Delay in milliseconds

            function easeInOutQuart(t) {

                return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * (--t) * t * t * t;

            }

            function animateLetters(forward = true) {

                letters.forEach((letter, index) => {

                    // const delay = Math.max(index, totalLetters - index) * delayIncrement;

                    const normalizedIndex = Math.max(index, totalLetters - 1 - index) / (totalLetters - 1);

                    const easedDelay = easeInOutQuart(normalizedIndex);

                    const delay = easedDelay * (totalLetters - 1) * delayIncrement;

                    setTimeout(() => {

                        letter.style.setProperty("--wght", forward ? 700 : 100);

                        letter.style.setProperty("--wdth", forward ? 400 : 150);

                        letter.style.setProperty("--opacity", forward ? 1 : 0.25);

                        letter.style.setProperty("--letter-spacing", forward ? '0.05em' : '0em');

                        // letter.style.setProperty("--font-size", forward ? '12vw' : '10vw');

                    }, delay);

                });

              setTimeout(() => animateLetters(!forward), 4000);

            }

            animateLetters();

        });</script>

<div class="animated-text" id="animatedText"></div>

  </body>

</html>






Latihan Buat Menu

 <!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Latihan Membuat Menu Informatika</title>

    <stayle>

      *{

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}

/* reset button */

button {

    appearance: none;

    background-color: transparent;

    border: none;

    cursor: pointer;

    outline: none;

    padding: 0;

    margin: 0;

    font-family: inherit;

    font-size: inherit;

    color: inherit;

    text-decoration: none;

    text-transform: none;

    line-height: normal;

    overflow: visible;

}


body{

    min-height: 100svh;

    background-color: rgb(15, 23, 42);

    color: white;

    display: grid;

    place-content: center;

    font-size: 1rem;

    font-family: system-ui;

}


nav {

    --_clr-txt: rgb(255, 255, 255);

    --_clr-txt-svg: rgb(147, 158, 184);

    --_ani-speed: 6s; /* speed of rotating text */


    display: flex;

    /*flex-wrap: wrap;*/

    gap: 1rem;

    font-size: 1.4rem;

}

nav>button {

    position: relative;

    display: grid;

    place-content: center;

    grid-template-areas: 'stack';

    padding: 0 1.5rem;

    text-transform: uppercase;

    font-weight: 300;

}


/* place button items on top of each other */

nav>button>span {

    transition: all 300ms ease-in-out;

    grid-area: stack;

}

/* nav icon */

nav>button>span:last-of-type {

    margin-top: 0.25rem;

    transform: scale(0);

    transition-delay: 0ms;

    border-radius: 50%;

}

/* hover - hide text */

nav>button:focus-visible>span:first-of-type,

nav>button:hover>span:first-of-type {

    transform: scale(0);

}

/* hover - reveal icon */

nav>button:focus-visible>span:last-of-type,

nav>button:hover>span:last-of-type {

    transform: scale(1);

}


/* nav SVG circular text*/

nav>button>svg {

    position: absolute;

    width: 200px;

    height: 200px;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

    transform-origin: center;

    opacity: 0;

    text-transform: uppercase;

    transition: all 300ms ease-in-out;

    color: var(--_clr-txt-svg);

}

/* hover - reveal rotating SVG */

nav>button:focus-visible>svg,

nav>button:hover>svg {

    transform: translate(-50%, -50%) scale(1);

    opacity: 1;

    transition-delay: 150ms;

    transition: all 300ms ease-in-out;

}

/*

@supports (-webkit-touch-callout: none) {

  /* specific to iOS devices * / 

  button svg {

      /* adjust position for iOS * /

      translate: -50% -50%;

      animation: rotate var(--_ani-speed) linear infinite;

  }

}

@supports not (-webkit-touch-callout: none) {

 */



 button svg g {

    transform-origin: center;

    animation: rotate var(--_ani-speed) linear infinite;

 }



@keyframes rotate {

    0% {

        transform: rotate(0deg);

    }

    100% {

        transform: rotate(360deg);

    }

}

    </style>

</head>

<body>

    <nav>

        <button type="button" title="Home">

          <span>Home</span>

          <span class="material-symbols-outlined" aria-hidden="true">home</span>

          <svg viewBox="0 0 300 300" aria-hidden="true">

            <g>

              <text fill="currentColor">

                <textPath xlink:href="#circlePath">Home</textPath>

              </text>

              <text fill="currentColor">

                <textPath xlink:href="#circlePath" startOffset="50%">Home</textPath>

              </text>

            </g>

          </svg>

        </button>

        <button type="button">

          <span>About</span>

          <span class="material-symbols-outlined" aria-hidden="true">info</span>

          <svg viewBox="0 0 300 300" aria-hidden="true">

            <g>

              <text fill="currentColor">

                <textPath xlink:href="#circlePath">About</textPath>

              </text>

              <text fill="currentColor">

                <textPath xlink:href="#circlePath" startOffset="50%">About</textPath>

              </text>

            </g>

          </svg>

        </button>

        <button type="button">

          <span>Services</span>

          <span class="material-symbols-outlined" aria-hidden="true">linked_services</span>

          <svg viewBox="0 0 300 300" aria-hidden="true">

            <g>

              <text fill="currentColor">

                <textPath xlink:href="#circlePath">Services</textPath>

              </text>

              <text fill="currentColor">

                <textPath xlink:href="#circlePath" startOffset="50%">Services</textPath>

              </text>

            </g>

          </svg>

        </button>

        <button type="button">

          <span>Contact</span>

          <span class="material-symbols-outlined" aria-hidden="true">email</span>

          <svg viewBox="0 0 300 300">

            <g>

              <text fill="currentColor" aria-hidden="true">

                <textPath xlink:href="#circlePath">Contact</textPath>

              </text>

              <text fill="currentColor">

                <textPath xlink:href="#circlePath" startOffset="50%">Contact</textPath>

              </text>

            </g>

          </svg>

        </button>

      </nav>

            <!-- SVG template with dynamic text -->

      <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 300 300" width="0" height="0">

        <defs>

          <path id="circlePath" d="M 150, 150 m -50, 0 a 50,50 0 0,1 100,0 a 50,50 0 0,1 -100,0" />

        </defs>

      </svg>

    </body>

</html>





Pages - Menu

Teknologi hanyalah alat. Namun, untuk menjadikan peserta didik bisa saling bekerjasama dan termotivasi, guru adalah yang paling penting.” ---Bill Gates---

Online


Powered by IT Komputer MAN Kapuas