Skip to content

abhisheksonkar21/Dance-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

<title>Plug to HTML5 Converter</title> <style> /* General Styles */ body { font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #f0f0f0; color: #333; } h1 { text-align: center; background-color: #ff6363; color: white; padding: 20px 0; margin: 0; }
/* Button Styles */
button {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  background-color: #ff6363;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #e05252;
}

/* Banner Styles */
.banner {
  text-align: center;
  font-size: 24px;
  color: #333;
  margin-top: 20px;
  padding: 10px;
  background-color: #fff5f5;
  border: 1px solid #ffcccc;
  border-radius: 5px;
  width: 80%;
  margin: 20px auto;
}

/* Video Section */
video {
  display: block;
  width: 100%;
  max-width: 600px;
  margin: 20px auto;
  border: 2px solid #ff6363;
  border-radius: 10px;
}

/* Description Styles */
#description {
  font-size: 18px;
  text-align: center;
  margin: 10px auto;
  padding: 10px;
  width: 80%;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  max-width: 600px;
}
</style>

Dance Website 💃🕺

Hip Hop
<script> // Sample Plug Code to be converted const plugCode = ` when user visits website { show "Welcome to the Dance World!" in banner } when user clicks "Hip Hop" { play hipHopVideo show danceDescription("Hip Hop") } `; // Parsing and converting Plug to HTML5 function plugToHTML(plugCode) { const lines = plugCode.trim().split('\n'); lines.forEach(line => { line = line.trim(); // Handle "when user visits website" if (line.startsWith('when user visits website')) { const messageMatch = line.match(/show "(.*)" in banner/); if (messageMatch) { const message = messageMatch[1]; document.getElementById('banner').textContent = message; } } // Handle "when user clicks" if (line.startsWith('when user clicks')) { const buttonMatch = line.match(/"([^"]+)"/); const actionMatch = line.match(/play (.*)Video/); const descMatch = line.match(/show danceDescription\("([^"]+)"\)/); if (buttonMatch && actionMatch && descMatch) { const buttonId = buttonMatch[1].replace(' ', '') + 'Btn'; const videoSrc = actionMatch[1] + '.mp4'; const danceType = descMatch[1]; document.getElementById(buttonId).addEventListener('click', () => { // Display video const videoElement = document.getElementById('video'); videoElement.src = videoSrc; videoElement.style.display = 'block'; // Display description document.getElementById('description').textContent = `Dance Type: ${danceType}`; }); } } }); } // Call the Plug-to-HTML5 conversion plugToHTML(plugCode); </script>

Changes Applied: CSS Enhancements:

Button: Styled the button with hover effects and rounded corners. Banner: Added padding, border-radius, and a soft background color for visual appeal. Video: Made the video block-centered and gave it a rounded border for a cleaner look. Description Box: Styled the description box to be centered, with padding, a border, and a clean design. HTML5 and JavaScript: The code parses the Plug commands, dynamically updates the banner text, plays the hipHopVideo.mp4 video, and displays the description when the button is clicked.

This formatted version gives a cleaner user interface and a more dynamic experience. Let me know if you'd like to adjust the colors, add more features, or further modify the code!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published