Skip to content

Commit f612317

Browse files
committedApr 19, 2020
Initial site setup and added games
1 parent 0b30dc4 commit f612317

26 files changed

+708
-2
lines changed
 

‎ACKNOWLEDGEMENTS.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Acknowledgements
2+
3+
- [AngularJS](https://angularjs.org/)
4+
- [Bootstrap](https://getbootstrap.com/)
5+
- [jQuery](https://jquery.com/)
6+
- [jQuery UI](https://jqueryui.com/)
7+
- [Popper.js](https://popper.js.org/)

‎CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Change Log
2+
3+
// https://github.com/olivierlacan/keep-a-changelog
4+
// https://keepachangelog.com/en/1.0.0/
5+
6+
## [0.0.1] - 2020-04-19
7+
### Added
8+
- Initial Setup

‎CONTRIBUTORS.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# CONTRIBUTORS
2+
3+
[![AlexHedley](https://avatars3.githubusercontent.com/u/1573469?s=50&v=4)](https://github.com/AlexHedley/)
4+
[AlexHedley](https://github.com/AlexHedley/)

‎README.md

+52-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,52 @@
1-
# tafl
2-
Hnefatafl
1+
# Tafl
2+
3+
Talf
4+
5+
- [Site](http://alexhedley.github.io/talf/)
6+
7+
Tafl, The Viking Game,
8+
9+
## Buy
10+
11+
- [National Museums Scotland](http://shop.nms.ac.uk/collections/toys-games-games-chess/products/the-viking-game-hnefatafl)
12+
13+
> ### Description
14+
15+
> Hnefatafl ˈne-fə-taː-f(ə)l is a simple but addictive game of strategy. Roughly translated as “The Kings Table”, the game recalls a time of feuding Viking lords and violent invasions. Popular since 400AD, Hnefatafl has stood the test of time as a great game for all the family. Channel your inner Viking chief and put your warmongering skills to the test with this Nordic inspired set, exclusive National Museums Scotland.
16+
17+
> This premium quality Hnefatafl set contains 37 playing pieces consisting of 1 king, 12 defenders and 24 attackers in two different coloured designs, a natural linen playing board, and playing rules in English, French, German and Japanese.
18+
19+
> Dimensions:
20+
21+
> Board: 29 x 29 cm
22+
23+
> Playing pieces: approx 3cm
24+
25+
## Info
26+
27+
A wooden board was designed in collaboration and made by [Basically Wooden](http://www.basicallywooden.co.uk/)
28+
29+
I decided on 3 symbols from [Symbol Dictionary](http://symboldictionary.net/?page_id=703)
30+
31+
- [Shield Knot](http://symboldictionary.net/?p=146) for Defenders
32+
- [Odins Horn](http://symboldictionary.net/?p=714) for the King's piece
33+
- [Valknut](http://symboldictionary.net/?p=741) for Attackers
34+
35+
![Shield Knot](images/shieldknot.jpg "Shield Knot")
36+
![Odins Horn](images/triplehorn.jpg "Odins Horn")
37+
![Valknut](images/valknut.jpg "Valknut")
38+
39+
![Tafl Board](images/Tafl_board.jpg "Tafl Board")
40+
41+
## Books
42+
43+
I've bought these books which are excellent.
44+
45+
- [Reconstructing Hnefatafl](https://www.amazon.co.uk/Reconstructing-Hnefatafl-Damian-Walker/dp/1291730788/)
46+
- [An Introduction to Hnefatafl](https://www.amazon.co.uk/Introduction-Hnefatafl-Damian-Gareth-Walker/dp/1326372335/)
47+
48+
## Links
49+
50+
- [Wikipedia](https://en.wikipedia.org/wiki/Tafl_games)
51+
- [http://tafl.cyningstan.com](http://tafl.cyningstan.com/)
52+
- [https://boardgamegeek.com/boardgame/2932/hnefatafl](https://boardgamegeek.com/boardgame/2932/hnefatafl)

‎css/bootstrap.3.3.7.min.css

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎css/bootstrap.min.css

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎css/jquery-ui.1.12.1.min.css

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎css/sticky-footer.css

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* Sticky footer styles
2+
/* https://getbootstrap.com/docs/4.0/examples/sticky-footer/sticky-footer.css
3+
-------------------------------------------------- */
4+
html {
5+
position: relative;
6+
min-height: 100%;
7+
}
8+
9+
body {
10+
margin-bottom: 60px; /* Margin bottom by footer height */
11+
}
12+
13+
.footer {
14+
position: absolute;
15+
bottom: 0;
16+
width: 100%;
17+
height: 60px; /* Set the fixed height of the footer here */
18+
line-height: 60px; /* Vertically center the text there */
19+
background-color: #f5f5f5;
20+
}

‎css/styles.css

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
body {
2+
background-color: #D2691E;
3+
}
4+
5+
h1 {
6+
color: #D2691E;
7+
}

‎data/games.json

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"games": [
3+
{
4+
"id": 1,
5+
"name": "Alex vs Sam",
6+
"date": "2016-01-15",
7+
"description": "First game with Sam",
8+
"winner": "Sam",
9+
"loser": "Alex"
10+
},
11+
{
12+
"id": 2,
13+
"name": "Alex vs Kev",
14+
"date": "2016-01-15",
15+
"description": "First game with Kev",
16+
"winner": "Alex",
17+
"loser": "Kev"
18+
},
19+
{
20+
"id": 3,
21+
"name": "Alex vs Sam",
22+
"date": "2016-02-01",
23+
"description": "",
24+
"winner": "Sam",
25+
"loser": "Alex"
26+
},
27+
{
28+
"id": 4,
29+
"name": "Alex vs Sam",
30+
"date": "2016-02-01",
31+
"description": "",
32+
"winner": "Sam",
33+
"loser": "Alex"
34+
},
35+
{
36+
"id": 5,
37+
"name": "Alex vs Sm",
38+
"date": "2016-02-03",
39+
"description": "",
40+
"winner": "Sam",
41+
"loser": "Alex"
42+
},
43+
{
44+
"id": 6,
45+
"name": "Alex vs Sam",
46+
"date": "2016-02-17",
47+
"description": "",
48+
"winner": "Sam",
49+
"loser": "Alex"
50+
},
51+
{
52+
"id": 7,
53+
"name": "Alex vs Sam",
54+
"date": "2016-05-25",
55+
"description": "",
56+
"winner": "Sam",
57+
"loser": "Alex"
58+
},
59+
{
60+
"id": 8,
61+
"name": "Alex vs Kev",
62+
"date": "2017-01-20",
63+
"description": "",
64+
"winner": "Alex",
65+
"loser": "Kev"
66+
},
67+
{
68+
"id": 9,
69+
"name": "Alex vs Kev",
70+
"date": "2017-01-20",
71+
"description": "",
72+
"winner": "Kev",
73+
"loser": "Alex"
74+
},
75+
{
76+
"id": 10,
77+
"name": "Alex vs Sam",
78+
"date": "2017-01-26",
79+
"description": "",
80+
"winner": "Alex",
81+
"loser": "Sam"
82+
},
83+
{
84+
"id": 11,
85+
"name": "Alex vs Kev",
86+
"date": "2017-02-28",
87+
"description": "",
88+
"winner": "Alex",
89+
"loser": "Kev"
90+
}
91+
]
92+
}

‎favicon.ico

116 KB
Binary file not shown.

‎images/Tafl_board.jpg

92.2 KB
Loading

‎images/shieldknot.jpg

10.2 KB
Loading

‎images/tafl.ico

116 KB
Binary file not shown.

‎images/tafl.jpg

35.9 KB
Loading

‎images/triplehorn.jpg

7.98 KB
Loading

‎images/valknut.jpg

7.89 KB
Loading

‎index.html

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<!-- Required meta tags -->
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
8+
<meta name="description" content="Tafl">
9+
<meta name="keywords" content="Hnefatafl">
10+
<meta name="author" content="Alex Hedley">
11+
<!-- Bootstrap CSS -->
12+
<link rel="stylesheet" href="css/bootstrap.min.css">
13+
<link rel="stylesheet" href="css/sticky-footer.css">
14+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
15+
<!-- <link rel="stylesheet" href="css/jquery-ui.min.css"> -->
16+
<link rel="stylesheet" href="css/jquery-ui.1.12.1.min.css">
17+
<link rel="stylesheet" href="css/styles.css">
18+
19+
<link rel="shortcut icon" href="favicon.ico">
20+
21+
<!-- Fonts -->
22+
<!-- <link href='https://fonts.googleapis.com/css?family=Orbitron' rel='stylesheet' type='text/css'> -->
23+
24+
<title>Tafl</title>
25+
</head>
26+
<body ng-app="myApp">
27+
28+
<!-- Begin page content -->
29+
<main role="main" class="container">
30+
31+
<section class="jumbotron title-container text-center">
32+
<div>
33+
<h1>Tafl</h1>
34+
35+
<div class="row justify-content-md-center">
36+
<div class="col-lg-8">
37+
<div class="input-group search-bar">
38+
<input type="text" class="form-control" ng-model='searchText' placeholder="Search for a game..." aria-label="Search">
39+
<button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
40+
</div>
41+
</div>
42+
</div>
43+
44+
</div>
45+
</section>
46+
47+
<div ng-controller="myController">
48+
49+
<div class="container">
50+
<div class="row">
51+
<div
52+
ng-repeat="game in games | filter:searchText"
53+
class="col-md-4"
54+
style="margin-bottom: 50px;"
55+
>
56+
<div class="card" style="width: 18rem;">
57+
<div class="card-body">
58+
<h5 class="card-title">{{game.name}}</h5>
59+
<p class="card-text">{{game.description}}</p>
60+
<p class="card-text">{{game.date}}</p>
61+
<p class="card-text">Winner: <strong>{{game.winner}}</strong></p>
62+
<span class="badge badge-secondary">{{game.winner_count}}</span>
63+
<p class="card-text">Loser: {{game.loser}}</p>
64+
<span class="badge badge-secondary">{{game.loser_count}}</span>
65+
</div>
66+
</div>
67+
</div>
68+
</div>
69+
</div>
70+
71+
</div>
72+
73+
</main>
74+
75+
<footer class="footer">
76+
<div class="container">
77+
<span class="text-muted">Alex Hedley.</span>
78+
</div>
79+
</footer>
80+
81+
<!-- Optional JavaScript -->
82+
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
83+
<script src="js/jquery-3.3.1.min.js" ></script>
84+
<script>window.jQuery || document.write('<script src="js/jquery-slim.min.js"><\/script>')</script>
85+
<script src="js/jquery-ui.min.js"></script>
86+
<!-- <script src="js/jquery-ui.1.12.1.min.js"></script> -->
87+
<!-- <script src="js/popper.min.js"></script> -->
88+
<script src="js/bootstrap.min.js"></script>
89+
<!-- <script src="js/jquery.pretty-text-diff.min.js"></script> -->
90+
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js"></script> -->
91+
<!-- <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.5/angular.min.js"></script> -->
92+
<script src="js/angular.min.js"></script>
93+
<script src="js/app.js"></script>
94+
</body>
95+
</html>

‎js/angular.min.js

+347
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎js/app.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
var myApp = angular.module('myApp',[]);
2+
myApp.controller('myController', function ($scope, $http, $q, $filter) {
3+
4+
$scope.games = [];
5+
6+
$scope.init = function () {
7+
getData();
8+
}
9+
10+
getData = () => {
11+
var file = 'data/games.json';
12+
13+
$http.get(file)
14+
.then(function(response) {
15+
$scope.games = response.data.games;
16+
});
17+
};
18+
19+
$scope.init();
20+
});

‎js/bootstrap.min.js

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎js/bootstrap3.3.7.min.js

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎js/jquery-3.3.1.min.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎js/jquery-slim.min.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎js/jquery-ui.min.js

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎js/popper.min.js

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.