{% extends "base.html" %}
{% load staticfiles %}
{% load mycms_tags %}

{%block PAGE_HEADER %}

<link type="text/css" rel="stylesheet" hrefp="/static/mycms/css/pageadmin.css">
<link type="text/css" rel="stylesheet" href="/static/mycms/editor/editor.css">

<script>
var view_json = {{view_object.json_data | safe }}
</script>

{% endblock PAGE_HEADER %}

{%block META_DESCRIPTION %}{{view_object.introduction}}{% endblock META_DESCRIPTION %}
{% block TITLE%} {{view_object.title}}{% endblock TITLE %}
{% block BODY_TITLE%} {{view_object.title}}{% endblock BODY_TITLE %}


{% block PAGE_CONTENT %}

<div class="container">
    <div class="row-fluid">

     
        <!-- Contents -->
        <div class="col-md-8 page-content" id="page_content" >
        
            <div> 
        
            <div class="ctaBox ctaBox2Cols color1 mb15">
        <div class="ctaBoxText">
                <h1>
                       SysAdmin or Devops ... 
                </h1>
                <h2>or just someone learning about computer systems, you will find here  
                tips & tricks, command line  commands, opensource tools and server 
                administration on opensource technologies.
                </h2>
        </div>
    </div>
        
            <h2>Systems Adminstration vs DevOps</h2>
            <p>
                There are so many stereotypes about system administration. If you are a systems adminstrator or is preparhing himself/herself, 
                then I hope you find the resources available in this website usefull. If you are doing DevOps then I hope all the articles and tutorials
                on DevOps tooling, technologies and processes will be of help to you. 
            </p>
            
            <h2>DevOps is a set of practices that encourage continous integration into production</h2>
            <p>
            DevOps is not a job title or a position. It is not a software tool, a team name or magic enterprise dust. It is nothing but a set of practices!
            Yet after a decade since the first time "devops" became popular, people still do not understand it. Many  organizations think about hiring a number of 
            "DevOps engineers" and setting them free to "DevOp" or whatever. 
            </p>
            
            <h2>Sysadmin or Devops or Whatever... </h2>
            
            Find below the latest articles. or browse the sub categories as listed to the left. Search on the website also works!
            
            </div>
          
        </div>
        <!-- end of contents -->
   
    
                  <aside class="col-md-4">
                    <section>
                        <h1>Systems Administration, Architecture And Troubleshooting Resources</h1>
                    
                    </section>
                    
                    
                    
                    <section class="widget search clearfix">
                        <form class="form-inline" role="form" method="get" action="/cms/search">
                            <div class="input-group input-group-lg">
                            <input type="search" name="q" id="id_q" class="form-control lg" placeholder="Search…">
                            <span class="input-group-btn"><button type="submit" class="btn btn-sm">Submit</button></span>
                        </div>
                        </form>
                    </section>
                    
                     <section class="widget">
                        <h3>Categories</h3>
                         <ul class="list-unstyled iconList">
                            {% for child in view_object.categories %}
                                <li class="primary"> 
                                        {% if child.categories %}
                                                <a href="/cms{{child.path}}" class="firstLevel">{{child.title}}</a>
                                                <ul class="subMenu">
                                                {% for gchild in child.categories %}
                                                    {% if gchild.categories %} 
                                                    <li class="submenu">
                                                        <a href="/cms{{gchild.path}}" class="hasSubMenu">{{gchild.title}}</a>
                                                            <ul>
                                                             {%for ggchild in gchild.categories %}
                                                                <li><a href="/cms{{ggchild.path}}">{{ggchild.title}}</a></li>
                                                            {%endfor%}
                                                            </ul>
                                                    </li>
                                                    {% else %}
                                                    <li><a href="/cms{{gchild.path}}">{{gchild.title}}</a></li>
                                                    {% endif %}
                                                
                                                 {%endfor%}
                                                </ul>
                                        {% else %}
                                                <a href="/cms{{child.path}}" class="firstLevel">{{child.title}}</a>  
                                        {% endif %}
                                </li>
                                {%endfor%}
                            </ul>
                    </section>
                    
                    
                    <section class="widget">
                        <h3>Categories</h3>
                            <ul class="list-unstyled iconList">
                                <li><a href="#">Solace of a lonely highway</a></li>
                                <li><a href="#">Write with purpose</a></li>
                                <li><a href="#">Tree on a lake</a></li>
                                <li><a href="#">Don’t stop questioning</a></li>
                            <li><a href="#">Overheard this morning</a></li>
                            </ul>
                    </section>
                    <section class="widget">
                        
                    </section>
                    
                            <section class="widget tagCloud">
                            <h3>Tag cloud</h3>
                                <a href="#" class="w2">News</a>
                                <a href="#" class="w1">category</a>
                                <a href="#" class="w3">business</a>
                                <a href="#" class="w3">economy</a>
                            <a href="#" class="w1">lolcats</a>
                        <a href="#" class="w2">design</a>
                        <a href="#" class="w2">Videos</a>
                            <a href="#" class="w1">Web</a>
                            <a href="#" class="w3">Photos</a>
                            <a href="#" class="w2">Music</a>
                            </section>
                            </aside>
                            <!-- Sidebar -->
    
    
    {% if view_object.request.user.username == "admin" %}
    <div id="overlay">    
        <div class="row-fluid">
            <div class="col-md-12 page-content" id="page_editor" style="margin-top:10px;">
    
                <!-- START PAGE_CONTENT -->    
                <!--div id="info-container">
                    <div class="alert alert-warning alert-dismissible" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
                        <strong>Warning!</strong> Better check yourself, you're not looking too good.
                    </div>
                </div-->
                <div style="box-shadow: 0px 5px 26px 1px rgba(0,0,0,0.75); border-radius: 5px;">
                    <ul class="nav nav-pills" id="admin-tabs">
                       <li class="active"><a data-toggle="pill" href="#home">Home</a></li>
                       <li><a data-toggle="pill" href="#menu1">Page Assets</a></li>
                       <li><a data-toggle="pill" href="#menu2">Page Meta</a></li>
                       <li id="close-admin"><img id="close-admin-overlay-button" src="/static/mycms/editor/close-window-50.png"/ ></li>
                    </ul>

                    <div class="tab-content" style="background:#ccc;">
                        <div id="home" class="tab-pane fade in active" style="background: #ccc;">     
                        
                        
                            <!-- put this in a template later???-->
                            <div class="row" id="category_form">
                                <form class="form" id="createpage_form">
                                    <div class="col-sm-4">
                                        <input id="createpage_title" type="text" placeholder="title" class="form-control">
                                    </div>
                                    <div class="col-sm-4">
                                        <input id="createpage_slug" type="text" placeholder="slug" class="form-control">
                                    </div>
                                    <div class="col-sm-2">
                                        <select id="createpage_pagetype_select" name="createpage_pagetype_select" type="text" class="form-control">
                                            <option value="1">Single Page HTML</option>
                                            <option value="2">Category Page</option>
                                            <option value="3">MultPage Article</option>
                                            <option value="4">MemberPage Article</option>
                                        </select>
                                    </div>
                                    <div class="col-sm-2">
                                        <button class="btn btn-primary" type="button" id="create_page_button">Create Page</button>
                                    </div>
                                </form>
                            </div>
                            
                             <!-- div class="row">
                                <div class="col-sm-6"> left </div>
                                <div class="col-sm-6"> right </div>
                            </div -->   
                            
                            <!-- end put in tempalte -->
                            <div id="category_editor">
                                <div col-sm-6> left </div>
                                <div col-sm-6> right </div>
                            </div>        
                    </div>
    
                    <div id="menu1" class="tab-pane fade">
                        <!-- will be loaded as a temlate-->
                        {% file_upload %}
                    </div>
    
    
                    <div id="menu2" class="tab-pane fade">
                        <h3>Article Meta Info</h3>
                        <p>Not Implemented Yet.</p>
                    </div>
    
                </div>           
            <!-- END PAGE_CONTENT -->
            </div>
    
            </div>
        </div>
    </div>
    {% endif %}
    
</div>


{% if view_object.request.user.username == "admin" %}

    {% verbatim %}

    <script type="text/dust" id="empty_category_editor_template">
        <div class="row" style="background: #bbb; border-top: 1px solid #dddddd; margin:0px;" >
            <div class="col-md-2">Category Title</div>
            <div class="col-md-4">Path URL</div>
        </div>
    
        <div class="row" style="background:#ccc; border-top: 1px solid #dddddd; margin:0px;" >
            <div class="col-md-12">There are no sub categories!</div>
        </div>
      
    </script>
    {% endverbatim %}
    
    {% Script type="text/javascript" src="/static/mycms/dustjs/dust-full.js" priority=8888 %}  
    {% Script type="text/javascript" src="/static/mycms/templates.js" priority=8889 %}  
    {% Script type="text/javascript" src="/static/mycms/editor/category.editors.js" priority=8889 %}  
      
{% endif %}
{% endblock PAGE_CONTENT %}  



{% block PAGE_BOTTOM %}





<script type="text/javascript">



</script>

{% endblock PAGE_BOTTOM %}