Unify Twitter cards and Open Graph data
This commit is contained in:
parent
10df0af355
commit
528887b1a6
@ -4,14 +4,16 @@
|
||||
| {% set title = 'homepage' %}
|
||||
|
||||
| {% block og %}
|
||||
meta(property="og:title", content="Blender Cloud")
|
||||
meta(property="og:type", content="website")
|
||||
meta(property="og:url", content="https://cloud.blender.org/")
|
||||
meta(property="og:image", content="{% if main_project.picture_header %}{{ main_project.picture_header.thumbnail('l', api=api) }}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_02.jpg')}}{% endif %}")
|
||||
| {% endblock %}
|
||||
|
||||
| {% block tw %}
|
||||
meta(property="og:title", content="Blender Cloud")
|
||||
meta(name="twitter:title", content="Blender Cloud")
|
||||
|
||||
meta(property="og:description", content="Blender Cloud is a web based service developed by Blender Institute that allows people to access the training videos and all the data from the open projects.")
|
||||
meta(name="twitter:description", content="Blender Cloud is a web based service developed by Blender Institute that allows people to access the training videos and all the data from the open projects.")
|
||||
|
||||
meta(property="og:image", content="{% if main_project.picture_header %}{{ main_project.picture_header.thumbnail('l', api=api) }}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_02.jpg')}}{% endif %}")
|
||||
meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_project.picture_header.thumbnail('l', api=api) }}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_02.jpg')}}{% endif %}")
|
||||
| {% endblock %}
|
||||
|
||||
|
@ -9,16 +9,17 @@ html(lang="en")
|
||||
meta(name="theme-color", content="#3e92aa")
|
||||
|
||||
meta(property="og:site_name", content="Blender Cloud")
|
||||
meta(property="og:locale", content="en_US")
|
||||
meta(name="twitter:card", content="summary_large_image")
|
||||
meta(name="twitter:site", content="@Blender_Cloud")
|
||||
|
||||
| {% block og %}
|
||||
meta(property="og:title", content="Blender Cloud")
|
||||
meta(property="og:url", content="https://cloud.blender.org")
|
||||
meta(property="og:type", content="website")
|
||||
meta(property="og:image", content="{{ url_for('static', filename='assets/img/backgrounds/background_gleb_locomotive.jpg')}}")
|
||||
| {% endblock %}
|
||||
meta(property="og:description", content="Blender Cloud is a web based service developed by Blender Institute that allows people to access the training videos and all the data from the open projects.")
|
||||
|
||||
meta(name="twitter:card", content="summary_large_image")
|
||||
meta(name="twitter:site", content="@Blender_Cloud")
|
||||
| {% block tw %}
|
||||
meta(name="twitter:title", content="Blender Cloud")
|
||||
meta(name="twitter:description", content="Blender Cloud is a web based service developed by Blender Institute that allows people to access the training videos and all the data from the open projects.")
|
||||
meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/backgrounds/background_gleb_locomotive.jpg')}}")
|
||||
|
@ -1,40 +1,5 @@
|
||||
| {% block og %}
|
||||
|
||||
| {% set title = 'blog' %}
|
||||
|
||||
| {% if project %}
|
||||
meta(property="og:title", content="{{ node.name }}{% if project._id == config.MAIN_PROJECT_ID %} — Blender Cloud Blog{% else%} - {{ project.name }} — Blender Cloud{% endif %}")
|
||||
| {% endif %}
|
||||
| {% if project and project.properties.picture_header %}
|
||||
meta(property="og:image", content="{{ project.properties.picture_header.thumbnail('l', api=api) }}")
|
||||
| {% elif node and node.picture %}
|
||||
meta(property="og:image", content="{{ node.picture.thumbnail('l', api=api) }}")
|
||||
| {% endif %}
|
||||
meta(property="og:description", content="{{ node.properties.content }}")
|
||||
meta(property="og:type", content="article")
|
||||
meta(property="article:type", content="{{node.user.full_name}}")
|
||||
meta(property="article:published_time", content="{{node._created | pretty_date }}")
|
||||
meta(property="og:see_also", content="https://cloud.blender.org/blog")
|
||||
meta(property="og:url", content="https://cloud.blender.org{{ url_for_node(node=node) }}")
|
||||
| {% endblock %}
|
||||
|
||||
| {% block tw %}
|
||||
meta(name="twitter:card", content="summary_large_image")
|
||||
| {% if project._id == config.MAIN_PROJECT_ID %}
|
||||
meta(property="twitter:title", content="{{ node.name }} — Blender Cloud Blog")
|
||||
| {% else %}
|
||||
meta(property="twitter:title", content="{{ node.name }} - {{ project.name }} Blog — Blender Cloud")
|
||||
| {% endif %}
|
||||
| {% if project and project.properties.picture_header %}
|
||||
meta(name="twitter:image", content="{{ project.properties.picture_header.thumbnail('l', api=api) }}")
|
||||
| {% elif node and node.picture %}
|
||||
meta(name="twitter:image", content="{{ node.picture.thumbnail('l', api=api) }}")
|
||||
| {% else %}
|
||||
meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_02.jpg')}}")
|
||||
| {% endif %}
|
||||
meta(name="twitter:description", content="{{ node.properties.content }}")
|
||||
| {% endblock %}
|
||||
|
||||
| {% block body %}
|
||||
|
||||
.container
|
||||
|
@ -5,20 +5,13 @@
|
||||
meta(property="og:type", content="website")
|
||||
| {% if og_picture %}
|
||||
meta(property="og:image", content="{{ og_picture.thumbnail('l', api=api) }}")
|
||||
| {% endif %}
|
||||
| {% if project %}
|
||||
meta(property="og:title", content="{{project.name}} - Blender Cloud")
|
||||
meta(property="og:url", content="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
||||
meta(property="og:description", content="{{project.summary}}")
|
||||
| {% endif %}
|
||||
| {% endblock %}
|
||||
|
||||
| {% block tw %}
|
||||
| {% if og_picture %}
|
||||
meta(property="twitter:image", content="{{ og_picture.thumbnail('l', api=api) }}")
|
||||
| {% endif %}
|
||||
| {% if project %}
|
||||
meta(property="og:title", content="{{project.name}} - Blender Cloud")
|
||||
meta(name="twitter:title", content="{{project.name}} on Blender Cloud")
|
||||
meta(property="og:url", content="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
||||
meta(property="og:description", content="{{project.summary}}")
|
||||
meta(name="twitter:description", content="{{project.summary}}")
|
||||
| {% endif %}
|
||||
| {% endblock %}
|
||||
|
@ -4,15 +4,13 @@
|
||||
| {% set title = 'home' %}
|
||||
|
||||
| {% block og %}
|
||||
meta(property="og:title", content="Blender Cloud - Home")
|
||||
meta(property="og:url", content="https://cloud.blender.org{{ request.path }}")
|
||||
meta(property="og:type", content="website")
|
||||
| {% endblock %}
|
||||
meta(property="og:url", content="https://cloud.blender.org{{ request.path }}")
|
||||
|
||||
| {% block tw %}
|
||||
meta(name="twitter:card", content="summary_large_image")
|
||||
meta(name="twitter:site", content="@Blender_Cloud")
|
||||
meta(property="og:title", content="Blender Cloud - Home")
|
||||
meta(name="twitter:title", content="Blender Cloud")
|
||||
|
||||
meta(property="og:image", content="{{ url_for('static', filename='assets/img/backgrounds/cloud_services_oti.jpg')}}")
|
||||
meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/backgrounds/cloud_services_oti.jpg')}}")
|
||||
| {% endblock %}
|
||||
|
||||
|
@ -1,17 +1,16 @@
|
||||
| {% extends 'layout.html' %}
|
||||
|
||||
| {% block og %}
|
||||
meta(property="og:title", content="{% if title == 'open-projects' %}Open Projects{% elif title == 'training' %}Training{% endif %}")
|
||||
// XXX - Replace with actual url
|
||||
meta(property="og:url", content="https://cloud.blender.org")
|
||||
meta(property="og:type", content="website")
|
||||
| {% endblock %}
|
||||
meta(property="og:url", content="https://cloud.blender.org")
|
||||
|
||||
| {% block tw %}
|
||||
meta(name="twitter:card", content="summary_large_image")
|
||||
meta(name="twitter:site", content="@Blender_Cloud")
|
||||
meta(property="og:title", content="{% if title == 'open-projects' %}Open Projects{% elif title == 'training' %}Training{% endif %}")
|
||||
meta(name="twitter:title", content="{% if title == 'open-projects' %}Open Projects{% elif title == 'training' %}Training{% endif %} on Blender Cloud")
|
||||
|
||||
meta(property="og:description", content="{% if title == 'open-projects' %}Full production data and tutorials from all open movies, for you to use freely{% elif title == 'training' %}Production quality training by 3D professionals{% endif %}")
|
||||
meta(name="twitter:description", content="{% if title == 'open-projects' %}Full production data and tutorials from all open movies, for you to use freely{% elif title == 'training' %}Production quality training by 3D professionals{% endif %}")
|
||||
|
||||
meta(property="og:image", content="{% if title == 'training' %}{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_03.jpg')}}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_agent327_01.jpg')}}{% endif %}")
|
||||
meta(name="twitter:image", content="{% if title == 'training' %}{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_03.jpg')}}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_agent327_01.jpg')}}{% endif %}")
|
||||
| {% endblock %}
|
||||
|
||||
|
@ -5,14 +5,12 @@
|
||||
|
||||
| {% block og %}
|
||||
meta(property="og:title", content="Dashboard")
|
||||
meta(name="twitter:title", content="Blender Cloud")
|
||||
|
||||
meta(property="og:url", content="https://cloud.blender.org/{{ request.path }}")
|
||||
meta(property="og:type", content="website")
|
||||
| {% endblock %}
|
||||
|
||||
| {% block tw %}
|
||||
meta(name="twitter:card", content="summary_large_image")
|
||||
meta(name="twitter:site", content="@Blender_Cloud")
|
||||
meta(name="twitter:title", content="Blender Cloud")
|
||||
meta(property="og:image", content="{{ url_for('static', filename='assets/img/backgrounds/cloud_services_oti.jpg')}}")
|
||||
meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/backgrounds/cloud_services_oti.jpg')}}")
|
||||
| {% endblock %}
|
||||
|
||||
|
@ -1,38 +1,47 @@
|
||||
| {% extends 'layout.html' %}
|
||||
| {% from '_macros/_add_new_menu.html' import add_new_menu %}
|
||||
|
||||
| {% block page_title %}{{project.name}}{% endblock%}
|
||||
| {% block page_title %}{{ project.name }}{% endblock%}
|
||||
|
||||
| {% block og %}
|
||||
meta(property="og:type", content="website")
|
||||
|
||||
| {% if og_picture %}
|
||||
meta(property="og:image", content="{{ og_picture.thumbnail('l', api=api) }}")
|
||||
| {% endif %}
|
||||
| {% if show_project %}
|
||||
meta(property="og:title", content="{{project.name}} - Blender Cloud")
|
||||
meta(property="og:url", content="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
||||
meta(property="og:description", content="{{project.summary}}")
|
||||
meta(name="twitter:image", content="{{ og_picture.thumbnail('l', api=api) }}")
|
||||
| {% elif node and node.picture %}
|
||||
meta(property="og:image", content="{{ node.picture.thumbnail('l', api=api) }}")
|
||||
meta(name="twitter:image", content="{{ node.picture.thumbnail('l', api=api) }}")
|
||||
| {% else %}
|
||||
| {% if node %}
|
||||
meta(property="og:title", content="{{node.name}} - Blender Cloud")
|
||||
meta(property="og:url", content="{{url_for('projects.view_node', project_url=project.url, node_id=node._id)}}")
|
||||
meta(property="og:description", content="{{node.description}}")
|
||||
meta(property="og:image", content="{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_02.jpg')}}")
|
||||
meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_02.jpg')}}")
|
||||
| {% endif %}
|
||||
| {% endif %}
|
||||
| {% endblock %}
|
||||
|
||||
| {% block tw %}
|
||||
| {% if og_picture %}
|
||||
meta(property="twitter:image", content="{{ og_picture.thumbnail('l', api=api) }}")
|
||||
| {% endif %}
|
||||
| {% if show_project %}
|
||||
meta(name="twitter:title", content="{{project.name}} on Blender Cloud")
|
||||
meta(name="twitter:description", content="{{project.summary}}")
|
||||
meta(property="og:title", content="{{ project.name }} - Blender Cloud")
|
||||
meta(name="twitter:title", content="{{ project.name }} - Blender Cloud")
|
||||
meta(property="og:description", content="{{ project.summary }}")
|
||||
meta(name="twitter:description", content="{{ project.summary }}")
|
||||
|
||||
meta(property="og:url", content="{{ url_for('projects.view', project_url=project.url, _external=True) }}")
|
||||
| {% else %}
|
||||
|
||||
| {% if node %}
|
||||
meta(name="twitter:title", content="{{node.name}} on Blender Cloud")
|
||||
meta(name="twitter:description", content="{{node.description}}")
|
||||
meta(property="og:title", content="{{ node.name }} - Blender Cloud")
|
||||
meta(name="twitter:title", content="{{ node.name }} on Blender Cloud")
|
||||
meta(property="og:description", content="{{ node.description }}")
|
||||
meta(name="twitter:description", content="{{ node.description }}")
|
||||
|
||||
meta(property="og:url", content="{{url_for('projects.view_node', project_url=project.url, node_id=node._id)}}")
|
||||
| {% else %}
|
||||
meta(property="og:title", content="{{ project.name }} Blog on Blender Cloud")
|
||||
meta(name="twitter:title", content="{{ project.name }} Blog on Blender Cloud")
|
||||
meta(property="og:description", content="{{ project.summary }}")
|
||||
meta(name="twitter:description", content="{{ project.summary }}")
|
||||
|
||||
meta(property="og:url", content="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
||||
| {% endif %}
|
||||
|
||||
| {% endif %}
|
||||
| {% endblock %}
|
||||
|
||||
|
@ -4,24 +4,19 @@
|
||||
|
||||
| {% block og %}
|
||||
meta(property="og:title", content="{{ node.name }}")
|
||||
meta(name="twitter:title", content="{{node.name}}")
|
||||
meta(property="og:url", content="{{ url_for('projects.view_node', project_url=project.url, node_id=node._id, t=1, _external=True) }}")
|
||||
meta(property="og:type", content="website")
|
||||
meta(property="og:description", content="Created on {{ node._created.strftime('%d %b %Y') }}")
|
||||
meta(name="twitter:description", content="Created on {{ node._created.strftime('%d %b %Y') }}")
|
||||
| {% if og_picture %}
|
||||
meta(property="og:image", content="{{ og_picture.thumbnail('l', api=api) }}")
|
||||
meta(property="og:image:secure_url", content="{{ og_picture.thumbnail('l', api=api) }}")
|
||||
meta(property="og:image:type", content="{{ og_picture.content_type }}")
|
||||
meta(property="og:image:witdh", content="{{ og_picture.width }}")
|
||||
meta(property="og:image:height", content="{{ og_picture.height }}")
|
||||
| {% endif %}
|
||||
| {% endblock %}
|
||||
|
||||
| {% block tw %}
|
||||
| {% if og_picture %}
|
||||
meta(property="twitter:image", content="{{ og_picture.thumbnail('l', api=api) }}")
|
||||
| {% endif %}
|
||||
meta(name="twitter:title", content="{{node.name}}")
|
||||
meta(name="twitter:description", content="Created on {{ node._created.strftime('%d %b %Y') }}")
|
||||
| {% endblock %}
|
||||
|
||||
| {% block header_backdrop %}{% endblock %}
|
||||
|
@ -4,9 +4,15 @@
|
||||
| {% set title = 'services' %}
|
||||
|
||||
| {% block og %}
|
||||
meta(property="og:title", content="Services - Blender Cloud")
|
||||
meta(property="og:type", content="website")
|
||||
meta(property="og:url", content="https://cloud.blender.org/services")
|
||||
|
||||
meta(property="og:title", content="Services - Blender Cloud")
|
||||
meta(name="twitter:title", content="Services - Blender Cloud")
|
||||
meta(property="og:description", content="Personal Projects · Blender Integration · Texture Browsing · Production Management")
|
||||
meta(name="twitter:description", content="Personal Projects · Blender Integration · Texture Browsing · Production Management")
|
||||
meta(property="og:image", content="{{ url_for('static', filename='assets/img/backgrounds/background_services.jpg')}}")
|
||||
meta(name="twitter:image", content="{{ url_for('static', filename='assets/img/backgrounds/background_services.jpg')}}")
|
||||
| {% endblock %}
|
||||
|
||||
| {% block header_backdrop %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user