Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
single-page-application
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christopher Cottier
single-page-application
Commits
7264f7b7
Commit
7264f7b7
authored
Apr 20, 2021
by
ccottier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
header and footer components added, routing for country components
parent
3209b2bc
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
139 additions
and
13 deletions
+139
-13
account.component.css
src/app/account/account.component.css
+0
-0
account.component.html
src/app/account/account.component.html
+1
-0
account.component.spec.ts
src/app/account/account.component.spec.ts
+25
-0
account.component.ts
src/app/account/account.component.ts
+15
-0
app-routing.module.ts
src/app/app-routing.module.ts
+12
-1
app.component.css
src/app/app.component.css
+7
-0
app.component.html
src/app/app.component.html
+7
-5
app.module.ts
src/app/app.module.ts
+3
-1
footer.component.css
src/app/footer/footer.component.css
+24
-0
footer.component.html
src/app/footer/footer.component.html
+7
-1
footer.component.ts
src/app/footer/footer.component.ts
+1
-1
greece.component.ts
src/app/greece/greece.component.ts
+1
-1
header.component.css
src/app/header/header.component.css
+23
-0
header.component.html
src/app/header/header.component.html
+11
-1
header.component.ts
src/app/header/header.component.ts
+1
-1
spain.component.ts
src/app/spain/spain.component.ts
+1
-1
No files found.
src/app/account/account.component.css
0 → 100644
View file @
7264f7b7
src/app/account/account.component.html
0 → 100644
View file @
7264f7b7
<p>
account works!
</p>
src/app/account/account.component.spec.ts
0 → 100644
View file @
7264f7b7
import
{
ComponentFixture
,
TestBed
}
from
'@angular/core/testing'
;
import
{
AccountComponent
}
from
'./account.component'
;
describe
(
'AccountComponent'
,
()
=>
{
let
component
:
AccountComponent
;
let
fixture
:
ComponentFixture
<
AccountComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
declarations
:
[
AccountComponent
]
})
.
compileComponents
();
});
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
AccountComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'should create'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/account/account.component.ts
0 → 100644
View file @
7264f7b7
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'account'
,
templateUrl
:
'./account.component.html'
,
styleUrls
:
[
'./account.component.css'
]
})
export
class
AccountComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
():
void
{
}
}
src/app/app-routing.module.ts
View file @
7264f7b7
import
{
SpainComponent
}
from
'./spain/spain.component'
;
import
{
GreeceComponent
}
from
'./greece/greece.component'
;
import
{
AccountComponent
}
from
'./account/account.component'
;
import
{
FranceComponent
}
from
'./france/france.component'
;
import
{
EnglandComponent
}
from
'./england/england.component'
;
import
{
NgModule
}
from
'@angular/core'
;
import
{
RouterModule
,
Routes
}
from
'@angular/router'
;
const
routes
:
Routes
=
[];
const
routes
:
Routes
=
[
{
path
:
'england'
,
component
:
EnglandComponent
},
{
path
:
'france'
,
component
:
FranceComponent
},
{
path
:
'account'
,
component
:
AccountComponent
},
{
path
:
'greece'
,
component
:
GreeceComponent
},
{
path
:
'spain'
,
component
:
SpainComponent
}
];
@
NgModule
({
imports
:
[
RouterModule
.
forRoot
(
routes
)],
...
...
src/app/app.component.css
View file @
7264f7b7
.dynamic-container
{
margin-top
:
35px
;
height
:
calc
(
100vh-70px
);
overflow-y
:
auto
;
overflow-x
:
hidden
;
padding
:
50px
20px
20px
50px
;
}
src/app/app.component.html
View file @
7264f7b7
<div>
woooohooo
</div>
<router-outlet></router-outlet>
<header></header>
<div
class=
'content'
role=
'main'
>
<div
class=
'dynamic-container col-md-10 col-xl-10'
>
<router-outlet></router-outlet>
</div>
</div>
<footer></footer>
\ No newline at end of file
src/app/app.module.ts
View file @
7264f7b7
...
...
@@ -9,6 +9,7 @@ import { EnglandComponent } from './england/england.component';
import
{
FranceComponent
}
from
'./france/france.component'
;
import
{
GreeceComponent
}
from
'./greece/greece.component'
;
import
{
SpainComponent
}
from
'./spain/spain.component'
;
import
{
AccountComponent
}
from
'./account/account.component'
;
@
NgModule
({
declarations
:
[
...
...
@@ -18,7 +19,8 @@ import { SpainComponent } from './spain/spain.component';
EnglandComponent
,
FranceComponent
,
GreeceComponent
,
SpainComponent
SpainComponent
,
AccountComponent
],
imports
:
[
BrowserModule
,
...
...
src/app/footer/footer.component.css
View file @
7264f7b7
.footer
{
height
:
5rem
;
background
:
#6fb7f1
;
bottom
:
0
;
right
:
0
;
left
:
0
;
position
:
fixed
;
}
ul
{
font-family
:
Arial
,
Verdana
;
font-size
:
14px
;
margin
:
0
auto
;
padding
:
0
;
margin-top
:
20px
;
/* width:600px; */
list-style
:
none
;
}
ul
li
{
display
:
block
;
position
:
relative
;
float
:
left
;
padding-left
:
20px
;
;
}
\ No newline at end of file
src/app/footer/footer.component.html
View file @
7264f7b7
<p>
footer works!
</p>
<div
class=
'footer'
>
<ul>
<li>
About Us
</li>
<li>
Careers
</li>
<li>
Contact Us
</li>
</ul>
</div>
\ No newline at end of file
src/app/footer/footer.component.ts
View file @
7264f7b7
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'
app-
footer'
,
selector
:
'footer'
,
templateUrl
:
'./footer.component.html'
,
styleUrls
:
[
'./footer.component.css'
]
})
...
...
src/app/greece/greece.component.ts
View file @
7264f7b7
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'
app-
greece'
,
selector
:
'greece'
,
templateUrl
:
'./greece.component.html'
,
styleUrls
:
[
'./greece.component.css'
]
})
...
...
src/app/header/header.component.css
View file @
7264f7b7
.header
{
background
:
#6fb7f1
;
height
:
4em
;
position
:
fixed
;
top
:
0
;
right
:
0
;
left
:
0
;
}
.btn
{
margin-top
:
30px
;
margin-left
:
10px
}
.btnMenu
{
margin-top
:
20px
;
margin-left
:
20px
;
display
:
inline-block
;
}
.account
{
position
:
absolute
;
right
:
10px
;
margin-top
:
30px
;
}
\ No newline at end of file
src/app/header/header.component.html
View file @
7264f7b7
<p>
header works!
</p>
<div
class=
'header'
>
<div
class=
'btnMenu'
>
<button
[
routerLink
]="['/
england
']"
>
England
</button>
<button
[
routerLink
]=
"['/
france
']"
>
France
</button>
<button
>
Greece
</button>
<button
>
Spain
</button>
</div>
<span
class=
'account'
>
<i
class=
"fa fa-user"
[
routerLink
]="['/
account
']"
></i>
</span>
</div>
\ No newline at end of file
src/app/header/header.component.ts
View file @
7264f7b7
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'
app-
header'
,
selector
:
'header'
,
templateUrl
:
'./header.component.html'
,
styleUrls
:
[
'./header.component.css'
]
})
...
...
src/app/spain/spain.component.ts
View file @
7264f7b7
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'
app-
spain'
,
selector
:
'spain'
,
templateUrl
:
'./spain.component.html'
,
styleUrls
:
[
'./spain.component.css'
]
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment