Technical Documentation Page

Course (Technical Documentation Page) on the freeCodeCamp website

Screenshot 2024 09 10 135438
CSS
				
					/* General Styles */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 100vh;
}

/* Navbar */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 250px;
  background-color: #636262;
  color: white;
  padding: 20px;
  height: 100vh;
  overflow: auto;
}

#navbar header {
  font-size: 20px;
  margin-bottom: 20px;
  font-weight: bold;
  text-align: center;
}

.nav-link {
  display: block;
  padding: 10px;
  color: white;
  text-decoration: none;
  margin-bottom: 10px;
  border-left: 4px solid transparent;
}

.nav-link:hover {
  background-color: #555;
  border-left: 4px solid #f39c12;
}

.main-section {
  margin-left: 280px;
  padding: 20px;
  border-bottom: 2px solid #ccc;
}

header {
  font-size: 24px;
  margin-bottom: 10px;
}

code {
  display: block;
  background-color: #f4f4f4;
  padding: 10px;
  margin: 10px 0;
  border-left: 3px solid #333;
}

ul {
  margin: 10px 0;
  padding-left: 20px;
}

li {
  margin-bottom: 5px;
}

/* Media Queries */
@media (max-width: 800px) {
  #navbar {
    width: 100%;
    height: auto;
    position: relative;
  }

  .main-section {
    margin-left: 0;
  }
}

				
			
HTML
				
					<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Technical Documentation</title>
  <link rel="stylesheet" href="styles.css">
</head>
<body>

  <!-- Navbar Section -->
  <nav id="navbar">
    <header>Technical Documentation</header>
    <a class="nav-link" href="#Introduction">Introduction</a>
    <a class="nav-link" href="#Getting_Started">Getting Started</a>
    <a class="nav-link" href="#Variables">Variables</a>
    <a class="nav-link" href="#Functions">Functions</a>
    <a class="nav-link" href="#Loops">Loops</a>
  </nav>

  <!-- Main Content Section -->
  <main id="main-doc">
    <!-- Section 1 -->
    <section class="main-section" id="Introduction">
      <header>Introduction</header>
      <p>This section introduces you to the basic concepts.</p>
      <p>We will cover topics such as syntax, data types, and more.</p>
      <code>let x = 10;</code>
      <ul>
        <li>Understand basics</li>
        <li>Key concepts</li>
      </ul>
    </section>

    <!-- Section 2 -->
    <section class="main-section" id="Getting_Started">
      <header>Getting Started</header>
      <p>To begin, you need a proper environment setup.</p>
      <p>This guide walks you through the steps.</p>
      <code>npm install</code>
      <ul>
        <li>Install necessary packages</li>
        <li>Configure IDE</li>
      </ul>
    </section>

    <!-- Section 3 -->
    <section class="main-section" id="Variables">
      <header>Variables</header>
      <p>Variables are containers for storing data values.</p>
      <p>Different programming languages have different ways of declaring variables.</p>
      <code>var x = 5;</code>
      <ul>
        <li>Declare variables</li>
        <li>Initialize variables</li>
      </ul>
    </section>

    <!-- Section 4 -->
    <section class="main-section" id="Functions">
      <header>Functions</header>
      <p>A function is a block of code designed to perform a particular task.</p>
      <p>Functions are reusable and can be called with different inputs.</p>
      <code>function greet() { console.log("Hello!"); }</code>
      <ul>
        <li>Function declaration</li>
        <li>Function invocation</li>
      </ul>
    </section>

    <!-- Section 5 -->
    <section class="main-section" id="Loops">
      <header>Loops</header>
      <p>Loops are used to run the same block of code multiple times.</p>
      <p>They are an essential part of any programming language.</p>
      <code>for (let i = 0; i < 5; i++) { console.log(i); }</code>
      <ul>
        <li>For loops</li>
        <li>While loops</li>
      </ul>
    </section>
  </main>

</body>
</html>

				
			

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top