Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove base controller from HTML tag to after Angular bootstrap and convert I18NFooter and Thanks to component directives. #7283

Merged
merged 15 commits into from
Aug 5, 2019
Next Next commit
Fixed splash-at0 and splash-at1
  • Loading branch information
YashJipkate committed Jul 5, 2019
commit 8c5e12fcb6f8955cd711f83e7bb720a83cc2192c
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
<div>
<div class="oppia-splash-section-one text-center">
<h1 class="oppia-splash-h1" style="max-width: 800px; font-size: 2.3em; line-height: 1.5em; padding-bottom: 0.5em;">Lesson plans aren't just for the schoolday</h1>

<div class="oppia-splash-button-heading">
<h2 style="max-width: 400px; color: #005c53; font-size: 1.6em; font-family: Capriola; line-height: 1.5em;">
Create fun interactive quizzes that students can do at home.
</h2>
</div>

<div style="position: relative;">
<div style="padding-left: 200px;">
<div class="oppia-splash-background-icon-row">
<img ng-src="<[$ctrl.getStaticImageUrl('/splash/books.svg')]>" class="oppia-splash-books" style="margin-left: -250px; width: 500px; top: 95px;" alt="">

<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Humor')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Combinatorics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Cooking')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Government')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Architecture')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('History')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Microbiology')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Engineering')]>" class="oppia-splash-background-icon" alt="">

<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Algorithms')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Economics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Computing')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Reading')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Art')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Creativity')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Physics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Language')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Arithmetic')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Chess')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Astronomy')]>" class="oppia-splash-background-icon" alt="">

<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Religion')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Mathematics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Philosophy')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Humor')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Combinatorics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Cooking')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Government')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Architecture')]>" class="oppia-splash-background-icon" alt="">
</div>

<div class="oppia-splash-background-icon-row">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Genetics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Space')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Algebra')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Music')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Chemistry')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Poetry')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Puzzles')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Calculus')]>" class="oppia-splash-background-icon" alt="">

<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Business')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Geography')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Biology')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Genetics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Space')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Algebra')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Music')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Chemistry')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Poetry')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Puzzles')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Calculus')]>" class="oppia-splash-background-icon" alt="">

<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Business')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Geography')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Biology')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Genetics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Space')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Algebra')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Music')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Chemistry')]>" class="oppia-splash-background-icon" alt="">
</div>

<div class="oppia-splash-background-icon-row">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Economics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Algorithms')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Creativity')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Astronomy')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Chess')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Arithmetic')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Language')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Physics')]>" class="oppia-splash-background-icon" alt="">

<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Combinatorics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Humor')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Philosophy')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Mathematics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Religion')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Cooking')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Engineering')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Microbiology')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('History')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Architecture')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Government')]>" class="oppia-splash-background-icon" alt="">

<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Art')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Reading')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Computing')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Economics')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Algorithms')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Creativity')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Astronomy')]>" class="oppia-splash-background-icon" alt="">
<img ng-src="<[$ctrl.getStaticSubjectImageUrl('Chess')]>" class="oppia-splash-background-icon" alt="">
</div>
</div>

<div class="oppia-splash-button-container">
<!-- User must complete the registration process. -->
<button type="button"
ng-if="!$ctrl.userIsLoggedIn"
ng-click="$ctrl.onRedirectToLogin('/creator_dashboard?mode=create')"
class="btn oppia-splash-button oppia-splash-button-create oppia-transition-200"
style="left: -webkit-calc(130px + 15%); left: -moz-calc(130px + 15%); left: -o-calc(130px + 15%); left: calc(130px + 15%); bottom: 210px; z-index: 10;"
translate="I18N_ACTION_CREATE_LESSON">
</button>
<button type="button"
ng-if="$ctrl.userIsLoggedIn"
ng-click="$ctrl.onClickCreateExplorationButton()"
class="btn oppia-splash-button oppia-splash-button-create oppia-transition-200"
style="left: -webkit-calc(130px + 15%); left: -moz-calc(130px + 15%); left: -o-calc(130px + 15%); left: calc(130px + 15%); bottom: 210px; z-index: 10;"
translate="I18N_ACTION_CREATE_LESSON">
</button>
<button type="button" ng-click="$ctrl.onClickBrowseLibraryButton()"
class="btn oppia-splash-button oppia-splash-button-browse oppia-transition-200"
style="left: -webkit-calc(130px + 15%); left: -moz-calc(130px + 15%); left: -o-calc(130px + 15%); left: calc(130px + 15%); bottom: 150px; font-size: 0.93em; z-index: 10;"
translate="I18N_ACTION_BROWSE_LESSONS">
</button>
</div>
</div>

<div class="oppia-splash-h2-container">
<h2 class="oppia-splash-h2" style="padding-bottom: 30px; font-size: 1.6em; padding-top: 100px; max-width: 700px;">
</h2>
</div>
</div>

<div class="oppia-splash-section-two">
<div class="oppia-splash-section-two-content" style="padding-top: 0;">
<div class="oppia-splash-bullet" style="overflow: visible;">
<div class="oppia-splash-bullet-block oppia-splash-block-left-image">
<img ng-src="<[$ctrl.getStaticImageUrl('/splash/bullet1icon.svg')]>" class="oppia-splash-overlapping-image-1" alt="">
</div>
<div class="oppia-splash-bullet-block oppia-splash-block-right-text"
translate="I18N_SPLASH_FIRST_EXPLORATION_DESCRIPTION">
</div>
</div>

<div class="oppia-splash-bullet" style="clear: both;">
<div class="oppia-splash-bullet-block oppia-splash-block-right-image">
<img ng-src="<[$ctrl.getStaticImageUrl('/splash/bullet2icon.svg')]>" alt="">
</div>
<div class="oppia-splash-bullet-block oppia-splash-block-left-text"
translate="I18N_SPLASH_SECOND_EXPLORATION_DESCRIPTION">
</div>
</div>

<div class="oppia-splash-bullet">
<div class="oppia-splash-bullet-block oppia-splash-block-left-image">
<img ng-src="<[$ctrl.getStaticImageUrl('/splash/bullet3icon.svg')]>" alt="">
</div>
<div class="oppia-splash-bullet-block oppia-splash-block-right-text"
translate="I18N_SPLASH_THIRD_EXPLORATION_DESCRIPTION">
</div>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// Copyright 2014 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* @fileoverview Data and controllers for the Oppia splash page.
*/

var oppia = require('AppInit.ts').module;

require('base_components/BaseContentDirective.ts');

require('domain/utilities/UrlInterpolationService.ts');
require('services/SiteAnalyticsService.ts');
require('services/UserService.ts');

oppia.directive('splashAt0Page', ['UrlInterpolationService', function(
UrlInterpolationService) {
return {
restrict: 'E',
scope: {},
bindToController: {},
templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(
'/pages/splash-page/splash-at0-page.directive.html'),
controllerAs: '$ctrl',
controller: [
'$rootScope', '$timeout', '$window', 'SiteAnalyticsService',
'UrlInterpolationService', 'UserService',
function($rootScope, $timeout, $window, SiteAnalyticsService,
UrlInterpolationService, UserService) {
var ctrl = this;
ctrl.userIsLoggedIn = null;
$rootScope.loadingMessage = 'Loading';
UserService.getUserInfoAsync().then(function(userInfo) {
ctrl.userIsLoggedIn = userInfo.isLoggedIn();
$rootScope.loadingMessage = '';
});
ctrl.getStaticImageUrl = UrlInterpolationService.getStaticImageUrl;
ctrl.getStaticSubjectImageUrl = function(subjectName) {
return UrlInterpolationService.getStaticImageUrl('/subjects/' +
subjectName + '.svg');
};

ctrl.onRedirectToLogin = function(destinationUrl) {
SiteAnalyticsService.registerStartLoginEvent(
'splashPageCreateExplorationButton');
$timeout(function() {
$window.location = destinationUrl;
}, 150);
return false;
};

ctrl.onClickBrowseLibraryButton = function() {
SiteAnalyticsService.registerClickBrowseLibraryButtonEvent();
$timeout(function() {
$window.location = '/library';
}, 150);
return false;
};

ctrl.onClickCreateExplorationButton = function() {
SiteAnalyticsService.registerClickCreateExplorationButtonEvent();
$timeout(function() {
$window.location = '/creator_dashboard?mode=create';
}, 150);
return false;
};
}
]
};
}]);
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2019 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* @fileoverview Directive scripts for the Oppia splash page.
*/

require('App.ts');
require('pages/splash-page/splash-at0-page.directive.ts');
Loading