Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

Commit

Permalink
blog-detailのスタイル調整とmarkdown以下のhnタグのスタイリング仮上げ
Browse files Browse the repository at this point in the history
  • Loading branch information
tunacook committed Oct 21, 2014
1 parent 66e1baf commit b1768a9
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 67 deletions.
66 changes: 21 additions & 45 deletions src/statics/less/blogs.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
}
.blog-article-header {
.clearfix();
margin-bottom: 20px;

}
.article-wrap {
Expand Down Expand Up @@ -60,14 +61,13 @@
background: #fff;
border: 1px solid #ddd;
display: inline-block;
padding: 5px;
margin-left: 6px;
width: 120px;
display: inline-block;
vertical-align: middle;
padding: 5px;
width: 110px;
margin: 0;
color: @text-color;
border-radius: 5px;
font-size: 12px;
}
&:hover {
text-decoration: none;
Expand All @@ -79,16 +79,19 @@
}
}
}


}
&.entry-item-right {
padding-left: 0;
}
}

}

.entry-item-right {
.blog-administration {
.blog-administration-head {
color: #fff;
background: @navbar-default-bg;
border-color: @navbar-default-bg;
}
}
}

// 内部公開記事用のスタイル
.bg-protected {
Expand All @@ -102,58 +105,31 @@
// Ref: http://line25.com/tutorials/how-to-create-a-cool-blog-post-date-icon-with-css
// 使い方
// <div class="date"><p>10<span>July</span></p></div>

.date {
line-height: 1;
width: 65px; height: 89px;
margin-right: 20px;
padding: 8px 0 0 0;
background: #fcfcfc;
background: linear-gradient(to bottom, #fcfcfc, #dad8d8);
border: 1px solid #d2d2d2;
background: @navbar-default-bg;
border-radius: 5px;
p {
font-family: Helvetica, sans-serif;
font-size: 50px; text-align: center; color: #9e9e9e;
font-size: 50px; text-align: center; color: #fff;
span {
background: @brand-primary;
font-size: 22px;
//background: @brand-primary;
font-size: 14px;
font-weight: bold;
color: #fff;
text-transform: uppercase;
display: block;
border-top: 2px solid darken(@brand-primary, 5%);
.border-bottom-radius(5px);
//border-top: 2px solid darken(@brand-primary, 5%);

padding: 4px 0 1px 0;
}
}
}
.entry-title {
font-size: 32px;
margin: 25px 0 0;
margin: 30px 0 0;
}
.markdown {
h1 {
margin-bottom: 0;
}
h2 {
padding: 5px;
border-left: 10px solid @text-color;
background: #f5f5f5;
font-size: 28px;
border-bottom: 2px dotted #666;
}
h3 {
border-bottom: 3px solid @text-color;
font-size: 24px;
padding-bottom: 5px;
padding-left: 5px;
margin-top: 25px;
}
h4 {
font-size: 18px;
padding-left: 5px;
padding-bottom: 5px;
border-bottom: 1px dotted #999;
}
}

5 changes: 0 additions & 5 deletions src/statics/less/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,6 @@ span {
background: #FCF8E3;
}

.markdown {
a {
word-break: break-all;
}
}
// 神降臨
.god {
position: fixed;
Expand Down
46 changes: 39 additions & 7 deletions src/statics/less/markdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,53 @@
p {
margin-left: 5px;
}
a {
word-break: break-all;
}
h1 {
font-size: 30px;
font-size: 28px;
color: white;
padding: 6px;
background-color: @brand-primary;
background-image: url("../img/markdown-h1-bg.png");
padding: 10px;
background: @navbar-default-bg;
background-repeat: repeat;
margin-bottom: 20px;
text-shadow: 0px 1px 2px #666;
}
h2 {
border-bottom: solid 1px desaturate(lighten(@text-color, 60%), 40%);
margin-bottom: 20px;
padding-bottom: 3px;
padding: 8px;
border-left: 10px solid @text-color;
background: #f5f5f5;
font-size: 24px;
border-bottom: 2px dotted #999;
}
h3 {
border-bottom: 3px solid @text-color;
font-size: 24px;
padding-bottom: 5px;
padding-left: 5px;
margin-top: 25px;
}
h4 {
font-size: 18px;
padding-left: 5px;
padding-bottom: 5px;
border-bottom: 1px dotted #999;
}
// h1 {
// font-size: 30px;
// color: white;
// padding: 6px;
// background-color: @brand-primary;
// background-image: url("../img/markdown-h1-bg.png");
// background-repeat: repeat;
// margin-bottom: 20px;
// text-shadow: 0px 1px 2px #666;
// }
// h2 {
// border-bottom: solid 1px desaturate(lighten(@text-color, 60%), 40%);
// margin-bottom: 20px;
// padding-bottom: 3px;
// }
h6 {
color: @gray-light;
}
Expand Down
36 changes: 26 additions & 10 deletions src/templates/blogs/components/entry_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="row list-group article-wrap">
<div class="entry-item entry-date col-xs-12 col-md-1">
<div class="date">
<p>{{ object.created_at|date:"d" }}<span>{{ object.created_at|date:"M" }}</span></p>
<p>{{ object.created_at|date:"d" }}<span>{{ object.created_at|date:"Y/m" }}</span></p>
</div>

</div>
Expand All @@ -23,6 +23,8 @@ <h1>{{ object.title }}</h1>
</div>

</div>


<div class="entry-item entry-item-right col-xs-12 col-md-2">
<dl class="blog-author">
<dt><span class="glyphicon glyphicon-pencil"></span><span>{% trans "Blog author" %}</span></dt>
Expand All @@ -37,16 +39,30 @@ <h1>{{ object.title }}</h1>

</dd>
</dl>
{% if user has 'blogs.change_entry' of object %}
<a href="{% url 'blogs_entry_update' author=user.username pk=object.pk %}" class="btn btn-default btn-sm">Edit</a>
{% endif %}
{% if user has 'blogs.delete_entry' of object %}
<a href="{% url 'blogs_entry_delete' author=user.username pk=object.pk %}" class="btn btn-danger btn-sm post-link" confirm-message="{% trans "Do you want to delete this entry?" %}">
Delete This Entry
<form method="POST" style="display: none;">{% csrf_token %}</form>
</a>
{% endif %}

{% if user has 'blogs.change_entry' or user has 'blogs.delete_entry' of object %}
<div class="panel panel-default blog-administration">
<div class="panel-heading blog-administration-head">
<h2 class="panel-title">{% trans "Administration" %}</h2>
</div>
<div class="list-group">
{% if user has 'blogs.change_entry' of object %}
<a class="list-group-item" href="{% url 'blogs_entry_update' author=user.username pk=object.pk %}"><span class="glyphicon glyphicon-pencil"></span> {% trans "Entry Edit" %}</a>
{% endif %}
{% if user has 'blogs.delete_entry' of object %}
<a class="list-group-item list-group-item-danger" href="{% url 'blogs_entry_delete' author=user.username pk=object.pk %}" confirm-message="{% trans "Do you want to delete this entry?" %}"><span class="glyphicon glyphicon-remove"></span> {% trans "Entry Delete" %}</a>
{% endif %}
</div>
</div>
{% endif %}


</div>






</div>

0 comments on commit b1768a9

Please sign in to comment.