Spaces:
Build error
Build error
Commit
·
50c9d20
1
Parent(s):
4406223
made header responsive and made first page responsive
Browse files- README.md +1 -1
- public/css/home.css +77 -17
- public/css/layouts/main.css +84 -20
- public/js/layouts/main.js +6 -0
- resources/views/layouts/main.blade.php +9 -2
README.md
CHANGED
|
@@ -20,7 +20,7 @@ ## Tasks :-
|
|
| 20 |
- [X] Create an simple layout page
|
| 21 |
- [X] Create an simple Dashboard page
|
| 22 |
- [X] Create an simple explore skills page
|
| 23 |
-
|
| 24 |
|
| 25 |
## Steps to run :-
|
| 26 |
|
|
|
|
| 20 |
- [X] Create an simple layout page
|
| 21 |
- [X] Create an simple Dashboard page
|
| 22 |
- [X] Create an simple explore skills page
|
| 23 |
+
- [ ] Make it mobile responsive
|
| 24 |
|
| 25 |
## Steps to run :-
|
| 26 |
|
public/css/home.css
CHANGED
|
@@ -1,43 +1,103 @@
|
|
| 1 |
-
#info_container
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
#info_container{
|
| 7 |
display: flex;
|
| 8 |
flex-direction: row;
|
| 9 |
align-items: center;
|
| 10 |
justify-content: space-evenly;
|
| 11 |
}
|
| 12 |
|
| 13 |
-
#info_container>p{
|
| 14 |
-
width:25ch;
|
|
|
|
| 15 |
font-size: 1.5em;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
|
|
|
|
| 20 |
}
|
| 21 |
|
| 22 |
-
#topdown_container
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
/* text-align: right; */
|
| 24 |
|
| 25 |
}
|
| 26 |
-
|
|
|
|
| 27 |
text-align: right;
|
| 28 |
}
|
| 29 |
|
| 30 |
-
#topdown_container>.main_section
|
| 31 |
-
|
| 32 |
-
|
|
|
|
| 33 |
display: flex;
|
| 34 |
flex-direction: row;
|
| 35 |
align-items: center;
|
| 36 |
justify-content: space-evenly;
|
| 37 |
}
|
| 38 |
|
| 39 |
-
.main_section>p{
|
| 40 |
-
font-size:1.5rem;
|
| 41 |
-
width:50ch;
|
| 42 |
-
|
|
|
|
| 43 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#info_container,
|
| 2 |
+
#topdown_container,
|
| 3 |
+
#bottomup_container {
|
| 4 |
+
min-height: 500px;
|
| 5 |
+
padding: 2rem 4rem;
|
| 6 |
}
|
| 7 |
|
| 8 |
+
#info_container {
|
| 9 |
display: flex;
|
| 10 |
flex-direction: row;
|
| 11 |
align-items: center;
|
| 12 |
justify-content: space-evenly;
|
| 13 |
}
|
| 14 |
|
| 15 |
+
#info_container>p {
|
| 16 |
+
width: 25ch;
|
| 17 |
+
margin: 9px;
|
| 18 |
font-size: 1.5em;
|
| 19 |
}
|
| 20 |
|
| 21 |
+
#info_container>img {
|
| 22 |
+
max-width: 550px;
|
| 23 |
+
width: 50%;
|
| 24 |
}
|
| 25 |
|
| 26 |
+
#topdown_container {
|
| 27 |
+
background-image:linear-gradient(-45deg, white, pink, purple);
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
#topdown_container>.heading,
|
| 31 |
+
#bottomup_container>.heading {
|
| 32 |
/* text-align: right; */
|
| 33 |
|
| 34 |
}
|
| 35 |
+
|
| 36 |
+
#bottomup_container>.heading {
|
| 37 |
text-align: right;
|
| 38 |
}
|
| 39 |
|
| 40 |
+
#topdown_container>.main_section,
|
| 41 |
+
#bottomup_container>.main_section {
|
| 42 |
+
width: 100%;
|
| 43 |
+
margin: 2rem;
|
| 44 |
display: flex;
|
| 45 |
flex-direction: row;
|
| 46 |
align-items: center;
|
| 47 |
justify-content: space-evenly;
|
| 48 |
}
|
| 49 |
|
| 50 |
+
.main_section>p {
|
| 51 |
+
font-size: 1.5rem;
|
| 52 |
+
width: 50ch;
|
| 53 |
+
max-width: 100%;
|
| 54 |
+
margin-inline: 2rem;
|
| 55 |
}
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
@media screen and (max-width: 768px) {
|
| 59 |
+
|
| 60 |
+
#info_container,
|
| 61 |
+
#topdown_container,
|
| 62 |
+
#bottomup_container {
|
| 63 |
+
padding: 2rem 1rem;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
#info_container {
|
| 67 |
+
flex-direction: column-reverse;
|
| 68 |
+
|
| 69 |
+
>p {
|
| 70 |
+
width: 100%;
|
| 71 |
+
margin: 20px;
|
| 72 |
+
font-size: 1.5em;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
>img {
|
| 76 |
+
width: 80%;
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
#topdown_container>.main_section{
|
| 81 |
+
margin-inline:0;
|
| 82 |
+
flex-direction: column-reverse;
|
| 83 |
+
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
#bottomup_container>.main_section{
|
| 87 |
+
margin-inline:0;
|
| 88 |
+
flex-direction: column;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.main_section>p{
|
| 92 |
+
margin-top:20px;
|
| 93 |
+
font-size:1rem;
|
| 94 |
+
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
#topdown_container>.heading,#bottomup_container>.heading{
|
| 98 |
+
text-align: center;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
|
public/css/layouts/main.css
CHANGED
|
@@ -1,55 +1,119 @@
|
|
| 1 |
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300&family=Roboto:wght@300&display=swap');
|
| 2 |
|
| 3 |
-
*{
|
| 4 |
-
margin:0;
|
| 5 |
-
padding:0;
|
| 6 |
box-sizing: border-box;
|
| 7 |
font-family: 'Poppins', sans-serif;
|
| 8 |
}
|
| 9 |
|
| 10 |
-
a{
|
| 11 |
-
color
|
| 12 |
/* border:none; */
|
| 13 |
text-decoration: none;
|
| 14 |
}
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
|
|
|
| 18 |
background-color: #FFC3C3;
|
| 19 |
display: flex;
|
| 20 |
flex-direction: row;
|
| 21 |
align-items: center;
|
| 22 |
justify-content: space-between;
|
| 23 |
-
padding:0.7rem 2rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
}
|
| 25 |
|
| 26 |
-
header
|
| 27 |
-
font-size:2rem;
|
| 28 |
cursor: pointer;
|
| 29 |
}
|
| 30 |
|
| 31 |
-
header>.sub_header{
|
| 32 |
display: flex;
|
| 33 |
flex-direction: row;
|
| 34 |
align-items: center;
|
| 35 |
justify-content: space-between;
|
| 36 |
}
|
| 37 |
|
| 38 |
-
header>.sub_header a{
|
| 39 |
-
margin-inline:10px;
|
| 40 |
cursor: pointer;
|
|
|
|
| 41 |
}
|
| 42 |
-
|
| 43 |
-
|
|
|
|
| 44 |
}
|
| 45 |
-
|
| 46 |
-
|
|
|
|
| 47 |
background-color: #0000004c;
|
| 48 |
aspect-ratio: 1;
|
| 49 |
-
color
|
| 50 |
-
padding:1rem;
|
| 51 |
|
| 52 |
-
display:flex;
|
| 53 |
align-items: center;
|
| 54 |
justify-content: center;
|
| 55 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300&family=Roboto:wght@300&display=swap');
|
| 2 |
|
| 3 |
+
* {
|
| 4 |
+
margin: 0;
|
| 5 |
+
padding: 0;
|
| 6 |
box-sizing: border-box;
|
| 7 |
font-family: 'Poppins', sans-serif;
|
| 8 |
}
|
| 9 |
|
| 10 |
+
a {
|
| 11 |
+
color: #000;
|
| 12 |
/* border:none; */
|
| 13 |
text-decoration: none;
|
| 14 |
}
|
| 15 |
|
| 16 |
+
|
| 17 |
+
header {
|
| 18 |
+
height: 80px;
|
| 19 |
background-color: #FFC3C3;
|
| 20 |
display: flex;
|
| 21 |
flex-direction: row;
|
| 22 |
align-items: center;
|
| 23 |
justify-content: space-between;
|
| 24 |
+
padding: 0.7rem 2rem;
|
| 25 |
+
}
|
| 26 |
+
header>.left{
|
| 27 |
+
position: relative;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
header .menu_btn {
|
| 31 |
+
position: absolute;
|
| 32 |
+
left: 20px;
|
| 33 |
+
top: 50%;
|
| 34 |
+
transform: translateY(-50%);
|
| 35 |
+
display: none;
|
| 36 |
}
|
| 37 |
|
| 38 |
+
header .title {
|
| 39 |
+
font-size: 2rem;
|
| 40 |
cursor: pointer;
|
| 41 |
}
|
| 42 |
|
| 43 |
+
header>.sub_header {
|
| 44 |
display: flex;
|
| 45 |
flex-direction: row;
|
| 46 |
align-items: center;
|
| 47 |
justify-content: space-between;
|
| 48 |
}
|
| 49 |
|
| 50 |
+
header>.sub_header a {
|
| 51 |
+
margin-inline: 10px;
|
| 52 |
cursor: pointer;
|
| 53 |
+
text-align: center;
|
| 54 |
}
|
| 55 |
+
|
| 56 |
+
header>.sub_header a:hover {
|
| 57 |
+
border-bottom: 2px solid #000;
|
| 58 |
}
|
| 59 |
+
|
| 60 |
+
header #user_badge {
|
| 61 |
+
border-radius: 50%;
|
| 62 |
background-color: #0000004c;
|
| 63 |
aspect-ratio: 1;
|
| 64 |
+
color: #fff;
|
| 65 |
+
padding: 1rem;
|
| 66 |
|
| 67 |
+
display: flex;
|
| 68 |
align-items: center;
|
| 69 |
justify-content: center;
|
| 70 |
}
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
@media screen and (max-width:550px) {
|
| 74 |
+
|
| 75 |
+
header {
|
| 76 |
+
height: unset;
|
| 77 |
+
flex-direction: column;
|
| 78 |
+
padding-inline: 0;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
header .menu_btn {
|
| 82 |
+
display: inherit;
|
| 83 |
+
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
header>.left{
|
| 87 |
+
width:100%;
|
| 88 |
+
text-align: center;
|
| 89 |
+
/* margin-bottom: 10px; */
|
| 90 |
+
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
.sub_header.hidden{
|
| 94 |
+
display:none;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
header>.sub_header {
|
| 98 |
+
width: 100%;
|
| 99 |
+
flex-direction: column;
|
| 100 |
+
background-color: inherit;
|
| 101 |
+
margin-top: 10px;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
header>.sub_header>div {
|
| 105 |
+
display: flex;
|
| 106 |
+
flex-direction: column;
|
| 107 |
+
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
header>.sub_header a {
|
| 111 |
+
margin-bottom: 10px;
|
| 112 |
+
padding: 10px;
|
| 113 |
+
border: 2px solid black;
|
| 114 |
+
border-radius: 50px;
|
| 115 |
+
background-color: black;
|
| 116 |
+
color: white;
|
| 117 |
+
|
| 118 |
+
}
|
| 119 |
+
}
|
public/js/layouts/main.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
document.querySelector('.menu_btn').addEventListener('click',toggleMenu);
|
| 2 |
+
|
| 3 |
+
function toggleMenu(e){
|
| 4 |
+
subheader = document.querySelector(".sub_header");
|
| 5 |
+
subheader.classList.toggle("hidden");
|
| 6 |
+
}
|
resources/views/layouts/main.blade.php
CHANGED
|
@@ -4,14 +4,20 @@
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
|
|
|
|
|
|
|
| 7 |
<link rel="stylesheet" href="{{ asset('css/layouts/main.css') }}">
|
| 8 |
@yield('head')
|
| 9 |
</head>
|
| 10 |
|
| 11 |
<body>
|
| 12 |
<header>
|
| 13 |
-
<
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
| 15 |
<div>
|
| 16 |
<a href="{{ route('dashboard') }}">Dashboard</a>
|
| 17 |
<a href="{{ route('dashboard.myskills') }}">My Skills</a>
|
|
@@ -31,6 +37,7 @@
|
|
| 31 |
</div>
|
| 32 |
</header>
|
| 33 |
@yield('main')
|
|
|
|
| 34 |
|
| 35 |
</body>
|
| 36 |
|
|
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
| 7 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
|
| 8 |
+
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
|
| 9 |
+
crossorigin="anonymous" referrerpolicy="no-referrer" />
|
| 10 |
<link rel="stylesheet" href="{{ asset('css/layouts/main.css') }}">
|
| 11 |
@yield('head')
|
| 12 |
</head>
|
| 13 |
|
| 14 |
<body>
|
| 15 |
<header>
|
| 16 |
+
<div class="left">
|
| 17 |
+
<i class='fa-solid fa-bars menu_btn'></i>
|
| 18 |
+
<a class='title' href="{{ route('home') }}">LearnGuide</a>
|
| 19 |
+
</div>
|
| 20 |
+
<div class="sub_header hidden">
|
| 21 |
<div>
|
| 22 |
<a href="{{ route('dashboard') }}">Dashboard</a>
|
| 23 |
<a href="{{ route('dashboard.myskills') }}">My Skills</a>
|
|
|
|
| 37 |
</div>
|
| 38 |
</header>
|
| 39 |
@yield('main')
|
| 40 |
+
<script src="{{ asset('js/layouts/main.js') }}"></script>
|
| 41 |
|
| 42 |
</body>
|
| 43 |
|