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

Add base-root template recipe #446

Open
jacobtylerwalls opened this issue Jul 19, 2024 · 0 comments
Open

Add base-root template recipe #446

jacobtylerwalls opened this issue Jul 19, 2024 · 0 comments

Comments

@jacobtylerwalls
Copy link
Member

jacobtylerwalls commented Jul 19, 2024

describe the issue

We should add this example from archesproject/arches#11002 to the docs:

There is a new template that can be extended in projects: base-root.htm. It can be extended like so:

```
{% extends "base-root.htm" %}

 {% block title %}

 {% endblock title %}

 {% block body %}
 <div id="foo"></div>
 {% endblock body %}
```

with a corresponding .js file, eg:

```
    import BarComponent from '@/BarComponent.vue';
    import createVueApplication from 'arches/arches/app/media/js/utils/create-vue-application';

    createVueApplication(BarComponent).then(vueApp => {
        vueApp.mount('#foo');
    });

```

and vue file:

<template>
    <div class="hello">
        <h1>{{ message }}</h1>
    </div>
</template>

<script setup>
import { ref } from 'vue';

const message = ref('Hello, World!');
</script>

<style scoped>
.hello {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
}
</style>

we are now able to load Vue applications without the Arches chrome, and with optional custom theming via the PrimeVue api.

please add links to existing docs or code (if relevant)
which release does this issue concern?

7.6

@jacobtylerwalls jacobtylerwalls changed the title Add standalone template recipe Add base-root template recipe Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant