Created
July 28, 2017 13:13
-
-
Save nlehuby/21ced6510668b96492b8b7ae74e6ec60 to your computer and use it in GitHub Desktop.
Thermomètre de ligne avec gitgraph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="fr"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Transilien N</title> | |
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.11.2/gitgraph.min.css" /> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<canvas id="gitGraph"></canvas> | |
<div id="detail" class="gitgraph-detail">Thermomètre de la ligne N avec gitgraph</div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.11.2/gitgraph.min.js"></script> | |
<script src="index.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://github.com/nicoespeon/gitgraph.js | |
var line_color = "#00A092"; | |
var config = { | |
template: "metro", | |
author: "" | |
}; | |
var gitGraph = new GitGraph(config); | |
gitGraph.template.commit.message.font = "normal 14pt Calibri"; | |
var master = gitGraph.branch({ | |
name: "master", | |
color: line_color, | |
commitDefaultOptions: { | |
color: line_color | |
} | |
}); | |
var commitConfig = { | |
dotSize: 10, | |
dotStrokeWidth: 10, | |
messageHashDisplay: false, | |
messageBranchDisplay: false, | |
messageAuthorDisplay: false, | |
message: "todo", | |
tooltipDisplay: false, | |
author: "" | |
}; | |
commitConfig.message = "Paris Montparnasse"; | |
commitConfig.dotColor = "white"; | |
master.commit(commitConfig); | |
commitConfig.message = "Vanves Malakoff" | |
commitConfig.dotColor = line_color; | |
master.commit(commitConfig); | |
commitConfig.message = "Clamart" | |
commitConfig.dotColor = line_color; | |
master.commit(commitConfig); | |
commitConfig.message = "..." | |
commitConfig.dotColor = line_color; | |
master.commit(commitConfig); | |
commitConfig.message = "Saint-Cyr" | |
commitConfig.dotColor = line_color; | |
master.commit(commitConfig); | |
// Branche Rambouillet | |
var rambouillet = master.branch({ | |
name: "rambouillet", | |
color: line_color, | |
commitDefaultOptions: { | |
color: line_color, | |
} | |
}); | |
commitConfig.message = "SQY" | |
commitConfig.dotColor = line_color; | |
rambouillet.commit(commitConfig); | |
commitConfig.message = "Trappes" | |
commitConfig.dotColor = line_color; | |
rambouillet.commit(commitConfig); | |
commitConfig.message = "La Verrière" | |
commitConfig.dotColor = line_color; | |
rambouillet.commit(commitConfig); | |
commitConfig.message = "..." | |
commitConfig.dotColor = line_color; | |
rambouillet.commit(commitConfig); | |
commitConfig.message = "Rambouillet" | |
commitConfig.dotColor = "white"; | |
rambouillet.commit(commitConfig); | |
// retour sur master | |
commitConfig.message = "Fontenay le Fleury" | |
commitConfig.dotColor = line_color; | |
master.commit(commitConfig); | |
commitConfig.message = "..." | |
commitConfig.dotColor = line_color; | |
master.commit(commitConfig); | |
commitConfig.message = "Plaisir Grignon" | |
commitConfig.dotColor = line_color; | |
master.commit(commitConfig); | |
// Branche Dreux | |
var dreux = master.branch({ | |
name: "dreux", | |
color: line_color, | |
commitDefaultOptions: { | |
color: line_color, | |
} | |
}); | |
commitConfig.message = "Villiers Neauphle Pontchartrain" | |
commitConfig.dotColor = line_color; | |
dreux.commit(commitConfig); | |
commitConfig.message = "Montfort l'Amaury Méré" | |
commitConfig.dotColor = line_color; | |
dreux.commit(commitConfig); | |
commitConfig.message = "..." | |
commitConfig.dotColor = line_color; | |
dreux.commit(commitConfig); | |
commitConfig.message = "Houdan" | |
commitConfig.dotColor = "white"; | |
dreux.commit(commitConfig); | |
var dreux_ = dreux.branch({ | |
name: "dreux_", | |
lineDash: [4], | |
color: line_color, | |
commitDefaultOptions: { | |
color: line_color, | |
} | |
}); | |
commitConfig.message = "Marchezais Broué" | |
commitConfig.dotColor = line_color; | |
dreux_.commit(commitConfig); | |
commitConfig.message = "Dreux" | |
commitConfig.dotColor = "white"; | |
dreux_.commit(commitConfig); | |
// retour sur master | |
commitConfig.message = "Beynes" | |
commitConfig.dotColor = line_color; | |
master.commit(commitConfig); | |
commitConfig.message = "..." | |
commitConfig.dotColor = line_color; | |
master.commit(commitConfig); | |
commitConfig.message = "Mantes-la-Jolie" | |
commitConfig.dotColor = "white"; | |
master.commit(commitConfig); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment