Skip to content

Commit

Permalink
💄 Style: update search layout page style
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Nov 27, 2024
1 parent 168f1ba commit 4886c05
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion assets/css/_core/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ header {
}
}

.search {
.menu .search {
position: relative;

input {
Expand Down
1 change: 0 additions & 1 deletion assets/css/_page/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@
@import '_home';
@import '_404';
@import '_offline';
@import '_friends';
6 changes: 0 additions & 6 deletions assets/css/_page/_special.scss

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @Description: Style of layout named 'friends'.
* Style of layout named 'friends'.
* @Author: Lruihao <https://lruihao.cn>
* @Updated: 2022/3/11 21:36
*/
Expand Down
14 changes: 14 additions & 0 deletions assets/css/_page/_special/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.special {
.single-title,
.single-subtitle {
text-align: right;
}

&.friends {
@import '_friends';
}

&.search {
@import '_search';
}
}
9 changes: 9 additions & 0 deletions assets/css/_page/_special/_search.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Style of layout named 'search'

// Google CSE
.gcse-searchbox:empty,
.gcse-searchresults:empty {
display: none;
}

// Bing CSE (Unsupported)
5 changes: 2 additions & 3 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,12 @@ enableEmoji = true
ignoreFieldNorm = false
# FixIt 0.3.16 | NEW Custom Search Engine (CSE)
[params.search.cse]
# support cse engine: ["google", "bing"]
# CSE engine: ["google", "bing"]
engine = "google"
# Google: https://programmablesearchengine.google.com/
# Google Custom Search Engine Context
cx = ""
# Bing: https://www.customsearch.ai/
# TODO
# Bing (Unsupported): https://www.customsearch.ai/

# Header config
[params.header]
Expand Down
4 changes: 2 additions & 2 deletions layouts/page/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{- define "content" -}}
{{- $params := partial "function/params.html" -}}
{{- $cse := .Site.Params.search.cse -}}
<article class="page single special cse">
<article class="page single special search">
<div class="header">
{{- /* Title */ -}}
<h1 class="single-title animate__animated animate__pulse animate__faster">{{- cond (.Param "capitalizeTitles") (title .Title) .Title -}}</h1>
Expand All @@ -32,6 +32,6 @@ <h1 class="single-title animate__animated animate__pulse animate__faster">{{- co
{{- end -}}
{{- end -}}

{{- /* TODO Bing CSE */ -}}
{{- /* Bing CSE (Unsupported) */ -}}
</article>
{{- end -}}

0 comments on commit 4886c05

Please sign in to comment.