]> git.parisson.com Git - mezzo.git/commitdiff
Event styles
authorPhilippe Barbosa <contact@philippebarbosa.com>
Thu, 3 Mar 2016 18:23:56 +0000 (19:23 +0100)
committerPhilippe Barbosa <contact@philippebarbosa.com>
Thu, 3 Mar 2016 18:23:56 +0000 (19:23 +0100)
app/festival/static/scss/modules/event-card.scss [new file with mode: 0644]
app/templates/agenda/event_detail.html
app/templates/agenda/event_list.html

diff --git a/app/festival/static/scss/modules/event-card.scss b/app/festival/static/scss/modules/event-card.scss
new file mode 100644 (file)
index 0000000..611e4a0
--- /dev/null
@@ -0,0 +1,33 @@
+.event__card {
+  padding: 1rem;
+  background: $white;
+}
+
+.event__name {
+ margin: 0 0 1rem;
+}
+
+.event__meta {
+  display: inline-block;
+  *display: inline;
+  *zoom: 1;
+  text-align: right;
+
+  padding: .3rem;
+  // background: $main_color;
+  border: 1px solid $gray_light;
+  color: black;
+  &:before {
+    content: '\f041';
+    font-family: $icon-font;
+    display: inline-block;
+    *display: inline;
+    *zoom: 1;
+    vertical-align: middle;
+    margin-right: .6rem;
+    font-size: 2rem;
+    color: darken($main_color, 20);
+  }
+}
+
+// f041
\ No newline at end of file
index 608255cff70fb5359ee44fa6351d3680094b6a0a..1a9d6a4e36805f5e6a53a97acf8e0f7889cfb8a2 100644 (file)
@@ -25,7 +25,7 @@
 
 {% block event_detail_postedby %}
 {% editable event.start event.end event.location %}
-<h6 class="post-meta">
+<p class="event__meta">
     {{ event.start }}
     {% if event.end %}
     {% trans "-" %} {{ event.end }}
@@ -33,7 +33,8 @@
     {% if event.location %}
     {% trans "at" %}
     <a href="{% url "event_list_location" event.location.slug %}">{{ event.location }}</a>
-    {% endif %}</h6>
+    {% endif %}
+</p>
 {% endeditable %}
 {% endblock %}
 {% block event_detail_commentlink %}
 {% endblock %}
 
 {% block event_detail_calendar %}
-<p><a href='{{ event|google_calendar_url }}' target="_blank" class="btn btn-default">
+<p><a href='{{ event|google_calendar_url }}' target="_blank" class="">
     Add to Google Calendar
 </a>
-<a href='{% icalendar_url %}' class="btn btn-default">
+<a href='{% icalendar_url %}' class="">
     Add to Outlook/iCal
 </a></p>
 {% endblock %}
 {% if event.location %}
 {% block event_detail_location %}
 {% editable event.location %}
-<div class="panel panel-default">
-    <div class="panel-body">
+<div class="event__card">
     <p>
-       {{ event.location.address|linebreaksbr }}<br />
-       <a href="{{ event|google_nav_url }}" target="_blank" class="btn btn-default">
-           Get Directions
-       </a>
+        {{ event.location.address|linebreaksbr }}<br />
+        <a href="{{ event|google_nav_url }}" target="_blank" class="">
+            Get Directions
+        </a>
     </p>
-    {% google_static_map event 621 250 10 %}
-    </div>
+    {% google_static_map event 900 300 15 %}
 </div>
 {% endeditable %}
 {% endblock %}
 
 {% block event_detail_sharebuttons %}
 {% set_short_url_for event %}
-<a class="btn btn-sm share-twitter" target="_blank" href="http://twitter.com/home?status={{ event.short_url|urlencode }}%20{{ event.title|urlencode }}">{% trans "Share on Twitter" %}</a>
-<a class="btn btn-sm share-facebook" target="_blank" href="http://facebook.com/sharer.php?u={{ request.build_absolute_uri }}&amp;t={{ event.title|urlencode }}">{% trans "Share on Facebook" %}</a>
+<div class="share__button">
+    <a class="btn btn-twitter" target="_blank" href="http://twitter.com/home?status={{ event.short_url|urlencode }}%20{{ event.title|urlencode }}">{% trans "Share on Twitter" %}</a>
+    <a class="btn btn-facebook" target="_blank" href="http://facebook.com/sharer.php?u={{ request.build_absolute_uri }}&amp;t={{ event.title|urlencode }}">{% trans "Share on Facebook" %}</a>
+</div>
 {% endblock %}
 
 {% block event_previous_next %}
index 51236096a090c4434abb62b72dbbc91176f2bf34..8f12f7e0ba2c8fc76281db8137d8d6a241e0dd2b 100644 (file)
 {% endif %}
 
 {% block event_calendar %}
-<p><a href='{% icalendar_url %}' target="_blank" class="btn btn-default">
-    Subscribe to all events in Google Calendar/Outlook/iCal
-</a></p>
+<p>
+    <a href='{% icalendar_url %}' target="_blank" class="">
+        Subscribe to all events in Google Calendar/Outlook/iCal
+    </a>
+</p>
 {% endblock %}
 
 {% for event in events.object_list %}
-{% block event_list_event_title %}
-{% editable event.title %}
-<h2>
-    <a href="{{ event.get_absolute_url }}">{{ event.title }}</a>
-</h2>
-{% endeditable %}
-{% endblock %}
-{% block event_list_event_metainfo %}
-{% editable event.start event.end event.location %}
-<h6 class="post-meta">
-    {{ event.start }}
-    {% if event.end %}
-    {% trans "-" %} {{ event.end }}
-    {% endif %}
-    {% if event.location %}
-    {% trans "at" %}
-    <a href="{% url "event_list_location" event.location.slug %}">{{ event.location }}</a>
+    {% block event_list_event_title %}
+        {% editable event.title %}
+        <div class="event__card">
+            <h3 class="event__name">
+                <a href="{{ event.get_absolute_url }}">{{ event.title }}</a>
+            </h3>
+        {% endeditable %}
+    {% endblock %}
+
+    {% if settings.EVENT_USE_FEATURED_IMAGE and event.featured_image %}
+        {% block event_list_event_featured_image %}
+            <a href="{{ event.get_absolute_url }}">
+                <img class="img-thumbnail pull-left" src="{{ MEDIA_URL }}{% thumbnail event.featured_image 90 90 %}">
+            </a>
+        {% endblock %}
     {% endif %}
-</h6>
-{% endeditable %}
-{% endblock %}
 
-{% if settings.EVENT_USE_FEATURED_IMAGE and event.featured_image %}
-{% block event_list_event_featured_image %}
-<a href="{{ event.get_absolute_url }}">
-    <img class="img-thumbnail pull-left" src="{{ MEDIA_URL }}{% thumbnail event.featured_image 90 90 %}">
-</a>
-{% endblock %}
-{% endif %}
+    {% block event_list_event_content %}
+        {% editable event.content %}
+            {{ event.description_from_content|safe }}
+        {% endeditable %}
+    {% endblock %}
 
-{% block event_list_event_content %}
-{% editable event.content %}
-{{ event.description_from_content|safe }}
-{% endeditable %}
-{% endblock %}
+    {% block event_list_event_metainfo %}
+        {% editable event.start event.end event.location %}
+            <p class="event__meta">
+                {{ event.start }}
+                {% if event.end %}
+                {% trans "-" %} {{ event.end }}
+                {% endif %}
+                {% if event.location %}
+                {% trans "at" %}
+                <a href="{% url "event_list_location" event.location.slug %}">{{ event.location }}</a>
+                {% endif %}
+            </p>
+        {% endeditable %}
+    {% endblock %}
 
 {% block event_list_event_links %}
 <div class="event-list-detail">
     </p>
 </div>
 {% endblock %}
+</div>
 {% endfor %}
 
 {% pagination_for events %}