Skip to content

Commit

Permalink
fix: default project beautify code
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Nov 30, 2024
1 parent 94b2e75 commit 4671da1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
30 changes: 11 additions & 19 deletions src/assets/default-project/en/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>Phoenix editor</title>
Expand All @@ -12,35 +12,27 @@
<img id="logo" alt="logo" src="images/phoenix-logo.svg" />
<div id="MainText">
<h1>Phoenix Code</h1>
<span>CLICK_HERE<br /></span><br />
<span>Click here to locate this &lt;span&gt; in the HTML file<br /></span><br />
</div>
<div class="video-container">
<a
href="https://www.youtube.com/watch?feature=player_embedded&v=Jkg3nAZ6vF8"
target="_blank"
title="Phoenix YouTube Channel">
href="https://www.youtube.com/watch?feature=player_embedded&v=Jkg3nAZ6vF8"
target="_blank"
title="Phoenix YouTube Channel">
<img
src="images/youtube_video.png"
alt="Phoenix Code on YouTube"
title="Phoenix Code on YouTube"
style="max-width: 320px;" />
src="images/youtube_video.png"
alt="Phoenix Code on YouTube"
title="Phoenix Code on YouTube"
style="max-width: 320px" />
</a>
<svg class="play-button" viewBox="0 0 200 200" alt="Play video">
<circle
cx="100"
cy="100"
r="90"
fill="#333"
fill-opacity="0.6" />
<circle cx="100" cy="100" r="90" fill="#333" fill-opacity="0.6" />
<polygon points="70, 55 70, 145 145, 100" fill="white" />
</svg>
</div>
</div>
<img id="cloudLeftTop" alt="cloud" src="images/vector-top-left.png" />
<img
id="cloudBottomRight"
alt="cloud"
src="images/vector-bottom-right.png" />
<img id="cloudBottomRight" alt="cloud" src="images/vector-bottom-right.png" />
<img id="starsRight" alt="stars" src="images/stars-right.svg" />
<img
class="clouds"
Expand Down
8 changes: 4 additions & 4 deletions src/assets/default-project/en/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ function onPageLoaded() {
console.log("page loaded");
}

document.addEventListener('DOMContentLoaded', function() {
document.addEventListener("DOMContentLoaded", function () {
// Listen for clicks on elements with the class 'play-button'
document.querySelectorAll('.play-button').forEach(function(button) {
button.addEventListener('click', function() {
document.querySelectorAll(".play-button").forEach(function (button) {
button.addEventListener("click", function () {
// When a play button is clicked, simulate a click on the <a> tag within the same .video-container
this.parentNode.querySelector('a').click();
this.parentNode.querySelector("a").click();
});
});
});

0 comments on commit 4671da1

Please sign in to comment.