Skip to content

Commit

Permalink
CSS challenges moved from JS
Browse files Browse the repository at this point in the history
  • Loading branch information
sadanandpai committed Jul 14, 2024
1 parent b47fdf6 commit 536165b
Show file tree
Hide file tree
Showing 36 changed files with 170 additions and 144 deletions.
2 changes: 1 addition & 1 deletion apps/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"scripts": {
"ng": "ng",
"dev": "ng serve --port 6014 --serve-path=/frontend-mini-challenges/angular/",
"dev": "ng serve --port 6015 --serve-path=/frontend-mini-challenges/angular/",
"build": "ng build --c=production --base-href=/frontend-mini-challenges/angular/",
"build-baseless": "ng build --c=production --base-href=/angular/",
"watch": "ng build --watch --configuration development",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- followed bootstrap css names -->
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<script src="../../helpers/header.js" type="module"></script>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ function createBlob() {
100 - radiusThree
}% ${radiusThree}% / ${radiusFour}% ${radiusTwo}% ${100 - radiusTwo}% ${100 - radiusFour}%`;

document.getElementById(
'blob'
).style.cssText = `border-radius: ${borderRadius}; height: ${blobHeight}px; width: ${blobWidth}px`;
document.getElementById('blob').style.cssText =
`border-radius: ${borderRadius}; height: ${blobHeight}px; width: ${blobWidth}px`;

outputCode.value = `border-radius: ${borderRadius};`;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,26 @@ button {
padding: 3px 7px;
text-align: center;
}

button:hover {
cursor: pointer;
background-color: aqua;
}

dialog {
border: 1px solid black;
border-radius: 3px;
padding: 10px;
max-width: 325px;
width: 80%;
}

h4 {
padding: 0px;
margin: 0px;
border-bottom: 1px solid black;
}

.dialogContent {
padding: 10px;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const showButton = document.getElementById('showDialog');
const dialogPopup = document.getElementById('dialogPopup');
const closeButton = document.getElementById('closeDialog')
const closeButton = document.getElementById('closeDialog');

showButton.addEventListener('click', () => {
dialogPopup.showModal();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<script src="../../helpers/header.js" type="module"></script>
Expand Down
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@
height: 30px;
background-color: white;
border-radius: 50%;
box-shadow: rgba(0, 0, 0, 0.15) 0 0 0 1px, rgba(0, 0, 0, 0.05) 0 10px 10px -5px, inset #fff 0 0 0 6px;
box-shadow:
rgba(0, 0, 0, 0.15) 0 0 0 1px,
rgba(0, 0, 0, 0.05) 0 10px 10px -5px,
inset #fff 0 0 0 6px;
cursor: -webkit-grab;
transition: border 0.15s ease, box-shadow 0.15s ease;
transition:
border 0.15s ease,
box-shadow 0.15s ease;
z-index: 2;
display: flex;
align-items: center;
Expand Down Expand Up @@ -63,9 +68,14 @@
height: 30px;
background-color: white;
border-radius: 50%;
box-shadow: rgba(0, 0, 0, 0.15) 0 0 0 1px, rgba(0, 0, 0, 0.05) 0 10px 10px -5px, inset #fff 0 0 0 6px;
box-shadow:
rgba(0, 0, 0, 0.15) 0 0 0 1px,
rgba(0, 0, 0, 0.05) 0 10px 10px -5px,
inset #fff 0 0 0 6px;
cursor: -webkit-grab;
transition: border 0.15s ease, box-shadow 0.15s ease;
transition:
border 0.15s ease,
box-shadow 0.15s ease;
z-index: 2;
display: flex;
align-items: center;
Expand All @@ -80,7 +90,10 @@
}

.active {
box-shadow: #0066ff 0 0 0 1px, rgba(0, 0, 0, 0.05) 0 10px 10px -5px, inset #fff 0 0 0 6px;
box-shadow:
#0066ff 0 0 0 1px,
rgba(0, 0, 0, 0.05) 0 10px 10px -5px,
inset #fff 0 0 0 6px;
z-index: 3;
}

Expand All @@ -105,7 +118,9 @@
width: 100%;
padding: 0px 14px;
height: 45px;
box-shadow: inset #d8d8da 0 0 0 1px, inset white 0 0 0 100px !important;
box-shadow:
inset #d8d8da 0 0 0 1px,
inset white 0 0 0 100px !important;
border: none;
font-size: 15px;
border-radius: 10px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ body.dark .navbar-app a img {
}

body.dark,
#innnerThemeSwitch:checked+.inner-container,
body.dark #innnerThemeSwitch:checked+.inner-container {
#innnerThemeSwitch:checked + .inner-container,
body.dark #innnerThemeSwitch:checked + .inner-container {
color: canvas;
background-color: canvasText;
}

#innnerThemeSwitch+.inner-container,
body.dark #innnerThemeSwitch+.inner-container {
#innnerThemeSwitch + .inner-container,
body.dark #innnerThemeSwitch + .inner-container {
color: canvasText;
background-color: canvas;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<link rel="icon" type="image/svg+xml" href="../../logo.svg" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>Spinning Loader</title>
<title>Spinner</title>
<script src="../../helpers/header.js" type="module"></script>
<link rel="stylesheet" href="styles.css" />
</head>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<script src="../../helpers/header.js" type="module"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
padding: 30px;

border-radius: 20px;
box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
box-shadow:
rgba(0, 0, 0, 0.3) 0px 19px 38px,
rgba(0, 0, 0, 0.22) 0px 15px 12px;
text-align: center;
}

.container h1 {
color: #70068e;
font-weight: bolder;
font-size: 2.5rem;
text-shadow: 2px 7px 5px rgba(0, 0, 0, 0.3), 0px -4px 10px rgba(255, 255, 255, 0.3);
text-shadow:
2px 7px 5px rgba(0, 0, 0, 0.3),
0px -4px 10px rgba(255, 255, 255, 0.3);
}

.form {
Expand Down Expand Up @@ -42,7 +46,9 @@ button {
cursor: pointer;
border-radius: 5px;
margin: 5px;
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
box-shadow:
rgba(50, 50, 93, 0.25) 0px 13px 27px -5px,
rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
}

button:hover {
Expand All @@ -66,7 +72,9 @@ button:hover {
margin-top: 20px;
background-color: #70068e;
color: black;
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
box-shadow:
rgba(50, 50, 93, 0.25) 0px 13px 27px -5px,
rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
}
.buttons:hover {
background-color: #b745d6;
Expand Down
2 changes: 1 addition & 1 deletion apps/vue/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default defineConfig({
},
},
server: {
port: 6015,
port: 6014,
strictPort: true,
},
base: '/frontend-mini-challenges/vue/',
Expand Down
108 changes: 108 additions & 0 deletions shared/data/content/css-challenges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,114 @@ const challenges: Map<string, IChallenge> = new Map([
tags: [],
},
],
[
'spinner',
{
title: 'Spinner',
link: 'spinner/',
difficulty: EDifficulty.Easy,
developer: 'DhanushNehru',
tags: [],
},
],
[
'dialog',
{
title: 'Dialog',
link: 'dialog/',
difficulty: EDifficulty.Easy,
developer: 'sahankatta',
youtube: 'https://youtu.be/aIzyEDi6zgU',
tags: [],
},
],
[
'light-dark-mode',
{
title: 'Light & Dark mode',
link: 'light-dark-mode/',
difficulty: EDifficulty.Easy,
developer: 'sadanandpai',
youtube: 'https://youtu.be/hxcGGhjYNFE',
tags: [],
},
],
[
'skeleton-loader',
{
title: 'Skeleton Loader',
link: 'skeleton-loader/',
difficulty: EDifficulty.Easy,
developer: 'sahankatta',
youtube: 'https://youtu.be/FEtTRjq1P6I',
tags: [],
},
],
[
'accordion',
{
title: 'Accordion',
link: 'accordion/',
difficulty: EDifficulty.Easy,
developer: 'rashidtvmr',
youtube: 'https://youtu.be/03KFXudVaoo',
tags: [],
},
],
[
'navigation-bar',
{
title: 'Navigation Bar',
link: 'navigation-bar/',
difficulty: EDifficulty.Easy,
developer: 'christian-lee1398',
youtube: 'https://youtu.be/urA5ogzG0L0',
tags: [],
},
],
[
'footer',
{
title: 'Footer',
link: 'footer/',
difficulty: EDifficulty.Easy,
developer: 'AbhineshJha',
youtube: 'https://youtu.be/FRRlFLfdvBE?si=HWn88BwJGTJvEBUD',
tags: [],
isNew: true,
},
],
[
'blobmaker',
{
title: 'Blob Maker',
link: 'blobmaker/',
difficulty: EDifficulty.Easy,
developer: 'AbhineshJha',
tags: [],
},
],
[
'star-rating-display',
{
title: 'Star Rating Display',
link: 'star-rating-display/',
difficulty: EDifficulty.Medium,
developer: 'sadanandpai',
tags: [],
},
],
[
'gradient-generator',
{
title: 'Gradient Generator',
link: 'gradient-generator/',
difficulty: EDifficulty.Medium,
developer: 'Sukomal07',
tags: [],
isNew: true,
},
],
]);

export const cssChallenges = sortChallengesByDifficulty(challenges);
Loading

0 comments on commit 536165b

Please sign in to comment.