Skip to content

Commit

Permalink
Add Navbar and Default Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
yousinix committed Feb 9, 2019
1 parent e614954 commit ec04a1c
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 2 deletions.
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
title: portfolYOU
description: >
Lorem ipsum dolor sit amet, his eu liber nobis senserit,
ne option debitis adipiscing duo, has in eirmod ancillae.
ne option debitis adipiscing duo, has in eirmod ancillae.
baseurl: "/portfolYOU"

# Author Info
author:
Expand Down
3 changes: 3 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@
<!-- Animate CSS CDN -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.css" type="text/css"/>

<!-- Custom CSS -->
<link rel="stylesheet" href="{{ '/assets/css/custom.css' | relative_url }}" type="text/css">

</head>
17 changes: 17 additions & 0 deletions _includes/navbar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<nav class="navbar navbar-expand-lg navbar-light">

<a class="navbar-brand" href="{{ site.baseurl }}"><h3>{{ site.title }}</h3></a>

<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav ml-auto">
<a class="nav-item nav-link{% if page.url contains 'projects' %} active{% endif %}" href="{{ '/projects' | relative_url }}">Projects</a>
<a class="nav-item nav-link{% if page.url contains 'articles' %} active{% endif %}" href="{{ '/articles' | relative_url }}">Articles</a>
<a class="nav-item nav-link{% if page.url contains 'about' %} active{% endif %}" href="{{ '/about' | relative_url }}">About</a>
</div>
</div>

</nav>
12 changes: 12 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">

{% include head.html %}

<body class="container my-5">
{% include navbar.html %}
{{ content }}
{% include scripts.html %}
</body>

</html>
5 changes: 5 additions & 0 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.active{
border-bottom: 3px solid #007bff;
margin-top: -3px;
font-weight: bold;
}
6 changes: 6 additions & 0 deletions assets/css/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
---
@charset "utf-8";

// Import partials from `sass_dir` (defaults to `_sass`)
@import "base";
9 changes: 8 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
portfolYOU
---
layout: default
---

<div class="row justify-content-center p-5 m-5">
<h1>{{ site.title }}</h1>
<p class="text-muted">{{ site.description }}</p>
</div>
8 changes: 8 additions & 0 deletions pages/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
permalink: /about/
---

<div class="row justify-content-center p-5 m-5">
<h1>About</h1>
</div>
8 changes: 8 additions & 0 deletions pages/articles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
permalink: /articles/
---

<div class="row justify-content-center p-5 m-5">
<h1>Articles</h1>
</div>
8 changes: 8 additions & 0 deletions pages/projects.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
permalink: /projects/
---

<div class="row justify-content-center p-5 m-5">
<h1>Projects</h1>
</div>

0 comments on commit ec04a1c

Please sign in to comment.