Skip to content

Instantly share code, notes, and snippets.

@isdaviddong
Last active July 2, 2025 09:40
Show Gist options
  • Save isdaviddong/23cc140c1780828b44f79397f737b95e to your computer and use it in GitHub Desktop.
Save isdaviddong/23cc140c1780828b44f79397f737b95e to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="Scripts/jquery-1.9.1.min.js"></script>
<link href="Content/bootstrap.min.css" rel="stylesheet" />
<script src="Scripts/isRockFx.js"></script>
<script>
$(function () {
$('#ButtonCal').click(
function () {
//取得用戶輸入的參數
var para = { 'height': $('#txbHeight').val(), 'weight': $('#txbWeight').val() };
//呼叫API
ExecuteAPI('Example', 'BMI', para,
//呼叫WebAPI成功時運行的Call Back Function
function (result) {
alert(result.Data);
}
);
}
);
});
</script>
</head>
<body>
<div class="row" style="margin:10px">
<div class="col-md-12">
<div class="form-group">
身高:
<input id="txbHeight" class="form-control" placeholder="請輸入身高" />
體重:
<input id="txbWeight" class="form-control" placeholder="請輸入體重" />
<br />
<button class="btn btn-primary" id="ButtonCal">計算</button>
</div>
</div>
</div>
</body>
</html>
@LooperShowcase
Copy link

<title>2D Array Game</title> <style> .cell { width: 40px; height: 40px; display: inline-block; text-align: center; line-height: 40px; border: 1px solid black; font-size: 25px; } </style>
<script> let map = [ [1, 1, 1, 1, 1], [1, 0, 0, 0, 1], [1, 0, 'P', 0, 1], [1, 0, 0, 0, 1], [1, 1, 1, 1, 1] ]; let playerX = 2; let playerY = 2; function drawMap() { let game = document.getElementById("game"); game.innerHTML = ""; for (let i = 0; i < map.length; i++) { for (let j = 0; j < map[i].length; j++) { let cell = document.createElement("div"); cell.className = "cell"; if (map[i][j] == 1) { cell.style.background = "gray"; // حيطه } else if (map[i][j] == 'P') { cell.style.background = "green"; // لاعب } else { cell.style.background = "white"; // طريق } cell.innerText = map[i][j] == 1 ? "" : map[i][j] == 'P' ? "😎" : ""; game.appendChild(cell); } game.innerHTML += "
"; } } drawMap(); document.addEventListener("keydown", function(e) { let newX = playerX; let newY = playerY; if (e.key == "ArrowUp") newX--; if (e.key == "ArrowDown") newX++; if (e.key == "ArrowLeft") newY--; if (e.key == "ArrowRight") newY++; if (map[newX][newY] == 0) { map[playerX][playerY] = 0; playerX = newX; playerY = newY; map[playerX][playerY] = 'P'; drawMap(); } }); </script>

@Sarah-gpj
Copy link

<title>SmartLearn - Learn Smarter, Not Harder</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body {
  line-height: 1.6;
  background-color: #f5f7fa;
  color: #333;
}

.navbar {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background-color: #0a3d62;
  color: white;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.navbar a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #f8c291;
}

.hero {
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, #74b9ff, #a29bfe);
  color: white;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.hero button {
  padding: 0.8rem 1.5rem;
  background-color: #0a3d62;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  margin-top: 1.5rem;
  transition: background-color 0.3s ease;
}

.hero button:hover {
  background-color: #1e5f9e;
}

.features {
  display: flex;
  justify-content: space-around;
  padding: 3rem 2rem;
  background-color: #fff;
}

.feature {
  max-width: 300px;
  text-align: center;
}

footer {
  text-align: center;
  padding: 2rem;
  background-color: #0a3d62;
  color: white;
}
</style>
SmartLearn

Learn Smarter, Not Harder

Master new skills with AI-powered personalized learning paths.

Get Started

AI Recommendations

Tailored learning plans based on your progress and goals.

Expert Instructors

Learn from professionals with years of industry experience.

Flexible Learning

Access your courses anytime, anywhere, on any device.

Contact us: info@smartlearn.com

© 2025 SmartLearn. All rights reserved.

<script> function subscribe() { alert("Thank you for your interest! We’ll contact you soon."); } </script>

@ItsM7mod
Copy link

.

@ItsM7mod
Copy link

.

@elhdad1
Copy link

elhdad1 commented Apr 21, 2025

<title>لعبة سؤال وجواب إسلامي</title>

لعبة سؤال وجواب إسلامي

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

@elhdad1
Copy link

elhdad1 commented Apr 21, 2025

<title>لعبة سؤال وجواب إسلامي</title>

لعبة سؤال وجواب إسلامي

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

@aliahmedjjj
Copy link

لا تطبيق ممتاز

@aliahmedjjj
Copy link

لا تطبيق ممتاز

@k-s8m
Copy link

k-s8m commented May 6, 2025

سح

@M7medGamy
Copy link

<title>موقع أفلام - مافيا</title> <style> body { font-family: Arial, sans-serif; background: #f9f9f9; color: #333; margin: 0; padding: 0; } header { background: #2196F3; color: white; padding: 20px; text-align: center; } main { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; padding: 20px; } .movie { background: white; box-shadow: 0 0 10px #ccc; border-radius: 8px; width: 280px; padding: 10px; text-align: center; } .movie img { width: 100%; border-radius: 6px; } .movie h3 { margin: 10px 0 5px; } .movie p { font-size: 14px; color: #666; } .movie a { display: inline-block; margin-top: 10px; padding: 8px 15px; background: #2196F3; color: white; text-decoration: none; border-radius: 5px; } footer { text-align: center; padding: 15px; background: #eee; margin-top: 30px; font-size: 14px; color: #555; } @media (max-width: 600px) { main { flex-direction: column; align-items: center; } .movie { width: 90%; } } </style>

موقع أفلام - مافيا

اكتشف أحدث الأفلام وتريلراتها

Inception

Inception

فيلم خيال علمي عن الأحلام والواقع.

مشاهدة التريلر
Interstellar

Interstellar

رحلة بين النجوم لإنقاذ البشرية.

مشاهدة التريلر
Joker

Joker

قصة تحول آرثر فليك إلى الجوكر.

مشاهدة التريلر
© 2025 موقع أفلام - مافيا. جميع الحقوق محفوظة.

@Mohamad912452
Copy link

<title>موقع ترحيب</title> # مرحبًا بك في موقعي اضغط هنا لتغيير الرسالة <script src="script.js"></script>

head>

<title>موقعي</title>

@Mohamad912452
Copy link

77

head>

<title>موقعي</title>

@Ahmedsamehww
Copy link

<title>ركّب اليفطة</title> <style> body { font-family: Arial; direction: rtl; text-align: center; } #gameArea { width: 500px; height: 300px; background-color: #e0e0e0; margin: auto; position: relative; overflow: hidden; } #worker { width: 40px; height: 60px; background-color: brown; position: absolute; bottom: 0; left: 10px; } #building { width: 100px; height: 150px; background-color: gray; position: absolute; bottom: 0; right: 50px; } #sign { width: 80px; height: 40px; position: absolute; top: 20px; left: 10px; display: flex; align-items: center; justify-content: center; border: 2px solid black; } </style>

🚶‍♂️ ركّب اليفطة على المحل

استخدم ← → للتحرك، واضغط "Enter" للتركيب

<script> const worker = document.getElementById("worker"); const sign = document.getElementById("sign"); const result = document.getElementById("result"); const correctText = localStorage.getItem("orderText"); const correctColor = localStorage.getItem("orderColor"); const playerText = localStorage.getItem("signText"); const playerColor = localStorage.getItem("signColor"); let pos = 10; document.addEventListener("keydown", e => { if (e.key === "ArrowRight") { pos += 10; if (pos > 450) pos = 450; worker.style.left = pos + "px"; } else if (e.key === "ArrowLeft") { pos -= 10; if (pos < 0) pos = 0; worker.style.left = pos + "px"; } else if (e.key === "Enter") { if (pos >= 400) { // تركيب sign.innerText = playerText; sign.style.backgroundColor = playerColor; // تقييم if (playerText === correctText && playerColor === correctColor) { result.innerText = "✅ تركيب ناجح! الزبون سعيد!"; } else { result.innerText = "❌ تركيب خاطئ! الزبون غير راضي."; } } } }); </script>

@haytham2017
Copy link

<title>لعبة كرة قدم ثنائية الأبعاد</title> <style> body { margin: 0; background: #2e7d32; display: flex; justify-content: center; align-items: center; height: 100vh; user-select: none; overflow: hidden; font-family: Arial, sans-serif; color: white; direction: rtl; } canvas { background: #4caf50; border: 3px solid white; display: block; } #scoreBoard { position: absolute; top: 15px; width: 100%; text-align: center; font-size: 24px; font-weight: bold; user-select: none; } </style>
اللاعب الأزرق: 0     |     اللاعب الأحمر: 0
<script> const canvas = document.getElementById('gameCanvas'); const ctx = canvas.getContext('2d'); const scoreBoard = document.getElementById('scoreBoard');
const WIDTH = canvas.width;
const HEIGHT = canvas.height;

const playerRadius = 20;
const playerSpeed = 4;

const ballRadius = 12;
const ballMaxSpeed = 7;
const friction = 0.98;

const goalWidth = 10;
const goalHeight = 120;

const player1 = {
  x: 100,
  y: HEIGHT / 2,
  color: '#2196f3',
  up: false,
  down: false,
  left: false,
  right: false,
  score: 0,
  controls: { up: 'w', down: 's', left: 'a', right: 'd' }
};

const player2 = {
  x: WIDTH - 100,
  y: HEIGHT / 2,
  color: '#f44336',
  up: false,
  down: false,
  left: false,
  right: false,
  score: 0,
  controls: { up: 'ArrowUp', down: 'ArrowDown', left: 'ArrowLeft', right: 'ArrowRight' }
};

const ball = {
  x: WIDTH / 2,
  y: HEIGHT / 2,
  vx: 0,
  vy: 0,
  radius: ballRadius,
  color: '#fff',
};

function drawField() {
  ctx.fillStyle = '#4caf50';
  ctx.fillRect(0, 0, WIDTH, HEIGHT);

  ctx.strokeStyle = 'white';
  ctx.lineWidth = 4;
  ctx.beginPath();
  ctx.moveTo(WIDTH / 2, 0);
  ctx.lineTo(WIDTH / 2, HEIGHT);
  ctx.stroke();

  ctx.beginPath();
  ctx.arc(WIDTH / 2, HEIGHT / 2, 70, 0, Math.PI * 2);
  ctx.stroke();

  ctx.fillStyle = 'white';
  ctx.fillRect(0, (HEIGHT - goalHeight) / 2, goalWidth, goalHeight);
  ctx.fillRect(WIDTH - goalWidth, (HEIGHT - goalHeight) / 2, goalWidth, goalHeight);
}

function drawPlayer(player) {
  ctx.fillStyle = player.color;
  ctx.beginPath();
  ctx.arc(player.x, player.y, playerRadius, 0, Math.PI * 2);
  ctx.fill();
}

function drawBall() {
  ctx.fillStyle = ball.color;
  ctx.beginPath();
  ctx.arc(ball.x, ball.y, ball.radius, 0, Math.PI * 2);
  ctx.fill();
  ctx.strokeStyle = '#ccc';
  ctx.stroke();
}

function movePlayer(player) {
  if (player.up && player.y - playerRadius > 0) player.y -= playerSpeed;
  if (player

@haytham2017
Copy link

<title>لعبة كرة قدم ثنائية الأبعاد</title> <style> body { margin: 0; background: #2e7d32; display: flex; justify-content: center; align-items: center; height: 100vh; user-select: none; overflow: hidden; font-family: Arial, sans-serif; color: white; direction: rtl; } canvas { background: #4caf50; border: 3px solid white; display: block; } #scoreBoard { position: absolute; top: 15px; width: 100%; text-align: center; font-size: 24px; font-weight: bold; user-select: none; } </style>
اللاعب الأزرق: 0     |     اللاعب الأحمر: 0
<script> const canvas = document.getElementById('gameCanvas'); const ctx = canvas.getContext('2d'); const scoreBoard = document.getElementById('scoreBoard');
const WIDTH = canvas.width;
const HEIGHT = canvas.height;

const playerRadius = 20;
const playerSpeed = 4;

const ballRadius = 12;
const ballMaxSpeed = 7;
const friction = 0.98;

const goalWidth = 10;
const goalHeight = 120;

const player1 = {
  x: 100,
  y: HEIGHT / 2,
  color: '#2196f3',
  up: false,
  down: false,
  left: false,
  right: false,
  score: 0,
  controls: { up: 'w', down: 's', left: 'a', right: 'd' }
};

const player2 = {
  x: WIDTH - 100,
  y: HEIGHT / 2,
  color: '#f44336',
  up: false,
  down: false,
  left: false,
  right: false,
  score: 0,
  controls: { up: 'ArrowUp', down: 'ArrowDown', left: 'ArrowLeft', right: 'ArrowRight' }
};

const ball = {
  x: WIDTH / 2,
  y: HEIGHT / 2,
  vx: 0,
  vy: 0,
  radius: ballRadius,
  color: '#fff',
};

function drawField() {
  ctx.fillStyle = '#4caf50';
  ctx.fillRect(0, 0, WIDTH, HEIGHT);

  ctx.strokeStyle = 'white';
  ctx.lineWidth = 4;
  ctx.beginPath();
  ctx.moveTo(WIDTH / 2, 0);
  ctx.lineTo(WIDTH / 2, HEIGHT);
  ctx.stroke();

  ctx.beginPath();
  ctx.arc(WIDTH / 2, HEIGHT / 2, 70, 0, Math.PI * 2);
  ctx.stroke();

  ctx.fillStyle = 'white';
  ctx.fillRect(0, (HEIGHT - goalHeight) / 2, goalWidth, goalHeight);
  ctx.fillRect(WIDTH - goalWidth, (HEIGHT - goalHeight) / 2, goalWidth, goalHeight);
}

function drawPlayer(player) {
  ctx.fillStyle = player.color;
  ctx.beginPath();
  ctx.arc(player.x, player.y, playerRadius, 0, Math.PI * 2);
  ctx.fill();
}

function drawBall() {
  ctx.fillStyle = ball.color;
  ctx.beginPath();
  ctx.arc(ball.x, ball.y, ball.radius, 0, Math.PI * 2);
  ctx.fill();
  ctx.strokeStyle = '#ccc';
  ctx.stroke();
}

function movePlayer(player) {
  if (player.up && player.y - playerRadius > 0) player.y -= playerSpeed;
  if (player

@logodz31
Copy link

<title>Logo Bros</title> <style> body { margin: 0; font-family: 'Segoe UI', sans-serif; background-color: #111; color: #fff; } header { background-color: #1a1a1a; padding: 20px; text-align: center; } header h1 { margin: 0; font-size: 2rem; } nav { text-align: center; margin: 20px 0; } nav a { color: #0af; text-decoration: none; margin: 0 10px; } .lang-switch { margin-top: 10px; } .container { max-width: 900px; margin: auto; padding: 20px; } .logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 30px 0; } .logo-box { background-color: #222; border-radius: 10px; padding: 20px; text-align: center; } .logo-box img { width: 100%; border-radius: 8px; } .form-section { background-color: #1a1a1a; padding: 30px; border-radius: 10px; } form input, form textarea { width: 100%; margin-bottom: 10px; padding: 10px; border: none; border-radius: 5px; background: #333; color: #fff; } form button { background: #0af; color: #000; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; } footer { text-align: center; padding: 20px; background: #1a1a1a; margin-top: 40px; } </style> <script> function switchLang(lang) { document.querySelectorAll('[data-lang]').forEach(el => { el.style.display = el.dataset.lang === lang ? 'block' : 'none'; }); } </script>

Logo Bros

العربية English
@lshak.31 @ayme.22y @sasoki.goat @dz.obito
Logo 1
Logo 2
<section class="form-section">
  <div data-lang="ar">
    <h2>اطلب لوغو</h2>
    <form>
      <input type="text" placeholder="الاسم" required />
      <input type="email" placeholder="البريد الإلكتروني" required />
      <textarea rows="4" placeholder="نوع اللوغو المطلوب أو ملاحظات..."></textarea>
      <button type="submit">أرسل الطلب</button>
    </form>
  </div>
  <div data-lang="en">
    <h2>Order a Logo</h2>
    <form>
      <input type="text" placeholder="Name" required />
      <input type="email" placeholder="Email" required />
      <textarea rows="4" placeholder="Logo type or notes..."></textarea>
      <button type="submit">Send Request</button>
    </form>
  </div>
</section>
© 2025 Logo Bros. All rights reserved.
Logo 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment