mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-21 23:08:42 +00:00
feat: new markdown style
This commit is contained in:
parent
bb5de2a00e
commit
d2a07c5265
@ -267,9 +267,10 @@ $('#contest-countdown').countdown(<?= $contest['end_time']->getTimestamp() - UOJ
|
||||
<li class="nav-item"><a class="nav-link" href="/contest/<?= $contest['id'] ?>" role="tab"><?= UOJLocale::get('contests::back to the contest') ?></a></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
<link rel="stylesheet" type="text/css" href="<?= HTML::url('/css/markdown.css') ?>">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-statement">
|
||||
<article class="top-buffer-md"><?= $problem_content['statement'] ?></article>
|
||||
<article class="top-buffer-md markdown-body"><?= $problem_content['statement'] ?></article>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab-submit-answer">
|
||||
<div class="top-buffer-sm"></div>
|
||||
|
@ -214,7 +214,8 @@ EOD
|
||||
ob_start();
|
||||
if ($this->type == 'blog') {
|
||||
echoUOJPageHeader('博客预览', array('ShowPageHeader' => false, 'REQUIRE_LIB' => array('mathjax' => '', 'shjs' => '')));
|
||||
echo '<article>';
|
||||
echo '<link rel="stylesheet" type="text/css" href="' . HTML::url('/css/markdown.css') . '">';
|
||||
echo '<article class="markdown-body">';
|
||||
echo $this->post_data['content'];
|
||||
echo '</article>';
|
||||
echoUOJPageFooter(array('ShowPageFooter' => false));
|
||||
|
@ -14,13 +14,14 @@
|
||||
|
||||
$blog_type = $blog['type'] == 'B' ? 'post' : 'slide';
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="<?= HTML::url('/css/markdown.css') ?>">
|
||||
<h2><?= $extra_text ?><a class="header-a" href="<?= HTML::blog_url(UOJContext::userid(), '/post/'.$blog['id']) ?>"><?= $blog['title'] ?></a></h2>
|
||||
<div><?= $blog['post_time'] ?> <strong>By</strong> <?= getUserLink($blog['poster']) ?></div>
|
||||
<?php if (!$show_title_only): ?>
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<?php if ($blog_type == 'post'): ?>
|
||||
<article><?= $content ?></article>
|
||||
<article class="markdown-body"><?= $content ?></article>
|
||||
<?php elseif ($blog_type == 'slide'): ?>
|
||||
<article>
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
|
2
web/css/markdown.css
Normal file
2
web/css/markdown.css
Normal file
File diff suppressed because one or more lines are too long
@ -11,6 +11,10 @@ body {
|
||||
min-height: 250px;
|
||||
}
|
||||
|
||||
.uoj-content img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.uoj-footer {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
@ -46,9 +50,6 @@ a sub {
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
article p {
|
||||
text-indent: 2em;
|
||||
}
|
||||
.markdown-editor-out p {
|
||||
text-indent: 2em;
|
||||
word-break: break-all;
|
||||
|
Loading…
Reference in New Issue
Block a user