-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhome_page.html
108 lines (76 loc) · 4.06 KB
/
home_page.html
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Alef|Varela+Round&display=swap" rel="stylesheet">
<link rel="icon" type="image/png" href="img/icons/logo_icon.png">
<link rel="stylesheet" href="css/mefathim.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<script src="js/load.js"></script>
<script src="js/version.js"></script>
<title>דף הבית</title>
</head>
<body dir="rtl">
<nav id="nav" class="navbar navbar-expand-sm bg-light navbar-light"></nav>
<h1>ברוכים הבאים לאתר מפתחים!</h1>
<div class="container" >
<div class="row">
<div id="now_logged" class="col-3 text-top"></div>
<div class="col-5 align-top post_area" id= "post_area" >
<button id="write" class="button" onclick="document.getElementById('write_post').style.display = 'block';">הוספת פוסט</button>
<div id="write_post" style="display: none;">
<textarea val = "gg"class="new_post " id="text" placeholder="פרסם פוסט" ></textarea><br>
<div class="row" id ='button_container' style="margin-right: 0px;">
<button class="post_button" id="send" >שלח</button>
<button class="post_button" id="cancel">בטל</button>
<p>
<p style=" margin-right: 10px; margin-left: 3px;"> תפוצה: </p>
<select id="circulation" style="height: min-content; padding: 2px; width: 95px">
<option value="0">רק אני</option>
<option value="1" selected="selected" >החברים</option>
<option value="2">כולם</option>
</select>
</p>
</div>
</div>
<hr/>
<div class="posts "></div>
</div>
</div>
</div>
<div class="fixed-bottom" id="version" ></div>
<script>
$(document).ready(function(){
get_connected_users();
set_refresh();
buildnavbar();
$("#version").append("גירסה: "+get_version()+"") ;
$('#post_area').find('#cancel').click(function() {
$('#post_area').find('#write_post').hide();
// set_refresh();
});
num_friend_requests();
//myVar = setInterval(alertFunc, 2000, "First parameter", "Second parameter");
});
$(document).ready(function(){
print_post();
$("#send").click(function()
{
$.post("scripts/add_post.py",
{
text: $("#text").val(),
circulation:$( "#circulation").val(),
}, function()
{
print_post();
$("#write_post").hide();
});
$("#text").val('');
});
});
</script>
</body>
</html>