rollup and roll down big posts. fix some button css
This commit is contained in:
parent
b45d101657
commit
94221611c1
|
@ -38,10 +38,28 @@ body {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-preview {
|
.post-content {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
min-height: 5em;
|
||||||
|
height: 5em;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-content blockquote {
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-slider {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.post-delete, .post-edit {
|
.post-delete, .post-edit {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
12
js/funcs.js
12
js/funcs.js
|
@ -42,4 +42,16 @@ $(document).ready( function () {
|
||||||
form.submit();
|
form.submit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".content-slider").click(function (e) {
|
||||||
|
var contentDiv = $(this).parents('.news-row').find('.post-content');
|
||||||
|
if (contentDiv.hasClass("state-up")) {
|
||||||
|
contentDiv.removeClass('state-up').addClass('state-down').animate({height: '100%'});
|
||||||
|
$(this).html('^');
|
||||||
|
} else {
|
||||||
|
contentDiv.removeClass('state-down').addClass('state-up').animate({height: '5em'});
|
||||||
|
$(this).html('v');
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
{{if .user}}
|
{{if .user}}
|
||||||
<li><a href="">{{.user.Username}}</a></li>
|
<li><a href="">{{.user.Username}}</a></li>
|
||||||
<li><form method="POST" action="/logout">{{ .csrfField }}<input type="submit" value="Logout" class="btn btn-sm btn-primary btn-block" /></form></li>
|
<li><form method="POST" action="/logout">{{ .csrfField }}<input type="submit" value="Logout" class="btn-sm btn-primary btn-block" /></form></li>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li><a href="/login">Log in</a></li>
|
<li><a href="/login">Log in</a></li>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -35,7 +35,7 @@ new category select
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-1">
|
<div class="col-xs-1">
|
||||||
<form method="POST" action="/categories/{{.category.Id}}/delete" class="cat-delete">{{ $.csrfField }}
|
<form method="POST" action="/categories/{{.category.Id}}/delete" class="cat-delete">{{ $.csrfField }}
|
||||||
<input type="submit" class="btn btn-sm btn-block" value="Delete" />
|
<input type="submit" class="btn btn-default btn-sm btn-block" value="Delete" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-3">
|
<div class="col-xs-3">
|
||||||
|
|
|
@ -39,17 +39,21 @@
|
||||||
<div class="col-xs-8 post-url">
|
<div class="col-xs-8 post-url">
|
||||||
<a href="{{.post.Url}}">{{truncate .post.Url 100}}</a>
|
<a href="{{.post.Url}}">{{truncate .post.Url 100}}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-2 post-edit"><a href="/news/{{.post.Id}}/edit" class="btn btn-sm btn-block">Edit</a></div>
|
<div class="col-xs-2 post-edit"><a href="/news/{{.post.Id}}/edit" class="btn btn-default btn-sm btn-block">Edit</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-2"> </div>
|
<div class="col-xs-2"> </div>
|
||||||
<div class="col-xs-8 post-content"> {{ .post.HTMLNotes }}</div>
|
<div class="col-xs-8 post-content state-up"> {{ .post.HTMLNotes }}</div>
|
||||||
<div class="col-xs-2 post-delete">
|
<div class="col-xs-2 post-delete">
|
||||||
<form method="POST" action="/news/{{.post.Id}}/delete" class="confirm-news-delete">{{ .csrfField }}
|
<form method="POST" action="/news/{{.post.Id}}/delete" class="confirm-news-delete">{{ .csrfField }}
|
||||||
<input type="submit" class="btn btn-sm btn-block" value="Delete" />
|
<input type="submit" class="btn btn-default btn-sm btn-block" value="Delete" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-2"> </div>
|
||||||
|
<div class="col-xs-8 btn-default btn content-slider state-up">v</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue