Friday, 11 August 2023

configuration of website

Menu Type: Dropdown with Full Width

Ensure the navigation items in the dropdown menu contain relevant keywords related to the website's content. For example, "Home," "About Us," and allContact Us" can be keyword-optimized anchor texts.
Header Section: Sticky with Full Width

Include an H1 heading in the header section that incorporates primary keywords related to the website's purpose. For example, "Find the Best Tools Online" or "Discover Essential Tools for Every Need."
Hero Section: Hero Section with Image

Add an alt attribute to the <img> tag in the hero section, using relevant keywords that describe the image, such as "Tools Website Hero Image" or "Tools Illustration."
Use an H1 or H2 heading in the hero section that includes keywords related to the website's primary focus. For instance, "Explore a Wide Range of Tools" or "Unlock Your Toolset Today."
Color Theme: Single-Color, Primary Color: #0000ff

Mention the primary color in the CSS code, such as "background-color: #0000ff;" or "color: #0000ff;" to indicate the website's color scheme.
Tool List: 12 Box-Style with Grid View

Assign keyword-rich names to the tools and use them in the <h3> headings within each tool box. For example, "Tool 1: Power Drill" or "Tool 2: Wrench Set."
Ensure the "Use Tool" buttons include relevant keywords, such as "Try Now," "Access Tool," or "Explore Features."
About Us: Detailed

Incorporate keywords related to the website's purpose and the "About Us" content. Use these keywords naturally within the descriptive paragraphs, emphasizing the website's unique value proposition and services offered.
Contact Us: Form

Mention relevant keywords in the heading of the contact form section, such as "Get in Touch" or "Contact Our Team for Assistance."
Include keywords in the labels and placeholders for the form fields, such as "Name," "Email Address," and "Message."
Footer Section: Rounded Social Icons with Full Width

Add an alt attribute to each <img> tag used for social icons, using keywords like "Facebook Icon," "Twitter Icon," or "Instagram Icon."
Include a brief description of the website's purpose and services in the footer text, incorporating relevant keywords.
Remember, it's important to strike a balance between keyword optimization and maintaining a natural and user-friendly website experience. Focus on providing valuable content and using keywords in a way that enhances the overall user experience.


<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Tools Website</title>
  <link rel="stylesheet" href="/* Reset default margin and padding */
body, h1, h2, h3, p, ul, li, form {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
}

.container {
  margin-left: 15px;
  margin-right: 15px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

header {
  background-color: #0000ff;
  color: #ffffff;
}

header.sticky {
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

nav .logo {
  color: #ffffff;
  font-size: 24px;
  text-decoration: none;
}

nav ul.menu {
  display: flex;
  list-style: none;
}

nav ul.menu li {
  margin-left: 15px;
}

nav ul.menu li a {
  color: #ffffff;
  text-decoration: none;
}

.hero {
  background-image: url('https://via.placeholder.com/1200x400');
  background-size: cover;
  background-position: center;
  color: #ffffff;
  padding: 100px 0;
  text-align: center;
}

.tools {
  padding: 50px 0;
}

.tools h2 {
  margin-bottom: 20px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 30px;
}

.tool-box {
  text-align: center;
}

.tool-box img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
}

.tool-box h3 {
  margin-top: 10px;
}

.use-tool {
  margin-top: 20px;
}

.about-us {
  padding: 50px 0;
}

.about-us h2 {
  margin-bottom: 20px;
}

.contact-us {
  padding: 50px 0;
}

.contact-us h2 {
  margin-bottom: 20px;
}

form .form-group {
  margin-bottom: 15px;
}

form label {
  display: block;
  margin-bottom: 5px;
}

form input,
form textarea {
  width: 100%;
  padding: 5px;
  border: 1px solid #dddddd;
  border-radius: 3px;
}

form textarea {
  height: 150px;
}

form button {
  padding: 10px 20px;
  background-color: #0000ff;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

">
  <script src="script.js"></script>
</head>

<body>
  <header class="sticky">
    <nav>
      <div class="container">
        <a class="logo" href="#">Tools Website</a>
        <ul class="menu">
          <li><a href="#">Home</a></li>
          <li><a href="#">About Us</a></li>
          <li><a href="#">Contact Us</a></li>
        </ul>
      </div>
    </nav>
  </header>

  <section class="hero">
    <div class="container">
      <h1>Welcome to Tools Website</h1>
      <p>Find the right tools for your needs.</p>
    </div>
  </section>

  <section class="tools">
    <div class="container">
      <h2>Tool List</h2>
      <div class="tool-grid">
        <div class="tool-box">
          <img src="https://via.placeholder.com/150" alt="Tool 1">
          <h3>Tool 1</h3>
          <button class="use-tool">Use Tool</button>
        </div>
        <div class="tool-box">
          <img src="https://via.placeholder.com/150" alt="Tool 2">
          <h3>Tool 2</h3>
          <button class="use-tool">Use Tool</button>
        </div>
        <!-- Repeat the tool boxes for the remaining tools -->
      </div>
    </div>
  </section>

  <section class="about-us">
    <div class="container">
      <h2>About Us</h2>
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel felis elit. Nam auctor blandit
        pharetra. Integer sit amet mi felis. Donec aliquam dui ut neque pharetra feugiat. Morbi id suscipit
        elit, at aliquet elit. Sed congue sapien eu purus mollis malesuada. Aenean ut mi sapien. Aliquam a
        cursus libero.</p>
      <p>Curabitur ac viverra libero. Aliquam nec sem eget urna rhoncus euismod vitae in mauris. Fusce sit
        amet eleifend nulla. Vestibulum vestibulum congue lacinia. Sed id arcu interdum, bibendum nulla
        quis, dapibus nisl. Etiam tincidunt congue augue, non placerat ante. Proin sit amet cursus mauris.</p>
    </div>
  </section>

  <section class="contact-us">
    <div class="container">
      <h2>Contact Us</h2>
      <form>
        <div class="form-group">
          <label for="name">Name:</label>
          <input type="text" id="name" name="name" required>
        </div>
        <div class="form-group">
          <label for="email">Email:</label>
          <input type="email" id="email" name="email" required>
        </div>
        <div class="form-group">
          <label for="message">Message:</label>
          <textarea id="message" name="message" required></textarea>
        </div>
        <button type="submit">Submit</button>
      </form>
    </div>
  </section>

  <footer>
    <div class="container">
      <div class="social-icons">
        <a href="#"><img src="https://via.placeholder.com/30" alt="Facebook"></a>
        <a href="#"><img src="https://via.placeholder.com/30" alt="Twitter"></a>
        <a href="#"><img src="https://via.placeholder.com/30" alt="Instagram"></a>
      </div>
      <p>&copy; 2023 Tools Website. All rights reserved.</p>
    </div>
  </footer>
</body>

</html>



Saturday, 15 July 2023

article writing tool

this code, we include the TinyMCE library using the provided CDN link. The library enables the rich text editing functionality in the textarea element with the ID articleEditor.

The article writing tool includes an input field for the title, a textarea for the article content, and a preview section to see the formatted output. The title and content are dynamically updated in the preview section as the user types.

The styling is done using CSS, with a responsive layout using the Bootstrap framework. You can customize the colors, padding, and other styling properties to match your desired design.

Please note that since the TinyMCE library is loaded from a CDN, an internet connection is required for the editor to function correctly.


<!DOCTYPE html>
<html>
<head>
  <title>Article Writing Tool</title>
  <script src="https://cdn.tiny.cloud/1/no-api-key/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
  <style>
    body {
      background-color: #f8f9fa;
      padding: 20px;
    }
    .container {
      max-width: 800px;
      margin: 0 auto;
      background-color: #fff;
      border-radius: 5px;
      padding: 20px;
    }
    h1 {
      color: #007bff;
      margin-bottom: 20px;
    }
    .form-group {
      margin-bottom: 20px;
    }
    label {
      font-weight: bold;
    }
    #articleEditor {
      height: 400px;
    }
    .preview-section {
      border: 1px solid #ced4da;
      padding: 10px;
      border-radius: 5px;
      background-color: #fff;
    }
    .preview-section h3 {
      margin-top: 0;
      color: #007bff;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>Article Writing Tool</h1>
    <div class="form-group">
      <label for="articleTitle">Title:</label>
      <input type="text" id="articleTitle" class="form-control" placeholder="Enter the title">
    </div>
    <div class="form-group">
      <label for="articleEditor">Article Content:</label>
      <textarea id="articleEditor"></textarea>
    </div>
    <div class="preview-section">
      <h3>Preview:</h3>
      <div id="articlePreview"></div>
    </div>
  </div>

  <script>
    tinymce.init({
      selector: '#articleEditor',
      height: 400,
      plugins: 'link image code',
      toolbar: 'undo redo | bold italic underline | alignleft aligncenter alignright | code',
      menubar: false
    });

    const articleTitleInput = document.getElementById('articleTitle');
    const articleEditor = tinymce.get('articleEditor');
    const articlePreview = document.getElementById('articlePreview');

    function updatePreview() {
      const title = articleTitleInput.value;
      const content = articleEditor.getContent();

      articlePreview.innerHTML = `<h3>${title}</h3>${content}`;
    }

    articleTitleInput.addEventListener('input', updatePreview);
    articleEditor.on('keyup', updatePreview);
  </script>
</body>
</html>




words and characters counter

In the above code, we have a container with a heading, a textarea for user input, and a section to display the word and character counts. The JavaScript code listens to the input event on the textarea and updates the counts dynamically.

The styling is done using CSS, with a responsive layout using the Bootstrap framework. The background color, text color, and padding can be customized to your preference.


<!DOCTYPE html>
<html>
<head>
  <title>Words and Characters Counting Tool</title>
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
  <style>
    body {
      background-color: #f8f9fa;
      padding: 20px;
    }
    .container {
      max-width: 600px;
      margin: 0 auto;
      background-color: #fff;
      border-radius: 5px;
      padding: 20px;
    }
    h1 {
      color: #007bff;
    }
    textarea {
      width: 100%;
      height: 150px;
      padding: 10px;
      border: 1px solid #ced4da;
      border-radius: 5px;
      resize: none;
    }
    .count-info {
      margin-top: 20px;
      font-size: 18px;
    }
    .count-info span {
      font-weight: bold;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>Words and Characters Counting Tool</h1>
    <div class="form-group">
      <label for="textArea">Enter your text:</label>
      <textarea id="textArea" placeholder="Type your text here..."></textarea>
    </div>
    <div class="count-info">
      <span id="wordCount">0</span> words, <span id="charCount">0</span> characters
    </div>
  </div>

  <script>
    const textArea = document.getElementById('textArea');
    const wordCountElement = document.getElementById('wordCount');
    const charCountElement = document.getElementById('charCount');

    textArea.addEventListener('input', () => {
      const text = textArea.value.trim();
      const words = text.split(/\s+/).filter(word => word.length > 0);
      const charCount = text.length;

      wordCountElement.textContent = words.length;
      charCountElement.textContent = charCount;
    });
  </script>
</body>
</html>


Drawing and sketching pad

this code, we create an HTML canvas element with an id of "canvas" to hold the drawing area. Below the canvas, we have a set of buttons for changing colors, clearing the canvas, and using an eraser.

We include the Fabric.js library using a script tag sourced from a CDN. Fabric.js simplifies working with the canvas element by providing a higher-level API for drawing and manipulating objects on the canvas.

In the JavaScript section, we initialize a new Fabric.js canvas object using the canvas element's id. We set the default drawing properties, such as enabling the drawing mode and specifying the brush's width and color.

The changeColor() function is used to change the drawing color based on the button clicked. If the "Eraser" button is clicked, the brush color is set to white to act as an eraser.

The clearCanvas() function clears the canvas by calling the clear() method on the Fabric.js canvas object.

This code provides a basic drawing and sketching tool with color selection, eraser functionality, and canvas clearing. You can further enhance it by adding additional features like different brush sizes, saving and loading drawings, and more.


<!DOCTYPE html>
<html>
<head>
  <title>Drawing and Sketching Tool</title>
  <style>
    #canvas {
      border: 1px solid #ccc;
    }
  </style>
</head>
<body>
  <canvas id="canvas" width="800" height="600"></canvas>

  <div>
    <button onclick="changeColor('red')">Red</button>
    <button onclick="changeColor('green')">Green</button>
    <button onclick="changeColor('blue')">Blue</button>
    <button onclick="changeColor('black')">Black</button>
    <button onclick="changeColor('white')">Eraser</button>
    <button onclick="clearCanvas()">Clear Canvas</button>
  </div>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/4.4.0/fabric.min.js"></script>
  <script>
    // Initialize Fabric.js canvas
    const canvas = new fabric.Canvas('canvas');

    // Set default drawing properties
    canvas.isDrawingMode = true;
    canvas.freeDrawingBrush.width = 5;
    canvas.freeDrawingBrush.color = 'black';

    // Function to change drawing color
    function changeColor(color) {
      if (color === 'white') {
        // Set the drawing brush to eraser mode
        canvas.freeDrawingBrush.color = 'white';
      } else {
        canvas.freeDrawingBrush.color = color;
      }
    }

    // Function to clear the canvas
    function clearCanvas() {
      canvas.clear();
    }
  </script>
</body>
</html>

note book

code includes the necessary HTML structure for the notebook tool, CSS styles to customize the appearance, and JavaScript functionality for adding, editing, and deleting notes. It uses the Bootstrap framework for responsive styling and pre-defined classes for buttons and form elements.

Note: Make sure to save this code with a .html extension and open it in a web browser to see the notebook tool in action.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Notebook Tool</title>
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
  <style>
    body {
      padding: 20px;
    }

    .note {
      margin-bottom: 20px;
    }

    .note .note-header {
      background-color: #f1f1f1;
      padding: 10px;
      border-radius: 5px 5px 0 0;
    }

    .note .note-content {
      background-color: #ffffff;
      padding: 10px;
      border: 1px solid #e1e1e1;
      border-radius: 0 0 5px 5px;
    }

    .note .note-actions {
      margin-top: 10px;
    }

    .btn-delete {
      color: #fff;
      background-color: #dc3545;
      border-color: #dc3545;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>Notebook Tool</h1>
    <form id="noteForm">
      <div class="form-group">
        <label for="noteTitle">Note Title:</label>
        <input type="text" class="form-control" id="noteTitle" placeholder="Enter note title" required>
      </div>
      <div class="form-group">
        <label for="noteContent">Note Content:</label>
        <textarea class="form-control" id="noteContent" rows="3" placeholder="Enter note content" required></textarea>
      </div>
      <button type="submit" class="btn btn-primary">Add Note</button>
    </form>
    <div id="noteList"></div>
  </div>

  <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
  <script>
    // Array to store notes
    let notes = [];

    // Function to render notes
    function renderNotes() {
      const noteList = document.getElementById('noteList');
      noteList.innerHTML = '';

      notes.forEach((note, index) => {
        const noteElement = document.createElement('div');
        noteElement.className = 'note';

        const noteHeader = document.createElement('div');
        noteHeader.className = 'note-header';
        noteHeader.innerHTML = `<strong>${note.title}</strong>`;
        noteElement.appendChild(noteHeader);

        const noteContent = document.createElement('div');
        noteContent.className = 'note-content';
        noteContent.textContent = note.content;
        noteElement.appendChild(noteContent);

        const noteActions = document.createElement('div');
        noteActions.className = 'note-actions';
        noteActions.innerHTML = `
          <button class="btn btn-danger btn-delete" onclick="deleteNote(${index})">Delete</button>
          <button class="btn btn-primary" onclick="editNote(${index})">Edit</button>
        `;
        noteElement.appendChild(noteActions);

        noteList.appendChild(noteElement);
      });
    }

    // Function to add a new note
    function addNote() {
      const noteTitleInput = document.getElementById('noteTitle');
      const noteContentInput = document.getElementById('noteContent');

      const title = noteTitleInput.value;
      const content = noteContentInput.value;

      if (title.trim() === '' || content.trim() === '') {
        return;
      }

      const newNote = {
        title,
        content
      };

      notes.push(newNote);

      renderNotes();

      // Clear form inputs
      noteTitleInput.value = '';
      noteContentInput.value = '';
    }

    // Function to delete a note
    function deleteNote(index) {
      notes.splice(index, 1);
      renderNotes();
    }

    // Function to edit a note
    function editNote(index) {
      const note = notes[index];

      const noteTitleInput = document.getElementById('noteTitle');
      const noteContentInput = document.getElementById('noteContent');

      noteTitleInput.value = note.title;
      noteContentInput.value = note.content;

      notes.splice(index, 1);
      renderNotes();
    }

    // Event listener for note submission
    document.getElementById('noteForm').addEventListener('submit', function(event) {
      event.preventDefault();
      addNote();
    });
  </script>
</body>
</html>

html css javascript previewer

this example, the HTML, CSS, and JavaScript code editors are represented by <textarea> elements within their respective <div class="editor"> containers. The preview is displayed in the <iframe> element with the id previewFrame. The "Run Preview" button triggers the runPreview() function to update the preview.

The code is highlighted using the highlight.js library, which is included via the CDN link. Syntax highlighting classes are automatically applied to the code elements to improve readability.

Feel free to customize the styling, add more features, and enhance the functionality to suit your needs. You can also explore additional libraries for more advanced code editing and previewing capabilities.

<!DOCTYPE html>
<html>
<head>
  <title>HTML CSS JS Previewer/Editor</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/monokai-sublime.min.css">
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f7f7f7;
      margin: 0;
      padding: 0;
    }

    .container {
      max-width: 800px;
      margin: 20px auto;
      padding: 20px;
      background-color: #fff;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    h1 {
      color: #333;
      text-align: center;
    }

    .editor-area {
      display: flex;
      flex-wrap: wrap;
      margin-bottom: 20px;
    }

    .editor {
      flex: 1;
      margin-bottom: 10px;
    }

    .editor textarea {
      width: 100%;
      height: 200px;
      border: 1px solid #ccc;
      border-radius: 3px;
      padding: 10px;
      font-family: Consolas, monospace;
      font-size: 14px;
    }

    .preview {
      background-color: #f9f9f9;
      padding: 10px;
      border-radius: 3px;
    }

    .preview iframe {
      width: 100%;
      height: 300px;
      border: none;
    }

    .button {
      display: inline-block;
      padding: 10px 20px;
      background-color: #4caf50;
      color: #fff;
      text-decoration: none;
      border-radius: 3px;
      transition: background-color 0.3s;
    }

    .button:hover {
      background-color: #45a049;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>HTML CSS JS Previewer/Editor</h1>

    <div class="editor-area">
      <div class="editor">
        <h2>HTML</h2>
        <textarea id="htmlEditor" placeholder="Enter your HTML code here"></textarea>
      </div>

      <div class="editor">
        <h2>CSS</h2>
        <textarea id="cssEditor" placeholder="Enter your CSS code here"></textarea>
      </div>

      <div class="editor">
        <h2>JavaScript</h2>
        <textarea id="jsEditor" placeholder="Enter your JavaScript code here"></textarea>
      </div>
    </div>

    <div class="preview">
      <h2>Preview</h2>
      <iframe id="previewFrame"></iframe>
    </div>

    <button class="button" onclick="runPreview()">Run Preview</button>
  </div>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js"></script>
  <script>
    const htmlEditor = document.getElementById('htmlEditor');
    const cssEditor = document.getElementById('cssEditor');
    const jsEditor = document.getElementById('jsEditor');
    const previewFrame = document.getElementById('previewFrame').contentWindow.document;

    function runPreview() {
      const htmlCode = htmlEditor.value;
      const cssCode = '<style>' + cssEditor.value + '</style>';
      const jsCode = '<script>' + jsEditor.value + '</script>';

      previewFrame.open();
      previewFrame.write(htmlCode + cssCode + jsCode);
      previewFrame.close();
    }

    hljs.highlightAll();
  </script>
</body>
</html>


html previewer Tool

In this example, the HTML code is entered in the <textarea> element with the class code-editor. The real-time preview is displayed in the <iframe> element with the id previewFrame.

The JavaScript code listens for any changes in the code editor and updates the preview iframe accordingly by writing the HTML code into its document.

Feel free to customize the styling, add more features, and enhance the functionality as per your requirements.


<!DOCTYPE html>
<html>
<head>
  <title>HTML Previewer Tool</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f7f7f7;
      margin: 0;
      padding: 0;
    }

    .container {
      max-width: 800px;
      margin: 20px auto;
      padding: 20px;
      background-color: #fff;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    h1 {
      color: #333;
      text-align: center;
    }

    .code-editor {
      width: 100%;
      height: 300px;
      margin-bottom: 20px;
      border: 1px solid #ccc;
      border-radius: 3px;
      padding: 10px;
    }

    .preview {
      background-color: #f9f9f9;
      padding: 10px;
      border-radius: 3px;
    }

    .preview iframe {
      width: 100%;
      height: 100%;
      border: none;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>HTML Previewer Tool</h1>

    <textarea id="codeEditor" class="code-editor" placeholder="Enter your HTML code here"></textarea>

    <div class="preview">
      <iframe id="previewFrame"></iframe>
    </div>
  </div>

  <script>
    const codeEditor = document.getElementById('codeEditor');
    const previewFrame = document.getElementById('previewFrame');

    codeEditor.addEventListener('input', updatePreview);

    function updatePreview() {
      const code = codeEditor.value;
      const previewDoc = previewFrame.contentWindow.document;
      previewDoc.open();
      previewDoc.write(code);
      previewDoc.close();
    }
  </script>
</body>
</html>

configuration of website

Menu Type: Dropdown with Full Width Ensure the navigation items in the dropdown menu contain relevant keywords related to the we...