forked from GNUsocial/gnu-social
		
	[Cards][Navigation] Navigation cards! Left panel now composed entirely of cards.
This commit is contained in:
		
							
								
								
									
										135
									
								
								templates/cards/navigation/view.html.twig
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										135
									
								
								templates/cards/navigation/view.html.twig
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,135 @@
 | 
				
			|||||||
 | 
					{% block timeline %}
 | 
				
			||||||
 | 
					    <section class="section-widget section-widget-padded">
 | 
				
			||||||
 | 
					    <h2 class="section-title">{{ icon('logo', 'icon icon-logo') | raw }} Timeline</h2>
 | 
				
			||||||
 | 
					    <nav class='sec-nav' tabindex="0" title="{{ 'Navigate through each timeline.' | trans }}">
 | 
				
			||||||
 | 
					        <ul>
 | 
				
			||||||
 | 
					            <li>
 | 
				
			||||||
 | 
					                <a href="{{ path('main_public') }}" class='{{ active('main_public') }}'>
 | 
				
			||||||
 | 
					                    Public
 | 
				
			||||||
 | 
					                </a>
 | 
				
			||||||
 | 
					            </li>
 | 
				
			||||||
 | 
					            <li>
 | 
				
			||||||
 | 
					                {% if app.user %}
 | 
				
			||||||
 | 
					                    <a href="{{ path("home_all", {'nickname' : current_actor.getNickname()}) }}" class='{{ active("home_all") }}'>
 | 
				
			||||||
 | 
					                        Home
 | 
				
			||||||
 | 
					                    </a>
 | 
				
			||||||
 | 
					                {% endif %}
 | 
				
			||||||
 | 
					            </li>
 | 
				
			||||||
 | 
					            <li>
 | 
				
			||||||
 | 
					                <a href="{{ path('main_all') }}" class='hover-effect {{ active('main_all') }}'>
 | 
				
			||||||
 | 
					                    Network
 | 
				
			||||||
 | 
					                </a>
 | 
				
			||||||
 | 
					            </li>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            {% if app.user %}
 | 
				
			||||||
 | 
					                {% for link in handle_event('AddMainNavigationItem', {'nickname': current_actor.getNickname()}) %}
 | 
				
			||||||
 | 
					                    <li>
 | 
				
			||||||
 | 
					                        <a href="{{ link['path'] }}" class='{{ active(link['path_id']) }}'>
 | 
				
			||||||
 | 
					                            {{ link['title'] }}
 | 
				
			||||||
 | 
					                        </a>
 | 
				
			||||||
 | 
					                    </li>
 | 
				
			||||||
 | 
					                {% endfor %}
 | 
				
			||||||
 | 
					            {% endif %}
 | 
				
			||||||
 | 
					        </ul>
 | 
				
			||||||
 | 
					    </nav>
 | 
				
			||||||
 | 
					    </section>
 | 
				
			||||||
 | 
					{% endblock timeline %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block group %}
 | 
				
			||||||
 | 
					    <section class="section-widget section-widget-padded">
 | 
				
			||||||
 | 
					        <h2 class="section-title">{{ icon('logo', 'icon icon-logo') | raw }} Group</h2>
 | 
				
			||||||
 | 
					        <nav class='sec-nav' tabindex="0" title="{{ 'Navigate through each timeline.' | trans }}">
 | 
				
			||||||
 | 
					            <ul>
 | 
				
			||||||
 | 
					                <li>
 | 
				
			||||||
 | 
					                    <a href="{{ path('main_public') }}" class='{{ active('main_public') }}'>
 | 
				
			||||||
 | 
					                        Public
 | 
				
			||||||
 | 
					                    </a>
 | 
				
			||||||
 | 
					                </li>
 | 
				
			||||||
 | 
					                <li>
 | 
				
			||||||
 | 
					                    {% if app.user %}
 | 
				
			||||||
 | 
					                        <a href="{{ path("home_all", {'nickname' : current_actor.getNickname()}) }}" class='{{ active("home_all") }}'>
 | 
				
			||||||
 | 
					                            Home
 | 
				
			||||||
 | 
					                        </a>
 | 
				
			||||||
 | 
					                    {% endif %}
 | 
				
			||||||
 | 
					                </li>
 | 
				
			||||||
 | 
					                <li>
 | 
				
			||||||
 | 
					                    <a href="{{ path('main_all') }}" class='hover-effect {{ active('main_all') }}'>
 | 
				
			||||||
 | 
					                        Network
 | 
				
			||||||
 | 
					                    </a>
 | 
				
			||||||
 | 
					                </li>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                {% if app.user %}
 | 
				
			||||||
 | 
					                    {% for link in handle_event('AddMainNavigationItem', {'nickname': current_actor.getNickname()}) %}
 | 
				
			||||||
 | 
					                        <li>
 | 
				
			||||||
 | 
					                            <a href="{{ link['path'] }}" class='{{ active(link['path_id']) }}'>
 | 
				
			||||||
 | 
					                                {{ link['title'] }}
 | 
				
			||||||
 | 
					                            </a>
 | 
				
			||||||
 | 
					                        </li>
 | 
				
			||||||
 | 
					                    {% endfor %}
 | 
				
			||||||
 | 
					                {% endif %}
 | 
				
			||||||
 | 
					            </ul>
 | 
				
			||||||
 | 
					        </nav>
 | 
				
			||||||
 | 
					    </section>
 | 
				
			||||||
 | 
					{% endblock group %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block profile_current_actor %}
 | 
				
			||||||
 | 
					<nav tabindex="0" class="profile-navigation" title="{{ 'Navigate through account related pages.' | trans }}">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <a title='{{ 'Replies to your notes.' | trans }}' href="{{ path('replies', {'nickname' : current_actor.getNickname()}) }}" class='{{ active("replies") }}'>
 | 
				
			||||||
 | 
					        Replies
 | 
				
			||||||
 | 
					    </a>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    {% for tab in handle_event('AddProfileNavigationItem', {'nickname': current_actor.getNickname()}) %}
 | 
				
			||||||
 | 
					        <a href="{{ tab['path'] }}" class='{{ active(tab['path_id']) }}'>
 | 
				
			||||||
 | 
					            {{ tab['title'] }}
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					    {% endfor %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <a title='{{ 'Access your account settings.' | trans }}' href="{{ path('settings') }}" class='{{ active('settings') }}'>
 | 
				
			||||||
 | 
					        Settings
 | 
				
			||||||
 | 
					    </a>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <a title='{{ 'Logout from your account.' | trans }}' href='{{ path('logout') }}'>
 | 
				
			||||||
 | 
					        Logout
 | 
				
			||||||
 | 
					    </a>
 | 
				
			||||||
 | 
					</nav>
 | 
				
			||||||
 | 
					{% endblock profile_current_actor %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block profile_security %}
 | 
				
			||||||
 | 
					    <section class='section-widget section-widget-padded' title="{{ 'Your profile information.' | trans }}">
 | 
				
			||||||
 | 
					        <h2 class="section-title">Account</h2>
 | 
				
			||||||
 | 
					        <nav tabindex="0" class="profile-navigation" title="{{ 'Navigate through account related pages.' | trans }}">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <a title='{{ 'Login with your existing account.' | trans }}' href="{{ path('login') }}" class='hover-effect {{ active('login') }}'>
 | 
				
			||||||
 | 
					                Login
 | 
				
			||||||
 | 
					            </a>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <a title='{{ 'Register a new account!' | trans }}' href="{{ path('register') }}">
 | 
				
			||||||
 | 
					                Register
 | 
				
			||||||
 | 
					            </a>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        </nav>
 | 
				
			||||||
 | 
					    </section>
 | 
				
			||||||
 | 
					{% endblock profile_security %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block footer %}
 | 
				
			||||||
 | 
					<footer class="footer">
 | 
				
			||||||
 | 
					    <nav>
 | 
				
			||||||
 | 
					        <a href="{{ path('doc_faq') }}" class='hover-effect {{ active('doc_faq') }}'>
 | 
				
			||||||
 | 
					            FAQ
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					        <a href="{{ path('doc_tos') }}" class='hover-effect {{ active('doc_tos') }}'>
 | 
				
			||||||
 | 
					            TOS
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					        <a href="{{ path('doc_privacy') }}" class='hover-effect {{ active('doc_privacy') }}'>
 | 
				
			||||||
 | 
					            Privacy
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					        <a href="{{ path('doc_source') }}" class='hover-effect {{ active('doc_source') }}'>
 | 
				
			||||||
 | 
					            Source
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					        <a href="{{ path('doc_version') }}" class='hover-effect {{ active('doc_version') }}'>
 | 
				
			||||||
 | 
					            Version
 | 
				
			||||||
 | 
					        </a>
 | 
				
			||||||
 | 
					    </nav>
 | 
				
			||||||
 | 
					</footer>
 | 
				
			||||||
 | 
					{% endblock footer %}
 | 
				
			||||||
@@ -6,103 +6,15 @@
 | 
				
			|||||||
    <aside class="panel-content accessibility-target">
 | 
					    <aside class="panel-content accessibility-target">
 | 
				
			||||||
        {% if app.user %}
 | 
					        {% if app.user %}
 | 
				
			||||||
            <section class='section-widget section-widget-padded' title="{{ 'Your profile information.' | trans }}">
 | 
					            <section class='section-widget section-widget-padded' title="{{ 'Your profile information.' | trans }}">
 | 
				
			||||||
 | 
					 | 
				
			||||||
                {% block profile_view %}{% include 'cards/profile/view.html.twig' with { actor: current_actor } %}{% endblock profile_view %}
 | 
					                {% block profile_view %}{% include 'cards/profile/view.html.twig' with { actor: current_actor } %}{% endblock profile_view %}
 | 
				
			||||||
 | 
					                {{ block("profile_current_actor", "cards/navigation/view.html.twig") }}
 | 
				
			||||||
                <nav tabindex="0" class="profile-navigation" title="{{ 'Navigate through account related pages.' | trans }}">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    <a title='{{ 'Replies to your notes.' | trans }}' href="{{ path('replies', {'nickname' : current_actor.getNickname()}) }}" class='{{ active("replies") }}'>
 | 
					 | 
				
			||||||
                        Replies
 | 
					 | 
				
			||||||
                    </a>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    {% for tab in handle_event('AddProfileNavigationItem', {'nickname': current_actor.getNickname()}) %}
 | 
					 | 
				
			||||||
                        <a href="{{ tab['path'] }}" class='{{ active(tab['path_id']) }}'>
 | 
					 | 
				
			||||||
                            {{ tab['title'] }}
 | 
					 | 
				
			||||||
                        </a>
 | 
					 | 
				
			||||||
                    {% endfor %}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    <a title='{{ 'Access your account settings.' | trans }}' href="{{ path('settings') }}" class='{{ active('settings') }}'>
 | 
					 | 
				
			||||||
                        Settings
 | 
					 | 
				
			||||||
                    </a>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    <a title='{{ 'Logout from your account.' | trans }}' href='{{ path('logout') }}'>
 | 
					 | 
				
			||||||
                        Logout
 | 
					 | 
				
			||||||
                    </a>
 | 
					 | 
				
			||||||
                </nav>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            {% else %}
 | 
					            {% else %}
 | 
				
			||||||
 | 
					                {{ block("profile_security", "cards/navigation/view.html.twig") }}
 | 
				
			||||||
                <section class='section-widget section-widget-padded' title="{{ 'Your profile information.' | trans }}">
 | 
					 | 
				
			||||||
                    <h2 class="section-title">Account</h2>
 | 
					 | 
				
			||||||
                    <nav tabindex="0" class="profile-navigation" title="{{ 'Navigate through account related pages.' | trans }}">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                        <a title='{{ 'Login with your existing account.' | trans }}' href="{{ path('login') }}" class='hover-effect {{ active('login') }}'>
 | 
					 | 
				
			||||||
                            Login
 | 
					 | 
				
			||||||
                        </a>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                        <a title='{{ 'Register a new account!' | trans }}' href="{{ path('register') }}">
 | 
					 | 
				
			||||||
                            Register
 | 
					 | 
				
			||||||
                        </a>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                    </nav>
 | 
					 | 
				
			||||||
                </section>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            {% endif %}
 | 
					            {% endif %}
 | 
				
			||||||
        </section>
 | 
					        </section>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <section class="section-widget section-widget-padded">
 | 
					        {{ block("timeline", "cards/navigation/view.html.twig") }}
 | 
				
			||||||
            <h2 class="section-title">Timeline</h2>
 | 
					 | 
				
			||||||
            <nav class='sec-nav' tabindex="0" title="{{ 'Navigate through each timeline.' | trans }}">
 | 
					 | 
				
			||||||
                <ul>
 | 
					 | 
				
			||||||
                    <li>
 | 
					 | 
				
			||||||
                        <a href="{{ path('main_public') }}" class='{{ active('main_public') }}'>
 | 
					 | 
				
			||||||
                            Public
 | 
					 | 
				
			||||||
                        </a>
 | 
					 | 
				
			||||||
                    </li>
 | 
					 | 
				
			||||||
                    <li>
 | 
					 | 
				
			||||||
                        {% if app.user %}
 | 
					 | 
				
			||||||
                            <a href="{{ path("home_all", {'nickname' : current_actor.getNickname()}) }}" class='{{ active("home_all") }}'>
 | 
					 | 
				
			||||||
                                Home
 | 
					 | 
				
			||||||
                            </a>
 | 
					 | 
				
			||||||
                        {% endif %}
 | 
					 | 
				
			||||||
                    </li>
 | 
					 | 
				
			||||||
                    <li>
 | 
					 | 
				
			||||||
                        <a href="{{ path('main_all') }}" class='hover-effect {{ active('main_all') }}'>
 | 
					 | 
				
			||||||
                            Network
 | 
					 | 
				
			||||||
                        </a>
 | 
					 | 
				
			||||||
                    </li>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    {% if app.user %}
 | 
					        {{ block("footer", "cards/navigation/view.html.twig") }}
 | 
				
			||||||
                        {% for link in handle_event('AddMainNavigationItem', {'nickname': current_actor.getNickname()}) %}
 | 
					 | 
				
			||||||
                            <li>
 | 
					 | 
				
			||||||
                                <a href="{{ link['path'] }}" class='{{ active(link['path_id']) }}'>
 | 
					 | 
				
			||||||
                                    {{ link['title'] }}
 | 
					 | 
				
			||||||
                                </a>
 | 
					 | 
				
			||||||
                            </li>
 | 
					 | 
				
			||||||
                        {% endfor %}
 | 
					 | 
				
			||||||
                    {% endif %}
 | 
					 | 
				
			||||||
                </ul>
 | 
					 | 
				
			||||||
            </nav>
 | 
					 | 
				
			||||||
        </section>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <footer class="footer">
 | 
					 | 
				
			||||||
            <nav>
 | 
					 | 
				
			||||||
                <a href="{{ path('doc_faq') }}" class='hover-effect {{ active('doc_faq') }}'>
 | 
					 | 
				
			||||||
                    FAQ
 | 
					 | 
				
			||||||
                </a>
 | 
					 | 
				
			||||||
                <a href="{{ path('doc_tos') }}" class='hover-effect {{ active('doc_tos') }}'>
 | 
					 | 
				
			||||||
                    TOS
 | 
					 | 
				
			||||||
                </a>
 | 
					 | 
				
			||||||
                <a href="{{ path('doc_privacy') }}" class='hover-effect {{ active('doc_privacy') }}'>
 | 
					 | 
				
			||||||
                    Privacy
 | 
					 | 
				
			||||||
                </a>
 | 
					 | 
				
			||||||
                <a href="{{ path('doc_source') }}" class='hover-effect {{ active('doc_source') }}'>
 | 
					 | 
				
			||||||
                    Source
 | 
					 | 
				
			||||||
                </a>
 | 
					 | 
				
			||||||
                <a href="{{ path('doc_version') }}" class='hover-effect {{ active('doc_version') }}'>
 | 
					 | 
				
			||||||
                    Version
 | 
					 | 
				
			||||||
                </a>
 | 
					 | 
				
			||||||
            </nav>
 | 
					 | 
				
			||||||
        </footer>
 | 
					 | 
				
			||||||
    </aside>
 | 
					    </aside>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
		Reference in New Issue
	
	Block a user