Difference between revisions of "SUNScholar/XMLUI Theme/M2/Customisation/Extra Customisation"

From Libopedia
Jump to navigation Jump to search
m
 
(22 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
</center>
 
</center>
  
==Modify Font Size CSS==
+
==Create Custom Buttons==
Absolute font sizing does not scale well with a responsive theme.
+
Modern web design demands that each "call-to-action" in a web page be made very clearly obvious to the user. Bootstrap buttons are perfect for highlighting these actions.
 
 
Left the font size size attributes that use XXem for font sizing.
 
  
Removed all the CCS <tt>'''font-size = XXpx;'''</tt> attributes from all the files in the <tt>'''styles'''</tt> folder.
 
 
==Modify Screen Size Breakpoints==
 
 
Edit the following file:
 
Edit the following file:
nano $HOME/{{Source}}/dspace-xmlui-mirage2/src/main/webapp/styles/classic_mirage_color_scheme/_bootstrap_variables.scss
+
  nano $HOME/{{Source}}/dspace-xmlui-mirage2/src/main/webapp/styles/classic_mirage_color_scheme/_bootstrap_variables.scss
 
Go to the bottom of the file and add the following:
 
Go to the bottom of the file and add the following:
 
<pre>
 
<pre>
 
/**
 
/**
* Maximum Screen Width
+
* Buttons CSS
 
**/
 
**/
$grid-gutter-width:            30px;
 
$container-large-desktop:      (1260px + $grid-gutter-width) !default;
 
</pre>
 
Refer to: https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_variables.scss
 
  
==Modify Body Text and Background Color==
+
$btn-font-weight:                normal !default;
Edit the following file:
+
 
nano $HOME/{{Source}}/dspace-xmlui-mirage2/src/main/webapp/styles/classic_mirage_color_scheme/_bootstrap_variables.scss
+
$btn-warning-color:              #fff !default;
Go to the bottom of the file and add the following:
+
$btn-warning-bg:                $brand-warning !default;
<pre>
+
$btn-warning-border:            darken($btn-warning-bg, 5%) !default;
//** Background color for `<body>`.
+
 
$body-bg:              #fff !default;
+
$btn-default-color:              #333 !default;
//** Global text color on `<body>`.
+
$btn-default-bg:                #fff !default;
$text-color:           $gray-dark !default;
+
$btn-default-border:            #ccc !default;
 +
 
 +
$btn-primary-color:              #fff !default;
 +
$btn-primary-bg:                $brand-primary !default;
 +
$btn-primary-border:             darken($btn-warning-bg, 5%) !default;
 +
 
 +
$btn-success-color:              #fff !default;
 +
$btn-success-bg:                $brand-success !default;
 +
$btn-success-border:             darken($btn-success-bg, 5%) !default;
 +
 
 +
$btn-info-color:                #fff !default;
 +
$btn-info-bg:                    $brand-info !default;
 +
$btn-info-border:                darken($btn-info-bg, 5%) !default;
 +
 
 +
$btn-danger-color:              #fff !default;
 +
$btn-danger-bg:                  $brand-danger !default;
 +
$btn-danger-border:              darken($btn-danger-bg, 5%) !default;
 +
 
 +
$btn-link-disabled-color:       $gray-light !default;
 
</pre>
 
</pre>
==Modify Item View CSS==
 
Edit the following file:
 
nano $HOME/{{Source}}/dspace-xmlui-mirage2/src/main/webapp/styles/classic_mirage_color_scheme/_item-lists.scss
 
See below for modified file.
 
<pre>
 
/**
 
* The contents of this file are subject to the license and copyright
 
* detailed in the LICENSE and NOTICE files at the root of the source
 
* tree and available online at
 
*
 
* http://www.dspace.org/license/
 
*/
 
.artifact-title {
 
    margin-bottom: 0px;
 
}
 
  
.artifact-abstract {
+
==[[SUNScholar/XMLUI_Theme/M2/Customisation/Multiple Themes|Multiple Themes]]==
    text-align: justify;
 
}
 
  
.thumbnail {
+
==Modify Font Size CSS==
    .glyphicon.glyphicon-file {
+
Absolute font sizing does not scale well with a responsive theme.
        color: $gray-lighter;
 
        margin-left: -10px;
 
    }
 
}
 
  
.item-wrapper.row {
+
Therefore I, removed all the absolute <tt>'''font-size = XXpx;'''</tt> attributes from all the files in the <tt>'''styles'''</tt> folder and left alone the font size attributes that use relative <tt>'''XXem'''</tt> for font sizing.
    @media(max-width: $screen-xs-max) {
+
==Github Repository==
        padding-bottom: 5px;
+
All the changes that were made to customise Mirage 2 for Stellenbosch University library are available on github.
        border-bottom: 1px solid $gray-lighter;
 
    }
 
}
 
</pre>
 
  
==Modify DSpace Variables CSS==
+
See link below.
Edit the following file:
+
  https://github.com/hamslaai/Mirage2
nano $HOME/{{Source}}/dspace-xmlui-mirage2/src/main/webapp/styles/classic_mirage_color_scheme/_dspace_variables.scss
+
[[Category:Customisation]]
See below for modified file
 
<pre>
 
/**
 
* The contents of this file are subject to the license and copyright
 
* detailed in the LICENSE and NOTICE files at the root of the source
 
* tree and available online at
 
*
 
  * http://www.dspace.org/license/
 
*/
 
// Extra DSpace variables
 
// ----------------------
 
$almost-white:          #f7f7f7 !default;
 
$center-section-padding-top: 20px;
 
$center-section-padding-bottom: 20px;
 
</pre>
 

Latest revision as of 12:12, 28 May 2016

Back to Mirage 2 Customisation

Create Custom Buttons

Modern web design demands that each "call-to-action" in a web page be made very clearly obvious to the user. Bootstrap buttons are perfect for highlighting these actions.

Edit the following file:

 nano $HOME/source/dspace-xmlui-mirage2/src/main/webapp/styles/classic_mirage_color_scheme/_bootstrap_variables.scss

Go to the bottom of the file and add the following:

/**
* Buttons CSS
**/

$btn-font-weight:                normal !default;

$btn-warning-color:              #fff !default;
$btn-warning-bg:                 $brand-warning !default;
$btn-warning-border:             darken($btn-warning-bg, 5%) !default;

$btn-default-color:              #333 !default;
$btn-default-bg:                 #fff !default;
$btn-default-border:             #ccc !default;

$btn-primary-color:              #fff !default;
$btn-primary-bg:                 $brand-primary !default;
$btn-primary-border:             darken($btn-warning-bg, 5%) !default;

$btn-success-color:              #fff !default;
$btn-success-bg:                 $brand-success !default;
$btn-success-border:             darken($btn-success-bg, 5%) !default;

$btn-info-color:                 #fff !default;
$btn-info-bg:                    $brand-info !default;
$btn-info-border:                darken($btn-info-bg, 5%) !default;

$btn-danger-color:               #fff !default;
$btn-danger-bg:                  $brand-danger !default;
$btn-danger-border:              darken($btn-danger-bg, 5%) !default;

$btn-link-disabled-color:        $gray-light !default;

Multiple Themes

Modify Font Size CSS

Absolute font sizing does not scale well with a responsive theme.

Therefore I, removed all the absolute font-size = XXpx; attributes from all the files in the styles folder and left alone the font size attributes that use relative XXem for font sizing.

Github Repository

All the changes that were made to customise Mirage 2 for Stellenbosch University library are available on github.

See link below.

https://github.com/hamslaai/Mirage2