1
0
mirror of https://github.com/danog/schema.tl.git synced 2024-12-02 09:18:02 +01:00

titles???

This commit is contained in:
TJ Horner 2017-08-21 20:33:47 -07:00
parent 0e9b350a1d
commit f62a98c3f6
2 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<html ng-app="tlDocsApp"> <html ng-app="tlDocsApp">
<head> <head>
<title>TL-Schema Explorer</title> <title>{{ title ? title + " // " : "" }}TL-Schema Explorer</title>
<link href="https://fonts.googleapis.com/css?family=Fira+Mono" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Fira+Mono" rel="stylesheet">
<link rel="stylesheet" href="/css/styles.css?v7"> <link rel="stylesheet" href="/css/styles.css?v7">
@ -11,7 +11,7 @@
<script src="/js/schema.js"></script> <script src="/js/schema.js"></script>
<script src="/js/angular.min.js"></script> <script src="/js/angular.min.js"></script>
<script src="/js/ngroute.min.js"></script> <script src="/js/ngroute.min.js"></script>
<script src="/js/app.js?v4"></script> <script src="/js/app.js?v5"></script>
<meta property="og:title" content="TL-Schema Explorer"> <meta property="og:title" content="TL-Schema Explorer">
<meta property="og:site_name" content="TL-Schema Explorer"> <meta property="og:site_name" content="TL-Schema Explorer">

View File

@ -173,6 +173,7 @@ tlDocsApp.config(function($routeProvider, $locationProvider) {
tlDocsApp.controller("mainController", function($scope, $rootScope, $location, schema, layerVersion, SchemaService) { tlDocsApp.controller("mainController", function($scope, $rootScope, $location, schema, layerVersion, SchemaService) {
$rootScope.hideGlobalSearch = true $rootScope.hideGlobalSearch = true
$rootScope.title = null
$scope.title = "TL-Schema Explorer" $scope.title = "TL-Schema Explorer"
$scope.schema = schema $scope.schema = schema
@ -224,6 +225,8 @@ tlDocsApp.controller("viewConstructorController", function($scope, $routeParams,
$scope.constructor = SchemaService.findConstructor($routeParams.predicate) $scope.constructor = SchemaService.findConstructor($routeParams.predicate)
if(!$scope.constructor) $location.path("/") if(!$scope.constructor) $location.path("/")
$rootScope.title = $scope.constructor.predicate
$scope.updatePlayground = function() { $scope.updatePlayground = function() {
var example = { flags: 0, _: $scope.constructor.predicate } var example = { flags: 0, _: $scope.constructor.predicate }
@ -246,6 +249,8 @@ tlDocsApp.controller("viewMethodController", function($scope, $routeParams, $loc
$scope.method = SchemaService.findMethod($routeParams.method) $scope.method = SchemaService.findMethod($routeParams.method)
if(!$scope.method) $location.path("/") if(!$scope.method) $location.path("/")
$rootScope.title = $scope.method.method
$scope.playgroundVals = { } $scope.playgroundVals = { }
$scope.playgroundOutput = "" $scope.playgroundOutput = ""
@ -270,4 +275,6 @@ tlDocsApp.controller("viewTypeController", function($scope, $routeParams, $locat
$scope.type = SchemaService.findType($routeParams.type) $scope.type = SchemaService.findType($routeParams.type)
if(!$scope.type) $location.path("/") if(!$scope.type) $location.path("/")
$rootScope.title = $scope.type.name
}) })