Skip to content

Css files #5

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,20 @@
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"inlineStyleLanguage": "css",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
"scripts": [],
"scripts": [
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"
],
"server": "src/main.server.ts",
"outputMode": "server",
"ssr": {
Expand Down Expand Up @@ -88,7 +91,7 @@
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"inlineStyleLanguage": "css",
"assets": [
{
"glob": "**/*",
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"@angular/platform-server": "^19.2.0",
"@angular/router": "^19.2.0",
"@angular/ssr": "^19.2.6",
"@ng-bootstrap/ng-bootstrap": "^18.0.0",
"bootstrap": "^5.3.6",
"express": "^4.18.2",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
Expand All @@ -41,4 +43,4 @@
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.7.2"
}
}
}
2 changes: 0 additions & 2 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
<h3>Welcome</h3>

<router-outlet />
66 changes: 51 additions & 15 deletions src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,57 @@
import { Routes } from '@angular/router';
import { MasterpageComponent } from './layout/masterpage/masterpage.component';
import { HomeComponent } from './features/home/pages/home/home.component';
import { AboutUsComponent } from './features/about-us/pages/about-us/about-us.component';
import { OurServicesComponent } from './features/our-services/pages/our-services/our-services.component';
import { ContactUsComponent } from './features/contact-us/pages/contact-us/contact-us.component';
import { GridComponent } from './layout/grid/grid.component';

export const routes: Routes = [
{
// { path: '', redirectTo: 'home', pathMatch: 'full' },
{
path: '',
component: MasterpageComponent, // Master page
component: GridComponent,
children: [
{ path: '', component: HomeComponent, title: 'Home' },
{ path: 'about', component: AboutUsComponent, title: 'About Us' },
{ path: 'services', component: OurServicesComponent, title: 'Our Services' },
{ path: 'contactus', component: ContactUsComponent, title: 'Contact Us' },
// Add other routes here
]
{
path: '',
loadComponent: () =>
import('./features/home/pages/home/home.component').then(
(m) => m.HomeComponent
), // Lazy load Home
title: 'Home',
},

{
path: 'about-us',
loadComponent: () =>
import('./features/about-us/pages/about-us/about-us.component').then(
(m) => m.AboutUsComponent
), // Lazy load about-us
title: 'About Us',
},

{
path: 'our-services',
loadComponent: () =>
import(
'./features/our-services/pages/our-services/our-services.component'
).then((m) => m.OurServicesComponent), // Lazy load our-services
title: 'Our Services',
},

{
path: 'contact-us',
loadComponent: () =>
import(
'./features/contact-us/pages/contact-us/contact-us.component'
).then((m) => m.ContactUsComponent), // Lazy load contact-us
title: 'Contact Us',
},

{
path: 'page-not-found',
loadComponent: () =>
import(
'./features/page-not-found/pages/page-not-found/page-not-found.component'
).then((m) => m.PageNotFoundComponent), // Lazy load page-not-found
title: 'Contact Us',
},
],
},
{ path: '**', redirectTo: '' } // Catch-all route
];
{ path: '**', redirectTo: '/page-not-found' }, // Catch-all route
];
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>page-not-found works!</p>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { PageNotFoundComponent } from './page-not-found.component';

describe('PageNotFoundComponent', () => {
let component: PageNotFoundComponent;
let fixture: ComponentFixture<PageNotFoundComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [PageNotFoundComponent]
})
.compileComponents();

fixture = TestBed.createComponent(PageNotFoundComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-page-not-found',
imports: [],
templateUrl: './page-not-found.component.html',
styleUrl: './page-not-found.component.scss'
})
export class PageNotFoundComponent {

}
32 changes: 32 additions & 0 deletions src/app/layout/grid/grid.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<div class="site-grid site-container">

<section class="navbar-container">
<app-navbar></app-navbar>
</section>

<header class="idetity-container grid-area-common">
YOUR PAGE NAME
</header>

<section class="call-to-action-container grid-area-common">
CALL TO ACTION
</section>

<section class="page-content-container">

<section class="page-content-main grid-area-common">
<router-outlet/>
</section>

<section class="sidebar-container grid-area-common">
SIDE BAR
</section>

</section>

<footer class="footer-container grid-area-common bg-body-secondary">
FOOTER HERE
</footer>

</div>

Empty file.
23 changes: 23 additions & 0 deletions src/app/layout/grid/grid.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { GridComponent } from './grid.component';

describe('GridComponent', () => {
let component: GridComponent;
let fixture: ComponentFixture<GridComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [GridComponent]
})
.compileComponents();

fixture = TestBed.createComponent(GridComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
13 changes: 13 additions & 0 deletions src/app/layout/grid/grid.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { NavbarComponent } from '../navbar/navbar.component';

@Component({
selector: 'app-grid',
imports: [RouterOutlet, NavbarComponent],
templateUrl: './grid.component.html',
styleUrl: './grid.component.scss'
})
export class GridComponent {

}
15 changes: 0 additions & 15 deletions src/app/layout/masterpage/masterpage.component.html
Original file line number Diff line number Diff line change
@@ -1,15 +0,0 @@
<header>
<nav>
<app-navbar></app-navbar>
</nav>
<section class="carousel-container">
carousel goes here...
</section>
</header>
<main>

</main>
<footer>
Footer goes here...
</footer>
<router-outlet/>
36 changes: 33 additions & 3 deletions src/app/layout/navbar/navbar.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
<a routerLink="/">Home</a> |
<a routerLink="/about-us">About Us</a>
<router-outlet/>
<nav class="navbar navbar-expand-sm bg-dark">
<div class="container-fluid">
<button class="navbar-toggler custom-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" aria-current="page"routerLink="/">Home</a>
</li>

<li class="nav-item">
<a class="nav-link" routerLink="/about-us">About Us</a>
</li>

<li class="nav-item">
<a class="nav-link" routerLink="/our-services">Our Services</a>
</li>

<li class="nav-item">
<a class="nav-link" routerLink="/contact-us">Contact Us</a>
</li>

<li class="nav-item">
<a class="nav-link" routerLink="/faq">FAQ</a>
</li>
</ul>

</div>
</div>
</nav>
4 changes: 2 additions & 2 deletions src/app/layout/navbar/navbar.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component } from '@angular/core';
import { RouterLink, RouterOutlet } from '@angular/router';
import { RouterLink } from '@angular/router';

@Component({
selector: 'app-navbar',
imports: [RouterLink, RouterOutlet ],
imports: [RouterLink ],
templateUrl: './navbar.component.html',
styleUrl: './navbar.component.scss'
})
Expand Down
2 changes: 2 additions & 0 deletions src/scss/abstracts/_functions.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

@use "./variables" as *;
3 changes: 1 addition & 2 deletions src/scss/abstracts/_index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@forward 'variables';
@forward 'mixins';
@forward 'functions';
@forward 'media-query';
@forward 'functions';
51 changes: 51 additions & 0 deletions src/scss/abstracts/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@use "./variables" as *;

// Responsive breakpoints mixin
@mixin respond-to($breakpoint) {
@if $breakpoint == sm {
@media (min-width: #{$breakpoint-sm}) { @content; }
}
@if $breakpoint == md {
@media (min-width: #{$breakpoint-md}) { @content; }
}
@if $breakpoint == lg {
@media (min-width: #{$breakpoint-lg}) { @content; }
}
@if $breakpoint == xl {
@media (min-width: #{$breakpoint-xl}) { @content; }
}
}

// Button mixin with variants
@mixin button-variant($bg-color, $text-color: white) {
background-color: $bg-color;
color: $text-color;
border: 2px solid $bg-color;

&:hover {
background-color: darken($bg-color, 10%);
border-color: darken($bg-color, 10%);
}

&:focus {
box-shadow: 0 0 0 3px rgba($bg-color, 0.25);
}
}

// Flex center mixin
@mixin flex-center {
display: flex;
align-items: center;
justify-content: center;
}

// Card shadow mixin
@mixin card-shadow($level: 1) {
@if $level == 1 {
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
} @else if $level == 2 {
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
} @else if $level == 3 {
box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
}
Loading