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
2d498dd1
Commit
2d498dd1
authored
Dec 16, 2020
by
mmonkey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preserve publisher links, and fix formatting in custom columns for CaliBlur theme.
parent
376214e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
108 deletions
+46
-108
caliBlur.css
cps/static/css/caliBlur.css
+37
-66
caliBlur.js
cps/static/js/caliBlur.js
+9
-42
No files found.
cps/static/css/caliBlur.css
View file @
2d498dd1
...
...
@@ -2123,8 +2123,7 @@ body > div.container-fluid > div > div.col-sm-10 > div.discover > div.container
transition
:
all
0s
}
.book-meta
>
.bookinfo
>
.tags
.btn-info
,
.well
>
form
>
.btn
{
.well
>
form
>
.btn
{
vertical-align
:
middle
;
-o-transition
:
background-color
.2s
,
color
.2s
}
...
...
@@ -2962,46 +2961,35 @@ body > div.container-fluid > div > div.col-sm-10 > div > div > div.col-sm-3.col-
margin-top
:
24px
}
.book-meta
>
.bookinfo
>
.publishers
>
span
:first-of-type
,
.book-meta
>
.bookinfo
>
.publishing-date
>
span
:first-of-type
{
.book-meta
>
.bookinfo
>
.languages
>
span
:first-of-type
,
.book-meta
>
.bookinfo
>
.publishers
>
span
:first-of-type
,
.book-meta
>
.bookinfo
>
.publishing-date
>
span
:first-of-type
,
.real_custom_columns
>
span
:first-of-type
{
color
:
hsla
(
0
,
0%
,
100%
,
.45
);
text-transform
:
uppercase
;
font-family
:
Open
Sans
Bold
,
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
font-family
:
Open
Sans
Bold
,
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
;
width
:
200px
;
display
:
inline-block
}
.book-meta
>
.bookinfo
>
.publishers
>
span
:last-of-type
,
.book-meta
>
.bookinfo
>
.publishing-date
>
span
:last-of-type
{
.book-meta
>
.bookinfo
>
.languages
>
span
:last-of-type
,
.book-meta
>
.bookinfo
>
.publishers
>
span
:last-of-type
,
.book-meta
>
.bookinfo
>
.publishing-date
>
span
:last-of-type
,
.real_custom_columns
>
span
:last-of-type
{
font-family
:
Open
Sans
Semibold
,
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
;
color
:
#fff
;
font-size
:
15px
;
-webkit-font-smoothing
:
antialiased
}
.book-meta
>
.bookinfo
>
.publishers
>
span
:last-of-type
{
padding-left
:
90px
}
.real_custom_columns
>
span
:last-of-type
{
padding-left
:
90px
}
.book-meta
>
.bookinfo
>
.publishing-date
>
span
:last-of-type
{
padding-left
:
90px
}
.book-meta
>
.bookinfo
>
.languages
>
span
:first-of-type
{
color
:
hsla
(
0
,
0%
,
100%
,
.45
);
text-transform
:
uppercase
;
font-family
:
Open
Sans
Bold
,
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
}
.book-meta
>
.bookinfo
>
.languages
>
span
:last-of-type
{
font-size
:
15px
;
font-family
:
Open
Sans
Semibold
,
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
;
-webkit-font-smoothing
:
antialiased
;
color
:
#fff
;
padding-left
:
85px
.book-meta
>
.bookinfo
>
.languages
>
span
>
a
,
.book-meta
>
.bookinfo
>
.publishers
>
span
>
a
,
.book-meta
>
.bookinfo
>
.publishing-date
>
span
>
a
,
.real_custom_columns
>
span
>
a
{
color
:
#fff
}
.book-meta
>
.bookinfo
>
.tags
.btn-info
,
.book-meta
>
h2
,
body
.book
.author
{
.book-meta
>
h2
,
body
.book
.author
{
font-family
:
Open
Sans
Bold
,
Helvetica
Neue
,
Helvetica
,
Arial
,
sans-serif
}
...
...
@@ -3082,34 +3070,10 @@ body.book .author {
background-color
:
rgba
(
0
,
0
,
0
,
.3
)
}
.book-meta
>
.bookinfo
>
.identifiers
>
p
>
.btn-success
,
.book-meta
>
.bookinfo
>
.tags
.btn-info
{
overflow
:
hidden
;
text-align
:
center
;
white-space
:
nowrap
;
margin
:
2px
3px
0
0
;
padding
:
0
10px
}
.book-meta
>
.bookinfo
>
.tags
.btn-info
{
background-color
:
rgba
(
0
,
0
,
0
,
.15
);
color
:
hsla
(
0
,
0%
,
100%
,
.7
);
font-size
:
13px
;
display
:
inline-block
;
border-radius
:
4px
;
-webkit-transition
:
background-color
.2s
,
color
.2s
;
transition
:
background-color
.2s
,
color
.2s
;
text-transform
:
none
}
.dropdown-menu
,
.tooltip.in
{
-webkit-transition
:
opacity
.15s
ease-out
,
-webkit-transform
.15s
cubic-bezier
(
.6
,
.4
,
.2
,
1.4
)
}
.book-meta
>
.bookinfo
>
.tags
.btn-info
:hover
{
color
:
#fff
;
text-decoration
:
underline
}
.book-meta
>
.bookinfo
>
.identifiers
,
.book-meta
>
.bookinfo
>
.tags
{
padding-left
:
40px
;
margin
:
10px
0
...
...
@@ -3351,7 +3315,8 @@ div.btn-group[role=group][aria-label="Download, send to Kindle, reading"] .dropd
box-shadow
:
none
}
.book-meta
>
.bookinfo
>
.identifiers
>
p
>
.btn-success
{
.book-meta
>
.bookinfo
.btn-info
,
.book-meta
>
.bookinfo
.btn-success
{
background-color
:
rgba
(
0
,
0
,
0
,
.15
);
color
:
hsla
(
0
,
0%
,
100%
,
.7
);
font-size
:
13px
;
...
...
@@ -3365,11 +3330,21 @@ div.btn-group[role=group][aria-label="Download, send to Kindle, reading"] .dropd
text-transform
:
none
}
.book-meta
>
.bookinfo
>
.identifiers
>
p
>
.btn-success
:hover
{
.book-meta
>
.bookinfo
.btn-info
:hover
,
.book-meta
>
.bookinfo
.btn-success
:hover
{
color
:
#fff
;
text-decoration
:
underline
}
.book-meta
>
.bookinfo
.btn-info
,
.book-meta
>
.bookinfo
.btn-success
{
overflow
:
hidden
;
text-align
:
center
;
white-space
:
nowrap
;
margin
:
2px
3px
0
0
;
padding
:
0
10px
}
#bookDetailsModal
.book-meta
{
color
:
hsla
(
0
,
0%
,
100%
,
.7
);
height
:
calc
(
100%
-
120px
);
...
...
@@ -6983,16 +6958,12 @@ body.edituser.admin > div.container-fluid > div.row-fluid > div.col-sm-10 > div.
margin
:
45px
}
.book-meta
>
.bookinfo
>
.publishing-date
>
span
:last-of-type
{
padding-left
:
25px
}
.book-meta
>
.bookinfo
>
.publishers
>
span
:last-of-type
{
padding-left
:
70px
}
.book-meta
>
.bookinfo
>
.languages
>
span
:last-of-type
{
padding-left
:
65px
.book-meta
>
.bookinfo
>
.languages
>
span
:first-of-type
,
.book-meta
>
.bookinfo
>
.publishers
>
span
:first-of-type
,
.book-meta
>
.bookinfo
>
.publishing-date
>
span
:first-of-type
,
.real_custom_columns
>
span
:first-of-type
{
width
:
50%
;
max-width
:
200px
;
}
.book-meta
>
.bookinfo
.publishers
{
...
...
cps/static/js/caliBlur.js
View file @
2d498dd1
...
...
@@ -145,44 +145,16 @@ if ($("body.book").length > 0) {
$
(
".blur-wrapper"
)
.
prepend
(
'<div><img alt="Blurred cover" class="bg-blur" src="'
+
cover
+
'"></div>'
);
// Fix-up book detail headings
publisher
=
$
(
".publishers p span"
).
text
().
split
(
":"
);
$
(
".publishers p span"
).
remove
();
$
.
each
(
publisher
,
function
(
i
,
val
)
{
$
(
".publishers"
).
append
(
"<span>"
+
publisher
[
i
]
+
"</span>"
);
});
$
(
".publishers span:nth-child(3)"
).
text
(
function
()
{
return
$
(
this
).
text
().
replace
(
/^
\s
+|^
\t
+|
\t
+|
\s
+$/g
,
""
);
});
// Fix-up book custom colums headings
// real_custom_column = $( '.real_custom_columns' ).text().split( ':' );
real_custom_column
=
$
(
".real_custom_columns"
);
// $( ".real_custom_columns" ).remove();
$
.
each
(
real_custom_column
,
function
(
i
,
val
)
{
var
split
=
$
(
this
).
text
().
split
(
":"
);
real_cc_key
=
split
.
shift
();
real_cc_value
=
split
.
join
(
":"
);
$
(
this
).
text
(
""
);
if
(
real_cc_value
!=
""
)
{
$
(
this
).
append
(
"<span>"
+
real_cc_key
+
"</span><span>"
+
real_cc_value
+
"</span>"
);
// Metadata Fields - Publishers, Published, Languages and Custom
$
(
'.publishers, .publishing-date, .real_custom_columns, .languages'
).
each
(
function
()
{
var
splitText
=
$
(
this
).
text
().
split
(
':'
);
var
label
=
splitText
.
shift
().
trim
();
var
value
=
splitText
.
join
(
':'
).
trim
();
// Preserve Links
if
(
$
(
this
).
find
(
'a'
).
length
)
{
value
=
$
(
this
).
find
(
'a'
).
first
().
removeClass
();
}
});
//$( '.real_custom_columns:nth-child(3)' ).text(function() {
//return $(this).text().replace(/^\s+|^\t+|\t+|\s+$/g, "");
//});
published
=
$
(
".publishing-date p"
)
.
text
().
split
(
": "
);
$
(
".publishing-date p"
).
remove
();
$
.
each
(
published
,
function
(
i
,
val
)
{
$
(
".publishing-date"
).
append
(
"<span>"
+
published
[
i
]
+
"</span>"
);
});
languages
=
$
(
".languages p span"
).
text
().
split
(
": "
);
$
(
".languages p span"
).
remove
();
$
.
each
(
languages
,
function
(
i
,
val
)
{
$
(
".languages"
).
append
(
"<span>"
+
languages
[
i
]
+
"</span>"
);
$
(
this
).
html
(
'<span>'
+
label
+
'</span><span></span>'
).
find
(
'span'
).
last
().
append
(
value
);
});
$
(
".book-meta h2:first"
).
clone
()
...
...
@@ -246,11 +218,6 @@ if ($("body.book").length > 0) {
$
(
"#add-to-shelves"
).
toggle
();
});
// Fix formatting error on book detail languages
if
(
!
$
(
".book-meta > .bookinfo > .languages > span:last-of-type"
).
text
().
startsWith
(
" "
))
{
$
(
".book-meta > .bookinfo > .languages > span:last-of-type"
).
prepend
(
" "
);
}
//Work to reposition dropdowns. Does not currently solve for
//screen resizing
function
dropdownToggle
()
{
...
...
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