- add alias_url ind config/app.php
- Define constants DATACITE_PREFIX abd APP_URL inside wevpack.mix.js - define subdomains for alias and dois inside routes/web.php - install dotenv via npm
This commit is contained in:
parent
a68b7b34cf
commit
00bea6885e
|
@ -55,6 +55,7 @@ return [
|
|||
*/
|
||||
|
||||
'url' => env('APP_URL', 'http://localhost'),
|
||||
'alias_url' => env('ALIAS_URL'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
5
package-lock.json
generated
5
package-lock.json
generated
|
@ -10,6 +10,7 @@
|
|||
"axios": "^0.21.1",
|
||||
"datatables.net": "^1.10.21",
|
||||
"datatables.net-buttons": "^1.6.3",
|
||||
"dotenv": "^8.6.0",
|
||||
"easytimer": "^1.1.1",
|
||||
"jquery": "^3.5.1",
|
||||
"leaflet": "^1.7.1",
|
||||
|
@ -4601,7 +4602,6 @@
|
|||
"version": "8.6.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz",
|
||||
"integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
|
@ -17000,8 +17000,7 @@
|
|||
"dotenv": {
|
||||
"version": "8.6.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz",
|
||||
"integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g=="
|
||||
},
|
||||
"dotenv-expand": {
|
||||
"version": "5.1.0",
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
"axios": "^0.21.1",
|
||||
"datatables.net": "^1.10.21",
|
||||
"datatables.net-buttons": "^1.6.3",
|
||||
"dotenv": "^8.6.0",
|
||||
"easytimer": "^1.1.1",
|
||||
"jquery": "^3.5.1",
|
||||
"leaflet": "^1.7.1",
|
||||
|
|
File diff suppressed because one or more lines are too long
8
resources/js/constants.ts
Normal file
8
resources/js/constants.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
declare const DATACITE_PREFIX: string;
|
||||
declare const APP_URL: string;
|
||||
|
||||
const _DATACITE_PREFIX = DATACITE_PREFIX;
|
||||
const _APP_URL = APP_URL;
|
||||
|
||||
export {_DATACITE_PREFIX as DATACITE_PREFIX};
|
||||
export {_APP_URL as APP_URL};
|
|
@ -1,9 +1,12 @@
|
|||
import { Component, Vue, Prop, Provide } from 'vue-property-decorator';
|
||||
import { Component, Vue, Prop } from 'vue-property-decorator';
|
||||
import { DATACITE_PREFIX, APP_URL } from "../../constants";
|
||||
|
||||
@Component
|
||||
export default class VsResults extends Vue {
|
||||
|
||||
openAccessLicences: Array<string> = ['CC BY', 'CC BY-SA'];
|
||||
openAccessLicences: Array<string> = ['CC-BY-4.0', 'CC-BY-SA-4.0'];
|
||||
datacite_prefix= DATACITE_PREFIX;
|
||||
app_url=APP_URL;
|
||||
|
||||
@Prop()
|
||||
data;
|
||||
|
|
|
@ -30,17 +30,17 @@
|
|||
<span v-if="openAccessLicences.includes(document.licence)" class="label label-success titlecase">Open Access</span>
|
||||
|
||||
|
||||
<h4 v-if="document.identifier && document.identifier.length > 0">
|
||||
<p v-if="document.identifier && document.identifier.length > 0">
|
||||
<!-- <span>Author: {{ document.identifier.join(', ') }}</span> -->
|
||||
<!-- <span v-for="(author,index) in document.author" :key="index">{{ author }}; </span> -->
|
||||
<!-- <span>'https://doi.org/' + {{ document.identifier[0] }}</span> -->
|
||||
<a target="_blank" v-bind:href="'https://doi.org/' + document.identifier[0]" class="ng-binding">
|
||||
{{ 'https://doi.org/' + document.identifier[0] }}
|
||||
</a>
|
||||
</h4>
|
||||
</p>
|
||||
|
||||
<h4>
|
||||
<a target="_self" v-bind:href="'dataset/' + document.id" class="ng-binding">
|
||||
<a target="_self" v-bind:href="'https://doi.'+ app_url +'/' + datacite_prefix + '/tethys.' + document.id" class="ng-binding">
|
||||
{{ document.title_output }}
|
||||
</a>
|
||||
</h4>
|
||||
|
|
990
routes/web.php
990
routes/web.php
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,6 @@
|
|||
let mix = require('laravel-mix');
|
||||
|
||||
require('dotenv').config();
|
||||
let webpack = require('webpack')
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mix Asset Management siehe https://laravel.com/docs/5.5/mix
|
||||
|
@ -55,7 +56,13 @@ mix.js('resources/js/datasetPublish.js', 'public/backend/publish').vue()
|
|||
// defaults.
|
||||
extensions: ['*', '.js', '.jsx', '.vue', '.ts', '.tsx'],
|
||||
},
|
||||
});
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({ // Remove this plugin if you don't plan to define any global constants
|
||||
DATACITE_PREFIX: JSON.stringify(process.env.DATACITE_PREFIX),
|
||||
APP_URL: JSON.stringify(process.env.APP_URL)
|
||||
}),
|
||||
]
|
||||
});
|
||||
// .options({
|
||||
// //publicPath: '../'
|
||||
// processCssUrls: false
|
||||
|
|
Loading…
Reference in New Issue
Block a user