-
Notifications
You must be signed in to change notification settings - Fork 146
Article layout overhaul #6306
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
Merged
Merged
Article layout overhaul #6306
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
804b375
Remove the 'new' badge
BurntimeX c87843a
Change the order of the items in header meta data
BurntimeX 1f1b7d3
Unify the appearance of the deleted/disabled state
BurntimeX 16f79df
Overhaul tag appearance
BurntimeX 314c8d5
Fix the issue that the TOC gives the first element a margin
BurntimeX 1381166
Overhaul article layout
BurntimeX f98065d
Make use of the 'unsafe' prefix
BurntimeX 6f59e36
Don't remove the article role if an article has a heading
BurntimeX 70c7ba5
Rename the generic class to 'entry'
BurntimeX ae23e77
Migrate article navigation to generic solution
BurntimeX 6cd7508
Migrate related articles to list view
BurntimeX dbb4420
Remove obsolete template
BurntimeX 8098059
Fix the box for the article list
BurntimeX 595127e
Add an option to set a maximum number of items shown in a list view
BurntimeX 56cc203
Provide article interactions on the article page
BurntimeX 9b9c3be
Apply suggestions from code review
BurntimeX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| <div class="contentHeaderTitle"> | ||
| <h1 class="contentTitle" itemprop="name headline">{$articleContent->title}</h1> | ||
| <ul class="inlineList contentHeaderMetaData articleMetaData"> | ||
| <li itemprop="author" itemscope itemtype="http://schema.org/Person"> | ||
| {icon name='user'} | ||
| {if $article->userID} | ||
| <a href="{$article->getUserProfile()->getLink()}" class="userLink" data-object-id="{$article->userID}" itemprop="url"> | ||
| <span itemprop="name">{unsafe:$article->getUserProfile()->getFormattedUsername()}</span> | ||
| </a> | ||
| {else} | ||
| <span itemprop="name">{$article->username}</span> | ||
| {/if} | ||
| </li> | ||
|
|
||
| <li> | ||
| {icon name='clock'} | ||
| <a href="{$article->getLink()}">{time time=$article->time}</a> | ||
| <meta itemprop="datePublished" content="{$article->time|date:'c'}"> | ||
| </li> | ||
|
|
||
| {if $article->hasLabels()} | ||
| <li> | ||
| {icon name='tags'} | ||
| <ul class="labelList"> | ||
| {foreach from=$article->getLabels() item=label} | ||
| <li>{unsafe:$label->render()}</li> | ||
| {/foreach} | ||
| </ul> | ||
| </li> | ||
| {/if} | ||
|
|
||
| <li> | ||
| {icon name='eye'} | ||
| {lang}wcf.article.articleViews{/lang} | ||
| </li> | ||
|
|
||
| {if $article->getDiscussionProvider()->getDiscussionCountPhrase()} | ||
| <li itemprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter"> | ||
| {icon name='comments'} | ||
| {if $article->getDiscussionProvider()->getDiscussionLink()}<a href="{$article->getDiscussionProvider()->getDiscussionLink()}">{else}<span>{/if} | ||
| {$article->getDiscussionProvider()->getDiscussionCountPhrase()} | ||
| {if $article->getDiscussionProvider()->getDiscussionLink()}</a>{else}</span>{/if} | ||
| <meta itemprop="interactionType" content="http://schema.org/CommentAction"> | ||
| <meta itemprop="userInteractionCount" content="{$article->getDiscussionProvider()->getDiscussionCount()}"> | ||
| </li> | ||
| {/if} | ||
|
|
||
| {hascontent} | ||
| <li> | ||
| {icon name='flag'} | ||
| {content} | ||
| {if $article->isDeleted} | ||
| <span class="badge red">{lang}wcf.message.status.deleted{/lang}</span> | ||
| {/if} | ||
| {if !$article->isPublished()} | ||
| <span class="badge green">{lang}wcf.message.status.disabled{/lang}</span> | ||
| {/if} | ||
| {event name='contentHeaderMetaDataFlag'} | ||
| {/content} | ||
| </li> | ||
| {/hascontent} | ||
|
|
||
| {event name='contentHeaderMetaData'} | ||
| </ul> | ||
|
|
||
| <div itemprop="publisher" itemscope itemtype="http://schema.org/Organization"> | ||
| <meta itemprop="name" content="{PAGE_TITLE|phrase}"> | ||
| <div itemprop="logo" itemscope itemtype="http://schema.org/ImageObject"> | ||
| <meta itemprop="url" content="{$__wcf->getStyleHandler()->getStyle()->getPageLogo()}"> | ||
| </div> | ||
| </div> | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| {if $attachmentList && $attachmentList->getGroupedObjects($objectID)|count} | ||
| {hascontent} | ||
| <section class="entry__attachments__thumbnails"> | ||
| <h2 class="entry__attachments__title">{lang}wcf.attachment.images{/lang}</h2> | ||
|
|
||
| <ul class="inlineList"> | ||
| {content} | ||
| {foreach from=$attachmentList->getGroupedObjects($objectID) item=attachment} | ||
| {if $attachment->showAsImage() && !$attachment->isEmbedded()} | ||
| <li class="attachmentThumbnail" data-attachment-id="{$attachment->attachmentID}"> | ||
| <a href="{$attachment->getLink()}"{if $attachment->canDownload()} data-fancybox="message-{$attachmentList->getObjectTypeName()}-{$objectID}" data-caption="{$attachment->filename}" aria-title="{lang}wcf.attachment.image.title{/lang}"{/if}> | ||
| <div class="attachmentThumbnailContainer"> | ||
| <span class="attachmentThumbnailImage"> | ||
| {if $attachment->hasThumbnail()} | ||
| <img | ||
| src="{$attachment->getThumbnailLink('thumbnail')}" | ||
| alt="" | ||
| {if $attachment->thumbnailWidth >= ATTACHMENT_THUMBNAIL_WIDTH && $attachment->thumbnailHeight >= ATTACHMENT_THUMBNAIL_HEIGHT} | ||
| class="attachmentThumbnailImageScalable" | ||
| {/if} | ||
| width="{$attachment->thumbnailWidth}" | ||
| height="{$attachment->thumbnailHeight}" | ||
| loading="lazy" | ||
| > | ||
| {else} | ||
| <img | ||
| src="{$attachment->getLink()}" | ||
| alt="" | ||
| {if $attachment->width >= ATTACHMENT_THUMBNAIL_WIDTH && $attachment->height >= ATTACHMENT_THUMBNAIL_HEIGHT} | ||
| class="attachmentThumbnailImageScalable" | ||
| {/if} | ||
| width="{$attachment->width}" | ||
| height="{$attachment->height}" | ||
| loading="lazy" | ||
| > | ||
| {/if} | ||
| </span> | ||
|
|
||
| <span class="attachmentThumbnailData"> | ||
| <span class="attachmentFilename">{$attachment->filename}</span> | ||
| </span> | ||
| </div> | ||
|
|
||
| <ul class="attachmentMetaData inlineList"> | ||
| <li> | ||
| {icon name='file-lines'} | ||
| {$attachment->filesize|filesize} | ||
| </li> | ||
| <li> | ||
| {icon name='up-right-and-down-left-from-center'} | ||
| {#$attachment->width} × {#$attachment->height} | ||
| </li> | ||
| </ul> | ||
| </a> | ||
| </li> | ||
| {/if} | ||
| {/foreach} | ||
| {/content} | ||
| </ul> | ||
| </section> | ||
| {/hascontent} | ||
|
|
||
| {hascontent} | ||
| <section class="entry__attachments__files"> | ||
| <h2 class="entry__attachments__title">{lang}wcf.attachment.files{/lang}</h2> | ||
|
|
||
| <div class="messageAttachmentList"> | ||
| {content} | ||
| {foreach from=$attachmentList->getGroupedObjects($objectID) item=attachment} | ||
| {if $attachment->showAsFile() && !$attachment->isEmbedded()} | ||
| <a href="{$attachment->getLink()}" class="messageAttachment jsTooltip" title="{lang}wcf.attachment.file.title{/lang}"> | ||
| <span class="messageAttachmentIcon"> | ||
| <span class="messageAttachmentIconDefault"> | ||
| {icon size=32 name=$attachment->getIconName()} | ||
| </span> | ||
| <span class="messageAttachmentIconDownload"> | ||
| {icon size=32 name='download'} | ||
| </span> | ||
| </span> | ||
| <span class="messageAttachmentFilename">{$attachment->filename}</span> | ||
| <span class="messageAttachmentMeta">{lang}wcf.attachment.file.info{/lang}</span> | ||
| </a> | ||
| {/if} | ||
| {/foreach} | ||
| {/content} | ||
| </div> | ||
| </section> | ||
| {/hascontent} | ||
| {/if} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| {if !$tags|empty} | ||
| <section class="entry_tags" aria-label="{lang}wcf.tagging.tags{/lang}"> | ||
| <ul class="tagList"> | ||
| {foreach from=$tags item=tag} | ||
| <li> | ||
| <a href="{link controller='Tagged' object=$tag}objectType={$objectType}{/link}" class="tag"> | ||
| {icon name='tag'} | ||
| {$tag->name} | ||
| </a> | ||
| </li> | ||
| {/foreach} | ||
| </ul> | ||
| </section> | ||
| {/if} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
22 changes: 20 additions & 2 deletions
22
wcfsetup/install/files/js/WoltLabSuite/Core/Component/Interaction/StandaloneButton.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.