Skip to content

Commit

Permalink
Restyle homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
danon committed Oct 22, 2024
1 parent 9311d4b commit 2f8f362
Show file tree
Hide file tree
Showing 17 changed files with 618 additions and 324 deletions.
3 changes: 0 additions & 3 deletions app/Domain/Icon/FontAwesomeFree.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ public function icons(): array
'loginGithub' => 'fab fa-github',

// homepage
'microblogsPopular' => 'far fa-comments',
'reputationRanking' => 'fas fa-star',
'forumNews' => 'fas fa-star',
'viewersOnlineLocal' => 'fas fa-eye',
'viewersOnlineGlobal' => 'fas fa-users',
'homepageActivityMicroblog' => 'far fa-person',
Expand Down
3 changes: 0 additions & 3 deletions app/Domain/Icon/FontAwesomePro.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ public function icons(): array
'loginGithub' => 'fa-brand fa-github',

// homepage
'microblogsPopular' => 'fa-light fa-fire-flame-curved',
'reputationRanking' => 'fa-light fa-trophy',
'forumNews' => 'fa-light fa-inbox-in',
'viewersOnlineLocal' => 'fa-light fa-eye',
'viewersOnlineGlobal' => 'fa-light fa-users',
'homepageActivityMicroblog' => 'fa-light fa-person',
Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function index(): View
),

'globalViewers' => $this->globalViewers(),
'lookAndFeel' => 'lookAndFeelModern',
])
->with('settings', $this->getSettings());
}
Expand Down
8 changes: 4 additions & 4 deletions app/Services/Session/Renderer.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Coyote\Services\Session;

use Coyote\Domain\Online\SessionRepository;
use Coyote\Domain\Online\FakeSessionRepository;
use Coyote\Domain\Online\Viewers;
use Coyote\Domain\Online\ViewersStore;
use Coyote\Domain\Spacer;
Expand All @@ -13,9 +13,9 @@ class Renderer
private Spacer $spacer;

public function __construct(
private SessionRepository $session,
private ViewersStore $store,
private Request $request,
private FakeSessionRepository $session,
private ViewersStore $store,
private Request $request,
)
{
$this->spacer = new Spacer(8);
Expand Down
2 changes: 1 addition & 1 deletion public/img/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/img/logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions resources/feature/theme/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,36 @@
}
}
}

@mixin theme {
/**
* The dark() and light() mixins increase selector specificity.
* In some cases, it's necessary to apply a common style to both
* themes, overriding a previously defined style.
* Thus, we need to artificially elevate the specificity
* of the style, without actually changing any style.
*/
html.theme-light &,
html.theme-dark &,
{
@content;
}
}

@mixin color-theme($light, $dark) {
@include light {
color: $light;
}
@include dark {
color: $dark;
}
}

@mixin background-theme($light, $dark) {
@include light {
background: $light;
}
@include dark {
background: $dark;
}
}
13 changes: 6 additions & 7 deletions resources/js/components/microblog/comment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,25 @@
</a>
</li>
<li class="list-inline-item">
<a
<span
@click="checkAuth(vote, comment)"
@mouseenter.once="loadVoters(comment)"
:aria-label="commentVoters"
:class="{'vote-active': comment.is_voted}"
href="javascript:"
data-balloon-pos="up"
data-balloon-break>
{{ commentLabel }}
</a>
</span>
</li>
<li class="list-inline-item">
<a @click="checkAuth(reply)" href="javascript:">
<span @click="checkAuth(reply)">
Odpowiedz
</a>
</span>
</li>
<li v-if="isAuthorized" class="list-inline-item">
<a href="javascript:" :data-metadata="comment.metadata" :data-url="comment.url">
<span :data-metadata="comment.metadata" :data-url="comment.url">
Zgłoś
</a>
</span>
</li>
</ul>

Expand Down
1 change: 0 additions & 1 deletion resources/sass/core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
@import "core/dark_flash";
@import "core/dark_footer";
@import "core/dark_header";
@import "core/dark_homepage";
@import "core/dark_input";
@import "core/dark_job";
@import "core/dark_job_offers";
Expand Down
104 changes: 0 additions & 104 deletions resources/sass/core/_dark_homepage.scss

This file was deleted.

2 changes: 1 addition & 1 deletion resources/sass/core/_dark_topic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body.theme-dark {
border-bottom-color: #2f2f2f;
border-bottom-width: 2px;

.nav-search {
.nav-search { // TODO remove this after new homepage
.search-bar {
background-color: #2a2a2a;

Expand Down
10 changes: 0 additions & 10 deletions resources/sass/core/_navs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@
}
}

.nav-pills {
.nav-link {
&.nav-link-style-only {
// Style an element to look like a nav link,
// without any functionality of nav link.
cursor: default;
}
}
}

.nav-tabs {
.nav-link.active {
border-top: 2px solid $alt-link-hover-color;
Expand Down
6 changes: 6 additions & 0 deletions resources/sass/icons/_icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ $icon-admin-table-sort: $fa-var-sort;
$icon-admin-table-sort-asc: $fa-var-sort-down;
$icon-admin-table-sort-desc: $fa-var-sort-up;

@mixin icon {
i.fa-fw {
@content;
}
}

.fa-square-question:before {
content: "\f2fd";
}
Expand Down
2 changes: 1 addition & 1 deletion resources/sass/layout/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ footer {
}
}

#scroll-to-top {
.scroll-top {
@include floater;
box-sizing: content-box;
font-size: 16px;
Expand Down
Loading

0 comments on commit 2f8f362

Please sign in to comment.