Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New standard mobile-first skin #1654

Closed
achimnol opened this issue Mar 5, 2014 · 7 comments
Closed

New standard mobile-first skin #1654

achimnol opened this issue Mar 5, 2014 · 7 comments
Assignees
Milestone

Comments

@achimnol
Copy link
Member

achimnol commented Mar 5, 2014

Build a new standard skin with mobile-first in mind.
The skin will be based on Bootstrap 3.x or later, its jQuery plugins, and Font Awesome 4.x or later.

To use this skin for mobile phones, we need to force use of the blog skin instead of "i" or "m" mode. In particular, the "m" mode for old feature-phones is considered to be deprecate.
We also need to modify Textcube's core codes that are tightly coupled with HTML rendering, such as pagination and category badges.

After all modifications, old skins may not be compatible with the new version of Textcube, but we will try to minimize backward-incompatibility.

@achimnol achimnol modified the milestones: 1.10, 2.0.0 Mar 5, 2014
@achimnol achimnol assigned achimnol and inureyes and unassigned achimnol and inureyes Mar 5, 2014
@achimnol achimnol modified the milestones: 2.0.0, 1.10 Mar 5, 2014
@inureyes
Copy link
Member

inureyes commented Mar 5, 2014

Dual renderer for paging skin block can be a backward-compatible solution.

achimnol added a commit that referenced this issue Mar 5, 2014
 - Work in progress.

 - We need some template language for skins.
   Currently we have to modify PHP codes to change HTML markups,
   but if we have a template engine, the modification can be confined
   within HTML only.

   Example:

     <li [##_no_more_prev_##]><a ...
     dress('no_more_prev', isset($paging['prev']) ? '' : 'class="disabled"', $view, $useSkinCache);

     can be rewritten as (following Jinja's syntax):

     <li{% if no_more_prev %} class="disabled"{% endif %}><a ...
@achimnol
Copy link
Member Author

achimnol commented Mar 5, 2014

Just for memo. Considerations for a new skin specification:

  • Templates including control statements such as loops and conditionals with variables. A good candidate for PHP is Twig which resembles Django/Jinja syntax.
  • Special synatx to define skin-defined elements such as sidebar widgets. They are scanned when changing the skin and have persistent states like visibility and orders.
  • A predefined CSS namespace for Textcube Core elements. For example, we could implement the trackback pop-up window as a Popover bootstrap component by filling its content via AJAX. In this case, internal elements should have separate CSS namespace to avoid conflicts with skin's styles.

@inureyes
Copy link
Member

inureyes commented Mar 6, 2014

Paging is handled by library/view/paging.php. getPagingView receives paging skin fragment, parses and returns the complete html. Therefore I'll work on

  • Split getPagingView into two parts: for desktop and for mobile
  • Add $context->property('blog.viewmode') -> 'mobile' or 'desktop', determines at dispatch process.

@inureyes
Copy link
Member

inureyes commented Mar 6, 2014

@achimnol I strongly agree with your opinion about CSS namespace. Currently, textcube skin support some default CSS names and ids, hardcoded in core (/skin/blog/standard/style.css uses them) without namespace. (Well, it's 10 year old code.)

Any ideas for naming? tc (textcube)? cb (codeball)? nw (needlworks)?

@inureyes
Copy link
Member

inureyes commented Mar 6, 2014

@achimnol I'll look at your modified pagination html markup of your test page. If you can send me a simplified html ul-li pagination format, please attach it here. 👍

@achimnol
Copy link
Member Author

achimnol commented Mar 6, 2014

I think tc- prefix would be fine. We also need to unify the rule namings, such as whether to use hyphens or underscores to distinguish different levels in the names. I think the "modern" practice is to use hyphens.

Additional idea for the new skin format:

  • Extension of index.xml. If we adopt template engines, some skins could offer extra options such as "left sidebar" or "right sidebar" by switching a few CSS classes. We could build an option panel like Textcube plugins and make the setting values available in the context of skin templates.
  • It would be more interesting if we use LESS to allow users to choose key colors of a skin, like color schemes in Microsoft Powerpoint.

inureyes added a commit that referenced this issue Mar 6, 2014
 - i/ and m/ URLs are removed.

From now on, textcube loads skin/blog/lucid when
  - blog.useiPhoneMode is true
  - device agent is recognized as the one of mobile devices.

TODO:
  - mobile <-> desktop mode button
  - move skin location to under resource/ directory.
  - upgrade skin parser to read skins outside /skin/blog directory.
  - Lots of mobile skin design / functions
achimnol added a commit that referenced this issue Mar 11, 2014
inureyes added a commit that referenced this issue Mar 11, 2014
 - default skin location (/skin/default) added.
 - Mobile mode uses skin at /skin/default/lucid.
achimnol added a commit that referenced this issue Mar 14, 2014
achimnol added a commit that referenced this issue Mar 14, 2014
inureyes added a commit that referenced this issue Dec 13, 2014
inureyes added a commit that referenced this issue Dec 13, 2014
@inureyes inureyes added the fixed label Dec 13, 2014
inureyes added a commit that referenced this issue Dec 23, 2014
lonniena added a commit that referenced this issue Dec 25, 2014
- Readjust the content font size
- Fixed - coverpage view img size for mobile
- Fixed - input form layout
inureyes added a commit that referenced this issue Dec 25, 2014
inureyes added a commit that referenced this issue Dec 27, 2014
lonniena added a commit that referenced this issue Dec 27, 2014
- Readjust the content font size
- Fixed - coverpage view img size for mobile
- Fixed - input form layout
inureyes added a commit that referenced this issue Dec 27, 2014
inureyes added a commit that referenced this issue Dec 27, 2014
inureyes added a commit that referenced this issue Dec 27, 2014
inureyes added a commit that referenced this issue Dec 27, 2014
lonniena added a commit that referenced this issue Jan 7, 2015
CSS, does not rely on MT_Meta_Recent Plugin
inureyes added a commit that referenced this issue Jan 8, 2015
lonniena added a commit that referenced this issue Jan 8, 2015
CSS, does not rely on MT_Meta_Recent Plugin
inureyes added a commit that referenced this issue Jan 9, 2015
lonniena added a commit that referenced this issue Feb 1, 2015
modified - Media Query on IE8
lonniena added a commit that referenced this issue Feb 1, 2015
sidebar bottom margin for visibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants