Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
douban-api-proxy
Commits
7342837a
Commit
7342837a
authored
Apr 03, 2016
by
Jan Broer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'html-fixes'
parents
c1be9a72
318d65bf
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
18 additions
and
9 deletions
+18
-9
style.css
cps/static/css/style.css
+3
-3
favicon.ico
cps/static/favicon.ico
+0
-0
detail.html
cps/templates/detail.html
+1
-1
discover.html
cps/templates/discover.html
+1
-1
index.html
cps/templates/index.html
+2
-2
search.html
cps/templates/search.html
+1
-1
shelf.html
cps/templates/shelf.html
+1
-1
web.py
cps/web.py
+9
-0
No files found.
cps/static/css/style.css
View file @
7342837a
...
...
@@ -8,7 +8,7 @@ a{color: #45b29d}a:hover{color: #444;}
.container-fluid
img
{
display
:
block
;
max-width
:
100%
;
height
:
auto
}
.container-fluid
.discover
{
margin-bottom
:
50px
}
.container-fluid
.new-books
{
border-top
:
1px
solid
#ccc
}
.container-fluid
.new-books
h2
{
margin
:
50px
0
0
0
}
.container-fluid
.book
{
margin-top
:
20px
}
.container-fluid
.book
.cover
{
height
:
225px
;
position
:
relative
}
.container-fluid
.book
.cover
img
{
border
:
3px
solid
#fff
;
border-radius
:
5px
;
box-sizeing
:
border-box
;
height
:
100%
;
bottom
:
0
;
position
:
absolute
;
-webkit-box-shadow
:
0
5px
8px
-6px
#777
;
-moz-box-shadow
:
0
5px
8px
-6px
#777
;
box-shadow
:
0
5px
8px
-6px
#777
;}
.container-fluid
.book
{
margin-top
:
20px
}
.container-fluid
.book
.cover
{
height
:
225px
;
position
:
relative
}
.container-fluid
.book
.cover
img
{
border
:
1px
solid
#fff
;
/*border-radius:7px;*/
box-sizeing
:
border-box
;
height
:
100%
;
bottom
:
0
;
position
:
absolute
;
-webkit-box-shadow
:
0
5px
8px
-6px
#777
;
-moz-box-shadow
:
0
5px
8px
-6px
#777
;
box-shadow
:
0
5px
8px
-6px
#777
;}
.container-fluid
.book
.meta
{
margin-top
:
10px
}
.container-fluid
.book
.meta
p
{
margin
:
0
}
.container-fluid
.book
.meta
.title
{
font-weight
:
bold
;
font-size
:
15px
;
color
:
#444
}
.container-fluid
.book
.meta
.author
{
font-size
:
12px
;
color
:
#999
}
...
...
@@ -21,8 +21,8 @@ span.glyphicon.glyphicon-tags {padding-right: 5px;color: #999;vertical-align: te
.book-meta
{
padding-bottom
:
20px
;}
.book-meta
.tags
a
{
display
:
inline
;}
.container-fluid
.single
.cover
img
{
border
:
3
px
solid
#fff
;
border-radius
:
5px
;
border
:
1
px
solid
#fff
;
/*border-radius: 7px;*/
box-sizeing
:
border-box
;
-webkit-box-shadow
:
0
5px
8px
-6px
#777
;
-moz-box-shadow
:
0
5px
8px
-6px
#777
;
...
...
cps/static/favicon.ico
View replaced file @
c1be9a72
View file @
7342837a
519 Bytes
|
W:
|
H:
1.12 KB
|
W:
|
H:
2-up
Swipe
Onion skin
cps/templates/detail.html
View file @
7342837a
...
...
@@ -9,7 +9,7 @@
{% endif %}
</div>
</div>
<div
class=
"col-
lg-7
book-meta"
>
<div
class=
"col-
sm-9 col-lg-9
book-meta"
>
<h2>
{{entry.title}}
</h2>
<p
class=
"author"
><a
href=
"{{url_for('author', name=entry.authors[0].name) }}"
>
{{entry.authors[0].name}}
</a>
</p>
...
...
cps/templates/discover.html
View file @
7342837a
...
...
@@ -14,7 +14,7 @@
{% endif %}
</div>
<div
class=
"meta"
>
<p
class=
"title"
>
{{entry.title}}
</p>
<p
class=
"title"
>
{{entry.title
|shortentitle
}}
</p>
<p
class=
"author"
><a
href=
"{{url_for('author', name=entry.authors[0].name) }}"
>
{{entry.authors[0].name}}
</a></p>
{% if entry.ratings.__len__() > 0 %}
<div
class=
"rating"
>
...
...
cps/templates/index.html
View file @
7342837a
...
...
@@ -15,7 +15,7 @@
{% endif %}
</div>
<div
class=
"meta"
>
<p
class=
"title"
>
{{entry.title}}
</p>
<p
class=
"title"
>
{{entry.title
|shortentitle
}}
</p>
<p
class=
"author"
><a
href=
"{{url_for('author', name=entry.authors[0].name) }}"
>
{{entry.authors[0].name}}
</a></p>
{% if entry.ratings.__len__() > 0 %}
<div
class=
"rating"
>
...
...
@@ -50,7 +50,7 @@
{% endif %}
</div>
<div
class=
"meta"
>
<p
class=
"title"
>
{{entry.title}}
</p>
<p
class=
"title"
>
{{entry.title
|shortentitle
}}
</p>
<p
class=
"author"
><a
href=
"{{url_for('author', name=entry.authors[0].name) }}"
>
{{entry.authors[0].name}}
</a></p>
{% if entry.ratings.__len__() > 0 %}
<div
class=
"rating"
>
...
...
cps/templates/search.html
View file @
7342837a
...
...
@@ -21,7 +21,7 @@
{% endif %}
</div>
<div
class=
"meta"
>
<p
class=
"title"
>
{{entry.title}}
</p>
<p
class=
"title"
>
{{entry.title
|shortentitle
}}
</p>
<p
class=
"author"
><a
href=
"{{url_for('author', name=entry.authors[0].name) }}"
>
{{entry.authors[0].name}}
</a></p>
{% if entry.ratings.__len__() > 0 %}
<div
class=
"rating"
>
...
...
cps/templates/shelf.html
View file @
7342837a
...
...
@@ -14,7 +14,7 @@
{% endif %}
</div>
<div
class=
"meta"
>
<p
class=
"title"
>
{{entry.title}}
</p>
<p
class=
"title"
>
{{entry.title
|shortentitle
}}
</p>
<p
class=
"author"
><a
href=
"{{url_for('author', name=entry.authors[0].name) }}"
>
{{entry.authors[0].name}}
</a></p>
{% if entry.ratings.__len__() > 0 %}
<div
class=
"rating"
>
...
...
cps/web.py
View file @
7342837a
...
...
@@ -4,6 +4,7 @@
import
mimetypes
import
logging
import
sys
import
textwrap
mimetypes
.
add_type
(
'application/xhtml+xml'
,
'.xhtml'
)
from
flask
import
Flask
,
render_template
,
session
,
request
,
Response
,
redirect
,
url_for
,
send_from_directory
,
make_response
,
g
,
flash
,
abort
from
cps
import
db
,
config
,
ub
,
helper
...
...
@@ -123,6 +124,14 @@ def url_for_other_page(page):
app
.
jinja_env
.
globals
[
'url_for_other_page'
]
=
url_for_other_page
## custom jinja filters
@
app
.
template_filter
(
'shortentitle'
)
def
shortentitle_filter
(
s
):
if
len
(
s
)
>
60
:
s
=
s
.
split
(
':'
,
1
)[
0
]
if
len
(
s
)
>
60
:
s
=
textwrap
.
wrap
(
s
,
60
,
break_long_words
=
False
)[
0
]
+
' [...]'
return
s
def
admin_required
(
f
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment