Skip to content

Commit

Permalink
feat: add new car and fix for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
skifli authored Jan 9, 2024
1 parent e518d57 commit 23bbed3
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 7 deletions.
25 changes: 25 additions & 0 deletions assets/css/pages/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,29 @@ model-viewer {
#member {
width: 100%
}
}

@media (max-width: 1100px) {
#title-section {
flex-direction: column;
height: calc(100vh - 250px);
padding: 2rem;
}

#title {
width: 100%;
}

#title h1 {
text-align: center;
display: block;
font-size: 3rem;
padding: 0px;
}

model-viewer {
width: 100%;
height: 50vh;
flex-direction: column;
}
}
Binary file added assets/img/dev-class-car/1.webp
Binary file not shown.
Binary file added assets/img/dev-class-car/2.webp
Binary file not shown.
Binary file added assets/img/dev-class-car/3.webp
Binary file not shown.
Binary file added assets/img/dev-class-car/4.webp
Binary file not shown.
6 changes: 6 additions & 0 deletions assets/js/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ function scrollToElement() {
}

window.addEventListener("load", function () {
let pageDomain = window.location.hostname;

if (pageDomain != "localhost" && (pageDomain != "warp-racing.com")) {
this.window.location.href = "https://warp-racing.com";
}

copyright.innerHTML = copyright.innerHTML.replace("{current_year}", new Date().getFullYear());

let cookieConsent = getCookie('cookieConsent');
Expand Down
16 changes: 9 additions & 7 deletions assets/js/pages/our-cars.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
let entryClassCarImage = document.getElementById('entry-class-car-image');
let devClassCarImage = document.getElementById('dev-class-car-image');

var entryClassSlide = 0;
var carSlide = 0;

function entryClassCarSlider() {
if (entryClassSlide++ == 4) {
entryClassSlide = 1;
function changeCar() {
if (carSlide++ == 4) {
carSlide = 1;
}

entryClassCarImage.style["background-image"] = `url(../assets/img/entry-class-car/${entryClassSlide}.webp)`;
entryClassCarImage.style["background-image"] = `url(../assets/img/entry-class-car/${carSlide}.webp)`;
devClassCarImage.style["background-image"] = `url(../assets/img/dev-class-car/${carSlide}.webp)`;

setTimeout(entryClassCarSlider, 5000);
setTimeout(changeCar, 5000);
}

window.addEventListener("load", function () {
entryClassCarSlider();
changeCar();
});
16 changes: 16 additions & 0 deletions our-cars/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@ <h3>Accel - 0.026N Drag</h3>
design we thought we were capable of, and we were proud of it.</p>
</div>
</div>

<div class="car-banner">
<h3>Velocity - 0.115N Drag</h3>
</div>

<div class="car">
<div id="dev-class-car-image" class="car-image"
style="background-image: url('../assets/img/dev-class-car/1.webp');"></div>

<div class="car-about">
<p>Velocity is our development class car. It went through multiple design iterations itself, and there
were many more versions before this design, such as 'Andromeda' and 'Bode'. In CFD testing there
were no severe high or low pressure regions. This design was much better than any design we thought
we were capable of, and we were proud of it.</p>
</div>
</div>
</div>

<div id="footer">
Expand Down

0 comments on commit 23bbed3

Please sign in to comment.