implemented image upload and cropping system, mostly work. it's too zoomed in and appears to be using the xy coords from the top left of the crop selector.
This commit is contained in:
@@ -46,12 +46,29 @@ function article_page_from_markdown($article_id)
|
||||
{
|
||||
$query = 'SELECT * FROM article WHERE article_id = ' . $article_id . ';';
|
||||
$article = query_one_result($query);
|
||||
|
||||
$query = 'SELECT user_id, username, profile_picture FROM user WHERE user_id = ' . $article['author_id'] . ';';
|
||||
$author = query_one_result($query);
|
||||
|
||||
$markdown = read_file_one_string($_ENV['ARTICLES_PATH'] . $article_id . '/article.md');
|
||||
|
||||
$parsedown = new Parsedown();
|
||||
|
||||
$html = '<div class="article">';
|
||||
$html .= '<h3>' . $article['title'] . '</h3>';
|
||||
$html = '
|
||||
<div class="article">
|
||||
<h3>' . $article['title'] . '</h3>
|
||||
<div class="row">
|
||||
<div class="col_right">
|
||||
<h5>Written by <a href="user.php?action=view&user_id=' . $author['user_id'] . '" style="font-size: 1.5vw;">' . $author['username'] . '</a></h5>
|
||||
<p>Published on ' . $article['published_at'] . '</p>
|
||||
</div>
|
||||
<div class="card_pic_box">
|
||||
<img src="/profile_pictures/' . $author['profile_picture'] . '" class="card_profile_picture" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="line" style="margin-bottom: 15px;"></div>
|
||||
';
|
||||
|
||||
$html .= $parsedown->text($markdown);
|
||||
$html .= '</div>';
|
||||
|
||||
@@ -91,7 +108,7 @@ function article_card($article_id)
|
||||
<small>Published: ' . $article['published_at'] . '</small>
|
||||
</div>
|
||||
<div class="card_pic_box">
|
||||
<img src="/profile_pictures/' . $author['profile_picture'] . '" class="card_profile_picture">
|
||||
<img src="' . $_ENV['PROFILE_IMAGES_PQ_PATH'] . $author['profile_picture'] . '" class="card_profile_picture">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user