fixed style for navbar headers
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
Danbooru.Comment.initialize_preview_button = function() {
|
||||
$("div.new-comment input[type=submit][value=Preview]").click(function(e) {
|
||||
e.preventDefault();
|
||||
$.ajax("/dtext/preview", {
|
||||
$.ajax("/dtext_preview", {
|
||||
type: "post",
|
||||
data: {
|
||||
body: $(e.target).closest("form").find("textarea").val()
|
||||
|
||||
@@ -54,7 +54,7 @@ table {
|
||||
/*** BEGIN CUSTOM STYLES ***/
|
||||
body {
|
||||
font-family: Verdana, Helvetica, sans-serif;
|
||||
padding: 1em 2em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
line-height: 1.25em;
|
||||
}
|
||||
@@ -193,13 +193,37 @@ menu {
|
||||
}
|
||||
|
||||
li {
|
||||
margin: 0 1em 0 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style-type: none;
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
header#top {
|
||||
h1 {
|
||||
margin: 5px 30px 0 30px;
|
||||
}
|
||||
|
||||
menu {
|
||||
background: #F7F7FF;
|
||||
padding: 5px 20px;
|
||||
|
||||
li {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
menu.main {
|
||||
background: white;
|
||||
|
||||
li.current {
|
||||
background: #F7F7FF;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
@@ -523,7 +547,7 @@ div.comments-for-post {
|
||||
div.dtext-preview {
|
||||
border: 2px dashed #AAA;
|
||||
padding: 1em;
|
||||
margin: 1em;
|
||||
margin: 1em 0;
|
||||
width: 30em;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
class DtextController < ApplicationController
|
||||
def preview
|
||||
render :inline => "<h3 class=\"preview-header\">Preview</h3><%= format_text(params[:body]) %>"
|
||||
end
|
||||
end
|
||||
5
app/controllers/dtext_previews_controller.rb
Normal file
5
app/controllers/dtext_previews_controller.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class DtextPreviewsController < ApplicationController
|
||||
def create
|
||||
render :inline => "<h1 class=\"preview-header\">Preview</h1><%= format_text(params[:body]) %>"
|
||||
end
|
||||
end
|
||||
@@ -1,5 +1,5 @@
|
||||
<% content_for(:secondary_nav_links) do %>
|
||||
<menu>
|
||||
<menu id="secondary-links">
|
||||
<li><%= link_to "Listing", advertisements_path %></li>
|
||||
<li><%= link_to "New", new_advertisement_path %></li>
|
||||
<% if @advertisement && !@advertisement.new_record? %>
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
<%= yield :html_header %>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<header id="top">
|
||||
<h1><%= link_to Danbooru.config.app_name, "/" %></h1>
|
||||
<nav>
|
||||
<menu>
|
||||
<menu class="main">
|
||||
<% if CurrentUser.user.is_anonymous? %>
|
||||
<%= nav_link_to("Login", new_session_path) %>
|
||||
<% else %>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</section>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
/<%= @post_set.tags %>
|
||||
/<%= @post_set.tags.join(" ") %>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "posts/partials/common/secondary_links" %>
|
||||
|
||||
@@ -2,9 +2,12 @@
|
||||
<menu>
|
||||
<li><%= link_to "Listing", posts_path %></li>
|
||||
<li><%= link_to "Upload", new_upload_path %></li>
|
||||
<li>Popular</li>
|
||||
<li><%= link_to "Favorites", favorites_path %></li>
|
||||
<li>Subscriptions</li>
|
||||
<li><%= link_to "Popular", explore_post_popular_path %></li>
|
||||
<li><%= link_to "Hot", explore_post_hot_path %></li>
|
||||
<% unless CurrentUser.is_anonymous? %>
|
||||
<li><%= link_to "Favorites", favorites_path %></li>
|
||||
<li><%= link_to "Subscriptions", tag_subscriptions_path(:user_id => CurrentUser.id) %></li>
|
||||
<% end %>
|
||||
<li><%= link_to "Changes", post_versions_path %></li>
|
||||
<li>Approvals</li>
|
||||
<li><%= link_to "Moderate", moderation_post_dashboard_path %></li>
|
||||
|
||||
@@ -91,6 +91,13 @@ Danbooru::Application.routes.draw do
|
||||
end
|
||||
resources :wiki_page_versions, :only => [:index, :show]
|
||||
|
||||
namespace :explore do
|
||||
namespace :post do
|
||||
resource :popular, :only => [:show]
|
||||
resource :hot, :only => [:show]
|
||||
end
|
||||
end
|
||||
|
||||
namespace :maintenance do
|
||||
namespace :user do
|
||||
resource :password_reset, :only => [:new, :create, :edit, :update]
|
||||
|
||||
Reference in New Issue
Block a user