diff --git a/SinkDark/article/models.py b/SinkDark/article/models.py index b18762c..957c542 100644 --- a/SinkDark/article/models.py +++ b/SinkDark/article/models.py @@ -24,6 +24,7 @@ class ArticleInfo(models.Model): title = models.CharField('标题', max_length=200) content = MDTextField(verbose_name='内容') rendered = RichTextUploadingField(verbose_name='最终内容', default='

默认内容

', editable=False) + brief = RichTextUploadingField(verbose_name='简介', default='简介') articlephoto = models.ImageField('文章图片', blank=True, upload_to='images/article/') reading = models.IntegerField('阅读量', default=0) liking = models.IntegerField('点赞量', default=0) diff --git a/SinkDark/publicStatic/css/base.css b/SinkDark/publicStatic/css/base.css index a53649d..e57de61 100644 --- a/SinkDark/publicStatic/css/base.css +++ b/SinkDark/publicStatic/css/base.css @@ -42,7 +42,7 @@ a:hover { text-decoration: none; color: #000; } } .main { overflow: hidden; - width: 68%; + width: 100%; margin: 0 auto; /* 添加左右自动外边距以实现水平居中 */ display: block; /* 已经是默认值,但保持清晰 */ } diff --git a/SinkDark/publicStatic/css/info.css b/SinkDark/publicStatic/css/info.css index 2eb9a64..395433c 100644 --- a/SinkDark/publicStatic/css/info.css +++ b/SinkDark/publicStatic/css/info.css @@ -1,4 +1,4 @@ -@charset "gb2312"; +@charset "UTF-8"; .infosbox { overflow: hidden; background: rgba(255,255,255,0.8); margin-bottom: 20px } .newsview { padding: 0 30px } .news_con a { color: #0e6dad } diff --git a/SinkDark/templates/article.html b/SinkDark/templates/article.html index 28c430e..ef2ca3c 100644 --- a/SinkDark/templates/article.html +++ b/SinkDark/templates/article.html @@ -15,7 +15,7 @@

{{ list.title }}

-

{{ list.rendered|safe }}

+

{{ list.brief|safe }}

{% endfor %} diff --git a/SinkDark/templates/base.html b/SinkDark/templates/base.html index dcd0442..5e2442c 100644 --- a/SinkDark/templates/base.html +++ b/SinkDark/templates/base.html @@ -27,14 +27,11 @@ - - + {% verbatim %} + + {% endverbatim %}