Giter VIP home page Giter VIP logo

daveleach.work's People

Contributors

dmleach avatar

Watchers

 avatar

daveleach.work's Issues

Correctly configure CSS template and images

Refer to the Stack Exchange thread at:
http://stackoverflow.com/questions/23447339/symfony-2-set-background-image-using-css

You should store your images in the bundle folder.

src/MyBundle/Resources/public/images

and your css in

src/MyBundle/Resources/public/css

since only web folder is accesible from outside you should use the command

app/console assets:install web --symlink

this will now create the links for the web folder as

web/bundles/Project_name/css
web/bundles/Project_name/images

So your relative path for the image would be as

.header{
    background-image: url("../images/mainlogo.gif");
}

And in twig you should use asset() function to link your styles:

<link href="{{ asset('bundles/acmeweb/css/yourstylesheet.css') }}" rel="stylesheet" type="text/css" />

Mark currently displayed page as active in main navigation

The main navigation menu, built using HomeController.php and navmenu.html.twig, can highlight the currently selected page in the main menu by giving it class="current." Change HomeController to flag the current page and change navmenu.html.twig to check for the flag and assign the class.

Add routing to blog page

Once built, add routing to blog page and verify that main navigation menu link works correctly.

Process nested arrays in main navigation data as dropdown menus

The dopetrope css template allows for nested menus using the syntax below. Modify navmenu.html.twig to process a nested array as a dropdown menu and build the HTML accordingly.

<nav id="nav">
    <ul>
        <li class="current"><a href="index.html">Home</a></li>
        <li>
            <a href="#">Dropdown</a>
            <ul>
                <li><a href="#">Lorem ipsum dolor</a></li>
                <li><a href="#">Magna phasellus</a></li>
                <li><a href="#">Etiam dolore nisl</a></li>
                <li>
                    <a href="#">Phasellus consequat</a>
                    <ul>
                        <li><a href="#">Magna phasellus</a></li>
                        <li><a href="#">Etiam dolore nisl</a></li>
                        <li><a href="#">Veroeros feugiat</a></li>
                        <li><a href="#">Nisl sed aliquam</a></li>
                        <li><a href="#">Dolore adipiscing</a></li>
                    </ul>
                </li>
                <li><a href="#">Veroeros feugiat</a></li>
            </ul>
        </li>
        <li><a href="left-sidebar.html">Left Sidebar</a></li>
        <li><a href="right-sidebar.html">Right Sidebar</a></li>
        <li><a href="no-sidebar.html">No Sidebar</a></li>
    </ul>
</nav>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.