Skip to content

Commit

Permalink
Merge branch 'Dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
frouioui committed May 25, 2018
2 parents f76bfa0 + f01f628 commit 422ba4c
Show file tree
Hide file tree
Showing 9 changed files with 252 additions and 62 deletions.
90 changes: 90 additions & 0 deletions bonus/doc/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>42SH</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark text font-weight-bold">
<a class="navbar-brand" href="/">Home</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/documentation">Documentation<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Download</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="/download" download="42sh.tar.gz">Source code</a>
<a class="dropdown-item" href="/download" download="42sh">Binary</a>
</div>
</li>
</ul>
</div>
</nav>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-3">About us</h1>
<div class="row">
<div class="col-lg-3">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="3"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100" src="./static/florian.jpg" alt="First slide">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="./static/cecile.jpg" alt="Second slide">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="./static/julien.jpg" alt="Third slide">
</div>
<div class="carousel-item">
<img class="d-block w-100" src="./static/florent.jpg" alt="Fourth slide">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="col lg-9">
<div class="lead">
<p><div class="text font-weight-bold">Florian:</div> Quote management, Environement management</p>
<p><div class="text font-weight-bold">Cecile:</div> Scripting, Globbings, Echo built in</p>
<p><div class="text font-weight-bold">Julien:</div> Multiple pipe management, Job control</p>
<p><div class="text font-weight-bold">Florent:</div> Parsing, Simple execution, Alias, History, Line edition, Local variable</p>
</div>
</div>
</div>
</div>
</div>
<div class="card text-center">
<div class="card-body">
<h5 class="card-title">Support the team!</h5>
<p class="card-text">Check out our GitHub and report any bug!</p>
<a href="https://github.com/frouioui/42sh" class="btn btn-dark center">GitHub</a>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
65 changes: 65 additions & 0 deletions bonus/doc/documentation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>42SH</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark text font-weight-bold">
<a class="navbar-brand" href="/">Home</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/documentation">Documentation<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Download</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="/download" download="42sh.tar.gz">Source code</a>
<a class="dropdown-item" href="/download" download="42sh">Binary</a>
</div>
</li>
</ul>
</div>
</nav>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-3">Documentation</h1><br><br>
<h2 class="text font-weight-bold">Install</h2>
<h4>Go to the <span class="badge badge-pill badge-info">download page</span> and click on download. You can either download the full source code or just the binary.</h4>
<h4>Make sure to have the ncurses library on your computer.</h4><br><br>
<h2 class="text font-weight-bold">After install</h2>
<h4>Once you've downloaded the project use <span class="badge badge-pill badge-info">make</span> to comile the source code.</h4>
<h4>Once the compilation is done or if you've downloaded the binary instead of the full source code, use <span class="badge badge-pill badge-info">sudo mv ./42sh /bin/42sh</span> to move it to the bin.</h4>
<h4>To execute the shell : <span class="badge badge-pill badge-info">42sh</span></h4><br><br>
<h2 class="text font-weight-bold">Alias</h2>
<h4>To add an alias to the shell use the command <span class="badge badge-pill badge-info">alias</span> this command takes two parameters, the first one being the original command and the second one being the new command.</h4>
<h4>For exemple remplacing <span class="badge badge-pill badge-info">ll</span> by <span class="badge badge-pill badge-info">ls -l</span> you would use : <span class="badge badge-pill badge-info">alias ll ls -l</span></h4>
<h4>Then use the command <span class="badge badge-pill badge-info">ll</span> and it will execute the linked alias.</h4>
<h4>Then use the command to display all the alias is <span class="badge badge-pill badge-info">alias</span></h4><br><br>
<h2 class="text font-weight-bold">History</h2>
<h4>To look at the history use the command <span class="badge badge-pill badge-info">history</span></h4>
<h4>If you want to use an old command us <span class="badge badge-pill badge-info">!-x</span> x being the number of the command you want to use</h4>
<h4>When you want to use the last command, you'd use : <span class="badge badge-pill badge-info">!-1</span></h4>
</div>
</div>
<div class="card text-center">
<div class="card-body">
<h5 class="card-title">Support the team!</h5>
<p class="card-text">Check out our GitHub and report any bug!</p>
<a href="https://github.com/frouioui/42sh" class="btn btn-dark center">GitHub</a>
</div>
</div>
<br>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
53 changes: 53 additions & 0 deletions bonus/doc/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>42SH</title>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark text font-weight-bold">
<a class="navbar-brand" href="/">Home</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/documentation">Documentation<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Download</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="/download" download="42sh.tar.gz">Source code</a>
<a class="dropdown-item" href="/download" download="42sh">Binary</a>
</div>
</li>
</ul>
</div>
</nav>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-2">42SH</h1>
<div class="lead">
<p>The 42sh is an Epitect project.</p>
<p>The purpose of this project was to re-create the tcsh.</p>
<p>Compsed of <a href="/about" class="badge badge-info">team</a> of 4 students.</p>
</div>
</div>
</div>
<div class="card text-center">
<div class="card-body">
<h5 class="card-title">Support the team!</h5>
<p class="card-text">Check out our GitHub and report any bug!</p>
<a href="https://github.com/frouioui/42sh" class="btn btn-dark center">GitHub</a>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
44 changes: 44 additions & 0 deletions bonus/doc/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package main

import (
"html/template"
"log"
"net/http"
)

var tmpl = template.Must(template.ParseGlob("./*.html"))

func home(w http.ResponseWriter, r *http.Request) {

tmpl.ExecuteTemplate(w, "home.html", nil)
}

func documentation(w http.ResponseWriter, r *http.Request) {

tmpl.ExecuteTemplate(w, "documentation.html", nil)
}

func download(w http.ResponseWriter, r *http.Request) {

log.Println("Download [42sh].")
http.Redirect(w, r, "/", http.StatusSeeOther)
}

func about(w http.ResponseWriter, r *http.Request) {

tmpl.ExecuteTemplate(w, "about.html", nil)
}

func main() {

log.SetFlags(log.LstdFlags)

http.HandleFunc("/", home)
http.HandleFunc("/download", download)
http.HandleFunc("/documentation", documentation)
http.HandleFunc("/about", about)

http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))

http.ListenAndServe(":8080", nil)
}
Binary file added bonus/doc/static/cecile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bonus/doc/static/florent.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bonus/doc/static/florian.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bonus/doc/static/julien.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 422ba4c

Please sign in to comment.