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

feat(timeline): add timeline layout #253

Merged
merged 4 commits into from
Mar 31, 2017
Merged

feat(timeline): add timeline layout #253

merged 4 commits into from
Mar 31, 2017

Conversation

ghouzenyan
Copy link
Contributor

What kind of change does this PR introduce? (check one with "x")

  • Bug fix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

Description

Implement the page-timeline-material feature in typecho-theme-material repo with Hexo.

If you prefer the voez or other styles, just modify the css style which you like.

Enjoy it!


Verification steps

No verification steps.

@neoFelhz neoFelhz changed the base branch from master to canary March 29, 2017 13:45
@neoFelhz
Copy link
Collaborator

neoFelhz commented Mar 29, 2017

I have changed the base branch as canary, thanks for you contributions!
Could you give a demo?

@neoFelhz neoFelhz changed the title faet(timeline): add timeline page to sidebar faet(timeline): add timeline layout Mar 29, 2017
Prettify the code & if <!--more--> is used when writing hexo post, show more excerpt.
@ghouzenyan
Copy link
Contributor Author

I think this figure may be a demo?

20170329223400

Also, the icon can be changed.

20170329223819

@neoFelhz neoFelhz changed the title faet(timeline): add timeline layout feat(timeline): add timeline layout Mar 29, 2017
Copy link
Collaborator

@cubesky cubesky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest change config to sidebar.timeline instead of sidebar.pages.timeline and use i18n to get different language for timeline label
@neoFelhz

@@ -133,6 +133,10 @@ sidebar:
#link: "/about"
#icon: person
#divider: false
timeline: #can use different languages
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we needn't add this configuration to config file. As you can see, we have gallery page and links page and they are not included in config file.
We needn't configuring it for users.

left: 0;
width: 60px;
height: 40px;
border-radius: box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid property name here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your suggestion. I try to fix it as following.

@@ -88,7 +88,8 @@

     left: 0; 
     width: 60px; 
     height: 40px; 
-    border-radius: box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05); 
+    border-radius: 0.25em; 
+    box-shadow: 0 0 0 4px white, inset 0 2px 0 rgba(0, 0, 0, 0.08), 0 3px 0 4px rgba(0, 0, 0, 0.05); 

This property is used to control the shape of corner as shown in the following figure.

jz 7ns3sgpto9d w 77em h

If reviewers don't like the material design of the square card that is broken by this property, you can also delete directly on this line of code. 😄

style: 'none'
}) %>
</span>
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some issue with tag categories between post excerpt.

Try to add double <br> between line 414 and 415?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this need to be changed in css, not html.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for that. I just copied the CSS from the typecho repo. I think there are still some issues in the style.

I tried to fix the float layout problem. I did several attempts but were not satisfied. This commit may be a acceptable modification. I hope someone who knows more CSS styles than me would prettify it.

Finally, I recommend that use fewer words to describe the tags and categories, which means you won't meet the above issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the problem is that the alignment would be broken while there are too many texts. But as we seen the content's width is short, especially displaying on the mobile. If we don't focus on how to fix the original style, I think we have two ways.

  1. Align tags & categories to the left and divide them into two lines.
  2. Put two icons on the upper right corner instead of lables that looks like in post page. Click to drop lists.

If you have a good idea, we can discuss it. ❤️

P.S. I expect someone to rewrite a more cool style. @neoFelhz @Halyul

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ghouzenyan OK. I will try to find a way to solve it.
Anyway, thanks for your contribution!

Correct spelling and float style  errors.
Add '...' after excerpts.
@neoFelhz neoFelhz merged commit c331da9 into iblh:canary Mar 31, 2017
@neoFelhz neoFelhz mentioned this pull request Apr 2, 2017
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants