Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styling #3

Merged
merged 2 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ __pycache__/
*.so

# Distribution / packaging
.vscode/
gut-env/
.Python
env/
venv/
Expand Down
6 changes: 5 additions & 1 deletion gutenbergtozim/l10n.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
},
"author": {
"textContent": "Author",
"placeholder": "List books of a single Author"
"placeholder": "Search by author name"
},
"title": {
"textContext": "Title",
"placeholder": "Search by title"
},
"cover-img": {
"alt": "Book Cover",
Expand Down
26 changes: 11 additions & 15 deletions gutenbergtozim/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,25 @@ <h2><a href="Home.html" data-l10n-id="sub-title">The first producer of free eboo
</div>
<div class="pure-u-1 pure-u-md-1-5 pure-u-sm-1-5">
{% else %}
<div class="pure-u-1 pure-u-sm-2-5 pure-u-md-2-5">
<input type="hidden" id="language_filter" value="{{ languages[0][1] }}" />
<div class="pure-u-1 pure-u-sm-2-5 pure-u-md-2-5">
<input type="hidden" id="language_filter" value="{{ languages[0][1] }}" />
{% endif %}
<div class="filter-container">
<input type="text" name="author_filter" id="author_filter" data-l10n-id="author" placeholder="Author" class="pure-input-rounded clearable" />
<input type="text" name="title_filter" id="title_filter" data-l10n-id="title" placeholder="Find a book by title" class="pure-input-rounded clearable" />
</div>
<div>
<a href="bookshelf_home.html">Bookshelves</a>
<a href="Home.html">Home</a>
</div>
<section class="filter-container">
<input type="text" name="author_filter" id="author_filter" data-l10n-id="author" placeholder="Author" class="pure-input-rounded clearable" />
<input type="text" name="title_filter" id="title_filter" data-l10n-id="title" placeholder="Search by title" class="pure-input-rounded clearable" />
{% if show_books %}
<a class="nav-link" href="bookshelf_home.html">Browse by Bookshelf</a>
{% else %}
<a class="nav-link" href="Home.html">Go Home</a>
{% endif %}
</section>
</div>
{% if show_books %}
<div class="pure-u-1 pure-u-sm-3-5 pure-u-md-3-5 sort">
<input type="hidden" id="default-sort" name="default-sort" value="popularity" />
<i class="fa fa-heart fa-2x" title="Sort by popularity" id="popularity_sort" />&nbsp;</i>
<i class="fa fa-sort-alpha-asc fa-2x" title="Sort by title" id="alpha_sort" >&nbsp;</i>
</div>
{% else %}
<div class="pure-u-1 pure-u-md-1-5">
<button class="search pure-button" data-l10n-id="search"><i class="fa fa-search fa-1x"></i> Search</button>
</div>
<!-- <div class="pure-u-1 pure-u-md-2-5"></div> -->
{% endif %}
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions gutenbergtozim/templates/cover_article.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ <h2>{{ book.subtitle }}</h2>
<div class="pure-g cover-content">

{% if cover_img %}
<div class="pure-u-1 pure-u-md-1-2 cover-image">
<div class="cover-image">
<img data-l10n-id="cover-img" class="cover-art" src="{{ cover_img }}" title="Book Cover" alt="Book Cover" />
</div>
<div class="pure-u-1 pure-u-md-1-2 bibrec sidedimg">
<!-- <div class="pure-u-1 pure-u-md-1-2 bibrec sidedimg">
{% else %}
<div class="pure-u-1 bibrec">
<div class="pure-u-1 bibrec"> -->
{% endif %}
<!-- <div class="bibrec"> -->
<div class="cover-detail author">
<p class="label" data-l10n-id="author">Author</p>
<p class="label" data-l10n-id="author">Authoxr</p>
<p class="label-value"{{ translate_author}}><a href='javascript:goToAuthor("{{ book.author.name() }}");'>{{ book.author.name() }}</a></p>
</div>

Expand Down
34 changes: 34 additions & 0 deletions gutenbergtozim/templates/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,22 @@ dataTables_wrapper.dataTables_length,
overflow-y: auto;
}

.nav-link {
text-decoration: underline;
cursor: pointer;
}

.filter-container {
width: 100%;
display: block;
margin: auto;
}

.filter-container .pure-input-rounded {
margin-bottom: 0.5em !important;
display: inherit !important;
}

/*.ui-menu-item,
.ui-menu-item:hover,
.ui-menu-item:link,
Expand Down Expand Up @@ -527,7 +543,25 @@ body.cover .content h2 {
#author_filter.clearable.onX{ cursor: pointer; } /* (jQ) hover cursor style */
#author_filter.clearable::-ms-clear {display: none; width:0; height:0;} /* Remove IE default X */

#title_filter.clearable{
background: #fff url(data:image/gif;base64,R0lGODlhBwAHAIAAAP///5KSkiH5BAAAAAAALAAAAAAHAAcAAAIMTICmsGrIXnLxuDMLADs=) no-repeat right -1em center;
/*border: 1px solid #999;
padding: 3px 18px 3px 4px; Use the same right padding (18) in jQ!
border-radius: 3px;*/
transition: background 0.4s;
}
#title_filter.clearable.x { background-position: right 1em center; } /* (jQ) Show icon */
#title_filter.clearable.onX{ cursor: pointer; } /* (jQ) hover cursor style */
#title_filter.clearable::-ms-clear {display: none; width:0; height:0;} /* Remove IE default X */

/* @media (max-width: 1400px) {

} */

@media (max-width: 800px) {
.nav-link {
text-align: center;
}
.fa-download {
display: none;
}
Expand Down