Browse Source

add footer

feature/header
Carmine De Rosa 5 years ago
parent
commit
f30b31011a
  1. 17
      components/footer/footer.html
  2. 26
      components/footer/footer.scss
  3. 12
      components/header/header.html
  4. 4
      components/header/header.scss
  5. 59
      pages/index.ejs
  6. 2
      src/scss/global.scss
  7. 26
      webpack.config.js

17
components/footer/footer.html

@ -1,3 +1,18 @@
<div class="component-footer">
footer
<div class="container d-flex my-auto">
<ul class="menu">
<li class="item mr-4">
<a href="/iolovolio" class="label"><b>io</b>lov<b>olio.</b></a>
</li>
<li class="item">
<a href="/terms" class="label">Termini servizio</a>
</li>
<li class="item">
<a href="/privacy" class="label">Privacy</a>
</li>
<li class="item">
<a href="/contacts" class="label">Contatti</a>
</li>
</ul>
</div>
</div>

26
components/footer/footer.scss

@ -2,9 +2,33 @@
@import "../../src/scss/mixins.scss";
.component-footer {
position: absolute;
//position: absolute;
display: flex;
height: $footer-height;
width: 100%;
bottom: 0;
background: $gray;
color: $white;
.menu {
display: flex;
height: 100%;
width: 100%;
list-style: none;
margin: 0;
padding: 0;
.item {
display: flex;
color: $white;
margin: auto 20px auto 0;
font-size: $font-12;
letter-spacing: 2px;
.label {
color: $white;
}
}
}
}

12
components/header/header.html

@ -8,13 +8,13 @@
</div>
<ul class="menu">
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'iolovolio.php') { echo "active";}?>"">
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'iolovolio.php') { echo "active";}?>">
<a href="/iolovolio" class="label"><b>io</b>lov<b>olio ...</b></a>
</li>
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'buy.php') { echo "active";}?>"">
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'buy.php') { echo "active";}?>">
<a href="/buy" class="label">acquistare</a>
</li>
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'learn.php') { echo "active";}?>"">
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'learn.php') { echo "active";}?>">
<a href="/learn" class="label">imparare</a>
</li>
<li class="item disabled">
@ -23,13 +23,13 @@
</ul>
<ul class="sidebar-menu">
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'iolovolio.php') { echo "active";}?>"">
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'iolovolio.php') { echo "active";}?>">
<a href="/iolovolio" class="label"><b>io</b>lov<b>olio ...</b></a>
</li>
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'buy.php') { echo "active";}?>"">
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'buy.php') { echo "active";}?>">
<a href="/buy" class="label">acquistare</a>
</li>
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'learn.php') { echo "active";}?>"">
<li class="item <?php if(basename($_SERVER['PHP_SELF']) == 'learn.php') { echo "active";}?>">
<a href="/learn" class="label">imparare</a>
</li>
<li class="item disabled">

4
components/header/header.scss

@ -64,13 +64,15 @@
margin: 20px;
font-size: $font-20;
letter-spacing: 2px;
padding: 20px;
border-bottom: 1px dotted $gray;
.label {
color: $white;
}
&.active {
border-bottom: 2px solid $white;
//border-bottom: 2px solid $white;
}
&.disabled {

59
pages/index.ejs

@ -14,64 +14,7 @@
<main class="main-content">
<section class="container">
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
section<br>
</section>

2
src/scss/global.scss

@ -100,7 +100,7 @@ button {
.main-content {
min-height: calc(100vh - #{$header-height} - #{$footer-height} - 50px);
min-height: calc(100vh - #{$footer-height});
padding: $header-height 40px 0 40px;
&.container-fluid {

26
webpack.config.js

@ -59,12 +59,26 @@ module.exports = (env) => {
]
fs.readdirSync(pagesPath).forEach( (page) => {
plugins.push(
new HtmlWebpackPlugin({
template: path.resolve(pagesPath, page),
filename: path.resolve(distPath, page.substr(0, page.lastIndexOf(".")) + ".php")
})
)
if(page == '.htaccess') {
plugins.push(
new CopyWebpackPlugin({
patterns: [
{
context: pagesPath,
from: '.htaccess',
to: distPath
}
]
})
)
} else {
plugins.push(
new HtmlWebpackPlugin({
template: path.resolve(pagesPath, page),
filename: path.resolve(distPath, page.substr(0, page.lastIndexOf(".")) + ".php")
})
)
}
})

Loading…
Cancel
Save