Дополнил доки API
This commit is contained in:
parent
d5d15c1a57
commit
d30c4f011d
26
api/API.md
26
api/API.md
@ -3,7 +3,7 @@
|
||||
|
||||
## GET vs. POST
|
||||
|
||||
Some parts of API accepts both GET and POST type requests. We recommend you to prefer second option, when it's possible, just because it is more anonymous, when used with SSL or Tor. However, authentification can be performed **only** with POST.
|
||||
Some parts of API accepts both GET and POST type requests. We recommend you to prefer second option, when it's possible, just because it is more private, when used with SSL or Tor. However, authentification and authenticated requests can be performed **only** with POST.
|
||||
|
||||
|
||||
## Naming conventions
|
||||
@ -13,5 +13,25 @@ Files starting from "_" ("_example.php") are intended for internal use only.
|
||||
|
||||
## Version 1
|
||||
|
||||
- stats.php (GET/POST): all general, public and private statistics about this instance
|
||||
- post/create.php (POST): create new post with image
|
||||
- stats.php (GET/POST): all general statistics about this instance
|
||||
|
||||
- admin/ (POST): private statistics about this instance
|
||||
- admin/dbview.php (POST): manage databases
|
||||
- admin/nukelock.php (POST): emergency "red button" to lock all operations to read-only mode
|
||||
|
||||
- user/ (GET/POST): get user information by id
|
||||
- user/list.php (GET/POST): get list of all users
|
||||
- user/create.php (POST): create new user account
|
||||
- user/edit.php (POST): edit user profile
|
||||
- user/delete.php (POST): delete user account
|
||||
|
||||
- post/ (GET/POST): get single post by id
|
||||
- post/list.php (GET/POST): get list of posts from range
|
||||
- post/create.php (POST): create new post with image
|
||||
- post/edit.php (POST): edit tags of post
|
||||
- post/delete.php (POST): delete post
|
||||
|
||||
- post/comments/ (GET/POST): show all comments from post by id
|
||||
- post/comments/create.php (POST): create new comment
|
||||
- post/comments/edit.php (POST): edit existing comment
|
||||
- post/comments/delete.php (POST): remove existing comment
|
BIN
front/styles/bg_pattern_peace.png
Normal file
BIN
front/styles/bg_pattern_peace.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 807 B |
BIN
front/styles/bg_pattern_peace_old.png
Normal file
BIN
front/styles/bg_pattern_peace_old.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 822 B |
@ -1,47 +1,51 @@
|
||||
body,div,h1,h2,h3,h4,h5,h6,p,ul,li,dd,dt {
|
||||
body, div, h1, h2, h3, h4, h5, h6, p, ul, li, dd, dt {
|
||||
font-family: Verdana, Sans-Serif;
|
||||
}
|
||||
|
||||
body, div, p, a {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, p, a {
|
||||
color: #00c07c;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #009049;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: #049e59;
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-position: 50% 0%;
|
||||
background-color: #094e59;
|
||||
background-image: url("./bg_pattern_peace.png");
|
||||
background-repeat: repeat;
|
||||
}
|
||||
|
||||
p, a {
|
||||
color: #009409;
|
||||
div.wrapper {
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
/*#page {
|
||||
background: none !important; А это на кой???
|
||||
/*div.wrapper img {
|
||||
width: 60%;
|
||||
height: 60%;
|
||||
}*/
|
||||
|
||||
#links {
|
||||
h1.title {
|
||||
font-size: 4em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.nav {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
#links > a {
|
||||
div.nav > a {
|
||||
padding: 0.25rem 0.25rem;
|
||||
}
|
||||
|
||||
div#a-home {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
top: 28em;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.mascotbox {
|
||||
z-index: 1;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-position: 50% 0;
|
||||
div.nibbabox {
|
||||
margin: 10px auto;
|
||||
padding: 2px 0;
|
||||
width: 480px;
|
||||
@ -51,37 +55,16 @@ div#a-home {
|
||||
text-shadow: 0 0 2px black, 0 0 6px black;
|
||||
}
|
||||
|
||||
.mascotbox:before {
|
||||
z-index: -1;
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 200vw;
|
||||
height: 200vh;
|
||||
top: -100px;
|
||||
left: -100px;
|
||||
|
||||
background-image: inherit;
|
||||
background-color: inherit;
|
||||
background-repeat: inherit;
|
||||
background-attachment: inherit;
|
||||
background-position: inherit;
|
||||
filter: blur(8px);
|
||||
}
|
||||
|
||||
#searchbox {
|
||||
div.searchbox {
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.news-excerpt {
|
||||
padding: 5px 1em 0 1em;
|
||||
}
|
||||
|
||||
#searchbox3, #news-excerpt-box .previous-news-link {
|
||||
div.notsearchbox {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
@media only screen and (max-height: 600px) {
|
||||
div#a-home {
|
||||
div.wrapper {
|
||||
top: 25vh;
|
||||
}
|
||||
}
|
99
index.html
99
index.html
@ -5,66 +5,55 @@
|
||||
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
|
||||
<meta name="theme-color" content="#00549e">
|
||||
<!-- <meta name="theme-color" content="#00549e"> -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!--TODO-->
|
||||
<link rel="stylesheet" href="./front/styles/default.css">
|
||||
<script src="./front/scripts/some_script.js" type="text/javascript" integrity="1234"></script>
|
||||
<!-- <script src="./front/scripts/some_script.js" type="text/javascript" integrity="1234"></script> -->
|
||||
</head>
|
||||
<body class="c-static a-home resp">
|
||||
<div id="page">
|
||||
<div id="c-static">
|
||||
<div id="a-home">
|
||||
<div id="searchbox" class='mascotbox'>
|
||||
<div id="static-index">
|
||||
<h1 style="font-size: 4em;"><a href="./">E949</a></h1>
|
||||
<div id="links">
|
||||
<a title="Login or sign up" href="./session/new">Login/Signup</a>
|
||||
<a title="A paginated list of every post" href="./posts">Posts</a>
|
||||
<a title="A paginated list of every comment" href="./comments">Comments</a>
|
||||
<a title="A paginated list of every tag" href="./tags">Tags</a>
|
||||
<a title="Wiki" href="./wiki_pages?title=help%3Ahome">Wiki</a>
|
||||
<a title="Forum" href="./forum_topics">Forum</a>
|
||||
<a title="A site map" href="./static/site_map">»</a>
|
||||
</div>
|
||||
<div>
|
||||
<form action="./posts" accept-charset="UTF-8" method="get">
|
||||
<div>
|
||||
<input type="text" name="tags" id="tags" value="" size="30" autofocus="autofocus" data-autocomplete="tag-query"><br>
|
||||
<input type="submit" value="Search">
|
||||
<input type="button" value="Change Mascot" id="change-mascot">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mascot_artist'>
|
||||
<!-- *пустота* -->
|
||||
</div>
|
||||
</div>
|
||||
<div id='searchbox2' class='mascotbox'>
|
||||
<img src="./images/counter/3.png">
|
||||
<img src="./images/counter/4.png">
|
||||
<img src="./images/counter/5.png">
|
||||
<img src="./images/counter/1.png">
|
||||
<img src="./images/counter/9.png">
|
||||
<img src="./images/counter/5.png">
|
||||
<img src="./images/counter/3.png">
|
||||
</div>
|
||||
<div id="news-excerpt-box" class="mascotbox">
|
||||
<div class="news-excerpt dtext-container">Site Maintenance: Wednesday, April 12</div>
|
||||
<div class="previous-news-link"><a href="./news_updates">Click here for previous news</a></div>
|
||||
</div>
|
||||
<div id='searchbox3' class='mascotbox'>
|
||||
<p>
|
||||
Serving 3,451,953 posts<br>
|
||||
<a title="Takedown Information" href="./static/takedown">Takedown Policy and Process</a> |
|
||||
<a title="Contact Us" href="./static/contact">Contact Us</a> |
|
||||
<a title="Advertising with Us" href="./help/advertising">Advertising</a> |
|
||||
<a title="Terms of Service" href="./static/terms_of_service">Terms of Service</a> |
|
||||
<a title="Privacy Policy" href="./static/privacy">Privacy</a>
|
||||
</p>
|
||||
</div>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="nibbabox notsearchbox">
|
||||
<img src="./test.png">
|
||||
</div>
|
||||
<div class="nibbabox searchbox">
|
||||
<h1 class="title"><a href="./">E949</a></h1>
|
||||
<div class="nav">
|
||||
<a title="Login in existing account" href="./account/login.php">Login</a>
|
||||
<a title="Create new account" href="./account/create.php">Signup</a>
|
||||
<!-- <a title="Account page" href="./account/">Username123</a> -->
|
||||
<a title="A paginated list of every post" href="./posts/">Posts</a>
|
||||
<a title="A paginated list of every tag" href="./tags/">Tags</a>
|
||||
<a title="Statistics of current instance" href="./stats.php">Statistics</a>
|
||||
<a title="A site map" href="./site_map.php">Site map</a>
|
||||
</div>
|
||||
<div>
|
||||
<form action="./posts" accept-charset="UTF-8" method="get">
|
||||
<input type="text" name="tags" id="tags" value="" size="30" autofocus="autofocus" data-autocomplete="tag-query"><br>
|
||||
<input type="submit" value="Search">
|
||||
<input type="button" value="Change Mascot" id="change-mascot">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nibbabox notsearchbox">
|
||||
<img src="./images/counter/3.png">
|
||||
<img src="./images/counter/4.png">
|
||||
<img src="./images/counter/5.png">
|
||||
<img src="./images/counter/1.png">
|
||||
<img src="./images/counter/9.png">
|
||||
<img src="./images/counter/5.png">
|
||||
<img src="./images/counter/3.png">
|
||||
</div>
|
||||
<div class="nibbabox notsearchbox">
|
||||
<p>
|
||||
Serving 3,451,953 posts<br>
|
||||
<a title="Takedown Information" href="./static/takedown">Takedown Policy and Process</a> |
|
||||
<a title="Contact Us" href="./static/contact">Contact Us</a> |
|
||||
<a title="Advertising with Us" href="./help/advertising">Advertising</a> |
|
||||
<a title="Terms of Service" href="./static/terms_of_service">Terms of Service</a> |
|
||||
<a title="Privacy Policy" href="./static/privacy">Privacy</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user