upgraded jquery, restyled post wiki excerpts
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
//= require jquery-1.6.2.min.js
|
//= require jquery-1.7.1.min.js
|
||||||
//= require jquery-ui-1.8.12.custom.min.js
|
//= require jquery-ui-1.8.12.custom.min.js
|
||||||
//= require keymaster.min.js
|
//= require keymaster.min.js
|
||||||
//= require jquery.hotkeys.js
|
//= require jquery.hotkeys.js
|
||||||
|
|||||||
@@ -132,26 +132,21 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
Danbooru.Post.initialize_wiki_page_excerpt = function() {
|
Danbooru.Post.initialize_wiki_page_excerpt = function() {
|
||||||
if (Danbooru.Cookie.get("hide-wiki-page-excerpt") === "1") {
|
$("#wiki-page-excerpt").hide();
|
||||||
$("#hide-wiki-page-excerpt").hide();
|
|
||||||
$("#wiki-page-excerpt-content").hide();
|
|
||||||
} else {
|
|
||||||
$("#show-wiki-page-excerpt").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#hide-wiki-page-excerpt").click(function(e) {
|
$("#show-posts-link").click(function(e) {
|
||||||
$("#hide-wiki-page-excerpt").hide();
|
$("#show-posts-link").parent("li").addClass("active");
|
||||||
$("#wiki-page-excerpt-content").hide();
|
$("#show-wiki-excerpt-link").parent("li").removeClass("active");
|
||||||
$("#show-wiki-page-excerpt").show();
|
$("#posts").show();
|
||||||
Danbooru.Cookie.put("hide-wiki-page-excerpt", "1");
|
$("#wiki-page-excerpt").hide();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#show-wiki-page-excerpt").click(function(e) {
|
$("#show-wiki-excerpt-link").click(function(e) {
|
||||||
$("#hide-wiki-page-excerpt").show();
|
$("#show-posts-link").parent("li").removeClass("active");
|
||||||
$("#wiki-page-excerpt-content").show();
|
$("#show-wiki-excerpt-link").parent("li").addClass("active");
|
||||||
$("#show-wiki-page-excerpt").hide();
|
$("#posts").hide();
|
||||||
Danbooru.Cookie.put("hide-wiki-page-excerpt", "0");
|
$("#wiki-page-excerpt").show();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,32 +102,19 @@ div#c-posts {
|
|||||||
font-size: $h3_size;
|
font-size: $h3_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#wiki-page-excerpt {
|
div#a-index {
|
||||||
position: relative;
|
menu#post-sections {
|
||||||
width: 40em;
|
margin-bottom: 0.5em;
|
||||||
background: #EEE;
|
font-size: $h3_size;
|
||||||
padding: 0.5em 1em;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
border: 1px solid #CCC;
|
|
||||||
@include border-radius(0.5em);
|
|
||||||
|
|
||||||
p:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div#hide-or-show-wiki-page-excerpt {
|
|
||||||
font-size: 1em;
|
|
||||||
position: absolute;
|
|
||||||
top: 9px;
|
|
||||||
right: 9px;
|
|
||||||
|
|
||||||
span {
|
li {
|
||||||
cursor: pointer;
|
padding: 0.25em 0.5em;
|
||||||
color: #AAA;
|
|
||||||
}
|
&.active {
|
||||||
|
background-color: $menu_color;
|
||||||
span:hover {
|
font-weight: bold;
|
||||||
color: #333;
|
@include border-radius(4px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,14 @@
|
|||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<section id="content">
|
<section id="content">
|
||||||
|
<menu id="post-sections">
|
||||||
|
<li class="active"><a href="#posts" id="show-posts-link">Posts</a></li>
|
||||||
|
|
||||||
|
<% if params[:tags].present? %>
|
||||||
|
<li><a href="#wiki-except" id="show-wiki-excerpt-link">Wiki</a></li>
|
||||||
|
<% end %>
|
||||||
|
</menu>
|
||||||
|
|
||||||
<%= render "posts/partials/index/edit" %>
|
<%= render "posts/partials/index/edit" %>
|
||||||
<%= render "wiki_pages/excerpt", :post_set => @post_set %>
|
<%= render "wiki_pages/excerpt", :post_set => @post_set %>
|
||||||
<%= render "posts/partials/index/posts", :post_set => @post_set %>
|
<%= render "posts/partials/index/posts", :post_set => @post_set %>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<h1>Posts</h1>
|
<div id="posts">
|
||||||
|
<%= post_set.presenter.post_previews_html(self) %>
|
||||||
|
|
||||||
<%= post_set.presenter.post_previews_html(self) %>
|
<%= numbered_paginator(post_set.posts) %>
|
||||||
|
</div>
|
||||||
<%= numbered_paginator(post_set.posts) %>
|
|
||||||
|
|||||||
@@ -2,25 +2,14 @@
|
|||||||
- post_set
|
- post_set
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<% if post_set.has_wiki? %>
|
<div id="wiki-page-excerpt">
|
||||||
<div id="wiki-page-excerpt">
|
<% if post_set.wiki_page %>
|
||||||
<h1>Wiki</h1>
|
<div class="prose">
|
||||||
|
<%= format_text(post_set.wiki_page.presenter.excerpt) %>
|
||||||
|
|
||||||
<div id="hide-or-show-wiki-page-excerpt">
|
<p>Read the <%= link_to "full article", wiki_page_path(post_set.wiki_page.id) %>.</p>
|
||||||
<span id="hide-wiki-page-excerpt" class="ui-icon ui-icon-triangle-1-n"></span>
|
|
||||||
<span id="show-wiki-page-excerpt" class="ui-icon ui-icon-triangle-1-s"></span>
|
|
||||||
</div>
|
</div>
|
||||||
|
<% else %>
|
||||||
<div id="wiki-page-excerpt-content">
|
<p>There is currently no wiki page for the tag "<%= post_set.tag_string %>". You can <%= link_to "create one", new_wiki_page_path(:wiki_page => {:title => post_set.tag_string}) %>.</p>
|
||||||
<% if post_set.wiki_page %>
|
<% end %>
|
||||||
<div class="prose">
|
</div>
|
||||||
<%= format_text(post_set.wiki_page.presenter.excerpt) %>
|
|
||||||
|
|
||||||
<p>Read the <%= link_to "full article", wiki_page_path(post_set.wiki_page.id) %>.</p>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<p>There is currently no wiki page for the tag "<%= post_set.tag_string %>". You can <%= link_to "create one", new_wiki_page_path(:wiki_page => {:title => post_set.tag_string}) %>.</p>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|||||||
0
script/install/danbooru_local_config.rb.templ
Normal file → Executable file
0
script/install/danbooru_local_config.rb.templ
Normal file → Executable file
0
script/install/database.yml.templ
Normal file → Executable file
0
script/install/database.yml.templ
Normal file → Executable file
0
script/install/init_d.templ
Normal file → Executable file
0
script/install/init_d.templ
Normal file → Executable file
0
script/install/nginx.conf
Normal file → Executable file
0
script/install/nginx.conf
Normal file → Executable file
0
script/install/nginx.danbooru.conf
Normal file → Executable file
0
script/install/nginx.danbooru.conf
Normal file → Executable file
0
script/upgrade_schema.rb
Normal file → Executable file
0
script/upgrade_schema.rb
Normal file → Executable file
0
script/upgrade_schema.sql
Normal file → Executable file
0
script/upgrade_schema.sql
Normal file → Executable file
4
vendor/assets/javascripts/jquery-1.7.1.min.js
vendored
Normal file
4
vendor/assets/javascripts/jquery-1.7.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user