V
V
Vasya Pupkin2015-05-11 17:30:36
JavaScript
Vasya Pupkin, 2015-05-11 17:30:36

Correct replacement in html?

I 'm parsing the example:
https://github.com/sdelements/lets-chat
There in the templates folder there are .html files with Django code (Google ATP), for example chat.html:

<% extends 'base.html' %>

<% block css %><% endblock %>

<% block js %>
<$ 'chat' | js | safe $>
<% endblock %>

<% block templates %>
    <% include 'includes/js/room.html' %>
    <% include 'includes/js/user.html' %>
    <% include 'includes/js/file.html' %>
    <% include 'includes/js/message.html' %>
    <% include 'includes/js/tab.html' %>
    <% include 'includes/js/browser-item.html' %>
    <% include 'includes/js/browser-item-user.html' %>
    <% include 'includes/js/upload.html' %>
<% endblock %>

<% block body %>
    <div id="lcb-client" class="lcb-client">
        <div class="lcb-header">
            <button type="button" class="btn lcb-header-toggle">
                <i class="fa fa-bars"></i>
            </button>
            <div class="lcb-header-logo">Talk</div>
        </div>
        <section class="lcb-sidebar">
            <div class="dropdown">
                <a class="lcb-account-button dropdown-toggle" data-toggle="dropdown" href="3">
                   <!-- <img class="lcb-account-button-avatar lcb-avatar" src="https://www.gravatar.com/avatar/<$ account.avatar $>?s=50" />-->
                    <span class="lcb-account-button-name"><$ account.displayName $></span>
                    <span class="lcb-account-button-username">@<$ account.username $></span>
                    <i class="lcb-account-button-chevron fa fa-chevron-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-menu-right">
                    <li>
                        <a data-toggle="modal" href="#lcb-profile">
                            <i class="fa fa-fw fa-edit"></i> Изменить профиль
                        </a>
                    </li>
                    <li>
                        <a data-toggle="modal" href="#lcb-account">
                            <i class="fa fa-fw fa-cogs"></i> Настройки аккаунта
                        </a>
                    </li>
                   <!-- <li>
                        <a data-toggle="modal" href="#lcb-notifications">
                            <i class="fa fa-fw fa-bell"></i> Уведомления
                        </a>
                    </li>-->
                    <!--<% if settings.xmpp.enable %>
                        <li>
                            <a data-toggle="modal" href="#lcb-xmpp">
                                <i class="fa fa-fw fa-comments"></i> XMPP/Jabber
                            </a>
                        </li>
                    <% endif %>-->
                   <!-- <li>
                        <a data-toggle="modal" href="#lcb-tokens">
                            <i class="fa fa-fw fa-lock"></i> Auth tokens
                        </a>
                    </li>-->
                    <li class="divider"></li>
                    <li><a href="./logout"><i class="fa fa-fw fa-sign-out"></i> Выйти</a></li>
                </ul>
            </div>
<!--            <div class="lcb-status-indicators">
                <span class="lcb-status-indicator lcb-status-indicator-error lcb-status-connection" data-status="disconnected" style="display: none;">
                    <i class="fa fa-plug"></i> Оффлаин
                </span>
                <span class="lcb-status-indicator lcb-status-connection" data-status="connected" style="display: none;">
                    <i class="fa fa-refresh"></i> Онлаин
                </span>
                <span class="lcb-status-indicator lcb-status-connection" style="display: none;">
                    <i class="fa fa-bell-slash"></i>
                </span>
            </div>-->
            <ul class="lcb-tabs">
                <li data-id="list" class="lcb-tab lcb-tab-home">
                    <a href="#!/">
                        <i class="fa fa-th"></i>
                    </a>
                </li>
            </ul>
        </section>
        <section class="lcb-panes">
            <div class="lcb-rooms-browser lcb-pane hide" data-id="list">
                <header class="lcb-rooms-browser-header">
                    <h2 class="lcb-rooms-browser-heading">
                        Дерево комнат
                    </h2>
                    <div class="lcb-rooms-browser-filter">
                        <label class="lcb-rooms-browser-filter-label" for="lcb-rooms-browser-filter-input">
                            <i class="fa fa-search"></i>
                        </label>
                        <input id="lcb-rooms-browser-filter-input" class="lcb-rooms-browser-filter-input" type="search" autofocus />
                    </div>
                    <a class="btn btn-success lcb-rooms-browser-new" data-toggle="modal" data-target="#lcb-add-room" href="#!/rooms/add">
                        <i class="fa fa-plus"></i>
                    </a>
                </header>
                <ul class="lcb-rooms-list"></ul>
                <% include 'includes/modals/add-room.html' %>
            </div>
        </section>
        <div class="lcb-loading lcb-client-loading">
            <img class="lcb-loading-indicator" src="./media/img/loading.svg" alt="Loading..." />
        </div>
        <% include 'includes/modals/notifications.html' %>
        <% include 'includes/modals/profile.html' %>
        <% include 'includes/modals/account.html' %>
        <% include 'includes/modals/xmpp.html' %>
        <% include 'includes/modals/tokens.html' %>
        <% include 'includes/modals/upload.html' %>
    </div><!-- lcb-client end -->
<% endblock %>

So, gentlemen! What is the correct way to replace things like <% include 'includes/modals/account.html' %> with simple tags <link> и <script>????
Tell me please!!!!!!!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zelsky, 2015-05-11
@EgorVoziyanov

shove inside
<script src="{ static "css/lalala.css"}"></script>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question