Using just Ionic CSS


#1

Hi all. I’m wondering if I can use just the Ionic CSS for my small project. I have included the css and js (see below), but am having problems getting the content to scroll. Am I going to run into problems without using angular as well? Thanks for any help.

<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="utf-8">
        
        <meta name="description" content="">
        <meta name="author" content="">

        <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

        <title>Title</title>

        <link href="/static/css/ionic.min.css" rel="stylesheet"></link>

    </head>

    <body>

        
<div class="bar bar-header bar-dark">
  	<h1 class="title">Games</h1>
</div>


        <div class="content has-header">
            
            

	
	
	<div class="list list-inset">

	    	    
	    <a class="item" href="/games/1">Game 1</a>
	    

	</div>
	<br><br><br><br><br><br>


            
        </div>
        
        <!-- JavaScript -->
        <script src="/static/js/jquery-1.10.2.js"></script>
        <script src="/static/js/ionic.bundle.min.js"></script>

        

        <div class="bar bar-footer bar-dark">
          <div class="title">Footer</div>
        </div>
    </body>

</html>

#2

I would have thought that this is possible… and I’ve put together a quick codepen http://codepen.io/toddhalfpenny/pen/YPWodb

The only thing I noticed is that I had to have some JS still (though pretty empty). This might be to allow Ionic to have something to hook onto.


#3

Thanks for the quick response. I just found Ionic and loved the demos. I’ve been looking around for examples of using just the pretty CSS and most examples use Angular. I’ve been wanting to dig into Angular, but am not sure I have the time to include that along with my X-mas vacation project. Much appreciated.


#4

No worries… well hopefully the codepen will give you something that means you can crack on.