Commit Graph

456 Commits

Author SHA1 Message Date
6f0a03ce60 Set page title on edit_embed 2017-10-03 12:52:50 +02:00
Pablo Vazquez
053848607d Don't add padding on bottom of node-details-description mixin 2017-10-03 01:26:41 +02:00
Pablo Vazquez
94a0868ba5 Comments: Style cancel button 2017-10-03 01:26:25 +02:00
Pablo Vazquez
c6d8a4c46f Comments: Send text should be inside a span 2017-10-03 01:26:06 +02:00
58a34d6cdb Typo (one bracket too much) 2017-10-02 19:49:33 +02:00
b0c7997128 Notifications: Don't update titles directly, fire an event instead 2017-10-02 19:49:20 +02:00
1bf2a87726 Use a the updateTitle() function to update page titles 2017-10-02 19:48:37 +02:00
d3cd6a884e Use toastr notifications instead of statusBarSet() 2017-10-02 19:31:52 +02:00
Pablo Vazquez
9870979c54 Comments: Style tweak linked comment
Move "Linked Comment" to the bottom, add padding, no borders.
2017-10-02 01:54:13 +02:00
Pablo Vazquez
bb067f77c3 Fix styling for login/local 2017-10-02 00:41:04 +02:00
Pablo Vazquez
da7be50c61 Comments: Cleanup and convert more IDs to classes when possible
No functional changes.
2017-09-30 23:21:54 +02:00
Pablo Vazquez
e4c5743852 Comments: trigger comments-loaded event on comments load.
Useful when apps want to know or do something with the comments,
like Dillo to parse emojis for example.
2017-09-30 23:18:09 +02:00
ddc52b969e Make it possible for node types to have a 'custom view'
This 'custom view' means that the URL to view the node (as returned by
url_for_node(…)) cannot be loaded via XHR and embedded in the project
viewer, but should rather be used as the actual browser URL instead.

Currently only blogs use this.
2017-09-29 10:45:29 +02:00
e4fff8df81 Added missing project_container variable. 2017-09-28 17:43:48 +02:00
ec42d033b3 Comment padding/color tweaks for the blog and projects 2017-09-25 10:15:05 +02:00
Pablo Vazquez
8fd577c733 Comments: Capitalize actions and color Reply 2017-09-25 01:24:30 +02:00
Pablo Vazquez
4eeccb6107 Comments: More compact layout 2017-09-25 00:39:34 +02:00
Pablo Vazquez
6688ae66fa Use Toastr to notify 2017-09-25 00:37:03 +02:00
Pablo Vazquez
38e960eb3f Comments: Fix multiple posting when using a hotkey
On every new item loaded with comments, we would bind the click without
unbinding first, leading to multiple posting when triggering the comment
submission.
2017-09-25 00:35:35 +02:00
Pablo Vazquez
dbde681aff Fix alignment for notifications count 2017-09-24 23:11:08 +02:00
Pablo Vazquez
76a5555ff4 Toastr Notifications: Brighter text color 2017-09-23 00:01:16 +02:00
7d740c74e3 Move comment posting into its own function 2017-09-22 19:12:13 +02:00
58b8cea757 Homepage: Don't capitalize project summary on random featured assets 2017-09-22 15:32:27 +02:00
dc75980eba Blog: limit the max-width of post content 2017-09-21 19:14:30 +02:00
f311dbbe30 Fix fluid headers on video 2017-09-21 19:04:55 +02:00
Pablo Vazquez
b5f0c59511 Comments: Style tweaks
More compact and also convert IDs to classes (when not used by javascript)
2017-09-21 01:14:53 +02:00
1e6180be48 More fixes for video fluid 2017-09-20 16:37:16 +02:00
ebe3118f79 Project home video should not have vjs-fluid, it already is fluid 2017-09-20 16:35:19 +02:00
714455a4eb Fix navigation tree not scrolling until the bottom 2017-09-20 16:31:07 +02:00
0089a8a98e Video: Previews are already fluid, no need for vjs-fluid 2017-09-20 16:18:05 +02:00
9fa4da284b Homepage: Style tweak to random featured project 2017-09-20 16:14:46 +02:00
e3f1f101e2 Assets: No need to calculate preview aspect ratio anymore
No longer used since we went full width
2017-09-20 16:06:42 +02:00
386571157a Assets: Check if user is subscriber or asset is public 2017-09-20 14:23:21 +02:00
5012d19180 Video asset: Show link to login as well as subscribe 2017-09-20 14:19:39 +02:00
54b5e8e3d4 Video: Fix Download button 2017-09-20 14:19:39 +02:00
Pablo Vazquez
5e0e71aa1c SASS: Set all config variables as !default
So other Pillar apps can override them
2017-09-19 21:21:59 +02:00
6af0cd2be8 Don't show "Create a project" button to non-subscribers, and make btn clickable 2017-09-18 13:51:31 +02:00
82a1e0796c Project Home: Scale header image fit as cover 2017-09-17 21:55:59 +02:00
8d0c0894cb Textures: No background color for download button 2017-09-17 21:55:10 +02:00
b2cfe46438 Style tweaks on projects
Plus re-ordering and minor cleanup
2017-09-17 20:11:13 +02:00
53ac29cfd1 Project: Show edit button in sidebar
So we can access it from everywhere and not only from project home
2017-09-17 20:11:13 +02:00
4e153413d9 Fix Download button showing when not logged in 2017-09-17 20:11:13 +02:00
5df68c4ead Comments: Only show if there are actually comments
No negative text "no comments"
2017-09-16 20:11:50 +02:00
1563f4142d Fix broken layout on project blog posts
Fixes T52764
2017-09-16 20:11:50 +02:00
9ac870e0a5 Fixed scrolling to comment when the comment ID is in the URL hash. 2017-09-13 14:05:18 +02:00
Dalai Felinto
303a33c3bf Internationalization: Backend support to localization based on user browser
User experience
===============
For users it means we can provide localized web-sites to enrich their
overall experiences.

Although for the Blender Cloud this doesn't make much sense (since the
content is in English), Flamenco and Attract can really benefit from
this.

New configuration settings
==========================
There are two new parameters in config.py:

* DEFAULT_LOCALE='en_US'
* SUPPORT_ENGLISH=True

They are both properly documented in the `config.py` file.

Technicall details
==================
We are using the 'Accept-Languages' header to match the
available translations with the user supported languages.

If an extension has a `translations` folder, it's used for translations.
However the main application (e.g., Blender Cloud) is the one that
determines the supported languages based on its `languages` folder.

How to mark strings for translation
===================================
See the documentation in README.md.

But as an example, 404.pug and pillar/__init__.py::handle_sdk_resource_invalid
have marked up strings that will be extracted once you install pillar,
or run any of the translations commangs.

Remember to **gulp** after you update the template files.

How to setup translations
=========================
You will need to create translation for the main project, and for each
extension that you want to see translated. I added a new entry-point to
the installation of Pillar.

So all you need is to use the `translations`
script to initialize, update and compile your translations.

Pending tasks
=============
Aside from marking more strings for extraction and start the translation
effort it would be interesting to replace the pretty_date routine with
momentjs.

Acknowledgement
===============
Many thanks for Sybren Stüvel for the suggestions and throughout code
review. Thanks also to Francesco Siddi for the original documentation
and suggesting me to tackle this. And Kudos for Pablo Vazquez for the
motivational support and for the upcoming "strings mark up" task force!

The core of the implementation is based on Miguel Grinberg i18n chapter
of his great 'The Mega Flask Tutorial'.

Reviewers: sybren

Differential Revision: https://developer.blender.org/D2826
2017-09-09 00:26:18 +02:00
e5b80297ba Fixed user ID, we now pass a UserClass instance to compute the capabilities 2017-09-05 16:05:57 +02:00
97564022c3 Renamed 'child' to 'variation', since it's not about child nodes. 2017-09-05 11:56:41 +02:00
b6b7aad046 Have a nicer 403 Forbidden message when the user isn't logged in.
Since we don't know who the user is, just stating that they don't have
access isn't correct.
2017-09-05 11:35:21 +02:00
a8e912fcb1 Include 'next' URL when logging in through a 403 Forbidden page 2017-09-05 11:35:21 +02:00