oTree Forum >

Using Material Design Lite

#1 by papayapap

Is it possible to use other designs apart from Bootstrap? I did a quick try with Material Designs Lite and the page looks weird. See code below.



{{ block content }}

<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>


<!-- Always shows a header, even in smaller screens. -->
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
    <header class="mdl-layout__header">
        <div class="mdl-layout__header-row">
            <!-- Title -->
            <span class="mdl-layout-title">To Do Liste</span>
            <!-- Add spacer, to align navigation to the right -->
            <div class="mdl-layout-spacer"></div>
            <!-- Navigation. We hide it in small screens. -->
            <nav class="mdl-navigation mdl-layout--large-screen-only">
                <a class="mdl-navigation__link" href="">Link</a>
                <a class="mdl-navigation__link" href="">Link</a>
                <a class="mdl-navigation__link" href="">Link</a>
                <a class="mdl-navigation__link" href="">Link</a>
            </nav>
        </div>
    </header>
    <div class="mdl-layout__drawer">
        <span class="mdl-layout-title">To Do Liste</span>
        <nav class="mdl-navigation">
            <a class="mdl-navigation__link" href="">Link</a>
            <a class="mdl-navigation__link" href="">Link</a>
            <a class="mdl-navigation__link" href="">Link</a>
            <a class="mdl-navigation__link" href="">Link</a>
        </nav>
    </div>
    <main class="mdl-layout__content">
        <div class="page-content">
            <!-- Textfield with Floating Label -->
            <form onsubmit="addTodo()">
                <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
                    <input class="mdl-textfield__input" type="text" id="todofield">
                    <label class="mdl-textfield__label" for="todofield">To Do einf├╝gen</label>
                </div>
                <!-- Colored raised button -->
                <button type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
                    Speichern
                </button>
            </form>

            <!-- ul is unsorted list, li is list item -->
            <ul class="demo-list-control mdl-list" id="todolist">

            </ul>
        </div>
    </main>
</div>

{{ endblock }}

Write a reply

Set forum username