- Notifications
You must be signed in to change notification settings - Fork328
Dan blog search#1359
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Dan blog search#1359
Changes fromall commits
Commits
Show all changes
10 commits Select commitHold shift + click to select a range
2cb1f13
add search to blog landing page
chillenberger7ed88dc
add search on enter, remove text on small screens
chillenberger5b621d3
Merge branch 'master' into dan-blog-search
chillenberger5d59fcf
add search
chillenberger5007ffb
add active state for tag buttons
chillenbergerac05a0d
remove dead code, clean up
chillenberger6266fa2
Merge branch 'master' into dan-blog-search
chillenberger4dc139e
move loading to dashboard, use loading for search
chillenberger8e699cf
fmt
chillenbergerb3f4146
add some spacing to blog loading
chillenbergerFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
97 changes: 88 additions & 9 deletionspgml-dashboard/src/api/cms.rs
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
12 changes: 0 additions & 12 deletionspgml-dashboard/src/components/cards/blog/article_preview/article_preview_controller.js
This file was deleted.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
29 changes: 17 additions & 12 deletionspgml-dashboard/src/components/cards/blog/article_preview/mod.rs
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
37 changes: 37 additions & 0 deletionspgml-dashboard/src/components/loading/dots/dots.scss
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,37 @@ | ||
div { | ||
@mixin loading-dot($delay, $initial) { | ||
width: 30px; | ||
height: 30px; | ||
opacity: $initial; | ||
border-radius: 30px; | ||
background-color: #{$gray-100}; | ||
animation: opacity 3s infinite linear; | ||
animation-delay: $delay; | ||
} | ||
.loading-dot-1 { | ||
@include loading-dot(0s, 0.1); | ||
} | ||
.loading-dot-2 { | ||
@include loading-dot(0.5s, 0.2); | ||
} | ||
.loading-dot-3 { | ||
@include loading-dot(1s, 0.3); | ||
} | ||
@keyframes opacity { | ||
0% { | ||
opacity: 0.1; | ||
} | ||
75% { | ||
opacity: 1; | ||
} | ||
100% { | ||
opacity: 0.1; | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletionspgml-dashboard/src/components/loading/dots/mod.rs
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 @@ | ||
use pgml_components::component; | ||
use sailfish::TemplateOnce; | ||
#[derive(TemplateOnce, Default)] | ||
#[template(path = "loading/dots/template.html")] | ||
pub struct Dots {} | ||
impl Dots { | ||
pub fn new() -> Dots { | ||
Dots {} | ||
} | ||
} | ||
component!(Dots); |
8 changes: 8 additions & 0 deletionspgml-dashboard/src/components/loading/dots/template.html
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,8 @@ | ||
<div class="d-flex flex-row gap-3"> | ||
<div class="loading-dot-1"> | ||
</div> | ||
<div class="loading-dot-2"> | ||
</div> | ||
<div class="loading-dot-3"> | ||
</div> | ||
</div> |
1 change: 1 addition & 0 deletionspgml-dashboard/src/components/loading/message/message.scss
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 @@ | ||
div[data-controller="loading-message"] {} |
23 changes: 23 additions & 0 deletionspgml-dashboard/src/components/loading/message/mod.rs
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,23 @@ | ||
use sailfish::TemplateOnce; | ||
use pgml_components::component; | ||
#[derive(TemplateOnce, Default)] | ||
#[template(path = "loading/message/template.html")] | ||
pub struct Message { | ||
message: String, | ||
} | ||
impl Message { | ||
pub fn new() -> Message { | ||
Message { | ||
message: String::from("Loading..."), | ||
} | ||
} | ||
pub fn message(mut self, message: &str) -> Message { | ||
self.message = String::from(message); | ||
self | ||
} | ||
} | ||
component!(Message); |
5 changes: 5 additions & 0 deletionspgml-dashboard/src/components/loading/message/template.html
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,5 @@ | ||
<% use crate::components::loading::Dots; %> | ||
<div class="d-flex flex-column justify-content-center align-items-center w-100 gap-3"> | ||
<%+ Dots::new() %> | ||
<h6 class="fw-semibold"><%- message %></h6> | ||
</div> |
10 changes: 10 additions & 0 deletionspgml-dashboard/src/components/loading/mod.rs
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,10 @@ | ||
// This file is automatically generated. | ||
// You shouldn't modify it manually. | ||
// src/components/loading/dots | ||
pub mod dots; | ||
pub use dots::Dots; | ||
// src/components/loading/message | ||
pub mod message; | ||
pub use message::Message; |
3 changes: 3 additions & 0 deletionspgml-dashboard/src/components/mod.rs
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
4 changes: 2 additions & 2 deletionspgml-dashboard/src/components/navigation/navbar/marketing/template.html
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
32 changes: 32 additions & 0 deletionspgml-dashboard/src/components/pages/blog/blog_search/call/call.scss
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,32 @@ | ||
div[data-controller="pages-blog-blog-search-call"] { | ||
.btn-primary { | ||
@include media-breakpoint-down(md) { | ||
padding: 12px 16px; | ||
} | ||
} | ||
.btn-tag { | ||
border: 2px solid #{$gray-200}; | ||
background-color: transparent; | ||
color: #{$gray-200}; | ||
&.selected{ | ||
background-color: #{$gray-100}; | ||
border-color: #{$gray-100}; | ||
color: #{$gray-900}; | ||
} | ||
&:hover:not(.all-tags), &:hover:not(.selected):is(.all-tags) { | ||
background-color: transparent; | ||
color: #{$gray-100}; | ||
border-color: #{$gray-100}; | ||
@include bold_by_shadow(var(#{$gray-100})); | ||
} | ||
&:active:not(.all-tags), &:active:not(.selected):is(.all-tags){ | ||
background-color: #{$gray-200}; | ||
border-color: #{$gray-200}; | ||
color: #{$gray-900}; | ||
} | ||
} | ||
} |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
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.