Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Atli Pall Petursson
Assignment1
Commits
fcbd2bbb
Commit
fcbd2bbb
authored
Feb 15, 2019
by
Atli Pall Petursson
Browse files
firstCommit
parents
Pipeline
#10478
canceled with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
css/style.css
0 → 100644
View file @
fcbd2bbb
@import
url('https://fonts.googleapis.com/css?family=Ubuntu')
;
body
{
font-family
:
'Ubuntu'
,
sans-serif
;
margin
:
0
;
background
:
#bbc7b2
;
height
:
auto
;
}
h1
{
font-weight
:
400
;
font-size
:
2.5rem
;
text-transform
:
uppercase
;
margin
:
0
;
}
h2
{
font-weight
:
400
;
font-size
:
1.2rem
;
text-transform
:
capitalize
;
margin
:
0
;
}
img
{
display
:
block
;
width
:
100%
;
}
main
{
max-width
:
900px
;
margin
:
auto
;
box-shadow
:
30px
0px
40px
rgba
(
0
,
0
,
0
,
0.1
),
-30px
0px
40px
rgba
(
0
,
0
,
0
,
0.1
);
}
#landing
{
background
:
#fff
;
}
#landing-text
{
display
:
flex
;
flex
:
0
1
40vw
;
height
:
50vh
;
justify-content
:
center
;
align-items
:
center
;
text-align
:
center
;
padding-right
:
1rem
;
padding-left
:
1rem
;
}
#landing-text
h2
{
color
:
#888
;
}
#landing-image
{
background
:
url(https://source.unsplash.com/dC6Pb2JdAqs)
;
background-position
:
center
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
height
:
50vh
;
flex
:
0
1
60vw
;
margin
:
0
;
}
.btn
{
padding
:
0.5rem
2rem
;
border
:
1px
#ccc
solid
;
display
:
inline-block
;
margin
:
2rem
0
0
;
border-radius
:
50px
;
text-decoration
:
none
;
color
:
black
;
transition
:
background
500ms
ease
;
}
.btn
:hover
{
background
:
darkgray
}
#header
{
padding
:
1.5rem
;
text-align
:
center
;
background
:
#333
;
color
:
#fff
;
}
#header
h2
{
border-left
:
dotted
1px
#fff
;
border-right
:
dotted
1px
#fff
;
display
:
inline-block
;
padding-right
:
1rem
;
padding-left
:
1rem
;
}
.caption
{
padding
:
0.8rem
;
text-align
:
center
;
}
footer
{
text-align
:
center
;
padding
:
2rem
1
rem
;
margin
:
auto
;
color
:
#333
;
}
footer
h3
{
font-size
:
3rem
;
margin-bottom
:
0
;
}
/* Testing screen sizes 500px and up */
@media
(
min-width
:
500px
)
{
#landing
{
display
:
flex
;
height
:
100%
;
}
#landing-text
{
height
:
100vh
;
}
#landing-image
{
height
:
100vh
;
}
}
/* Testing screen sizes 700px and up */
@media
(
min-width
:
700px
)
{
.btn
{
padding
:
1rem
3rem
;
}
}
\ No newline at end of file
index.html
0 → 100644
View file @
fcbd2bbb
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"ie=edge"
>
<link
rel=
"stylesheet"
href=
"css/style.css"
>
<title>
Web page portfolio
</title>
</head>
<body>
<main>
<div
id=
"landing"
>
<div
id=
"landing-text"
>
<div
id=
"landing-text-inner"
>
<h1>
Web Page Portfolio
</h1>
<h2>
Assignment1
</h2>
<a
href=
"#about"
class=
"btn"
id=
"about"
>
About Us
</a>
</a>
<a
href=
"#progress"
class=
"btn"
id=
"view-progress"
>
View Progress
</a>
</div>
</div>
<div
id=
"landing-image"
></div>
</div>
<div
id=
"about"
>
<div
id=
"header"
>
<h2>
About Us
</h2>
</div>
<div
class=
"caption"
>
<h3>
Atli Pall Petursson
</h3>
<p>
Atli is a student on his first year on IT Software Development at Aarhus University.
</p>
</div>
<div
id=
"progress"
>
<div
id=
"header"
>
<h2>
View Progress
</h2>
</div>
</div>
</div>
</main>
<footer>
<h3>
A Website By
</h3>
<p>
Atli Pall Petursson
&
Gustav Hammelev
</p>
<p>
F19 - The Web Of Things
</p>
</footer>
<script
src=
"http://code.jquery.com/jquery-3.3.1.min.js"
integrity=
"sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin=
"anonymous"
></script>
<script>
src
=
"
js/main.js
"
</script>
</body>
</html>
\ No newline at end of file
js/main.js
0 → 100644
View file @
fcbd2bbb
// Adding smooth scroll to the about button
$
(
'
#about
'
).
on
(
'
click
'
,
function
()
{
const
about
=
$
(
'
#about
'
).
position
().
top
;
$
(
'
html, body
'
).
animate
(
{
scrollTop
:
about
},
1500
);
});
$
(
'
#view-progress
'
).
on
(
'
click
'
,
function
()
{
const
progress
=
$
(
'
#progress
'
).
position
().
top
;
$
(
'
html, body
'
).
animate
(
{
scrollTop
:
progress
},
1500
);
});
\ No newline at end of file
Write
Preview
Supports
Markdown
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