Can i use the CSS generated and managed by this module in my custom pages #334
michaeloliveraz
started this conversation in
General
Replies: 1 comment
-
What do you mean? This library patches / extends the default django admin, for making a custom admin page that inherits the admin style you should extend an existing django template, doing something like this: {% extends "admin/change_form.html" %}
{% load static %}
{% block extrastyle %}
{{ block.super }}
{% endblock %}
{% block extrahead %}
{{ block.super }}
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" integrity="sha256-7ZWbZUAi97rkirk4DcEp4GWDPkWpRMcNaEyXGsNXjLg=" crossorigin="anonymous">
<style type="text/css" scoped >
[v-cloak] {
display: none;
}
</style>
{% endblock %}
{% block nav-sidebar %}
{% endblock %}
{% block content %}
<div id="content-main">
<div class="container mt-4" id="js-app" v-cloak v-if="ready">
<!-- Your Vue.js app -->
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.min.js" integrity="sha256-kXTEJcRFN330VirZFl6gj9+UM6gIKW195fYZeR3xDhc=" crossorigin="anonymous"></script>
<script src="{% static 'app/admin/js/app.js' %}"></script>
</div>
{% endblock %} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I love this module, and I want to extend its capability into the custom user pages. I am currently using Vue.js for my custom pages, but the CSS mapping doesn't seem compatible. Has anyone done what I want to do and can offer any tips. I suppose using Django templates makes the most sense, but I like some of the advantages of vue.js so would like to preserve that if I can and still use the CSS from this module.
Beta Was this translation helpful? Give feedback.
All reactions