mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Finish header in new content server frontend
This commit is contained in:
parent
9d27ff0ef3
commit
4a298e0573
@ -1,6 +1,8 @@
|
|||||||
body {
|
body {
|
||||||
background-color: #fffcf2;
|
background-color: #fffcf2;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
|
margin: 0 0 0 0;
|
||||||
|
padding: 0 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#container {
|
#container {
|
||||||
@ -51,7 +53,50 @@ body {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* }}} */
|
ul#primary-nav {
|
||||||
|
display: block;
|
||||||
|
margin-right: 60px;
|
||||||
|
text-align: right;
|
||||||
|
margin-top: 60px;
|
||||||
|
line-height: 20px;
|
||||||
|
cursor: default;
|
||||||
|
position: relative;
|
||||||
|
top: -100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul#primary-nav li {
|
||||||
|
display: inline;
|
||||||
|
padding: 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul#primary-nav li a {
|
||||||
|
padding: 6px;
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
font-variant: small-caps;
|
||||||
|
/*text-transform: uppercase;*/
|
||||||
|
font-size: 80%;
|
||||||
|
font-weight: bold;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-shadow: #27211b 2px 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul#primary-nav li a:hover {
|
||||||
|
background-color: #39a9cf;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
text-shadow: #27211b 1px 1px 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#donate {
|
||||||
|
display: block;
|
||||||
|
width: 200px;
|
||||||
|
height: 38px;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
top: -230px;
|
||||||
|
left: 65%;
|
||||||
|
}
|
||||||
|
|
||||||
h2.library_name {
|
h2.library_name {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
@ -62,6 +107,8 @@ h2.library_name {
|
|||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
/* Combobox {{{ */
|
/* Combobox {{{ */
|
||||||
|
|
||||||
.ui-button { margin-left: -1px; }
|
.ui-button { margin-left: -1px; }
|
||||||
@ -70,6 +117,7 @@ h2.library_name {
|
|||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
|
||||||
/* Sort select {{{ */
|
/* Sort select {{{ */
|
||||||
|
|
||||||
.sort_select { float: left; margin-left: 1em; margin-top: 2ex; font-size: small; }
|
.sort_select { float: left; margin-left: 1em; margin-top: 2ex; font-size: small; }
|
||||||
|
@ -28,13 +28,37 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<div class="area">
|
<div class="area">
|
||||||
<div class="bubble">
|
<div class="bubble">
|
||||||
<p title="Showing library: {library_path}">→ {library_name}</p>
|
<p title="Showing library: {library_path}"
|
||||||
|
>→ {library_name} ←</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<ul id="primary-nav">
|
||||||
|
<li><a id="nav-mobile" href="/mobile" title="A version of this website suited for mobile browsers">Mobile</a></li>
|
||||||
|
|
||||||
|
<li><a id="nav-demo" href="/old" title="The old version of this webiste">Old</a></li>
|
||||||
|
<li><a id="nav-download" href="/opds" title="A feed based version of this website, used in special purpose applications">Feed</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<form id="donate" action="https://www.paypal.com/cgi-bin/webscr"
|
||||||
|
method="post" title="Donate to support the development of calibre">
|
||||||
|
<div>
|
||||||
|
<input type="hidden" name="cmd" value="_s-xclick"></input>
|
||||||
|
<input type="hidden" name="hosted_button_id" value="3028915"></input>
|
||||||
|
<input type="image"
|
||||||
|
src="http://calibre-ebook.com/site_media//img/button-donate.png"
|
||||||
|
name="submit"></input>
|
||||||
|
<img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif"
|
||||||
|
width="1" height="1"></img>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- End header -->
|
||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<div class="sort_select">
|
<div class="sort_select">
|
||||||
<label>{sort_select_label} </label>
|
<label>{sort_select_label} </label>
|
||||||
|
@ -63,6 +63,7 @@ class BrowseServer(object):
|
|||||||
# Catalogs {{{
|
# Catalogs {{{
|
||||||
def browse_catalog(self, category=None):
|
def browse_catalog(self, category=None):
|
||||||
if category == None:
|
if category == None:
|
||||||
|
#categories = self.categories_cache()
|
||||||
ans = self.browse_template().format(title='',
|
ans = self.browse_template().format(title='',
|
||||||
script='toplevel();')
|
script='toplevel();')
|
||||||
else:
|
else:
|
||||||
|
@ -35,6 +35,7 @@ class ContentServer(object):
|
|||||||
|
|
||||||
def add_routes(self, connect):
|
def add_routes(self, connect):
|
||||||
connect('root', '/', self.index)
|
connect('root', '/', self.index)
|
||||||
|
connect('old', '/old', self.old)
|
||||||
connect('get', '/get/{what}/{id}', self.get,
|
connect('get', '/get/{what}/{id}', self.get,
|
||||||
conditions=dict(method=["GET", "HEAD"]))
|
conditions=dict(method=["GET", "HEAD"]))
|
||||||
connect('static', '/static/{name:.*?}', self.static,
|
connect('static', '/static/{name:.*?}', self.static,
|
||||||
@ -123,6 +124,9 @@ class ContentServer(object):
|
|||||||
|
|
||||||
return self.static('index.html')
|
return self.static('index.html')
|
||||||
|
|
||||||
|
def old(self, **kwargs):
|
||||||
|
return self.static('index.html')
|
||||||
|
|
||||||
# Actually get content from the database {{{
|
# Actually get content from the database {{{
|
||||||
def get_cover(self, id, thumbnail=False):
|
def get_cover(self, id, thumbnail=False):
|
||||||
cover = self.db.cover(id, index_is_id=True, as_file=False)
|
cover = self.db.cover(id, index_is_id=True, as_file=False)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user