Add media object style

This commit is contained in:
Raghavendra Kamath
2018-04-19 12:35:36 +05:30
parent 18f578c724
commit 7d6023315c
5 changed files with 55 additions and 57 deletions

View File

@@ -19,7 +19,7 @@ app_license = "MIT"
# app_include_js = "/assets/foundation/js/foundation.js"
# include js, css files in header of web template
# web_include_css = "/assets/foundation/css/style.css"
web_include_css = "/assets/foundation/css/style.css"
# web_include_js = "/assets/foundation/js/foundation.js"
# include js in page

View File

@@ -0,0 +1,3 @@
.media-img {
max-width: 200px;
}

View File

@@ -17,11 +17,7 @@
{%- block head -%}
{% block meta_block %}{% endblock %}
<link href="/assets/bootstrap-4/css/bootstrap.min.css" rel="stylesheet">
{% if path != '' %}
<link type="text/css" rel="stylesheet" href="/assets/frappe/css/hljs.css">
<link type="text/css" rel="stylesheet" href="/assets/frappe/css/font-awesome.css">
<link type="text/css" rel="stylesheet" href="/assets/frappe/css/octicons/octicons.css">
{% endif %}
<link href="/assets/foundation/css/style.css" rel="stylesheet">
{%- endblock -%}
{%- block head_include %}{{ head_include or "" }}{% endblock -%}
{%- block style %}{%- endblock -%}

View File

@@ -1,11 +1,10 @@
{% macro media(title, content, image, link) %}
<div class="media centered {% if link %}clickable{% endif %}"
<div class="media {% if link %}clickable{% endif %}"
{% if link %}style="cursor: pointer;"{% endif %}
{% if link %}onclick="location.href='{{ link }}'"{% endif %}>
<a class="mr-3" href="{{ link or "#" }}">
<img class="img-thumbnail"
src="{% if image %}{% if not '/' in image %}/assets/foundation/img/{% endif %}{{ image }}{% else %}/assets/foundation/img/frappe-bird-grey.svg{% endif %}"
style="{% if image and not '/' in image %}opacity: 0.4{% endif %}">
<img class="media-img img-thumbnail" src="{% if image %}{% if not '/' in image %}/assets/foundation/img/{% endif %}{{ image }}{% else %}/assets/foundation/img/frappe-bird-grey.svg{% endif %}"
>
</a>
<div class="media-body">
{% if title %}<h4>{{ title }}</h4>{% endif %}

View File

@@ -5,7 +5,7 @@
{% macro gold_member(m) %}
<div class="media {{ 'text-muted' if m.placeholder else '' }}" style="cursor: pointer;" onclick="location.href='{{ m.route }}'">
<a class="mr-3" href="{{ m.route }}">
<img class="img-thumbnail" src="{{ m.image or '/assets/foundation/img/gold.png' }}">
<img class="media-img img-thumbnail" src="{{ m.image or '/assets/foundation/img/gold.png' }}">
</a>
<div class="media-body">
<h4 class="media-heading">{{ m.title }}</h4>
@@ -36,7 +36,7 @@
{% endmacro %}
{% block page_content %}
<section class="gold bottom-spacer-4">
<section class="my-5 px-3">
<h2>Gold Members</h2>
{% for m in gold_members %}
{{ gold_member(m) }}
@@ -47,7 +47,7 @@
{% endif %}
</section>
<section class="silver bottom-spacer-4">
<section class="my-5 px-3">
<h2>Silver Members</h2>
<div class="row">
{% for m in silver_members %}
@@ -59,7 +59,7 @@
Become a Silver Member and get your company featured here</a></p>
{% endif %}
</section>
<section class="bottom-spacer-4">
<section class="my-5 px-3">
<h2>Individual Members</h2>
<div class="row page-padding">
{% for s in individual_members %}