Skip to content

Commit 03e90fc

Browse files
committed
Different changes to help indexation
1 parent 939812e commit 03e90fc

10 files changed

Lines changed: 330 additions & 1179 deletions

File tree

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ configure([project(':server')]) {
106106
compile "org.springframework.boot:spring-boot-starter-cache"
107107
compile "org.springframework.boot:spring-boot-starter-velocity"
108108
compile "org.springframework.boot:spring-boot-starter-websocket"
109+
compile "org.springframework.boot:spring-boot-devtools"
109110

110111
compile "com.google.zxing:javase:3.2.1"
111112
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.6.1"

client-ng1/gulp/build-dist.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,18 @@ module.exports = function(gulp, config) {
8585
});
8686
gulp.task('build:dist:css:vendors', ['build:dev:css:vendors'], function(){
8787
return gulp.src(paths.build.dev + '/css/vendors.css')
88-
.pipe(rename('vendors-' + timestamp + '.min.css'))
88+
.pipe(rename('vendors.min.css'))
8989
.pipe(gulp.dest(paths.build.dist + '/css'));
9090
});
9191
gulp.task('build:dist:css', ['build:dev:css'], function(){
9292
return gulp.src(paths.build.dev + '/css/main.css')
9393
.pipe(csso())
94-
.pipe(rename('cesar-' + timestamp + '.min.css'))
94+
.pipe(rename('cesar.min.css'))
9595
.pipe(gulp.dest(paths.build.dist + '/css'));
9696
});
9797
gulp.task('build:dist:js', ['build:dev:js'], function(){
9898
return gulp.src(paths.build.dev + '/js/app.js')
99-
.pipe(rename('cesar-' + timestamp + '.min.js'))
99+
.pipe(rename('cesar.min.js'))
100100
.pipe(uglify({output: { 'ascii_only': true }})) // preserve ascii unicode characters such as \u226E
101101
.pipe(gulp.dest(paths.build.dist + '/js'));
102102
});
@@ -111,7 +111,7 @@ module.exports = function(gulp, config) {
111111
return gulp.src(paths.build.dev + '/js/vendors.js')
112112
.pipe(sourcemaps.init())
113113
.pipe(gulpIf(notMinified, uglify()))
114-
.pipe(rename('vendors-' + timestamp + '.min.js'))
114+
.pipe(rename('vendors.min.js'))
115115
.pipe(sourcemaps.write('.'))
116116
.pipe(gulp.dest(paths.build.dist + '/js'));
117117
});
@@ -122,10 +122,10 @@ module.exports = function(gulp, config) {
122122
gulp.task('build:dist:index', function () {
123123
return gulp.src(paths.index)
124124
.pipe(htmlreplace({
125-
'js': 'js/cesar-' + timestamp + '.min.js',
126-
'vendors': 'js/vendors-' + timestamp + '.min.js',
127-
'css': 'css/cesar-' + timestamp + '.min.css',
128-
'vendorscss': 'css/vendors-' + timestamp + '.min.css',
125+
'js': 'js/cesar.min.js',
126+
'vendors': 'js/vendors.min.js',
127+
'css': 'css/cesar.min.css',
128+
'vendorscss': 'css/vendors.min.css',
129129
}))
130130
.pipe(rename('index.html'))
131131
.pipe(gulp.dest(paths.build.dist));

client-ng1/src/app/index-dev.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html ng-app="cesar" lang="en" ng-strict-di>
2+
<html ng-app="cesar" ng-strict-di>
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -18,16 +18,16 @@
1818
<!-- Add to homescreen for Chrome on Android -->
1919
<meta name="mobile-web-app-capable" content="yes">
2020
<meta name="application-name" content="Mix-IT">
21-
<link rel="icon" sizes="192x192" href="logo/touch/chrome-touch-icon-192x192.png">
21+
<link rel="icon" sizes="192x192" href="img/touch/chrome-touch-icon-192x192.png">
2222

2323
<!-- Add to homescreen for Safari on iOS -->
2424
<meta name="apple-mobile-web-app-capable" content="yes">
2525
<meta name="apple-mobile-web-app-status-bar-style" content="black">
2626
<meta name="apple-mobile-web-app-title" content="Mix-IT">
27-
<link rel="apple-touch-icon" href="logo/touch/apple-touch-icon.png">
27+
<link rel="apple-touch-icon" href="img/touch/apple-touch-icon.png">
2828

2929
<!-- Tile icon for Win8 (144x144 + tile color) -->
30-
<meta name="msapplication-TileImage" content="logo/touch/ms-touch-icon-144x144-precomposed.png">
30+
<meta name="msapplication-TileImage" content="img/touch/ms-touch-icon-144x144-precomposed.png">
3131
<meta name="msapplication-TileColor" content="#0277bd">
3232
<meta name="google-site-verification" content="qDFxcAv1zhCLUhj0mMn9Nk_tEk0DCH02Dn6QHZP9Is8">
3333

client-ng1/src/app/js/routes.js

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@
254254
.state('start', new State(USER_ROLES, '', 'js/home/home.html').build())
255255

256256
.state('home', new State(USER_ROLES, 'home', 'js/home/home.html').build())
257-
257+
258258
.state('conference', new State(USER_ROLES, 'conference', 'js/conference/conference.html')
259259
.build())
260-
260+
261261
.state('valid', new State(USER_ROLES, 'valid', 'js/home/home.html')
262262
.controller(
263263
/* @ngInject */
@@ -382,6 +382,15 @@
382382
})
383383
.build())
384384

385+
.state('mixit16ext', new State(USER_ROLES, 'mixit16/:type', 'js/sessions/talks.html')
386+
.controller('SessionsClosedCtrl')
387+
.data({year: 2016})
388+
.resolve({
389+
sessions : getAll2016Sessions,
390+
sponsors: getAll2016Sponsors
391+
})
392+
.build())
393+
385394
.state('mixit15', new State(USER_ROLES, 'mixit15?search', 'js/sessions/talks.html')
386395
.controller('SessionsClosedCtrl')
387396
.data({year: 2015})
@@ -391,6 +400,15 @@
391400
})
392401
.build())
393402

403+
.state('mixit15ext', new State(USER_ROLES, 'mixit15/:type', 'js/sessions/talks.html')
404+
.controller('SessionsClosedCtrl')
405+
.data({year: 2015})
406+
.resolve({
407+
sessions : getAll2015Sessions,
408+
sponsors: getAll2015Sponsors
409+
})
410+
.build())
411+
394412
.state('mixit14', new State(USER_ROLES, 'mixit14?search', 'js/sessions/talks.html')
395413
.controller('SessionsClosedCtrl')
396414
.data({year: 2014})
@@ -400,6 +418,15 @@
400418
})
401419
.build())
402420

421+
.state('mixit14ext', new State(USER_ROLES, 'mixit14/:type', 'js/sessions/talks.html')
422+
.controller('SessionsClosedCtrl')
423+
.data({year: 2014})
424+
.resolve({
425+
sessions : getAll2014Sessions,
426+
sponsors: getAll2014Sponsors
427+
})
428+
.build())
429+
403430
.state('mixit13', new State(USER_ROLES, 'mixit13?search', 'js/sessions/talks.html')
404431
.controller('SessionsClosedCtrl')
405432
.data({year: 2013})
@@ -409,6 +436,15 @@
409436
})
410437
.build())
411438

439+
.state('mixit13ext', new State(USER_ROLES, 'mixit13/:type', 'js/sessions/talks.html')
440+
.controller('SessionsClosedCtrl')
441+
.data({year: 2013})
442+
.resolve({
443+
sessions : getAll2014Sessions,
444+
sponsors: getAll2014Sponsors
445+
})
446+
.build())
447+
412448
.state('mixit12', new State(USER_ROLES, 'mixit12?search', 'js/sessions/talks.html')
413449
.controller('SessionsClosedCtrl')
414450
.data({year: 2012})
@@ -418,6 +454,15 @@
418454
})
419455
.build())
420456

457+
.state('mixit12ext', new State(USER_ROLES, 'mixit12/:type', 'js/sessions/talks.html')
458+
.controller('SessionsClosedCtrl')
459+
.data({year: 2012})
460+
.resolve({
461+
sessions : getAll2014Sessions,
462+
sponsors: getAll2014Sponsors
463+
})
464+
.build())
465+
421466
.state('lightnings', new State(USER_ROLES, 'lightnings?search', 'js/lt/lightningtalks.html')
422467
.controller('LightningtalksCtrl')
423468
.resolve({
@@ -543,7 +588,7 @@
543588
.build())
544589

545590
.state('multimedia', new State(USER_ROLES, 'multimedia', 'js/multimedia/multimedia.html').
546-
build())
591+
build())
547592

548593
.state('codeofconduct', new State(USER_ROLES, 'codeofconduct', 'js/codeofconduct/codeofconduct.html')
549594
.build())
@@ -586,6 +631,18 @@
586631
.state('logout', new State(USER_ROLES, 'logout', 'js/home/home.html')
587632
.build())
588633

634+
.state('login', new State(USER_ROLES, 'login', 'js/login/login.html')
635+
.controller('LoginCtrl')
636+
.build())
637+
638+
.state('login1', new State(USER_ROLES, 'login/:id', 'js/login/login.html')
639+
.controller('LoginCtrl')
640+
.build())
641+
642+
.state('login2', new State(USER_ROLES, 'login/with/:id', 'js/login/login.html')
643+
.controller('LoginCtrl')
644+
.build())
645+
589646
.state('authent', new State(USER_ROLES, 'authent?redirect', 'js/login/login.html')
590647
.controller('LoginCtrl')
591648
.build())

manifest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
memory: 1G
22
instances: 1
3+
buildpack: https://github.com/cloudfoundry/java-buildpack.git
34
applications:
45
- name: cesar
56
path: ./server/build/libs/server.jar

server/src/main/java/org/mixit/cesar/Routes.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class Routes {
1818
"/admarticle/{id:\\w+}",
1919
"/admarticles",
2020
"/admplanning",
21+
"/article",
2122
"/article/{id:\\w+}",
2223
"/article/{id:\\w+}/{name:[A-Za-z0-9_\\-.]+}",
2324
"/articles",
@@ -29,15 +30,19 @@ public class Routes {
2930
"/cfptalk/{type:\\w+}",
3031
"/codeofconduct",
3132
"/compte",
33+
"/conduite",
3234
"/createaccount/*",
3335
"/createaccountsocial",
34-
"/interest/{name:\\w+}",
36+
"/interest/{name:[A-Za-z0-9_\\-.\\s]+ }",
3537
"/faq",
3638
"/favoris",
3739
"/home",
3840
"/lightning/{id:\\w+}",
3941
"/lightning/{id:\\w+}/{name:[A-Za-z0-9_\\-.]+}",
4042
"/lightnings",
43+
"/login",
44+
"/login/{id:\\w+}",
45+
"/login/with/{id:\\w+}",
4146
"/logout",
4247
"/facilities",
4348
"/member/{type:\\w+}/{id:\\w+}",
@@ -47,6 +52,11 @@ public class Routes {
4752
"/mixit14",
4853
"/mixit13",
4954
"/mixit12",
55+
"/mixit16/{type:\\w+}",
56+
"/mixit15/{type:\\w+}",
57+
"/mixit14/{type:\\w+}",
58+
"/mixit13/{type:\\w+}",
59+
"/mixit12/{type:\\w+}",
5060
"/mixteen",
5161
"/monitor",
5262
"/multimedia",
@@ -61,7 +71,7 @@ public class Routes {
6171
"/ranking",
6272
"/rankingmonit",
6373
"/session/{id:\\w+}",
64-
"/session/{id:\\w+}/{title:[A-Za-z0-9_\\-.]+}",
74+
"/session/{id:\\w+}/{title:[A-Za-z0-9_\\-.\\s]+}",
6575
"/sessions",
6676
"/speakers",
6777
"/sponsor/{id:\\w+}",

server/src/main/java/org/mixit/cesar/security/config/CesarMailConfig.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
import java.util.Properties;
44

55
import org.springframework.beans.factory.annotation.Value;
6-
import org.springframework.boot.autoconfigure.velocity.VelocityProperties;
76
import org.springframework.context.annotation.Bean;
87
import org.springframework.context.annotation.Configuration;
98
import org.springframework.mail.javamail.JavaMailSender;
109
import org.springframework.mail.javamail.JavaMailSenderImpl;
11-
import org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver;
1210

1311
@Configuration
1412
public class CesarMailConfig {

server/src/main/java/org/mixit/cesar/site/config/CesarHttpCacheConfig.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
package org.mixit.cesar.site.config;
22

3+
import java.util.concurrent.TimeUnit;
4+
import javax.servlet.Filter;
5+
36
import org.springframework.context.annotation.Bean;
47
import org.springframework.context.annotation.Configuration;
58
import org.springframework.http.CacheControl;
9+
import org.springframework.web.filter.ShallowEtagHeaderFilter;
610
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
711
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
812
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@@ -18,10 +22,15 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
1822
registry
1923
.addResourceHandler("/**/*.html")
2024
.addResourceLocations("classpath:/static/")
21-
.setCacheControl(CacheControl.noStore().mustRevalidate());
25+
.setCacheControl(CacheControl.maxAge(10, TimeUnit.DAYS));
2226
}
2327
};
28+
}
2429

30+
31+
@Bean
32+
public Filter securityFilter() {
33+
return new ShallowEtagHeaderFilter();
2534
}
2635

2736
}

server/src/main/java/org/mixit/cesar/site/web/app/BotController.java

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
import java.util.Map;
44

5+
import org.apache.velocity.app.VelocityEngine;
56
import org.mixit.cesar.site.service.AbsoluteUrlFactory;
67
import org.mixit.cesar.site.service.CesarService;
78
import org.springframework.beans.factory.annotation.Autowired;
89
import org.springframework.stereotype.Controller;
10+
import org.springframework.ui.Model;
11+
import org.springframework.ui.velocity.VelocityEngineUtils;
912
import org.springframework.web.bind.annotation.RequestMapping;
1013
import org.springframework.web.bind.annotation.RequestMethod;
1114
import org.springframework.web.servlet.ModelAndView;
@@ -24,13 +27,34 @@ public class BotController {
2427
@Autowired
2528
private CesarService cesarService;
2629

27-
@RequestMapping(method = RequestMethod.GET)
28-
public ModelAndView showQuizz() {
29-
Map<String, String> params = cesarService.getParameters();
30-
params.put("baseurl", absoluteUrlFactory.getBaseUrl());
31-
params.put("name", "Mix-IT");
32-
params.put("description", "Mix-IT, it's 2 intense days of conferences to discover new ideas, games to learn, development or creative workshops");
33-
return new ModelAndView("bot", params);
30+
@Autowired
31+
private VelocityEngine velocityEngine;
32+
33+
// @RequestMapping(method = RequestMethod.GET)
34+
// public ModelAndView showQuizz() {
35+
// Map<String, String> params = cesarService.getParameters();
36+
// params.put("baseurl", absoluteUrlFactory.getBaseUrl());
37+
// params.put("name", "Mix-IT");
38+
// params.put("description", "Mix-IT, it's 2 intense days of conferences to discover new ideas, games to learn, development or creative workshops");
39+
//
40+
// VelocityEngineUtils.mergeTemplateIntoString(
41+
// this.velocityEngine,
42+
// "bot",
43+
// "UTF-8",
44+
// null);
45+
//
46+
// return new ModelAndView("bot", params);
47+
// }
48+
49+
@RequestMapping
50+
public String showQuizz(Model model) {
51+
//Map<String, String> params =
52+
model.addAllAttributes(cesarService.getParameters());
53+
model.addAttribute("baseurl", absoluteUrlFactory.getBaseUrl());
54+
model.addAttribute("name", "Mix-IT");
55+
model.addAttribute("description", "Mix-IT, it's 2 intense days of conferences to discover new ideas, games to learn, development or creative workshops");
56+
//return new ModelAndView("bot", params);
57+
return "bot";
3458
}
3559

3660
}

0 commit comments

Comments
 (0)