A new presentation, using parallax effects
* style.css: Makes a better style * Banner.png: Made obsolete * Profile.cs: Groups profile properties * ChangeLog: * ChangeLog: Must not exist in the source tree * Web.config: * instdbws.sql: Groups profile properties * App.master: A better Html structure * AccountController.cs: Fixes the Profile edition * MarkdownHelper.cs: Adds an extraction of an introduction from a Markdown text * Edit.aspx: * Index.aspx: * UserPost.aspx: a better html structure * UserPosts.aspx: * a better html structure * post previews * Web.csproj: Adds and removes images
This commit is contained in:
parent
c10a78841b
commit
5da977daef
15 changed files with 372 additions and 202 deletions
|
|
@ -11,17 +11,18 @@
|
|||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<h1><div id="vtitle" for="Title" class="post title editable"><%=Html.Markdown(Model.Title)%></div></h1>
|
||||
<div id="vcontent" for="Content" class="post content editable">
|
||||
<%=Html.Markdown(Model.Content,"/bfiles/"+Model.Id+"/")%>
|
||||
</div>
|
||||
<div>
|
||||
<% using(Html.BeginForm("ValidateEdit","Blogs")) { %>
|
||||
<fieldset>
|
||||
<legend>Billet</legend>
|
||||
<%= Html.LabelFor(model => model.Title) %> <%= Html.ValidationMessage("Title") %> : <br>
|
||||
<input name="Title" id="Title">
|
||||
<input name="Title" id="Title" class="fullwidth">
|
||||
<br>
|
||||
<%= Html.LabelFor(model => model.Content) %>
|
||||
<%= Html.ValidationMessage("Content") %>: <br>
|
||||
<textarea id="Content" name="Content"><%=Html.Markdown(Model.Content)%></textarea><br>
|
||||
<style> #Content { }
|
||||
</style>
|
||||
<textarea id="Content" name="Content" class="fullwidth" ><%=Html.Markdown(Model.Content)%></textarea><br>
|
||||
|
||||
<%= Html.CheckBox( "Visible" ) %>
|
||||
<%= Html.LabelFor(model => model.Visible) %>
|
||||
|
|
@ -37,7 +38,16 @@
|
|||
<%=Html.Hidden("Author")%>
|
||||
<%=Html.Hidden("Id")%>
|
||||
<input type="submit">
|
||||
</fieldset>
|
||||
<% } %>
|
||||
</div>
|
||||
<div class="post">
|
||||
<h1><div id="vtitle" for="Title" class="post title editable"><%=Html.Markdown(Model.Title)%></div></h1>
|
||||
<div id="vcontent" for="Content" class="post content editable">
|
||||
<%=Html.Markdown(Model.Content,"/bfiles/"+Model.Id+"/")%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
jQuery('#vtitle').hallo({
|
||||
|
|
@ -166,16 +176,18 @@ function submitFile()
|
|||
{ submitFilesTo('PostFile'); }
|
||||
</script>
|
||||
<form id="uploads" method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend>Fichiers attachés</legend>
|
||||
<input type="file" name="attached" id="postedfile" multiple>
|
||||
<input type="button" value="attacher les ficher" onclick="submitFile()">
|
||||
<input type="button" value="importer les documents" onclick="submitImport()">
|
||||
</fieldset>
|
||||
</form>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="MASContent" ID="MASContentContent" runat="server">
|
||||
<div class="metablog">
|
||||
(Id:<a href="/Blogs/UserPost/<%= Model.Id %>">
|
||||
<i><%= Model.Id %></i></a>, <%= Model.Posted.ToString("yyyy/MM/dd") %> - <%= Model.Modified.ToString("yyyy/MM/dd") %> <%= Model.Visible? "":", Invisible!" %>) <%= Html.ActionLink("Supprimer","RemovePost", new { user=Model.Author, title = Model.Title }, new { @class="actionlink" } ) %>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<aside>
|
||||
Id:<%= Html.ActionLink( Model.Id.ToString() , "UserPost", new { user= Model.Author, title=Model.Title, id = Model.Id }, new { @class = "usertitleref actionlink" }) %>
|
||||
, Posted: <%= Model.Posted.ToString("yyyy/MM/dd") %> - Modified: <%= Model.Modified.ToString("yyyy/MM/dd") %>
|
||||
Visible: <%= Model.Visible? "oui":"non" %> <%= Html.ActionLink("Supprimer","RemovePost", new { user=Model.Author, title = Model.Title }, new { @class="actionlink" } ) %>
|
||||
</aside>
|
||||
|
||||
</asp:Content>
|
||||
|
|
@ -4,23 +4,23 @@
|
|||
|
||||
<div>
|
||||
<% foreach (var g in Model.GroupByUser()) { %>
|
||||
<h1><a href="<%= Url.Content("~/Blog/"+g.Key) %>" class="actionlink userref">
|
||||
<%=g.Key%></a></h1>
|
||||
<h2><a href="<%= Url.Content("~/Blog/"+g.Key) %>" class="actionlink userref">
|
||||
<%=g.Key%></a></h2>
|
||||
<% foreach (var p in g) { %>
|
||||
<div class="blogpost">
|
||||
|
||||
|
||||
<div class="postpreview">
|
||||
<%= Html.ActionLink(p.Title, "UserPost",
|
||||
new { user = g.Key, title = p.Title }, new { @class = "usertitleref actionlink" , style="display:block;"} ) %>
|
||||
le <%=p.Posted.ToString("D") %>
|
||||
new { user = g.Key, title = p.Title }, new { @class = "usertitleref actionlink" } ) %>
|
||||
|
||||
<aside>
|
||||
(Posté le <%=p.Posted.ToString("D") %>)
|
||||
|
||||
<% if (Membership.GetUser()!=null)
|
||||
if ((Membership.GetUser().UserName==g.Key)
|
||||
|| (Roles.IsUserInRole ("Admin")))
|
||||
{ %><aside>
|
||||
{ %>
|
||||
<%= Html.ActionLink("Editer","Edit", new { id = p.Id }, new { @class="actionlink" }) %>
|
||||
<%= Html.ActionLink("Supprimer","RemovePost", new { id = p.Id }, new { @class="actionlink" } ) %>
|
||||
</aside><% } %>
|
||||
<% } %> </aside>
|
||||
</div> <% } %>
|
||||
<% } %>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -17,25 +17,27 @@
|
|||
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<% foreach (var be in Model) { %>
|
||||
<div class="blogpost">
|
||||
<div class="post">
|
||||
<%= Html.Markdown(be.Content,"/bfiles/"+be.Id+"/") %>
|
||||
</div>
|
||||
|
||||
<% string username = Membership.GetUser().UserName; %>
|
||||
<% foreach (var c in (Comment[]) BlogManager.GetComments(be.Id)) { %>
|
||||
<div class="comment" style="min-height:32px;"> <img style="clear:left;float:left;max-width:32px;max-height:32px;margin:.3em;" src="<%= Url.Content("~/Account/Avatar/"+c.From) %>" alt="<%=c.From%>"/>
|
||||
<%= Html.Markdown(c.CommentText) %>
|
||||
<% if ( username == Model.Author || c.From == username ) { %>
|
||||
<%= Html.ActionLink("Supprimer","RemoveComment", new { cmtid = c.Id } , new { @class="actionlink" })%>
|
||||
<% } %>
|
||||
</div><% } %>
|
||||
|
||||
|
||||
<% if (Membership.GetUser()!=null) {
|
||||
if (Membership.GetUser().UserName==be.Author)
|
||||
{ %> <div class="metapost">
|
||||
<%= Html.ActionLink("Editer","Edit", new { id = be.Id }, new { @class="actionlink" }) %>
|
||||
<%= Html.ActionLink("Supprimer","RemovePost", new { id = be.Id }, new { @class="actionlink" } ) %>
|
||||
</div> <% } %>
|
||||
<%
|
||||
string username = Membership.GetUser().UserName; %>
|
||||
<% foreach (var c in (Comment[]) BlogManager.GetComments(be.Id)) { %>
|
||||
<div class="comment" style="min-height:32px;"> <img style="clear:left;float:left;max-width:32px;max-height:32px;margin:.3em;" src="/Blogs/Avatar/<%=c.From%>" alt="<%=c.From%>"/>
|
||||
<%= Html.Markdown(c.CommentText) %>
|
||||
<% if ( username == Model.Author || c.From == username ) { %>
|
||||
<%= Html.ActionLink("Supprimer","RemoveComment", new { cmtid = c.Id } , new { @class="actionlink" })%>
|
||||
<% } %>
|
||||
</div><% } %>
|
||||
<div class="postcomment">
|
||||
|
||||
<aside>
|
||||
<% using (Html.BeginForm("Comment","Blogs")) { %>
|
||||
<%=Html.Hidden("Author")%>
|
||||
<%=Html.Hidden("Title")%>
|
||||
|
|
@ -43,6 +45,6 @@
|
|||
<%=Html.Hidden("PostId",be.Id)%>
|
||||
<input type="submit" value="Poster un commentaire"/>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %><% } %>
|
||||
</aside>
|
||||
<% } %></div><% } %>
|
||||
</asp:Content>
|
||||
|
|
|
|||
|
|
@ -18,10 +18,14 @@
|
|||
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
<% foreach (BlogEntry e in this.Model) { %>
|
||||
<div <% if (!e.Visible) { %> style="background-color:#022;" <% } %>>
|
||||
|
||||
<h2 class="blogtitle" ><%= Html.ActionLink(e.Title,"UserPost", new { user=e.Author, title=e.Title, id = e.Id }, new { @class = "usertitleref actionlink" , style="display:block;"}) %></h2>
|
||||
<div class="metablog">(<%= e.Posted.ToString("yyyy/MM/dd") %>
|
||||
<div class="postpreview<% if (!e.Visible) { %> hiddenpost<% } %>" >
|
||||
<h2><%= Html.ActionLink(e.Title,"UserPost", new { user=e.Author, title=e.Title, id = e.Id }, new { @class = "usertitleref actionlink" }) %></h2>
|
||||
<% bool truncated = false; %>
|
||||
<%= Html.MarkdownToHtmlIntro(out truncated, e.Content,"/bfiles/"+e.Id+"/") %>
|
||||
<% if (truncated) { %>
|
||||
<i><%= Html.ActionLink( "lire la suite" ,"UserPost", new { user=e.Author, title=e.Title, id = e.Id }, new { @class = "usertitleref actionlink" }) %></i>
|
||||
<% } %>
|
||||
<aside>(<%= e.Posted.ToString("yyyy/MM/dd") %>
|
||||
- <%= e.Modified.ToString("yyyy/MM/dd") %> <%= e.Visible? "":", Invisible!" %>)
|
||||
<% if (Membership.GetUser()!=null)
|
||||
if (Membership.GetUser().UserName==e.Author)
|
||||
|
|
@ -29,8 +33,7 @@
|
|||
<%= Html.ActionLink("Editer","Edit", new { id = e.Id }, new { @class="actionlink" }) %>
|
||||
<%= Html.ActionLink("Supprimer","RemovePost", new { id = e.Id }, new { @class="actionlink" } ) %>
|
||||
<% } %>
|
||||
</div>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue