Skip to content

Commit

Permalink
Add Basic Javescript
Browse files Browse the repository at this point in the history
Hola
  • Loading branch information
bert-cafecito committed Dec 4, 2024
1 parent 3e8af44 commit 1365b39
Show file tree
Hide file tree
Showing 11 changed files with 706 additions and 25 deletions.
22 changes: 22 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "Node.js",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm"

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Overall, using DevCycle's feature flags evaluation and user targeting capabiliti
Based on my experience, here are a few suggestions for improving DevCycle:

- **Enhanced Documentation**: Providing more detailed documentation and examples on setting up and managing feature flags would help new users get up to speed more quickly.
- **SDK Key Permissions**: I would to see a section explaining how to the client SDK key permissions is set up. Looking at the documentation, I couldn't find a clear explanation on the permissions for SDK keys. At enterprise level, I feel that CISOs would like to know what permissions are being granted to the SDK keys.

By addressing these areas, DevCycle can further enhance its platform and provide an even better experience for its users.

Expand Down
223 changes: 223 additions & 0 deletions frontend/data/questions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
[
{
"id": 1,
"question": "What is the name of the Pokémon that is known as the 'Mouse Pokémon' and is an Electric type?",
"correctAnswer": "Pikachu",
"options": ["Pikachu", "Raichu", "Sandshrew", "Jigglypuff"]
},
{
"id": 2,
"question": "Which region is the starting point in the original Pokémon Red and Blue games?",
"correctAnswer": "Kanto",
"options": ["Johto", "Sinnoh", "Kanto", "Hoenn"]
},
{
"id": 3,
"question": "What are the three starter Pokémon in the Kanto region?",
"correctAnswer": "Bulbasaur, Charmander, Squirtle",
"options": [
"Chikorita, Cyndaquil, Totodile",
"Bulbasaur, Charmander, Squirtle",
"Treecko, Torchic, Mudkip",
"Turtwig, Chimchar, Piplup"
]
},
{
"id": 4,
"question": "Which Pokémon evolves into Charizard?",
"correctAnswer": "Charmeleon",
"options": ["Charmeleon", "Charmander", "Charcoal", "Charcadet"]
},
{
"id": 5,
"question": "What is the type advantage of Water Pokémon over Fire Pokémon?",
"correctAnswer": "Water is super effective against Fire",
"options": [
"Water is weak to Fire",
"Water is super effective against Fire",
"Water and Fire are neutral",
"Fire is immune to Water"
]
},
{
"id": 6,
"question": "Which Legendary Pokémon is known as the 'Time Travel Pokémon'?",
"correctAnswer": "Celebi",
"options": ["Celebi", "Dialga", "Palkia", "Jirachi"]
},
{
"id": 7,
"question": "What is the main objective of a Pokémon Trainer in the games?",
"correctAnswer": "To become the Pokémon Champion",
"options": [
"To collect all Berries",
"To become the Pokémon Champion",
"To find hidden treasure",
"To decorate their Secret Base"
]
},
{
"id": 8,
"question": "Which item is used to catch Pokémon?",
"correctAnswer": "Poké Ball",
"options": ["Potion", "Poké Ball", "Repel", "Rare Candy"]
},
{
"id": 9,
"question": "What is the evolution of Eevee that is a Fire type?",
"correctAnswer": "Flareon",
"options": ["Jolteon", "Vaporeon", "Flareon", "Espeon"]
},
{
"id": 10,
"question": "What color is a Shiny Gyarados?",
"correctAnswer": "Red",
"options": ["Blue", "Yellow", "Red", "Green"]
},
{
"id": 11,
"question": "Which Pokémon is #001 in the National Pokédex?",
"correctAnswer": "Bulbasaur",
"options": ["Bulbasaur", "Charmander", "Squirtle", "Pikachu"]
},
{
"id": 12,
"question": "Which Pokémon can only evolve when exposed to a Thunder Stone?",
"correctAnswer": "Pikachu",
"options": ["Pikachu", "Eevee", "Growlithe", "Exeggcute"]
},
{
"id": 13,
"question": "What is the main role of Professor Oak in the Pokémon series?",
"correctAnswer": "To give the player their first Pokémon",
"options": [
"To sell Poké Balls",
"To give the player their first Pokémon",
"To teach battles",
"To train Legendary Pokémon"
]
},
{
"id": 14,
"question": "What type combination does Gardevoir have?",
"correctAnswer": "Psychic/Fairy",
"options": ["Psychic/Fairy", "Psychic/Normal", "Psychic/Ghost", "Fairy/Dark"]
},
{
"id": 15,
"question": "Which Pokémon game introduced the concept of Mega Evolution?",
"correctAnswer": "Pokémon X and Y",
"options": [
"Pokémon Sun and Moon",
"Pokémon Sword and Shield",
"Pokémon X and Y",
"Pokémon Black and White"
]
},
{
"id": 16,
"question": "What is the ability of Ditto that allows it to transform into other Pokémon?",
"correctAnswer": "Imposter",
"options": ["Imposter", "Mimicry", "Shape Shift", "Illusion"]
},
{
"id": 17,
"question": "Which Flying-type Legendary Pokémon is found in the Kanto region?",
"correctAnswer": "Articuno",
"options": ["Articuno", "Lugia", "Zapdos", "Moltres"]
},
{
"id": 18,
"question": "Which Pokémon is known as the 'Pikachu clone' of the Hoenn region?",
"correctAnswer": "Plusle",
"options": ["Minun", "Plusle", "Pachirisu", "Emolga"]
},
{
"id": 19,
"question": "Which Ghost/Poison Pokémon is the final evolution of Gastly?",
"correctAnswer": "Gengar",
"options": ["Haunter", "Mismagius", "Gengar", "Spiritomb"]
},
{
"id": 20,
"question": "What move does Magikarp typically know when caught in the wild?",
"correctAnswer": "Splash",
"options": ["Splash", "Tackle", "Flail", "Bounce"]
},
{
"id": 21,
"question": "Which Pokémon is said to carry trainers over the sea in the games?",
"correctAnswer": "Lapras",
"options": ["Lapras", "Gyarados", "Sharpedo", "Mantine"]
},
{
"id": 22,
"question": "What is the Pokémon League?",
"correctAnswer": "An organization of the strongest Trainers in a region",
"options": [
"A gym for training Pokémon",
"An organization of the strongest Trainers in a region",
"A battle club for novice Trainers",
"A place to trade Pokémon"
]
},
{
"id": 23,
"question": "Which type is super effective against Dragon Pokémon?",
"correctAnswer": "Fairy",
"options": ["Fairy", "Steel", "Psychic", "Bug"]
},
{
"id": 24,
"question": "What is the evolution of Togepi?",
"correctAnswer": "Togetic",
"options": ["Togekiss", "Togetic", "Clefairy", "Jigglypuff"]
},
{
"id": 25,
"question": "What are the names of the main characters in the Pokémon anime series?",
"correctAnswer": "Ash and Pikachu",
"options": [
"Ash and Pikachu",
"Red and Charizard",
"Brock and Misty",
"Gary and Eevee"
]
},
{
"id": 26,
"question": "Which Mythical Pokémon is featured in Pokémon: The First Movie?",
"correctAnswer": "Mewtwo",
"options": ["Mewtwo", "Mew", "Jirachi", "Celebi"]
},
{
"id": 27,
"question": "What is the primary currency used in Pokémon games?",
"correctAnswer": "Pokédollars",
"options": ["Coins", "Pokédollars", "Tokens", "Gold"]
},
{
"id": 28,
"question": "Which Pokémon is known for its ability to sing and put others to sleep?",
"correctAnswer": "Jigglypuff",
"options": ["Jigglypuff", "Clefairy", "Audino", "Meloetta"]
},
{
"id": 29,
"question": "What is the unique feature of Rotom in Pokémon games?",
"correctAnswer": "It can change forms to possess appliances",
"options": [
"It can change forms to possess appliances",
"It has unlimited energy",
"It is always Shiny",
"It speaks human language"
]
},
{
"id": 30,
"question": "Which Pokémon is known as the 'Aura Pokémon'?",
"correctAnswer": "Lucario",
"options": ["Lucario", "Zoroark", "Riolu", "Absol"]
}
]

46 changes: 21 additions & 25 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,32 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome to the Challenge</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
}
.welcome-container {
text-align: center;
background-color: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
color: #333;
}
p {
color: #666;
}
</style>
<title>Challenge</title>
<link id="theme-link" rel="stylesheet" href="styles/gameboy.css">
<script src="https://js.devcycle.com/devcycle.min.js"></script>
</head>
<body>
<div class="navigation">
<a href="index.html">Home</a>
<a href="profile.html">Profile</a>
</div>
<div class="welcome-container">
<h1>Welcome to the Challenge!</h1>
<p>We're excited to have you here. Get ready to push your limits and achieve great things!</p>
</div>
<div id="trivia-container" class="trivia-container">
<h2 id="trivia-question">Question will appear here</h2>
<div id="trivia-options">
<!-- Option buttons will be loaded here -->
</div>
</div>
<div class="navigation-buttons">
<button id="prev-question">Previous</button>
<button id="next-question">Next</button>
</div>
<script src="scripts/session.js"></script>
<script src="scripts/devcycle.js"></script>
<script src="scripts/theme.js"></script>
<script src="scripts/trivia.js"></script>
</body>
</html>
36 changes: 36 additions & 0 deletions frontend/profile.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Profile</title>
<link id="theme-link" rel="stylesheet" href="styles/gameboy.css">
<script src="https://js.devcycle.com/devcycle.min.js"></script>
</head>
<body onload="displayUserSession()">
<div class="theme-selector">
<label for="theme">Choose a theme:</label>
<select id="theme" onchange="switchTheme()">
<option value="gameboy">Gameboy</option>
<option value="millionaire">Who Wants to Be a Millionaire?</option>
</select>
</div>
<div class="navigation">
<a href="index.html">Home</a>
<a href="profile.html">Profile</a>
</div>
<div class="profile-container">
<h1>User Profile</h1>
<p id="user-session"></p>
<p id="user-answersteak"></p>
<p id="user-settings"></p>
</div>
<script src="scripts/session.js"></script>
<script src="scripts/theme.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
displayUserSession();
});
</script>
</body>
</html>
Loading

0 comments on commit 1365b39

Please sign in to comment.