generated from alchemycodelab/web-template
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev #1
Open
JakeCMorgan
wants to merge
6
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dev #1
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4c0ef65
deleted readme
JakeCMorgan 57fbce4
added wireframe to assets and readme, wrote out plan in readme
JakeCMorgan d5b85a1
added functions for buttons and random answer array, added styling to…
JakeCMorgan e1578db
moved random answer text to inside of 8 ball image, applied color sty…
JakeCMorgan 1d8e2c4
experimented with an svg triangle attempting to make answer text wrap…
JakeCMorgan 7d0d1fc
adds logos
JakeCMorgan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"liveServer.settings.port": 5502 | ||
} |
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 |
---|---|---|
@@ -1,27 +1,29 @@ | ||
## The Golden Rule: | ||
# Magic 8 Ball Plan | ||
|
||
🦸 🦸♂️ `Stop starting and start finishing.` 🏁 | ||
![wireframe for magic 8 ball app](./assets/8-ball-wireframe.png) | ||
|
||
If you work on more than one feature at a time, you are guaranteed to multiply your bugs and your anxiety. | ||
## HTML | ||
|
||
## Making a plan | ||
- h1 for header | ||
- section with | ||
|
||
1. **Make a drawing of your app. Simple "wireframes"** | ||
1. **Look at the drawing and name the HTML elements you'll need to realize your vision** | ||
1. **Look at the drawing and imagine using the app. What _state_ do you need to track?** | ||
1. **For each HTML element ask: Why do I need this? (i.e., "we need div to display the results in")** | ||
1. **Once we know _why_ we need each element, think about how to implement the "Why" as a "How" (i.e., `resultsEl.textContent = newResults`)** | ||
1. **Find all the 'events' (user clicks, form submit, on load etc) in your app. Ask one by one, "What happens when" for each of these events. Does any state change? Does any DOM update?** | ||
1. **Think about how to validate each of your features according to a Definition of Done. (Hint: console.log usually helps here.)** | ||
1. **Consider what features _depend_ on what other features. Use this dependency logic to figure out what order to complete tasks.** | ||
* p tag for prompt | ||
* text input for user question | ||
* button for submit | ||
|
||
Additional considerations: | ||
- section with | ||
|
||
- Ask: which of your HTML elements need to be hard coded, and which need to be dynamically generated? | ||
- Consider your data model. | ||
- What kinds of objects (i.e., Dogs, Friends, Todos, etc) will you need? | ||
- What are the key/value pairs? | ||
- What arrays might you need? | ||
- What needs to live in a persistence layer? | ||
- Is there some state we need to initialize? | ||
- Ask: should any of this work be abstracted into functions? (i.e., is the work complicated? can it be reused?) | ||
* img of 8 ball | ||
* p tag to display the randomly selected answer | ||
* button to ask again | ||
|
||
## EVENTS | ||
|
||
- button click (question submit) | ||
- hide prompt | ||
- display the image | ||
- pick a random number between 0 and the length of the answers array -1 | ||
- set the content of the answer p to the random choice | ||
- button click (ask again) | ||
- hide 8 ball and the answer | ||
- show prompt |
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.
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 |
---|---|---|
@@ -1,39 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<!-- metadata --> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
|
||
<!-- title and favicon --> | ||
<title>Web App</title> | ||
<link rel="icon" type="image/x-icon" href="assets/alchemy-favicon.png" /> | ||
|
||
<!-- js --> | ||
<script type="module" src="app.js"></script> | ||
|
||
<!-- fonts --> | ||
<!-- see https://fonts.google.com/ --> | ||
|
||
<!-- css --> | ||
<link rel="stylesheet" href="styles/reset.css" /> | ||
<link rel="stylesheet" href="styles/global.css" /> | ||
<!-- add link for page specific css --> | ||
|
||
</head> | ||
|
||
<body> | ||
<header> | ||
<img class="logo" src="assets/html_css_js.png" alt="logo"> | ||
<h1>Web App</h1> | ||
</header> | ||
|
||
<main> | ||
|
||
</main> | ||
|
||
</body> | ||
|
||
</html> | ||
<head> | ||
<!-- metadata --> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
|
||
<!-- title and favicon --> | ||
<title>Web App</title> | ||
<link rel="icon" type="image/x-icon" href="assets/JakeMorgan-favicon.png" /> | ||
|
||
<!-- js --> | ||
<script type="module" src="app.js"></script> | ||
|
||
<!-- fonts --> | ||
<!-- see https://fonts.google.com/ --> | ||
|
||
<!-- css --> | ||
<link rel="stylesheet" href="styles/reset.css" /> | ||
<link rel="stylesheet" href="styles/global.css" /> | ||
<!-- add link for page specific css --> | ||
</head> | ||
|
||
<body> | ||
<header> | ||
<img class="logo" src="assets/JakeMorgan-favicon.png" alt="logo" /> | ||
<h1>Magic 8 Ball</h1> | ||
</header> | ||
|
||
<main> | ||
<section id="prompt" class="prompt"> | ||
<h1>What do you want to know?</h1> | ||
<input type="text" /> | ||
<button id="submit">Submit</button> | ||
</section> | ||
<section id="fortune" class="fortune hide"> | ||
<div class="fortune-wrapper"> | ||
<img class="image" src="./assets/8-ball.png" alt="magic 8 ball" /> | ||
<p class="answer" id="answer"></p> | ||
<svg class="triangle" viewbox="-1 -1 95 95"> | ||
<path | ||
d="M5 4h14a2 2 0 0 1 1.84 2.75l-7.1 12.25a2 2 0 0 1 -3.5 0l-7.1 -12.25a2 2 0 0 1 1.75 -2.75" | ||
fill="none" | ||
stroke="currentColor" | ||
stroke-width="0.5" | ||
/> | ||
</svg> | ||
<button class="reset" id="reset">Ask again!</button> | ||
<div class="shape left"></div> | ||
<div class="shape right"></div> | ||
</div> | ||
</section> | ||
</main> | ||
</body> | ||
</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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can just delete these console.logs :D