and less to sass for work page

pull/46/head
eric 2018-01-30 13:19:40 -05:00
parent 4d2167c58f
commit c720dfcab2
16 changed files with 745 additions and 20 deletions

View File

@ -1,10 +1,11 @@
{% extends 'comments/base.html' %}
{% load i18n %}
{% load sass_tags %}
{% block title %}{% trans "Preview your comment" %}{% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="/static/css/campaign2.css" />
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/campaign2.scss' %}" />
{% endblock %}
{% block doccontent %}

View File

@ -1,8 +1,10 @@
{% extends 'basedocumentation.html' %}
{% load sass_tags %}
{% block title %} &#x2665; Libraries{% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="/static/css/campaign2.css" />
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/campaign2.scss' %}" />
<link type="text/css" rel="stylesheet" href="/static/css/libraries.css" />
{% endblock %}

View File

@ -1,6 +1,7 @@
{% extends 'basedocumentation.html' %}
{% load humanize %}
{% load sass_tags %}
{% block title %}Campaign Management{% endblock %}
@ -12,7 +13,7 @@ textarea {
}
</style>
<link type="text/css" rel="stylesheet" href="/static/css/manage_campaign.css" />
<link type="text/css" rel="stylesheet" href="/static/css/campaign2.css" />
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/campaign2.scss' %}" />
<script type="text/javascript" src="/static/js/tabs.js"></script>

View File

@ -1,11 +1,12 @@
{% extends 'basepledge.html' %}
{% load humanize %}
{% load sass_tags %}
{% block title %}Pledge Cancelled{% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="/static/css/campaign2.css" />
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/campaign2.scss' %}" />
{% endblock %}
{% block doccontent %}

View File

@ -1,11 +1,12 @@
{% extends 'basepledge.html' %}
{% load humanize %}
{% load sass_tags %}
{% block title %}Pledge Cancelled{% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="/static/css/campaign2.css" />
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/campaign2.scss' %}" />
{% endblock %}
{% block doccontent %}

View File

@ -1,11 +1,12 @@
{% extends 'basepledge.html' %}
{% load humanize %}
{% load sass_tags %}
{% block title %}Pledge Recharge{% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="/static/css/campaign2.css" />
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/campaign2.scss' %}" />
{% endblock %}
{% block doccontent %}

View File

@ -2,8 +2,10 @@
{% load comments %}
{% load humanize %}
{% load purchased %}
{% load lib_acqs %}
{% load purchased %}
{% load sass_tags %}
{% block title %}&#151;
{% if work.is_free %}
{{ work.title }} is a Free eBook. {% for fmt in work.formats %}[{{ fmt }}]{% endfor %}
@ -21,7 +23,7 @@
{% if work.first_isbn_13 %}<meta property="book:isbn" content="{{ work.first_isbn_13 }}" />{% endif %}
{% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="/static/css/campaign2.css" />
<link type="text/css" rel="stylesheet" href="{% sass_src 'scss/campaign2.scss' %}" />
{% if user.is_staff or user in work.last_campaign.managers.all %}
<link rel="stylesheet" href="/static/css/ui-lightness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen">
{{ kwform.media.css }}

View File

@ -0,0 +1,198 @@
@import "variables.scss";
/* needed for campaign, pledge, and manage_campaign */
.book-detail {
float:left;
width:100%;
clear:both;
display:block;
}
.book-cover {
float: left;
margin-right:10px;
width:151px;
img {
@include mediaborder-base;
}
}
.mediaborder {
@include mediaborder-base;
}
.book-detail-info {
float:left;
/* if we want to nix the explore bar, width should be 544ish */
width:309px;
h2.book-name, h3.book-author, h3.book-year {
padding:0;
margin:0;
line-height:normal
}
h2.book-name {
font-size: $font-size-header;
font-weight:bold;
color:$text-blue;
}
h3.book-author, h3.book-year {
font-size: $font-size-default;
font-weight:normal;
color:$text-blue;
}
h3.book-author span a, h3.book-year span a{
font-size: $font-size-default;
font-weight:normal;
color:$link-color;
}
> div {
width:100%;
clear:both;
display:block;
overflow:hidden;
border-top:1px solid $pale-blue;
padding:10px 0;
}
> div.layout {
border: none;
padding: 0;
div.pubinfo {
float: left;
width: auto;
padding-bottom: 7px;
}
}
.btn_wishlist span {
text-align: right;
}
.find-book label {
float:left;
line-height:31px;
}
.find-link {
float:right;
img {
padding: 2px;
@include one-border-radius(5px);
}
}
.pledged-info {
padding:10px 0;
position: relative;
&.noborder {
border-top: none;
padding-top: 0;
}
.campaign-status-info {
float: left;
width: 50%;
margin-top: $font-size-default;
span {
font-size: $font-size-larger;
color: $medium-blue;
font-weight: bold;
}
}
}
.thermometer {
@include one-border-radius(10px);
border: solid 2px $blue-grey;
width: 291px;
padding: 7px;
position: relative;
overflow: visible;
/* looks better if we start the gradient a little closer to the success color */
$greener-than-alert: #CF6944;
background: -webkit-gradient(linear, left top, right top, from($call-to-action), to($greener-than-alert));
background: -webkit-linear-gradient(left, $greener-than-alert, $call-to-action);
background: -moz-linear-gradient(left, $greener-than-alert, $call-to-action);
background: -ms-linear-gradient(left, $greener-than-alert, $call-to-action);
background: -o-linear-gradient(left, $greener-than-alert, $call-to-action);
background: linear-gradient(left, $greener-than-alert, $call-to-action);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$alert', endColorstr='$call-to-action'); /* IE6 & IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='$alert', endColorstr='$call-to-action')"; /* IE8+ */
&.successful {
border-color: $bright-blue;
background: $pale-blue;
}
.cover {
position: absolute;
right: 0;
@include border-radius(0, 10px, 10px, 0);
width: 50px;
height: 14px;
margin-top: -7px;
background: lighten($blue-grey, 10%);
}
span {
display: none;
}
&:hover span {
display: block;
position: absolute;
z-index: 200;
right: 0;
top:-7px;
font-size: $font-size-header;
color: $medium-blue;
background: white;
border: 2px solid $blue-grey;
@include one-border-radius(10px);
padding: 5px;
}
}
.explainer{
span.explanation{
display: none;
}
&:hover span.explanation {
display: block;
position: absolute;
z-index: 200;
right: 0;
top:12px;
font-size: $font-size-default;
font-weight: normal;
color: $text-blue;
background: white;
border: 2px solid $blue-grey;
@include one-border-radius(10px);
padding: 5px;
}
}
.status {
position: absolute;
top:50%;
right:0%;
height: 25px;
margin-top: -12px;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

439
static/scss/campaign2.scss Normal file
View File

@ -0,0 +1,439 @@
@import "variables.scss";
@import "campaign_tabs.scss";
@import "book_detail.scss";
@import "social_share.scss";
/* Page layout */
#js-page-wrap {
overflow:hidden;
}
#main-container {
margin-top:20px;
}
#js-leftcol .jsmodule, .pledge.jsmodule {
margin-bottom:10px;
&.rounded .jsmod-content {
@include one-border-radius(20px);
background:$pale-blue;
color: $text-blue;
padding:10px 20px;
font-weight:bold;
border:none;
margin:0;
line-height: 16px;
/* Bubble in upper left looks different depending on campaign status */
&.ACTIVE {
background: $green;
color: white;
font-size: $font-size-header;
font-weight: normal;
line-height: 20px;
}
&.No.campaign.yet {
background: $orange;
color: white;
}
span {
display: inline-block;
vertical-align: middle;
&.spacer {
visibility: none;
}
&.findtheungluers {
cursor: pointer;
}
}
}
}
.jsmodule.pledge {
float: left;
margin-left: 10px;
}
#js-slide .jsmodule {
width: 660px !important;
}
#js-search {
margin: 0 15px 0 15px !important;
}
.alert > .errorlist {
list-style-type: none;
font-size: $font-size-larger;
border: none;
text-align: left;
font-weight: normal;
font-size: $font-size-default;
> li {
margin-bottom: 14px;
}
.errorlist {
margin-top: 7px;
li {
width: auto;
height: auto;
padding-left: 32px;
padding-right: 32px;
font-size: $font-size-default;
}
}
}
/* Center elements */
#js-maincol {
float:left;
width:470px;
margin:0 10px;
div#content-block {
background: none;
padding:0;
}
}
.status {
font-size: $font-size-header;
color: $green;
}
/* Center - add/remove actions in book detail area */
.add-wishlist, .add-wishlist-workpage, .remove-wishlist-workpage, .remove-wishlist, .on-wishlist, .create-account {
float: right;
cursor: pointer;
span {
font-weight:normal;
color:$text-blue;
text-transform: none;
padding-left:20px;
&.on-wishlist {
background:url("#{$image-base}checkmark_small.png") left center no-repeat;
cursor: default;
}
}
}
.btn_wishlist .add-wishlist span, .add-wishlist-workpage span, .create-account span {
background:url("#{$image-base}booklist/add-wishlist.png") left center no-repeat;
}
.remove-wishlist-workpage span, .remove-wishlist span {
background:url("#{$image-base}booklist/remove-wishlist-blue.png") left center no-repeat;
}
/* Center - tabs and content below them */
div#content-block-content {
padding-left: 5px;
a {
color: $medium-blue;
}
#tabs-1 img {
@include mediaborder-base;
}
#tabs-3 {
margin-left: -5px;
}
}
.tabs-content {
padding-right: 5px;
iframe {
@include mediaborder-base;
}
form {
margin-left: -5px;
}
.clearfix {
margin-bottom: 10px;
border-bottom: 2px solid $blue-grey;
}
}
.work_supporter {
height: auto;
min-height: 50px;
margin-top: 5px;
vertical-align: middle;
}
.work_supporter_avatar {
float: left;
margin-right: 5px;
img {
@include one-border-radius(5px);
}
}
.work_supporter_name {
@include height(50px);
float: left;
}
.work_supporter_nocomment {
height: 50px;
margin-top: 5px;
vertical-align: middle;
min-width: 235px;
float: left;
}
.show_supporter_contact_form
{
display:block;
margin-left: 5px;
float: right;
}
.supporter_contact_form
{
display:none;
margin-left: 5px;
}
.contact_form_result
{
display:block;
margin-left: 5px;
}
.work_supporter_wide
{
display: block;
height: 65px;
margin-top: 5px;
float: none;
margin-left: 5px;
}
.info_for_managers
{
display: block;
}
.show_supporter_contact_form
{
cursor:pointer;
opacity:0.5
}
.show_supporter_contact_form:hover
{
cursor:pointer;
opacity:1
}
.official {
border: 3px $bright-blue solid;
padding: 3px;
margin-left: -5px;
}
.editions {
div {
float:left;
padding-bottom: 5px;
margin-bottom: 5px;
}
.image {
width: 60px;
overflow: hidden;
}
.metadata {
display:block;
overflow: hidden;
margin-left: 5px;
}
a:hover {
text-decoration: underline;
}
}
.show_more_edition,
.show_more_ebooks {
cursor: pointer;
}
.show_more_edition {
text-align: right;
&:hover {
text-decoration: underline;
}
}
.more_edition {
display:none;
clear: both;
padding-bottom: 10px;
padding-left: 60px;
}
.more_ebooks {
display:none;
}
.show_more_ebooks:hover {
text-decoration: underline;
}
/* Right column */
/* Right - add/remove actions below big green button */
#js-rightcol {
.add-wishlist, .on-wishlist, .create-account {
float: none;
}
.on-wishlist {
margin-left: 20px;
}
}
#js-rightcol, #pledge-rightcol {
float:right;
width:235px;
margin-bottom: 20px;
h3.jsmod-title {
background:$medium-blue-grey;
@include one-border-radius(10px);
padding:10px;
height:auto;
font-style:normal;
font-size: $font-size-larger;
margin:0 0 10px 0;
color: white;
span {
padding:0;
color:#fff;
font-style:normal;
@include height(22px);
}
}
.jsmodule {
margin-bottom:10px;
a:hover {
text-decoration: none;
}
}
}
#pledge-rightcol {
margin-top: 7px;
}
.js-rightcol-pad {
border:1px solid $blue-grey;
@include one-border-radius(10px);
padding:10px;
}
#widgetcode {
display: none;
border:1px solid $blue-grey;
@include one-border-radius(10px);
padding:10px;
}
/* Right column - support tiers */
ul.support li {
border-bottom:1px solid $blue-grey;
padding:10px 5px 10px 10px;
background:url("#{$image-base}icons/pledgearrow.png") 98% center no-repeat;
&.no_link{
background:none;
}
&.last {
border-bottom: none;
}
span {
display:block;
padding-right:10px;
&.menu-item-price {
font-size: $font-size-header;
float: left;
display: inline;
margin-bottom: 3px;
}
&.menu-item-desc {
float: none;
clear: both;
font-size: $font-size-larger;
font-weight: normal;
line-height: $font-size-larger*1.3;
}
}
&:hover {
color: #fff;
background:$call-to-action url("#{$image-base}icons/pledgearrow-hover.png") 98% center no-repeat;
a {
color: #fff;
text-decoration: none;
}
&.no_link{
background:#fff;
color:$call-to-action
}
}
}
.you_pledged {
float: left;
line-height: 21px;
font-weight:normal;
color:$text-blue;
padding-left:20px;
background:url("#{$image-base}checkmark_small.png") left center no-repeat;
}
.thank-you {
font-size: $font-size-header;
font-weight: bold;
margin: 20px auto;
}
div#libtools {
border:1px solid $blue-grey;
@include one-border-radius(10px);
padding:10px;
margin-left: 0px;
margin-top: 1em;
padding: 10px;
p {
margin-top: 0px;
margin-bottom: 0px;
}
span {
margin-top: 0px;
margin-left: 0.5em ;
display: inline-block;
}
input[type="submit"]{
margin-left: 4em;
}
}

View File

@ -0,0 +1,75 @@
/* Campaign and manage_campaign use same tab styling, so it's factored out here */
#tabs{
border-bottom: 4px solid $medium-blue;
clear: both;
float: left;
margin-top: 10px;
width: 100%;
ul.book-list-view {
margin-bottom:4px !important;
}
}
#tabs-1, #tabs-2, #tabs-3, #tabs-4 {
display:none;
}
#tabs-1.active, #tabs-2.active, #tabs-3.active, #tabs-4.active {
display: inherit;
}
#tabs-2 textarea {
width: 95%;
}
ul.tabs {
float:left;
padding:0;
margin:0;
list-style:none;
width: 100%;
li {
float: left;
height: 46px;
line-height: 20px;
padding-right:2px;
width: 116px;
background: none;
margin: 0;
padding: 0 2px 0 0;
&.tabs4 {
padding-right:0px;
}
a {
height: 41px;
line-height: 18px;
display:block;
text-align:center;
padding:0 10px;
min-width:80px;
@include border-radius(7px, 7px, 0, 0);
background:$blue-grey;
color:$text-blue;
padding-top: 5px;
&:hover {
text-decoration: none;
}
div {
padding-top: 8px;
}
}
a:hover, &.active a {
background:$medium-blue;
color:#fff;
}
}
}

View File

@ -7,7 +7,7 @@
#main-container.main-container-fl .js-main {
width:968px;
background:#fff url("${image-base}landingpage/container-top.png") top center no-repeat;
background:#fff url("#{$image-base}landingpage/container-top.png") top center no-repeat;
}
#js-maincol-fl {
padding:30px 30px 0 30px;
@ -178,7 +178,7 @@ div.signup_btn {
overflow:hidden;
a {
background: url("${image-base}bg.png") no-repeat scroll right top transparent;
background: url("#{$image-base}bg.png") no-repeat scroll right top transparent;
color: #fff;
display: block;
font-size: $font-size-default;
@ -190,7 +190,7 @@ div.signup_btn {
float:left;
span {
background: url("${image-base}bg.png") no-repeat scroll -770px -36px transparent;
background: url("#{$image-base}bg.png") no-repeat scroll -770px -36px transparent;
display: block;
margin-right: 29px;
padding: 0 5px 0 15px;

View File

@ -26,7 +26,7 @@
form {
float:left;
width:210px;
background:url("${image-base}landingpage/search-box-two.png") 0 0 no-repeat;
background:url("#{$image-base}landingpage/search-box-two.png") 0 0 no-repeat;
height:36px;
display:block;
overflow:hidden;
@ -41,13 +41,13 @@
a.prev {
@include clickyarrows();
background:url("${image-base}landingpage/arrow-left.png") 0 0 no-repeat;
background:url("#{$image-base}landingpage/arrow-left.png") 0 0 no-repeat;
left: 0;
}
a.next {
@include clickyarrows();
background:url("${image-base}landingpage/arrow-right.png") 0 0 no-repeat;
background:url("#{$image-base}landingpage/arrow-right.png") 0 0 no-repeat;
right: 0;
}
}
@ -72,7 +72,7 @@
}
&.greenbutton {
background:url("${image-base}landingpage/search-button-two.png") 0 0 no-repeat;
background:url("#{$image-base}landingpage/search-button-two.png") 0 0 no-repeat;
width:40px;
height:40px;
padding:0;
@ -86,7 +86,7 @@
}
#js-slide .jsmodule > h3 {
background:url("${image-base}landingpage/bg-slide.png") bottom center no-repeat;
background:url("#{$image-base}landingpage/bg-slide.png") bottom center no-repeat;
padding-bottom:7px;
padding-left:35px;

File diff suppressed because one or more lines are too long

View File

@ -186,9 +186,10 @@ $cursor-disabled: not-allowed;
line-height:$x;
}
.mediaborder {
@mixin mediaborder-base()
{
padding: 5px;
border: solid 5px #EDF3F4;
border: solid 5px $pale-blue;
}
@mixin actionbuttons()