Skip to content

Commit

Permalink
fix:phase-5 correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Limyangtyin committed Nov 28, 2023
1 parent e598ccc commit 0758acd
Show file tree
Hide file tree
Showing 18 changed files with 471 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1>Certificate IV in IT (Programming) Web Tech Portfolio</h1>
<li><a href="phase-2">Phase 2</a></li>
<li><a href="phase-3">Phase 3</a></li>
<li><a href="phase-4">Phase 4</a></li>
<li><a href="phase-5">Phase 5</a></li>
<li><a href="index.html">Phase 5</a></li>
</ul>
</nav>
</header>
Expand All @@ -45,7 +45,7 @@ <h2 class="text-xl font-bold text-gray-500">Certificate IV in IT (Programming)</
<a href="phase-4">Phase 4</a>
</section>
<section>
<a href="phase-5">Phase 5</a>
<a href="index.html">Phase 5</a>
</section>

</div>
Expand Down
Empty file added phase-4/.gitignore
Empty file.
Empty file added phase-4/.keep
Empty file.
9 changes: 9 additions & 0 deletions phase-4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Colour Scheme
| Name | RGB | HEX |
|-----------------|----------------|----------|
| black | 0, 0, 0 | #000000 |
| white | 255, 255, 255 | #FFFFFF |
| olivine | 158, 178, 93 | #9EB25D |
| columbian blue | 167, 198, 218 | #A7C6DA |
| nyanza | 238, 252, 206 | #EEFCCE |
| naples yellow | 241, 219, 75 | #F1DB4B |
2 changes: 1 addition & 1 deletion phase-4/WebTechAssessment
Submodule WebTechAssessment updated from 7c5b72 to a4ef15
100 changes: 100 additions & 0 deletions phase-4/assests/css/reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/***
The new CSS reset - version 1.9 (last updated 19.6.2023)
GitHub page: https://github.com/elad2412/the-new-css-reset
***/

/*
Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property
- The "symbol *" part is to solve Firefox SVG sprite bug
- The "html" element is excluded, otherwise a bug in Chrome breaks the CSS hyphens property (https://github.com/elad2412/the-new-css-reset/issues/36)
*/
*:where(:not(html, iframe, canvas, img, svg, video, audio):not(svg *, symbol *)) {
all: unset;
display: revert;
}

/* Preferred box-sizing value */
*,
*::before,
*::after {
box-sizing: border-box;
}

/* Reapply the pointer cursor for anchor tags */
a, button {
cursor: revert;
}

/* Remove list styles (bullets/numbers) */
ol, ul, menu {
list-style: none;
}

/* For images to not be able to exceed their container */
img {
max-inline-size: 100%;
max-block-size: 100%;
}

/* removes spacing between cells in tables */
table {
border-collapse: collapse;
}

/* Safari - solving issue when using user-select:none on the <body> text input doesn't working */
input, textarea {
-webkit-user-select: auto;
}

/* revert the 'white-space' property for textarea elements on Safari */
textarea {
white-space: revert;
}

/* minimum style to allow to style meter element */
meter {
-webkit-appearance: revert;
appearance: revert;
}

/* preformatted text - use only for this feature */
:where(pre) {
all: revert;
}

/* reset default text opacity of input placeholder */
::placeholder {
color: unset;
}

/* remove default dot (•) sign */
::marker {
content: initial;
}

/* fix the feature of 'hidden' attribute.
display:revert; revert to element instead of attribute */
:where([hidden]) {
display: none;
}

/* revert for bug in Chromium browsers
- fix for the content editable attribute will work properly.
- webkit-user-select: auto; added for Safari in case of using user-select:none on wrapper element*/
:where([contenteditable]:not([contenteditable="false"])) {
-moz-user-modify: read-write;
-webkit-user-modify: read-write;
overflow-wrap: break-word;
-webkit-line-break: after-white-space;
-webkit-user-select: auto;
}

/* apply back the draggable feature - exist only in Chromium and Safari */
:where([draggable="true"]) {
-webkit-user-drag: element;
}

/* Revert Modal native behavior */
:where(dialog:modal) {
all: revert;
}
121 changes: 121 additions & 0 deletions phase-4/assests/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
@media screen and (max-width: 1200px){
.headerclass{
border: 1px solid black;
background-color: #F1DB4B;
}
main{
border: 2px solid black;
background-color: #9EB25D;
}

.footerclass{
border: 1px solid black;
background-color: #A7C6DA;
}

main>article{
padding: 20px;
border: 1px solid black;
background-color: #EEFCCE;
}

nav, aside{
display: none;
}
}

@media screen and (min-width: 1200px) {
.headerclass {
border: 1px solid black;
background-color: #F1DB4B;
}

nav > a {
border: 1px solid black;
margin: 2px;
padding: 3px;
}

main {
display: grid;
grid-template-columns: 1fr auto;
border: 2px solid black;
background-color: #9EB25D;
}

.footerclass {
border: 1px solid black;
background-color: #A7C6DA;
}

.grid-container {
display: grid;
grid-template-columns: auto auto auto;
padding-top: 80px;
}

main > article {
border: 1px solid black;
margin: 10px;
padding: 20px;
width: auto;
background-color: #EEFCCE;
}

aside{
grid-column: 3;
grid-row: 1/span 3;
border: 1px solid black;
margin: 10px;
padding: 20px;
}

aside>section{
border: 1px solid black;
margin: 10px;
padding: 20px;
}

#cars{
margin: 20px;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
background-color: #f7f7f7;
max-width: 400px;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
}

label{
display: block;
}

input{
padding: 3px;
border: 1px solid black;
}

input::placeholder{
color: rgba(0, 0, 0, 0.5);
}

button{
background: linear-gradient(to bottom, #aaa, #888);
border: 1px solid #444;
border-radius: 5px;
color: #cccccc;
padding: 10px 20px;
box-shadow: 0 3px 5px rgba(0, 0, 0, 0.5);
margin-left: 5px;
}

#dataBox{
margin: 10px;
padding: 10px;
border: 1px solid black;
width: 200px;
height: 400px;
background-color: #cccccc;
}
}
30 changes: 30 additions & 0 deletions phase-4/assests/js/javascript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
document.getElementById("GetCars").addEventListener('click', function(event) {
event.preventDefault();

const carsModel = document.getElementById('carsModel').value.toLowerCase();

fetch('https://api.api-ninjas.com/v1/cars?model=' + carsModel, {
headers: {
'X-Api-Key': 's5o4B87e3l5cpOmIZI/JOA==KkcbIdeoiXB7zH5b'
}
}).then(function (response) {
if (!response.ok) {
throw new Error('Network response was not ok');
}
return response.json();
}).then(function (data) {
if (data.length > 0) {
const carInfo = data[0];
const {make, model, year} = carInfo;

// Display car information in HTML
document.getElementById('make').textContent = 'Make: ' + make;
document.getElementById('carModel').textContent = 'Model: ' + model;
document.getElementById('carYear').textContent = 'Year: ' + year;
} else {
console.log("Car's information not found");
}
}).catch(function (error) {
console.error('Error:', error.message);
});
});
Binary file added phase-4/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added phase-4/img/Html and CSS Joke.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added phase-4/img/Joke about user error.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added phase-4/img/Programming joke.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added phase-4/img/Story illustration.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added phase-4/img/ilya-pavlov-OqtafYT5kTw-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added phase-4/img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added phase-4/img_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0758acd

Please sign in to comment.