• 0 Posts
  • 8 Comments
Joined 2 years ago
cake
Cake day: July 2nd, 2023

help-circle






  • Yesterday:

    <nav script="dropdown.js" style="dropdown.css">
      <button onclick="toggleDropdown()">Menu</button>
    </nav>
    

    Today:

    // index.js
    import React from 'react';
    import ReactDOM from 'react-dom';
    import './global.css';
    import App from './App';
    
    ReactDOM.createRoot(document.getElementById('root')).render(<App />);
    
    // App.jsx
    import Dropdown from './components/Dropdown';
    import './App.css';
    
    export default function App() {
      return (
        <main>
          <Dropdown />
          <p>Hello, world!</p>
        </main>
      );
    }
    
    // components/Dropdown.jsx
    import { useState } from 'react';
    import styles from './Dropdown.module.css';
    import ArrowIcon from '../assets/icons/ArrowIcon.jsx';
    
    export default function Dropdown() {
      const [open, setOpen] = useState(false);
      return (
       <div className={styles.dropdown}>
          <button onClick={() => setOpen(!open)}>Menu <ArrowIcon /></button>
          {open && (
            <ul>
              <li>Option 1</li>
              <li>Option 2</li>
            </ul>
          )}
        </div>
      );
    }
    

  • foggy@lemmy.worldtoSelfhosted@lemmy.worldHow do you document your Homelab?
    link
    fedilink
    English
    arrow-up
    0
    arrow-down
    1
    ·
    edit-2
    2 months ago

    I operate on the philosophy that it is better for me to relearn things than lean on old documentation that may no longer be accurate/relevant.

    The best way to implement a safe connection to my home lab today might not be the safest way tomorrow.

    Old dog, new tricks, etc.

    Also! Your documentation is an attackers wet dream.

    NB: this philosophy doesn’t scale.