You're looking at it

Homepage: https://roundabout-host.com

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

Add favourite counter

roundabout,
created on Wednesday, 13 November 2024, 14:50:24 (1731509424), received on Wednesday, 13 November 2024, 14:50:27 (1731509427)
Author identity: vlad <vlad.muntoiu@gmail.com>

19dc51a77e918c9dd5da25c2452d312b657129fd

templates/home.html

@@ -13,11 +13,11 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    <h1>{{ config.site_name }}</h1>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    <h2>{% trans %}Search{% endtrans %}</h2>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    <form action="/search" method="get" role="search" class="buttonbox">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    <input type="text" name="q" placeholder="{% trans %}Search repositories...{% endtrans %}" aria-label="Repository search">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    <input type="text" name="q" placeholder="{% trans %}Search repositories...{% endtrans %}" aria-label="{% trans %}Repository search{% endtrans %}">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        <button type="submit">{% trans %}Search{% endtrans %}</button>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    </form>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    <form action="/user-search" method="get" role="search" class="buttonbox">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    <input type="text" name="q" placeholder="{% trans %}Search users...{% endtrans %}" aria-label="User search">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    <input type="text" name="q" placeholder="{% trans %}Search users...{% endtrans %}" aria-label="{% trans %}User search{% endtrans %}">
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        <button type="submit">{% trans %}Search{% endtrans %}</button>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    </form>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                </x-frame>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

templates/repo.html

@@ -94,9 +94,9 @@

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    {% if logged_in_user %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        <a title="{% trans %}Mark as favourite{% endtrans %}" class="button" href="/{{ username }}/{{ repository }}/favourite">
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            {% if not is_favourite %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            {% trans %}Add favourite{% endtrans %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            {% trans counter=repo_data.favourites|length %}Add to favourites ({{ counter }}){% endtrans %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            {% else %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            {% trans %}Remove favourite{% endtrans %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                            {% trans counter=repo_data.favourites|length %}Remove from favourites ({{ counter }}){% endtrans %}
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            {% endif %}
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        </a>
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    {% endif %}