Skip to content

Commit

Permalink
Merge branch 'feature-2556-demo-css-refactor' into feature-2375-demo-…
Browse files Browse the repository at this point in the history
…theme
  • Loading branch information
aron committed Jun 21, 2012
2 parents 4fca279 + a8bdd9b commit 7bb38ca
Show file tree
Hide file tree
Showing 45 changed files with 881 additions and 390 deletions.
1 change: 1 addition & 0 deletions ckan/config/routing.py
Expand Up @@ -317,6 +317,7 @@ def make_map():
map.connect('/i18n/strings_{lang}.js', controller='i18n', action='strings')
map.connect('/util/redirect', controller='util', action='redirect')
map.connect('/test/primer', controller='development', action='primer')
map.connect('/test/markup', controller='development', action='markup')

for plugin in routing_plugins:
map = plugin.after_map(map)
Expand Down
6 changes: 5 additions & 1 deletion ckan/controllers/development.py
Expand Up @@ -4,5 +4,9 @@ class DevelopmentController(base.BaseController):
''' Controller for front end development pages '''

def primer(self):
''' Render all html elements out onto a single page '''
''' Render all html components out onto a single page '''
return base.render('development/primer.html')

def markup(self):
''' Render all html elements out onto a single page '''
return base.render('development/markup.html')
37 changes: 36 additions & 1 deletion ckan/public/base/less/ckan.less
Expand Up @@ -18,7 +18,7 @@
body {
// Using the masthead/footer gradient prevents the color from changing
// at the bottom of the window on pages with little content.
background-color: @masthead-background-color-end;
background-color: @mastheadBackgroundColorEnd;
}

[hidden] {
Expand All @@ -33,6 +33,41 @@ td, th {
word-wrap: break-word;
}

code {
padding: 2px 2px;
color: #000;
font-weight: bold;
border: none;
background: none;
}

pre {
border: none;
background: none;
padding-left: 0;
padding-right: 0;
}

mark {
background: @highlightBackground;
}

blockquote p {
font-size: 1em;
}

.embedded-content h1 {
font-size: 1.4em;
}

.embedded-content h2 {
font-size: 1.4em;
}

.embedded-content h3 {
font-size: 1.2em;
}

.popular {
text-indent: -999em;
}
Expand Down
2 changes: 1 addition & 1 deletion ckan/public/base/less/dataset.less
Expand Up @@ -107,7 +107,7 @@
margin-top: -17px;
width: 30px;
height: 30px;
background: transparent url("@{image-path}/icon-search-27x26.png") no-repeat center center;
background: transparent url("@{imagePath}/icon-search-27x26.png") no-repeat center center;
text-indent: -900em;
}

Expand Down
6 changes: 3 additions & 3 deletions ckan/public/base/less/footer.less
Expand Up @@ -4,11 +4,11 @@
}

.site-footer a {
color: @masthead-link-color;
color: @mastheadLinkColor;
}

.site-footer label {
color: @masthead-link-color;
color: @mastheadLinkColor;
}

.footer-links,
Expand All @@ -30,6 +30,6 @@
}

.attribution small {
color: @masthead-text-color;
color: @mastheadTextColor;
font-size: 12px;
}
71 changes: 46 additions & 25 deletions ckan/public/base/less/forms.less
Expand Up @@ -68,16 +68,15 @@ textarea {
.control-large input,
.control-large .control-label {
font-size: 18px;
line-height: 2;
}

.control-large input {
}

.form-actions {
background: none;
margin-left: -@gutter-x;
margin-right: -@gutter-x;
margin-left: -@gutterX;
margin-right: -@gutterX;
margin-bottom: 0; // Prevents reduces the padding when included in a module.
padding-bottom: 0;
text-align: right;
Expand All @@ -99,11 +98,23 @@ textarea {

// Override the default form widths.
.form-horizontal .control-label {
width: 115px;
width: 120px;
line-height: 1.3;
padding-top: 9px;
}

.form-horizontal .control-large input,
.form-horizontal .control-large .control-label {
font-size: 18px;
line-height: 2;
}

.form-horizontal .control-large .control-label {
padding-top: 10px;
}

.form-horizontal .controls {
margin-left: 125px;
margin-left: 130px;
}

.form-horizontal .info-block {
Expand All @@ -129,8 +140,8 @@ textarea {
}

.form-horizontal .form-actions {
padding-left: @gutter-x;
padding-right: @gutter-x;
padding-left: @gutterX;
padding-right: @gutterX;
}

.form-inline input {
Expand Down Expand Up @@ -161,7 +172,6 @@ textarea {
}

.simple-input .field input {
.box-sizing(border-box);
width: 100%;
height: auto;
margin: 0 -7px; // Pull input out into gutter
Expand All @@ -186,7 +196,6 @@ textarea {
.editor textarea {
.border-radius(@inputBorderRadius @inputBorderRadius 0 0);
border-bottom: none;
font-size: 12px;
}

.editor .info-block {
Expand Down Expand Up @@ -223,6 +232,10 @@ textarea {
width: 150px;
}

.control-custom input:last-of-type {
.border-radius(0 3px 3px 0);
}

.control-custom .checkbox {
display: inline-block;
margin-left: 5px;
Expand All @@ -235,34 +248,33 @@ textarea {
// Errors

.alert-danger a, .alert-error a {
color: @error-text;
color: @errorText;
}

.control-group.error input,
.control-group.error select,
.control-group.error textarea,
.control-group.error .input-prepend .add-on,
.control-group.error .input-append .add-on {
border-color: @error-border;
border-color: @errorBorder;
}

.error-block {
.border-radius(0 0 @input-border-radius @input-border-radius);
display: block;
padding: 6px 8px 3px;
background: @error-border;
margin: -@input-border-radius 0 0;
color: @input-background;
width: 216px;
.error-inline {
color: @errorText;
}

.error-block,
.error-inline {
font-size: 12px;
}

.error-block {
.border-radius(0 0 @input-border-radius @input-border-radius);
.border-radius(0 0 @inputBorderRadius @inputBorderRadius);
display: block;
padding: 6px 8px 3px;
background: @error-border;
margin: -@input-border-radius 0 0;
color: @input-background;
background: @errorBorder;
margin: -@inputBorderRadius 0 0;
color: @inputBackground;
width: 216px;
}

Expand All @@ -274,11 +286,20 @@ textarea {
width: auto;
}

.control-group.error .input-prepend .error-block {
.control-group.error .input-prepend .error-block,
.control-custom.error .error-block {
margin-left: -1px;
width: auto;
}

.control-custom.error .error-block {
width: 429px;
}

.control-select.error .error-block {
width: 204px;
}

// Stages
// Builds form stages out of an ordered list. The following CSS uses tag
// selectors on the .active class to prevent the styles bleeding into the
Expand All @@ -289,7 +310,7 @@ textarea {
.clearfix;
color: #aeaeae;
counter-reset: stage;
margin: -@gutter-y -@gutter-x @gutter-y;
margin: -@gutterY -@gutterX @gutterY;
overflow: hidden;
}

Expand Down

0 comments on commit 7bb38ca

Please sign in to comment.