From 1067f30fe70e24ec183b961f7c1c786734d3ebed Mon Sep 17 00:00:00 2001 From: krahets Date: Fri, 22 Sep 2023 13:08:21 +0800 Subject: [PATCH] Include glightbox plugin enabling zooming figures --- codes/c/chapter_greedy/fractional_knapsack.c | 4 +- mkdocs.yml | 40 ++++++++------------ 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/codes/c/chapter_greedy/fractional_knapsack.c b/codes/c/chapter_greedy/fractional_knapsack.c index a801b4e84..0ffeaa9f1 100644 --- a/codes/c/chapter_greedy/fractional_knapsack.c +++ b/codes/c/chapter_greedy/fractional_knapsack.c @@ -7,12 +7,12 @@ #include "../utils/common.h" /* 物品 */ -struct item { +struct Item { int w; // 物品重量 int v; // 物品价值 }; -typedef struct item Item; +typedef struct Item Item; /* 按照价值密度排序 */ int sortByValueDensity(const void *a, const void *b) { diff --git a/mkdocs.yml b/mkdocs.yml index 2e431240e..06f12e43a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -11,7 +11,7 @@ edit_uri: https://github.com/krahets/hello-algo/tree/main/docs/ version: 1.0.0b5 # Copyright -copyright: Copyright © 2023 Krahets +copyright: Copyright © 2022 - 2023 Krahets # Configuration theme: @@ -73,13 +73,24 @@ extra: link: https://twitter.com/krahets - icon: fontawesome/solid/code link: https://leetcode.cn/u/jyd/ - generator: false + # generator: false status: new: 最近添加 # Plugins plugins: - search + - glightbox: + touchNavigation: true + loop: false + effect: zoom + slide_effect: none + width: 100% + height: auto + zoomable: true + draggable: false + auto_caption: false + caption_position: bottom # Extensions markdown_extensions: @@ -209,9 +220,7 @@ nav: # [icon: material/text-search] - chapter_searching/index.md - 10.1   二分查找: chapter_searching/binary_search.md - # [status: new] - 10.2   二分查找插入点: chapter_searching/binary_search_insertion.md - # [status: new] - 10.3   二分查找边界: chapter_searching/binary_search_edge.md - 10.4   哈希优化策略: chapter_searching/replace_linear_by_hashing.md - 10.5   重识搜索算法: chapter_searching/searching_algorithm_revisited.md @@ -231,17 +240,12 @@ nav: - 11.10   基数排序: chapter_sorting/radix_sort.md - 11.11   小结: chapter_sorting/summary.md - 第 12 章   分治: - # [icon: material/set-split, status: new] + # [icon: material/set-split] - chapter_divide_and_conquer/index.md - # [status: new] - 12.1   分治算法: chapter_divide_and_conquer/divide_and_conquer.md - # [status: new] - 12.2   分治搜索策略: chapter_divide_and_conquer/binary_search_recur.md - # [status: new] - 12.3   构建树问题: chapter_divide_and_conquer/build_binary_tree_problem.md - # [status: new] - 12.4   汉诺塔问题: chapter_divide_and_conquer/hanota_problem.md - # [status: new] - 12.5   小结: chapter_divide_and_conquer/summary.md - 第 13 章   回溯: # [icon: material/map-marker-path] @@ -252,34 +256,22 @@ nav: - 13.4   N 皇后问题: chapter_backtracking/n_queens_problem.md - 13.5   小结: chapter_backtracking/summary.md - 第 14 章   动态规划: - # [icon: material/table-pivot, status: new] + # [icon: material/table-pivot] - chapter_dynamic_programming/index.md - # [status: new] - 14.1   初探动态规划: chapter_dynamic_programming/intro_to_dynamic_programming.md - # [status: new] - 14.2   DP 问题特性: chapter_dynamic_programming/dp_problem_features.md - # [status: new] - 14.3   DP 解题思路: chapter_dynamic_programming/dp_solution_pipeline.md - # [status: new] - 14.4   0-1 背包问题: chapter_dynamic_programming/knapsack_problem.md - # [status: new] - 14.5   完全背包问题: chapter_dynamic_programming/unbounded_knapsack_problem.md - # [status: new] - 14.6   编辑距离问题: chapter_dynamic_programming/edit_distance_problem.md - # [status: new] - 14.7   小结: chapter_dynamic_programming/summary.md - 第 15 章   贪心: - # [icon: material/head-heart-outline, status: new] + # [icon: material/head-heart-outline] - chapter_greedy/index.md - # [status: new] - 15.1   贪心算法: chapter_greedy/greedy_algorithm.md - # [status: new] - 15.2   分数背包问题: chapter_greedy/fractional_knapsack_problem.md - # [status: new] - 15.3   最大容量问题: chapter_greedy/max_capacity_problem.md - # [status: new] - 15.4   最大切分乘积问题: chapter_greedy/max_product_cutting_problem.md - # [status: new] - 15.5   小结: chapter_greedy/summary.md - 第 16 章   附录: # [icon: material/help-circle-outline]