Commit d8b7f874 authored by Matija Obreza's avatar Matija Obreza
Browse files

Moved existing design to /0 and created design /1

parent 4e0e6da8
......@@ -10,7 +10,7 @@ encoding//src/main/resources/content/language_fr.properties=UTF-8
encoding//src/main/resources/content/language_pt.properties=UTF-8
encoding//src/main/resources/content/language_ru.properties=UTF-8
encoding//src/main/resources/content/language_zh.properties=UTF-8
encoding//src/main/webapp/WEB-INF/decorator/header.jsp=UTF-8
encoding//src/main/webapp/WEB-INF/decorator/0/header.jsp=UTF-8
encoding//src/main/webapp/WEB-INF/jsp/accession/data.jsp=UTF-8
encoding//src/main/webapp/WEB-INF/jsp/accession/explore.jsp=UTF-8
encoding//src/main/webapp/WEB-INF/jsp/descr/index.jsp=UTF-8
......
......@@ -10,12 +10,50 @@ module.exports = function(grunt) {
grunt.initConfig({
app : {
source : 'src/main/sourceapp',
dist : 'src/main/webapp/html'
source : 'src/main/sourceapp/0',
source1 : 'src/main/sourceapp/1',
dist : 'src/main/webapp/html/0',
dist1 : 'src/main/webapp/html/1'
},
clean : {
dist : [ '.tmp', '<%= app.dist %>/styles', '<%= app.dist %>/js' ]
dist : [ '.tmp', '<%= app.dist %>', '<%= app.dist1 %>' ]
},
// Compiles Sass to CSS and generates necessary files if requested
compass : {
options : {
cssDir : '.tmp/styles',
generatedImagesDir : '.tmp/images/generated',
importPath : './bower_components',
httpImagesPath : '/images',
httpGeneratedImagesPath : '/images/generated',
httpFontsPath : '/styles/fonts',
relativeAssets : false,
assetCacheBuster : false,
raw : 'Sass::Script::Number.precision = 10\n'
},
dist : {
options : {
sassDir : '<%= app.source %>/styles',
imagesDir : '<%= app.source %>/images',
javascriptsDir : '<%= app.source %>/scripts',
fontsDir : '<%= app.source %>/styles/fonts',
cssDir : '<%= app.dist %>/styles',
generatedImagesDir : '<%= app.dist %>/images/generated'
}
},
dist1 : {
options : {
sassDir : '<%= app.source1 %>/styles',
imagesDir : '<%= app.source1 %>/images',
javascriptsDir : '<%= app.source1 %>/scripts',
fontsDir : '<%= app.source1 %>/styles/fonts',
cssDir : '<%= app.dist1 %>/styles',
generatedImagesDir : '<%= app.dist1 %>/images/generated'
}
}
},
// Copies remaining files to places other tasks can use
copy : {
dist : {
......@@ -24,7 +62,7 @@ module.exports = function(grunt) {
dot : true,
cwd : '<%= app.source %>',
dest : '<%= app.dist %>',
src : [ '*.css', 'js/{,*/}*.js', '*.{ico,png,txt}', '.htaccess', '*.html', 'images/{,*/}*.{webp}', 'styles/fonts/{,*/}*.*' ]
src : [ '*.css', 'images/**/*', 'js/{,*/}*.js', '*.{ico,png,txt}', 'styles/fonts/{,*/}*.*' ]
}, {
expand : true,
cwd : '.tmp/images',
......@@ -35,24 +73,21 @@ module.exports = function(grunt) {
cwd : 'bower_components/bootstrap-sass/assets/fonts/bootstrap/',
src : '*',
dest : '<%= app.dist %>/styles/fonts'
},
{
expand : true,
cwd : 'bower_components/fontawesome/fonts/',
src : '*',
dest : '<%= app.dist %>/styles/fonts'
},
{
expand : true,
cwd : 'bower_components/fontawesome/css/',
src : '*',
dest : '<%= app.dist %>/styles/'
},
{
expand : true,
cwd : 'bower_components/webfont-notosans/regular/',
src : '*',
dest : '<%= app.dist %>/styles/fonts'
}, {
expand : true,
cwd : 'bower_components/fontawesome/fonts/',
src : '*',
dest : '<%= app.dist %>/styles/fonts'
}, {
expand : true,
cwd : 'bower_components/fontawesome/css/',
src : '*',
dest : '<%= app.dist %>/styles/'
}, {
expand : true,
cwd : 'bower_components/webfont-notosans/regular/',
src : '*',
dest : '<%= app.dist %>/styles/fonts'
},{
expand : true,
cwd : 'bower_components/jquery-ui/themes/base/',
......@@ -83,65 +118,72 @@ module.exports = function(grunt) {
cwd : 'src/main/sourceapp/styles/',
src : [ 'pages.css' ],
dest : '<%= app.dist %>/styles'
},
]
} ]
},
styles : {
expand : true,
cwd : '<%= app.source %>/styles',
dest : '.tmp/styles/',
src : '{,*/}*.css'
}
},
// Compiles Sass to CSS and generates necessary files if requested
compass : {
options : {
sassDir : '<%= app.source %>/styles',
cssDir : '.tmp/styles',
generatedImagesDir : '.tmp/images/generated',
imagesDir : '<%= app.source %>/images',
javascriptsDir : '<%= app.source %>/scripts',
fontsDir : '<%= app.source %>/styles/fonts',
importPath : './bower_components',
httpImagesPath : '/images',
httpGeneratedImagesPath : '/images/generated',
httpFontsPath : '/styles/fonts',
relativeAssets : false,
assetCacheBuster : false,
raw : 'Sass::Script::Number.precision = 10\n'
dist1 : {
files : [ {
expand : true,
dot : true,
cwd : '<%= app.source1 %>',
dest : '<%= app.dist1 %>',
src : [ '*.css', 'images/**/*', 'js/{,*/}*.js', '*.{ico,png,txt}', 'styles/fonts/{,*/}*.*' ]
}, {
expand : true,
cwd : '.tmp/images',
dest : '<%= app.dist1 %>/images',
src : [ 'generated/*' ]
}, {
expand : true,
cwd : 'bower_components/bootstrap-sass/assets/fonts/bootstrap/',
src : '*',
dest : '<%= app.dist1 %>/styles/fonts'
}, {
expand : true,
cwd : 'bower_components/fontawesome/fonts/',
src : '*',
dest : '<%= app.dist1 %>/styles/fonts'
}, {
expand : true,
cwd : 'bower_components/fontawesome/css/',
src : '*',
dest : '<%= app.dist1 %>/styles/'
}, {
expand : true,
cwd : 'bower_components/webfont-notosans/regular/',
src : '*',
dest : '<%= app.dist1 %>/styles/fonts'
}, /* {
expand : true,
cwd : 'bower_components/jquery-ui/themes/base/',
src : [ 'jquery-ui.css' ],
dest : '<%= app.dist1 %>/styles'
} */ ]
},
dist : {
options : {
cssDir : '<%= app.dist %>/styles',
generatedImagesDir : '<%= app.dist %>/images/generated'
}
}
// ,
// server : {
// options : {
// sourcemap : true
// }
// }
// styles : {
// expand : true,
// cwd : '<%= app.source %>/styles',
// dest : '.tmp/styles/',
// src : '{,*/}*.css'
// }
},
// Make sure code styles are up to par and there are no obvious mistakes
jshint : {
options : {
jshintrc : '.jshintrc',
reporter : require('jshint-stylish')
},
all : {
dist : {
src : [ 'Gruntfile.js', '<%= app.source %>/js/{,*/}*.js' ]
},
// test: {
// options: {
// jshintrc: 'test/.jshintrc'
// },
// src: ['test/spec/{,*/}*.js']
// }
dist1 : {
src : [ 'Gruntfile.js', '<%= app.source1 %>/js/{,*/}*.js' ]
},
},
concat : {
options : {
// separator: ';',
......@@ -170,8 +212,37 @@ module.exports = function(grunt) {
world : {
src: [ 'bower_components/highmaps-beta/highmaps.src.js', 'bower_components/highcharts/modules/data.src.js', '<%= app.source %>/js/world.js'],
dest : '<%= app.dist %>/js/genesyshighcharts.js'
},
dist1 : {
src : [ 'bower_components/jquery/dist/jquery.js',
'bower_components/modernizr/modernizr.js',
'bower_components/jquery-flot/jquery.flot.js',
'bower_components/jquery-flot/jquery.flot.pie.js',
'bower_components/jquery-flot/jquery.flot.fillbetween.js',
'bower_components/jquery-simplecolorpicker/jquery.simplecolorpicker.js',
'bower_components/tinymce/tinymce.js',
'bower_components/tinymce/tinymce.jquery.js',
'bower_components/tinymce/themes/modern/theme.js',
'bower_components/tinymce/plugins/link/plugin.js',
'bower_components/tinymce/plugins/autolink/plugin.js',
'bower_components/tinymce/plugins/code/plugin.js',
'bower_components/leaflet/dist/leaflet.js',
'bower_components/leaflet-locationfilter/src/locationfilter.js',
'bower_components/bootstrap-sass/assets/javascripts/bootstrap.js',
'bower_components/jquery-ui/jquery-ui.js',
'bower_components/jquery-ui/ui/autocomplete.js',
'bower_components/dyn-css/lib/dyncss.js',
'bower_components/jstree/dist/jstree.min.js' ],
dest : '<%= app.dist1 %>/js/libraries.js',
},
app1 : {
src : [ '<%= app.source1 %>/js/prologue.js', '<%= app.source1 %>/js/epilogue.js' ],
dest : '<%= app.dist1 %>/js/genesys.js'
}
},
autoprefixer : {
options : {
browsers : [ 'last 3 versions' ]
......@@ -183,8 +254,18 @@ module.exports = function(grunt) {
src : '**/*.css',
dest : '<%= app.dist %>/styles'
} ]
},
dist1 : {
files : [ {
expand : true,
cwd : '<%= app.dist1 %>/styles',
src : '**/*.css',
dest : '<%= app.dist1 %>/styles'
} ]
}
},
cssmin : {
options : {
keepSpecialComments : 0
......@@ -193,11 +274,21 @@ module.exports = function(grunt) {
files : {
'<%= app.dist %>/styles/bootstrap.min.css' : [ '<%= app.dist %>/styles/bootstrap.css' ],
'<%= app.dist %>/styles/other.min.css' : [ '<%= app.dist %>/styles/jquery-ui.css', '<%= app.dist %>/styles/forza.css', '<%= app.dist %>/styles/leaflet.css',
'<%= app.dist %>/styles/jquery.simplecolorpicker.css', '<%= app.dist %>/styles/jquery.simplecolorpicker-regularfont.css' ],
'<%= app.dist %>/styles/jquery.simplecolorpicker.css', '<%= app.dist %>/styles/jquery.simplecolorpicker-regularfont.css' ],
'<%= app.dist %>/styles/genesys.min.css' : [ '<%= app.dist %>/styles/genesys.css' ],
'<%= app.dist %>/styles/pages.min.css' : [ '<%= app.dist %>/styles/pages.css' ],
'<%= app.dist %>/styles/all.min.css' : [ '<%= app.dist %>/styles/bootstrap.css', '<%= app.dist %>/styles/jquery-ui.css', '<%= app.dist %>/styles/forza.css',
'<%= app.dist %>/styles/leaflet.css', '<%= app.dist %>/styles/jquery.simplecolorpicker.css', '<%= app.dist %>/styles/jquery.simplecolorpicker-regularfont.css', '<%= app.dist %>/styles/genesys.css', '<%= app.dist %>/styles/pages.css' ],
'<%= app.dist %>/styles/leaflet.css', '<%= app.dist %>/styles/jquery.simplecolorpicker.css', '<%= app.dist %>/styles/jquery.simplecolorpicker-regularfont.css', '<%= app.dist %>/styles/genesys.css', '<%= app.dist %>/styles/pages.css' ],
}
},
dist1 : {
files : {
'<%= app.dist1 %>/styles/bootstrap.min.css' : [ '<%= app.dist1 %>/styles/bootstrap.css' ],
'<%= app.dist1 %>/styles/other.min.css' : [ '<%= app.dist1 %>/styles/forza.css' ],
'<%= app.dist1 %>/styles/genesys.min.css' : [ '<%= app.dist1 %>/styles/genesys.css' ],
'<%= app.dist1 %>/styles/all.min.css' : [ '<%= app.dist1 %>/styles/bootstrap.css',
'<%= app.dist1 %>/styles/forza.css',
'<%= app.dist1 %>/styles/genesys.css'],
}
}
},
......@@ -216,19 +307,40 @@ module.exports = function(grunt) {
'<%= app.dist %>/js/all.min.js' : [ '<%= app.dist %>/js/libraries.js', '<%= app.dist %>/js/genesys.js' ],
'<%= app.dist %>/js/genesyshighcharts.min.js' : [ '<%= app.dist %>/js/genesyshighcharts.js' ]
}
},
dist1 : {
options : {
compress : false,
preserveComments : false,
report : 'min'
},
files : {
'<%= app.dist1 %>/js/libraries.min.js' : [ '<%= app.dist1 %>/js/libraries.js' ],
'<%= app.dist1 %>/js/genesys.min.js' : [ '<%= app.dist1 %>/js/genesys.js' ],
'<%= app.dist1 %>/js/all.min.js' : [ '<%= app.dist1 %>/js/libraries.js', '<%= app.dist1 %>/js/genesys.js' ],
'<%= app.dist1 %>/js/genesyshighcharts.min.js' : [ '<%= app.dist1 %>/js/genesyshighcharts.js' ]
}
}
},
sass: { // Task
sass: { // Task
dist: { // Target
options: { // Target options
style: 'expanded'
},
files: { // Dictionary of files
//'style.css': 'style.scss' // 'destination': 'source'
'src/main/webapp/html/styles/genesys.css': 'src/main/sourceapp/styles/genesys.scss',
'src/main/webapp/html/styles/pages.css':'src/main/sourceapp/styles/pages.scss'
}
},
dist1: {
options: {
style: 'expanded'
},
files: {
'src/main/webapp/1/html/styles/genesys.css': 'src/main/sourceapp/1/styles/genesys.scss',
}
}
},
......@@ -254,9 +366,11 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-newer');
grunt.registerTask('build', [ 'newer:jshint', 'compass:dist', 'copy:dist', 'concat', 'autoprefixer', 'uglify:dist', 'cssmin' ]);
grunt.registerTask('js', [ 'jshint:all', 'copy:dist', 'concat', 'autoprefixer', 'uglify:dist' ]);
grunt.registerTask('css', [ 'compass:dist', 'copy:dist', 'concat', 'autoprefixer', 'cssmin' ]);
grunt.registerTask('default', [ 'build' ]);
grunt.registerTask('build0', [ 'newer:jshint:dist', 'compass:dist', 'copy:dist', 'concat:dist', 'concat:world', 'concat:app', 'autoprefixer:dist', 'uglify:dist', 'cssmin:dist' ]);
grunt.registerTask('build1', [ 'newer:jshint:dist1', 'compass:dist1', 'copy:dist1', 'concat:dist1', 'concat:app1', 'autoprefixer:dist1', 'uglify:dist1', 'cssmin:dist1' ]);
// grunt.registerTask('js', [ 'jshint:all', 'copy:dist', 'concat', 'autoprefixer', 'uglify:dist' ]);
// grunt.registerTask('css', [ 'compass:dist', 'copy:dist', 'concat', 'autoprefixer', 'cssmin' ]);
grunt.registerTask('default', [ 'build0', 'build1' ]);
grunt.registerTask('build', [ 'build0', 'build1' ]);
};
......@@ -658,7 +658,7 @@
<doctype>book</doctype>
<sourceHighlighter>coderay</sourceHighlighter>
<attributes>
<stylesheet>${basedir}/src/main/webapp/html/styles/ascii-doc.css</stylesheet>
<stylesheet>${basedir}/src/main/webapp/html/0/styles/ascii-doc.css</stylesheet>
<copycss>true</copycss>
<!-- <linkcss /> -->
<toc>left</toc>
......
......@@ -58,7 +58,7 @@ plan to run on HTTPS protocol.
user authentication. Keep this value `false`.
|cdn.server|${base.url}|Default configuration does not use a CDN and defaults to the `base.url`.
|cdn.base|${cdn.server}|
|cdn.flags.url|${cdn.base}/html/flags|
|cdn.flags.url|${cdn.base}/html/0/images/flags|
|robots.allow|false|Setting this to `true` will produce a `/robots.txt` response that allows robots to index
the site.
|===
......
......@@ -61,7 +61,7 @@ google.analytics.account=
# CDN
cdn.server=${base.url}
cdn.base=${cdn.server}
cdn.flags.url=${cdn.base}/html/flags
cdn.flags.url=${cdn.base}/html/0/images/flags
# Content creation on startup
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment