-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41ae328
commit a4b5626
Showing
18 changed files
with
166 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class MatchmakingConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'Apps.Matchmaking' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
|
||
from django.urls import path | ||
|
||
from . import views | ||
|
||
urlpatterns = [ | ||
path('', views.index, name='matchmaking'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.shortcuts import render | ||
|
||
|
||
def index(request): | ||
return render(request, 'Matchmaking/matchmaking.html') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
function handleText() { | ||
const BASE_TEXT = "FINDING A MATCH"; | ||
const text = document.getElementById("matchmaking text"); | ||
console.log(text); | ||
let textIndex = 0; | ||
setInterval(() => { | ||
text.innerText = BASE_TEXT + ".".repeat(textIndex % 3); | ||
textIndex += 1; | ||
}, 1000); | ||
} | ||
function handleTimer() { | ||
const timer = document.getElementById("matchmaking-timer"); | ||
let time = 0; | ||
setInterval(() => { | ||
time += 1; | ||
let minutes = Math.floor(time / 60); | ||
let seconds = time % 60; | ||
minutes = minutes < 10 ? "0" + minutes : minutes; | ||
seconds = seconds < 10 ? "0" + seconds : seconds; | ||
timer.innerText = `${minutes}:${seconds}`; | ||
}, 1000); | ||
} | ||
async function App() { | ||
handleText(); | ||
handleTimer(); | ||
} | ||
App(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.matchmaking-wrapper { | ||
height: 80%; | ||
width: 100%; | ||
background: url("/static/public/SocialCloud.png") no-repeat; | ||
background-size: cover; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
user-select: none; | ||
} | ||
.matchmaking-container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
.matchmaking-text-wrapper { | ||
background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)); | ||
padding: 1rem 2rem; | ||
border-radius: 1.5rem; | ||
gap: 2rem; | ||
display: flex; | ||
align-items: center; | ||
} | ||
#close-matchmaking { | ||
color: red; | ||
font-size: 2rem; | ||
user-select: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{% load static %} | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" href="{% static 'styles/matchmaking.css' %}" /> | ||
<link rel="stylesheet" href="{% static 'styles/main.css' %}" /> | ||
<link | ||
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | ||
rel="stylesheet" | ||
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" | ||
crossorigin="anonymous" | ||
/> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Pixelify+Sans&display=swap" | ||
rel="stylesheet" | ||
/> | ||
</head> | ||
<body> | ||
<main class="main"> | ||
<div class="main-profile-data"> | ||
<pong-redirect class="inbox-profile-wrapper" id="profile-image-wrapper"> | ||
<img src="" id="profile-image" alt="" /> | ||
</pong-redirect> | ||
<div class="inbox-wrapper"> | ||
<input type="checkbox" id="input-button" /> | ||
<label for="input-button" class="input-label"> | ||
<img src="{% static 'public/inbox.svg' %}" alt="cannot load" /> | ||
</label> | ||
<ul class="inbox-list" id="inbox-list"> | ||
</ul> | ||
</div> | ||
</div> | ||
<div | ||
class="container-fluid position-relative matchmaking-wrapper" | ||
style="padding: 0" | ||
> | ||
<div class="matchmaking-container"> | ||
<div class="matchmaking-text-wrapper"> | ||
<h1 id="matchmaking text">FINDING A MATCH</h1> | ||
<button id="close-matchmaking">X</button> | ||
</div> | ||
<div><h1 id="matchmaking-timer">00:00</h1></div> | ||
</div> | ||
</div> | ||
</main> | ||
<script src="{% static 'scripts/spa.js' %}" type="module"></script> | ||
</body> | ||
</html> |