diff --git a/index.html b/index.html index 52550e9..9a88915 100644 --- a/index.html +++ b/index.html @@ -23,8 +23,6 @@ - -

Media społecznościowe/moje konta

@@ -53,20 +51,46 @@
  • muzyka
  • jestem fanem/po prostu słucham:

    -
    + +
    +

    rocka

    +
    +

    szczególnie:

    + +
    +
    +
    +

    części amerykańskiego rapu

    +
    +

    szczególnie:

    + +
    +
    +
    +

    zespołów/artystów

    +
    - - +
    +
    +

    sprzęt/oprogramowanie, który posiadam:

    +
    +

    sprzęt

    +
    + +
    +
    +
    +

    systemy operacyjne

    +
    + +
    +
    +
    +

    oprogramowanie

    +
    + +
    +
    +
    +

    subskrypcje

    +
    + +
    +
    +

    cenię sobie prywatność, nie korzystam m.in. z facebooka, wyszukiwarki google.

    diff --git a/script.js b/script.js index eab9d47..d07002e 100644 --- a/script.js +++ b/script.js @@ -72,4 +72,22 @@ if (ageElement) { ageElement.innerText = difference.toFixed(4); } -swapButton.addEventListener('click', swapContent); \ No newline at end of file +swapButton.addEventListener('click', swapContent); + +const accordions = document.querySelectorAll('.accordion'); + +function closeOtherAccordions(accordion) { + accordions.forEach(acc => { + if (acc !== accordion) + acc.classList.remove('active'); + }); +} + +function openAccordion(accordion) { + closeOtherAccordions(accordion); + accordion.classList.toggle('active'); +} + +accordions.forEach(accordion => { + accordion.addEventListener('click', () => openAccordion(accordion)); +}); \ No newline at end of file diff --git a/style.css b/style.css index da554b3..488d024 100644 --- a/style.css +++ b/style.css @@ -4,10 +4,6 @@ --size: 100px; } -html { - height: 100vh; -} - body { min-height: 100vh; } @@ -23,11 +19,13 @@ body { align-items: stretch; justify-content: center; flex-direction: row; - min-height: 100vh; + height: 100vh; + width: 100%; } #content>* { - width: 100vw; + overflow-y: auto; + width: 100%; display: flex; align-items: center; flex-direction: column; @@ -213,6 +211,53 @@ button { opacity: 0; } +.accordion { + width: 100%; + background-color: #ffb54c; + padding: 10px 0 10px 0; + cursor: pointer; + transition: ease-in 0.2s; +} + +.accordion.active, .accordion:hover { + background-color: #fffdcc; +} + +.accordion p { + text-align: center; + margin: 0; +} + +.accordion>p::after { + content: '▼'; + margin-left: 5px; +} + +.accordion.active>p::after { + content: '▲'; +} + +.accordion-content { + display: none; + padding: 10px 0 10px 0; + border-radius: 10px; + text-align: center; +} + +.accordion-content > *:is(ol, ul) { + list-style-type: none; +} + +.accordion-content > *:is(ol, ul) li::before { + content: '•'; + margin: 0 5px 0 5px; +} + +.accordion.active>.accordion-content { + display: block; +} + +/* ANIMATIONS */ @keyframes bounce { 0% { top: 0; @@ -321,4 +366,8 @@ body:not(.dark) #age { flex-direction: column; justify-content: center; } + + #box { + display: none; + } } \ No newline at end of file