Skip to content

Commit

Permalink
Added analytics, v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelt25 committed Apr 10, 2017
1 parent 6943ae6 commit 8726f43
Show file tree
Hide file tree
Showing 26 changed files with 140 additions and 99 deletions.
2 changes: 1 addition & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ h1,h2,h3,h4,h5,h6{
margin-right: 15px;
}

.navbar-text a:focus, a:hover, a:visited {
.navbar-text a:focus, a:hover {
color: #fff !important;
text-decoration: none;
}
Expand Down
Binary file modified img/about1.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/about2.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/about3.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/about5.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/about6.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/about7.JPG
Binary file not shown.
Binary file removed img/bckg.jpg
Binary file not shown.
Binary file modified img/cameraObs.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/ciclope.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/dmk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/earth.jpg
Binary file not shown.
Binary file modified img/facebook_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/moobotix.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/observatory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/philips.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/space.jpg
Binary file not shown.
Binary file modified img/twitter_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 22 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<head>
<meta charset="utf-8">
<base href="/web-observatorio/">
<!--Poner / en venus-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="img/logo.ico">
Expand All @@ -14,6 +15,18 @@
<link rel="stylesheet" href="css/style.css">
<!-- fontsawesome -->
<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Google Analytics -->
<script>
window.ga = window.ga || function() {
(ga.q = ga.q || []).push(arguments)
};
ga.l = +new Date;
//cambiar venus UA-97133305-1
// ga('create', 'UA-96927777-1', 'auto');
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<!-- EndGoogle Analytics -->
</head>

<body ng-controller="mainController">
Expand Down Expand Up @@ -71,14 +84,16 @@
<div class="container" id="content" ng-view></div>

<!-- <div class="container-fluid"> -->
<footer>
<div class="row" style="margin-right: -0px; margin-left: 0px;">
<div class="col-md-12 center-block text-center">
<a href="#" target="_blank"><img class="logo" src="img/facebook_icon.png" alt="facebook"></i></a>
<a href="#" target="_blank"><img class="logo" src="img/twitter_icon.png" alt="twitter"></i></a>
</div>
<footer>
<div class="row" style="margin-right: -0px; margin-left: 0px;">
<div class="col-md-12 center-block text-center">
<a href="https://www.facebook.com/ciclopeastro" target="_blank"><img class="logo" src="img/facebook_icon.png" alt="facebook"></i>
</a>
<a href="https://twitter.com/ciclopegroup" target="_blank"><img class="logo" src="img/twitter_icon.png" alt="twitter"></i>
</a>
</div>
</footer>
</div>
</footer>
<!-- </div> -->
</div>

Expand Down
24 changes: 12 additions & 12 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,32 @@ app.config(['$locationProvider', function($locationProvider) {
// Routing
app.config(function($routeProvider) {
$routeProvider
.when('/', {
redirectTo: '/bienvenido'
})
.when('/bienvenido', {
// .when('/', {
// redirectTo: '/bienvenido'
// })
.when('/inicio', {
templateUrl: 'views/inicio.html',
controller: 'inicioController'
})
.when('/equipamiento', {
templateUrl: 'views/equipment.html',
controller: ''
controller: 'equipamientoController'
})
.when('/acerca', {
templateUrl: 'views/about.html',
controller: ''
controller: 'acercaController'
})
.when('/contacto', {
templateUrl: 'views/contact.html',
controller: ''
})
.when('/inicio', {
templateUrl: 'views/inicio.html',
controller: 'inicioController'
controller: 'contactoController'
})
// .when('/inicio', {
// templateUrl: 'views/inicio.html',
// controller: 'inicioController'
// })
.otherwise({
redirectTo: function(){
return '/'
return '/inicio'
}
})
// .when('/experimento/nocturno', {
Expand Down
136 changes: 96 additions & 40 deletions js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,100 @@ app.controller('mainController', function($scope) {


app.controller('inicioController', ['$scope', '$sce', '$http', function($scope, $sce, $http) {
$scope.cameraFile = $sce.trustAsResourceUrl('https://www.youtube.com/embed/u');
//Estado observatorio
$scope.state = {};
// $scope.state.temperature = null;
// $scope.state.humidity = null;
// $scope.state.pressure = null;
// $scope.state.windSpeed = null;
// $scope.state.visibility = null;'
$scope.state.operability = "Estado de la cúpula: <span class='dome-red'>CERRADA</span>";
// $scope.state.busy = "El observatorio está libre. Inicie sesión o Registrese para observar el cielo."
$http.get('http://api.openweathermap.org/data/2.5/weather?q=Boadilladelmonte,sp&APPID=41a51db0a52c9d6db1462321b6a6a297')
.then(function successCallback(response){
$scope.state.temperature = response.data.main.temp - 273.15;
$scope.state.humidity = response.data.main.humidity;
$scope.state.pressure = response.data.main.pressure;
$scope.state.windSpeed = response.data.wind.speed;
$scope.state.visibility = response.data.visibility;
},function errorCallback(response){
$scope.state.temperature = "No disponible";
$scope.state.humidity = "No disponible";
$scope.state.pressure = "No disponible";
$scope.state.windSpeed = "No disponible";
$scope.state.visibility = "No disponible";
});
$scope.cameraFile = 'img/cameraObs.jpg';
// Seleccion de camara
$scope.SelectCamera = function() {
if ($scope.camera == 'interior') {
// $scope.cameraFile = $sce.trustAsResourceUrl('https://www.youtube.com/embed/FM7MFYoylVs');
$scope.cameraFile = 'img/moobotix.jpg';
} else if ($scope.camera == 'exterior') {
$scope.cameraFile = 'img/philips.jpg';
// $scope.cameraFile = $sce.trustAsResourceUrl('https://www.youtube.com/embed/D5drYkLiLI8');
} else if ($scope.camera == 'ccd') {
// $scope.cameraFile = $sce.trustAsResourceUrl('https://www.youtube.com/embed/RhU9MZ98jxo');
}
}


// http://api.openweathermap.org/data/2.5/weather?q=Madrid,sp&APPID=41a51db0a52c9d6db1462321b6a6a297
// $scope.cameraFile = $sce.trustAsResourceUrl('https://www.youtube.com/embed/u');
//Estado observatorio
$scope.state = {};
// $scope.state.temperature = null;
// $scope.state.humidity = null;
// $scope.state.pressure = null;
// $scope.state.windSpeed = null;
// $scope.state.visibility = null;'
$scope.state.operability = "Estado de la cúpula: <span class='dome-red'>CERRADA</span>";
// $scope.state.busy = "El observatorio está libre. Inicie sesión o Registrese para observar el cielo."
$http.get('http://api.openweathermap.org/data/2.5/weather?q=Boadilladelmonte,sp&APPID=41a51db0a52c9d6db1462321b6a6a297')
.then(function successCallback(response) {
$scope.state.temperature = response.data.main.temp - 273.15;
$scope.state.humidity = response.data.main.humidity;
$scope.state.pressure = response.data.main.pressure;
$scope.state.windSpeed = response.data.wind.speed;
$scope.state.visibility = response.data.visibility;
}, function errorCallback(response) {
$scope.state.temperature = "No disponible";
$scope.state.humidity = "No disponible";
$scope.state.pressure = "No disponible";
$scope.state.windSpeed = "No disponible";
$scope.state.visibility = "No disponible";
});
$scope.cameraFile = 'img/cameraObs.jpg';
// Seleccion de camara
$scope.SelectCamera = function() {
if ($scope.camera == 'interior') {
// $scope.cameraFile = $sce.trustAsResourceUrl('https://www.youtube.com/embed/FM7MFYoylVs');
$scope.cameraFile = '/moobotix.jpg';
} else if ($scope.camera == 'exterior') {
$scope.cameraFile = '/philips.jpg';
// $scope.cameraFile = $sce.trustAsResourceUrl('https://www.youtube.com/embed/D5drYkLiLI8');
} else if ($scope.camera == 'ccd') {
// $scope.cameraFile = $sce.trustAsResourceUrl('https://www.youtube.com/embed/RhU9MZ98jxo');
}
}

//Modal imagen
if ($(window).width() > 767) {
var $lightbox = $('#lightbox');
$('.thumbnail').on('click', function(event) {
var $img = $(this).find('img'),
src = $img.attr('src'),
alt = $img.attr('alt');
// css = {
// 'maxWidth': $(window).width() - 100,
// 'maxHeight': $(window).height() - 100
// };

$lightbox.find('.close').addClass('hidden');
$lightbox.find('img').attr('src', src);
$lightbox.find('img').attr('alt', alt);
// $lightbox.find('img').css(css);
});

$lightbox.on('shown.bs.modal', function() {
var $img = $lightbox.find('img');

$lightbox.find('.modal-dialog').css({
'width': $img.width()
});
$lightbox.find('.close').removeClass('hidden');
});
} else {
$('.thumbnail').removeAttr('data-toggle');
}

// http://api.openweathermap.org/data/2.5/weather?q=Madrid,sp&APPID=41a51db0a52c9d6db1462321b6a6a297
}]);


app.controller('equipamientoController', ['$scope', '$sce', '$http', function($scope, $sce, $http) {

// <!-- Google Analytics -->
ga('set', 'page', '/equipamiento');
ga('send', 'pageview');
// <!-- End Google Analytics -->

}]);
app.controller('acercaController', ['$scope', '$sce', '$http', function($scope, $sce, $http) {

// <!-- Google Analytics -->
ga('set', 'page', '/acerca');
ga('send', 'pageview');
// <!-- End Google Analytics -->

}]);

app.controller('contactoController', ['$scope', '$sce', '$http', function($scope, $sce, $http) {

// <!-- Google Analytics -->
ga('set', 'page', '/contacto');
ga('send', 'pageview');
// <!-- End Google Analytics -->

}]);
34 changes: 1 addition & 33 deletions js/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var path = window.location.pathname;
var dir = path.slice(18);
var dir = path.slice(18); //poner a 1 al subir a venus
var selected; //clase activa navbar

// Ajuste path - navbar
Expand All @@ -26,7 +26,6 @@ $(document).ready(function() {
});
// End elemento activo Lista navbar


// Navbar lateral activo
$('.navbar-nav').on('click', 'li', function() {
selected = $('#slidemenu').hasClass('slide-active');
Expand Down Expand Up @@ -58,35 +57,4 @@ $(document).ready(function() {
$(del).removeClass('slide-active');
}
});

if ($(window).width() > 767) {
var $lightbox = $('#lightbox');
console.log('menor');
$('[data-target="#lightbox"]').on('click', function(event) {
var $img = $(this).find('img'),
src = $img.attr('src'),
alt = $img.attr('alt'),
css = {
'maxWidth': $(window).width() - 100,
'maxHeight': $(window).height() - 100
};

$lightbox.find('.close').addClass('hidden');
$lightbox.find('img').attr('src', src);
$lightbox.find('img').attr('alt', alt);
$lightbox.find('img').css(css);
});

$lightbox.on('shown.bs.modal', function(e) {
var $img = $lightbox.find('img');

$lightbox.find('.modal-dialog').css({
'width': $img.width()
});
$lightbox.find('.close').removeClass('hidden');
});

} else {
$('.thumbnail').removeAttr('data-toggle');
}
});
2 changes: 1 addition & 1 deletion views/about.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="row">

<div class="col-xs-12 text-center center-block">
<img src="img/ciclope.png" class="img-responsive" alt="" style="margin: 20px auto;">
<a href="http://ciclope.info"><img src="img/ciclope.png" class="img-responsive" alt="" style="margin: 20px auto;"></a>
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div id="carousel" class="carousel slide" data-ride="carousel">
Expand Down
11 changes: 6 additions & 5 deletions views/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ <h1 class="text-center" style="margin-bottom:50px">Contacto</h1>
<div class="col-md-6 text-center" id="contacto" style="margin-bottom:20px;">
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-12">
<h3>Envíanos un email <span></span></h3>
<a href="#" class="social-mail" target="_blank"><i class="fa fa-envelope-square fa-3x" aria-hidden="true"></i></a>
<h3>Conócenos<span></span></h3>
<!-- <a href="#" class="social-mail" target="_blank"><i class="fa fa-envelope-square fa-3x" aria-hidden="true"></i></a> -->
<a href="http://ciclope.info"><img src="img/logo.png" width="45"alt=""></a>
</div>
<div class="col-xs-12 col-sm-6 col-md-12">
<h3>Síguenos en redes sociales</h3>
<a href="#" class="social-fb" target="_blank"><i class="fa fa-facebook-square fa-3x" aria-hidden="true"></i></a>
<a href="#" class="social-tw" target="_blank"><i class="fa fa-twitter-square fa-3x" aria-hidden="true"></i></a>
<a href="https://www.facebook.com/ciclopeastro" class="social-fb" target="_blank"><i class="fa fa-facebook-square fa-3x" aria-hidden="true"></i></a>
<a href="https://twitter.com/ciclopegroup" class="social-tw" target="_blank"><i class="fa fa-twitter-square fa-3x" aria-hidden="true"></i></a>
</div>
<div class="col-xs-12">
<h3>Dirección</h3>
<p>Escuela Técnica Superior de Ingnieros Informáticos</p>
<p>Escuela Técnica Superior de Ingenieros Informáticos</p>
<p>Campus de Montegancedo</p>
<p>28660 Boadilla del Monte</p>
<p>Madrid - Spain</p>
Expand Down
1 change: 1 addition & 0 deletions views/inicio.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ <h3 class="text-center">Cámaras del observatorio</h3>
<div class="form-group row">
<div class="col-md-9 col-sm-9 col-xs-9">
<select class="form-control" name="" ng-model="camera">
<option value="" selected disabled hidden></option>
<option value="exterior">Cámara exterior</option>
<option value="interior">Cámara interior</option>
<!-- <option value="ccd">Cámara ccd</option> -->
Expand Down

0 comments on commit 8726f43

Please sign in to comment.