Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <!-- Please note that the NoJS gif asset can be found here: https://tenor.com/en-CA/view/rick-roll-nitro-gif-21997352 -->
- <html lang = "en">
- <head>
- <meta charset = "UTF-8">
- <meta name = "viewport" content = "width = device-width, initial-scale = 1.0">
- <title>Absolutely</title>
- </head>
- <style>
- body {
- font-family: 'Helvetica', sans-serif;
- background-color: #f4f4f4;
- margin: 0;
- padding: 0;
- }
- #menu {
- background-color: #ffffff;
- border: 1px solid #d1d1d1;
- border-radius: 10px;
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
- overflow: hidden;
- transition: width 0.3s ease;
- }
- .menu-item {
- padding: 15px;
- border-bottom: 1px solid #d1d1d1;
- transition: background-color 0.3s ease;
- cursor: pointer;
- border-radius: 8px;
- }
- .menu-item:hover {
- background-color: #f4f4f4;
- }
- </style>
- <body>
- <noscript>
- <p>JavaScript is disabled in your browser. We are sorry, so please accept the gift of Discord Nitro as our apology.</p>
- <img src="Assets/NoJS.gif" alt="Incoming Nitro" style="width: device-width; height: device-height">
- </noscript>
- <canvas id="canvas"></canvas>
- <script>
- const drop_down = [[], ["Team", "Mission"], ["Overview", "Coming Soon"], ["Sponsor", "Donation"]];
- const canvas = document.getElementById('canvas');
- const ctx = canvas.getContext('2d');
- let current_page = 'Home'
- canvas.width = window.innerWidth - 10;
- canvas.height = window.innerHeight - 10;
- function drawRoundedRectangle(ctx, x, y, width, height, cornerRadius, fill, hoverFill, name) {
- const previousShadowBlur = ctx.shadowBlur;
- const previousShadowColor = ctx.shadowColor;
- const previousShadowOffsetX = ctx.shadowOffsetX;
- const previousShadowOffsetY = ctx.shadowOffsetY;
- ctx.fillStyle = fill;
- ctx.beginPath();
- ctx.moveTo(x + cornerRadius, y);
- ctx.lineTo(x + width - cornerRadius, y);
- ctx.arcTo(x + width, y, x + width, y + cornerRadius, cornerRadius);
- ctx.lineTo(x + width, y + height - cornerRadius);
- ctx.arcTo(x + width, y + height, x + width - cornerRadius, y + height, cornerRadius);
- ctx.lineTo(x + cornerRadius, y + height);
- ctx.arcTo(x, y + height, x, y + height - cornerRadius, cornerRadius);
- ctx.lineTo(x, y + cornerRadius);
- ctx.arcTo(x, y, x + cornerRadius, y, cornerRadius);
- ctx.closePath();
- ctx.shadowBlur = 10;
- ctx.shadowColor = 'rgba(0, 0, 0, 0.2)';
- ctx.shadowOffsetX = 0;
- ctx.shadowOffsetY = 4;
- if (ctx.isPointInPath(mouseX, mouseY)) {
- //ctx.fillStyle = hoverFill;
- let ind = -1;
- let left = -1;
- if(name == 'None'){
- return;
- } else if(name == 'Home'){
- ind = 0;
- left = 30;
- } else if(name == 'About'){
- ind = 1;
- left = 230;
- } else if(name == 'Courses'){
- ind = 2;
- left = 340;
- } else if(name == 'Donate'){
- ind = 3;
- left = 475;
- }
- let arr = drop_down[ind];
- let menu_width = 300;
- let menu_height = 60 * arr.length + 10 * (arr.length + 1);
- ctx.shadowBlur = 10;
- ctx.shadowColor = 'rgba(0, 0, 0, 0.2)';
- ctx.shadowOffsetX = 0;
- ctx.shadowOffsetY = 4;
- if(ind == 0){
- return;
- }
- drawRoundedRectangle(ctx, left, 100, menu_width, menu_height, 30, '#EFEDEF', '#EFEDEF', 'None');
- for(let i = 0; i < arr.length; i++){
- drawRoundedRectangle(ctx, left + 10, 110 + 70 * i, menu_width - 20, 60, 30, '#EAE8EA', '#D9D7D9', 'None');
- }
- } else {
- ctx.fillStyle = fill;
- }
- ctx.fill();
- ctx.shadowBlur = previousShadowBlur;
- ctx.shadowColor = previousShadowColor;
- ctx.shadowOffsetX = previousShadowOffsetX;
- ctx.shadowOffsetY = previousShadowOffsetY;
- }
- function draw() {
- canvas.width = window.innerWidth - 10;
- canvas.height = window.innerHeight - 10;
- ctx.clearRect(0, 0, canvas.width, canvas.height);
- ctx.fillStyle = '#F4F2F4';
- ctx.fillRect(0, 0, canvas.width, canvas.height);
- drawRoundedRectangle(ctx, 20, 20, canvas.width - 40, 80, 40, '#EFEDEF', '#EFEDEF', "None"); // Modified this line
- drawRoundedRectangle(ctx, 30, 30, 250, 60, 30, '#74B1B9', '#5C8E96', "Home");
- drawRoundedRectangle(ctx, 290, 30, 100, 60, 30, '#EAE8EA', '#D9D7D9', "About");
- drawRoundedRectangle(ctx, 340, 30, 125, 60, 30, '#EAE8EA', '#D9D7D9', "Courses");
- drawRoundedRectangle(ctx, 475, 30, 110, 60, 30, '#EAE8EA', '#D9D7D9', "Donate");
- ctx.fillStyle = '#111111';
- ctx.font = '25px Courier New';
- ctx.fillText('absolutely not', 50, 67.5);
- ctx.fillStyle = '#111111';
- ctx.font = '20px Courier New';
- ctx.fillText('About', 300, 65);
- ctx.fillStyle = '#111111';
- ctx.font = '20px Courier New';
- ctx.fillText('Courses', 360, 65);
- ctx.fillStyle = '#111111';
- ctx.font = '20px Courier New';
- ctx.fillText('Donate', 495, 65);
- requestAnimationFrame(draw);
- }
- let mouseX, mouseY;
- canvas.addEventListener('mousemove', function(event) {
- const rect = canvas.getBoundingClientRect();
- mouseX = event.clientX - rect.left;
- mouseY = event.clientY - rect.top;
- });
- draw();
- </script>
- </body>
- </html>
- <!--
- Future steps for us:
- 1. Make the menu items clickable
- 2. Make the menu items have a dropdown
- 3. Create user accounts
- 4. Get users and companies
- 5. Rehire Ryan
- 6. Write the backend in C++ or Python
- 7. Host this on a server
- 8. Make the website look good
- -->
Advertisement
Add Comment
Please, Sign In to add comment