This repository has been archived by the owner on May 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathfoot.php
70 lines (64 loc) · 1.75 KB
/
foot.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<hr>
<footer id="footer">
<div class="row">
<div class="col col-sm-6">
<p>
<i class="icon-heart"></i> Powered by <a href='https://github.com/TomHetmer/Runtime'>Runtime</a>.
</p>
</div>
<div class="col col-sm-6">
<form method="POST">
<input type="hidden" name="page" value="<?php echo $_GET['page']; if(isset($_GET['id'])) {echo '?id='.$_GET['id'];} ?>">
<select class="form-control pull-right" name="locale">
<option value="cs" <?php if($_GET['locale'] == 'cs') echo "selected" ?>>česky</option>
<option value="en" <?php if($_GET['locale'] == 'en') echo "selected" ?>>english</option>
</select>
<input type="submit" class="js-hide">
</form>
</div>
</div>
</footer>
</div>
<script src='//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.0/js/bootstrap.min.js'></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.1.0/jquery.timeago.min.js"></script>
<script src='/static/live-form-validation.js'></script>
<script>
$(document).on('change', 'select[name="locale"]', function() {
$(this).parents('form').submit();
});
</script>
<?php
if($_GET['locale'] == 'cs') {
?>
<script>
$(document).ready(function() {
jQuery.timeago.settings.strings = {
prefixAgo: "před",
prefixFromNow: null,
suffixAgo: null,
suffixFromNow: null,
seconds: "méně než minutou",
minute: "minutou",
minutes: "%d minutami",
hour: "hodinou",
hours: "%d hodinami",
day: "1 dnem",
days: "%d dny",
month: "1 měsícem",
months: "%d měsíci",
year: "1 rokem",
years: "%d roky"
};
});
</script>
<?php
}
?>
<script>
$(document).ready(function() {
$("time.timeago").timeago();
$('.js-hide').hide();
});
</script>
</body>
</html>