From c93527fb07a25a5f63db31df1aabdab8eac7c382 Mon Sep 17 00:00:00 2001 From: ridethepig Date: Sat, 29 Apr 2023 19:04:30 +0800 Subject: [PATCH] COD Chapter 4 --- ...rganization_and_Design_1681729306797_0.edn | 2875 ++++++++++++++++- journals/2023_04_28.md | 6 + journals/2023_04_29.md | 3 + journals/2023_04_30.md | 6 + .../2023-04-30T03_42_43.088Z.Desktop.css | 726 +++++ .../2023-04-30T03_48_07.662Z.Desktop.css | 727 +++++ .../2023-04-30T03_49_06.397Z.Desktop.css | 727 +++++ .../2023-04-30T03_49_19.592Z.Desktop.css | 727 +++++ .../2023-04-30T03_49_28.379Z.Desktop.css | 727 +++++ .../2023-04-30T03_51_56.008Z.Desktop.css | 727 +++++ logseq/custom.css | 726 ++++- logseq/export.css | 4 + ...Organization_and_Design_1681729306797_0.md | 772 ++++- pages/hls__ostep_1681115599584_0.md | 1 + 14 files changed, 8746 insertions(+), 8 deletions(-) create mode 100644 journals/2023_04_28.md create mode 100644 journals/2023_04_29.md create mode 100644 journals/2023_04_30.md create mode 100644 logseq/bak/logseq/custom/2023-04-30T03_42_43.088Z.Desktop.css create mode 100644 logseq/bak/logseq/custom/2023-04-30T03_48_07.662Z.Desktop.css create mode 100644 logseq/bak/logseq/custom/2023-04-30T03_49_06.397Z.Desktop.css create mode 100644 logseq/bak/logseq/custom/2023-04-30T03_49_19.592Z.Desktop.css create mode 100644 logseq/bak/logseq/custom/2023-04-30T03_49_28.379Z.Desktop.css create mode 100644 logseq/bak/logseq/custom/2023-04-30T03_51_56.008Z.Desktop.css create mode 100644 logseq/export.css diff --git a/assets/Computer_Organization_and_Design_1681729306797_0.edn b/assets/Computer_Organization_and_Design_1681729306797_0.edn index 69573a8..47917a9 100644 --- a/assets/Computer_Organization_and_Design_1681729306797_0.edn +++ b/assets/Computer_Organization_and_Design_1681729306797_0.edn @@ -4532,5 +4532,2876 @@ :height 1243.1990666666666}), :page 334}, :content {:text " Nonetheless,"}, - :properties {:color "green"}}], - :extra {:page 335}} + :properties {:color "green"}} + {:id #uuid "644bcbf6-66f0-4f82-b542-bf07ceb22716", + :page 337, + :position {:bounding {:x1 0, + :y1 204, + :x2 906.9348754882812, + :y2 481.09375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 204, + :x2 0, + :y2 228, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 220, + :x2 0, + :y2 244, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 607.0811157226562, + :y1 416.28125, + :x2 906.771240234375, + :y2 436.28125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.90625, + :y1 438.6875, + :x2 906.9348754882812, + :y2 458.6875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.90625, + :y1 461.09375, + :x2 444.40277099609375, + :y2 481.09375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 337}, + :content {:text " To retain the value of an individual instruction for its other four stages, the value read from instruction memory must be saved in a register."}, + :properties {:color "yellow"}} + {:id #uuid "644bcd54-fb9c-4d04-a133-9397d29534b8", + :page 339, + :position {:bounding {:x1 0, + :y1 572, + :x2 907.150146484375, + :y2 1041.109375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 572, + :x2 0, + :y2 596, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 725.92822265625, + :y1 998.703125, + :x2 907.150146484375, + :y2 1018.703125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.96875, + :y1 1021.109375, + :x2 837.6973266601562, + :y2 1041.109375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 339}, + :content {:text "any information needed in a later pipe stage must be passed to that stage via a pipeline register"}, + :properties {:color "yellow"}} + {:id #uuid "644bd29e-d65e-4a73-89cc-124f907838ef", + :page 343, + :position {:bounding {:x1 0, + :y1 204, + :x2 907.2296752929688, + :y2 1093.359375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 204, + :x2 0, + :y2 228, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 220, + :x2 0, + :y2 244, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 236, + :x2 0, + :y2 260, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 668.2852783203125, + :y1 1006.140625, + :x2 907.2072143554688, + :y2 1026.140625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.90625, + :y1 1028.546875, + :x2 907.0008544921875, + :y2 1048.546875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.90625, + :y1 1050.953125, + :x2 907.2296752929688, + :y2 1070.953125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.90625, + :y1 1073.359375, + :x2 539.208984375, + :y2 1093.359375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 343}, + :content {:text "each logical component of the datapath—such as instruction memory, register read ports, ALU, data memory, and register write port—can be used only within a single pipeline stage. Otherwise, we would have a structural hazard"}, + :properties {:color "yellow"}} + {:id #uuid "644bd357-ff90-42bc-9342-dc73102adee0", + :page 345, + :position {:bounding {:x1 266.921875, + :y1 574.71875, + :x2 644.1444702148438, + :y2 604.71875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 266.921875, + :y1 574.71875, + :x2 644.1444702148438, + :y2 604.71875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 345}, + :content {:text "Graphically Representing Pipelines"}, + :properties {:color "yellow"}} + {:id #uuid "644bd45a-f008-440b-b367-2dad2a7267fc", + :page 349, + :position {:bounding {:x1 266.921875, + :y1 406.71875, + :x2 453.29779052734375, + :y2 436.71875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 266.921875, + :y1 406.71875, + :x2 453.29779052734375, + :y2 436.71875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 349}, + :content {:text "Pipelined Control"}, + :properties {:color "yellow"}} + {:id #uuid "644bd711-ebfb-429c-a340-6c17191eda7d", + :page 352, + :position {:bounding {:x1 174.78517150878906, + :y1 963.234375, + :x2 730.9315795898438, + :y2 1008.234375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 174.78517150878906, + :y1 963.234375, + :x2 174.7899932861328, + :y2 1008.234375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 214.65625, + :y1 970.203125, + :x2 730.9315795898438, + :y2 1005.203125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 352}, + :content {:text "Data Hazards: Forwarding versus Stalling"}, + :properties {:color "yellow"}} + {:id #uuid "644bd891-f33c-43a9-87ba-b071ec181876", + :page 365, + :position {:bounding {:x1 380.796875, + :y1 888.484375, + :x2 580.9854125976562, + :y2 923.484375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 380.796875, + :y1 888.484375, + :x2 580.9854125976562, + :y2 923.484375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 365}, + :content {:text "Control Hazards"}, + :properties {:color "yellow"}} + {:id #uuid "644bd898-be2d-4c8e-bec3-50823b9a7b28", + :page 367, + :position {:bounding {:x1 266.921875, + :y1 144.640625, + :x2 546.9251708984375, + :y2 174.640625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 266.921875, + :y1 144.640625, + :x2 546.9251708984375, + :y2 174.640625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 367}, + :content {:text "Assume Branch Not Taken"}, + :properties {:color "yellow"}} + {:id #uuid "644be99c-0fd5-44e6-9e17-769890c257a0", + :page 362, + :position {:bounding {:x1 100.796875, + :y1 232.265625, + :x2 358.4082336425781, + :y2 262.265625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 232.265625, + :x2 358.4082336425781, + :y2 262.265625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 362}, + :content {:text "Data Hazards and Stalls"}, + :properties {:color "yellow"}} + {:id #uuid "644be9a8-d6e8-45d7-a345-bb57935e4ad6", + :page 363, + :position {:bounding {:x1 517.015625, + :y1 690.6875, + :x2 556.4736328125, + :y2 710.6875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 517.015625, + :y1 690.6875, + :x2 556.4736328125, + :y2 710.6875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 363}, + :content {:text "nops"}, + :properties {:color "yellow"}} + {:id #uuid "644bed0a-1ca6-4433-bc2a-78c9e2a15a33", + :page 367, + :position {:bounding {:x1 338.9303283691406, + :y1 426.734375, + :x2 418.94647216796875, + :y2 446.734375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 338.9303283691406, + :y1 426.734375, + :x2 418.94647216796875, + :y2 446.734375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 367}, + :content {:text "percolate "}, + :properties {:color "green"}} + {:id #uuid "644bee58-04af-4372-9825-73ca79d86ba3", + :page 370, + :position {:bounding {:x1 100.796875, + :y1 144.640625, + :x2 390.66241455078125, + :y2 174.640625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 144.640625, + :x2 390.66241455078125, + :y2 174.640625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 370}, + :content {:text "Dynamic Branch Prediction"}, + :properties {:color "yellow"}} + {:id #uuid "644bef12-3410-4f93-a0a7-cdc121cba36d", + :page 367, + :position {:bounding {:x1 266.921875, + :y1 495.578125, + :x2 611.3236694335938, + :y2 525.578125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 266.921875, + :y1 495.578125, + :x2 611.3236694335938, + :y2 525.578125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 367}, + :content {:text "Reducing the Delay of Branches"}, + :properties {:color "yellow"}} + {:id #uuid "644bf9bb-3d27-429c-a8f2-904365f0820e", + :page 370, + :position {:bounding {:x1 0, + :y1 236, + :x2 741.1400146484375, + :y2 513.90625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 236, + :x2 0, + :y2 260, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 455.25, + :y1 471.5, + :x2 741.1400146484375, + :y2 491.5, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.8125, + :y1 493.90625, + :x2 203.6959228515625, + :y2 513.90625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 370}, + :content {:text "branch prediction buffer or branch history table"}, + :properties {:color "yellow"}} + {:id #uuid "644bfdc9-5a90-451e-a203-745016f515fc", + :page 373, + :position {:bounding {:x1 723.814453125, + :y1 436.875, + :x2 814.6109008789062, + :y2 458.875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 723.814453125, + :y1 436.875, + :x2 814.6109008789062, + :y2 458.875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 373}, + :content {:text "tournament "}, + :properties {:color "green"}} + {:id #uuid "644bfe19-3e1d-4c8b-9308-afa36426b843", + :page 374, + :position {:bounding {:x1 214.65625, + :y1 970.203125, + :x2 353.6936340332031, + :y2 1005.203125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 214.65625, + :y1 970.203125, + :x2 353.6936340332031, + :y2 1005.203125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 374}, + :content {:text "Exceptions"}, + :properties {:color "yellow"}} + {:id #uuid "644bfe25-cb9d-4a2c-baf2-6fdcee9c09f4", + :page 373, + :position {:bounding {:x1 0, + :y1 76, + :x2 906.880615234375, + :y2 274.0625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 76, + :x2 0, + :y2 100, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 855.796875, + :y1 231.546875, + :x2 906.880615234375, + :y2 253.546875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.9375, + :y1 252.0625, + :x2 365.0625, + :y2 274.0625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.9375, + :y1 255.0625, + :x2 361.0292663574219, + :y2 271.859375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 373}, + :content {:text "branch target buffer."}, + :properties {:color "yellow"}} + {:id #uuid "644bfee0-90fc-478c-826d-24ab4df5a0ea", + :page 373, + :position {:bounding {:x1 738.734375, + :y1 334.203125, + :x2 902.1599731445312, + :y2 356.203125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 738.734375, + :y1 334.203125, + :x2 902.1599731445312, + :y2 356.203125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 373}, + :content {:text "correlating predictors"}, + :properties {:color "yellow"}} + {:id #uuid "644bfff0-bc59-4a00-b420-68865d47619d", + :page 375, + :position {:bounding {:x1 266.921875, + :y1 885.21875, + :x2 848.4404296875, + :y2 915.21875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 266.921875, + :y1 885.21875, + :x2 848.4404296875, + :y2 915.21875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 375}, + :content {:text "How Exceptions Are Handled in the MIPS Architecture"}, + :properties {:color "yellow"}} + {:id #uuid "644c8153-402f-49e9-a33e-ddfb342f09ca", + :page 376, + :position {:bounding {:x1 313.421875, + :y1 332.578125, + :x2 455.89288330078125, + :y2 349.578125, + :width 899.9991666666666, + :height 1109.9991666666665}, + :rects ({:x1 313.421875, + :y1 332.578125, + :x2 455.89288330078125, + :y2 349.578125, + :width 899.9991666666666, + :height 1109.9991666666665}), + :page 376}, + :content {:text "vectored interrupts"}, + :properties {:color "yellow"}} + {:id #uuid "644c81bd-46b7-455c-82a5-300e283528bd", + :page 376, + :position {:bounding {:x1 100.796875, + :y1 1058, + :x2 549.7010498046875, + :y2 1088, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 1058, + :x2 549.7010498046875, + :y2 1088, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 376}, + :content {:text "Exceptions in a Pipelined Implementation"}, + :properties {:color "yellow"}} + {:id #uuid "644c821f-5e4e-496e-900c-579241acdf55", + :page 376, + :position {:bounding {:x1 620.03125, + :y1 326.671875, + :x2 729.8056640625, + :y2 346.671875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 620.03125, + :y1 326.671875, + :x2 729.8056640625, + :y2 346.671875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 376}, + :content {:text "Cause register"}, + :properties {:color "yellow"}} + {:id #uuid "644c8287-e87a-4b27-aa58-a48b8bbbedf9", + :page 375, + :position {:bounding {:x1 0, + :y1 593.375, + :x2 907.0874633789062, + :y2 1052.890625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 593.375, + :x2 0, + :y2 617.375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 835.015625, + :y1 1010.5, + :x2 907.0874633789062, + :y2 1030.5, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.921875, + :y1 1032.890625, + :x2 448.2140197753906, + :y2 1052.890625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 375}, + :content {:text "exception program counter (EPC) "}, + :properties {:color "yellow"}} + {:id #uuid "644c835e-e733-4552-9104-450e7190c367", + :page 377, + :position {:bounding {:x1 813.891845703125, + :y1 483.46875, + :x2 891.5256958007812, + :y2 503.46875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 813.891845703125, + :y1 483.46875, + :x2 891.5256958007812, + :y2 503.46875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 377}, + :content {:text "clobbered "}, + :properties {:color "green"}} + {:id #uuid "644cc90a-7230-4fef-92ba-4e4e8679589c", + :page 380, + :position {:bounding {:x1 0, + :y1 45.78125, + :x2 741.2799682617188, + :y2 257.0625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 45.78125, + :x2 0, + :y2 69.78125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 62.375, + :x2 0, + :y2 86.375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 675.5715942382812, + :y1 192.265625, + :x2 741.2799682617188, + :y2 212.265625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 214.65625, + :x2 741.0421142578125, + :y2 234.65625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 237.0625, + :x2 718.4612426757812, + :y2 257.0625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 380}, + :content {:text "multiple exceptions can occur simultaneously in a single clock cycle. The solution is to prioritize the exceptions so that it is easy to determine which is serviced first."}, + :properties {:color "yellow"}} + {:id #uuid "644cce08-6ba0-4c7f-8181-8453c74b4161", + :page 381, + :position {:bounding {:x1 380.796875, + :y1 526.9375, + :x2 725.642333984375, + :y2 561.9375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 380.796875, + :y1 526.9375, + :x2 725.642333984375, + :y2 561.9375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 381}, + :content {:text "Parallelism via Instructions"}, + :properties {:color "yellow"}} + {:id #uuid "644cd47e-72cb-474f-9e9a-3d3078497428", + :page 382, + :position {:bounding {:x1 200.44284057617188, + :y1 550.65625, + :x2 524.9210815429688, + :y2 570.65625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 200.44284057617188, + :y1 550.65625, + :x2 524.9210815429688, + :y2 570.65625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 382}, + :content {:text "two primary and distinct responsibilities "}, + :properties {:color "yellow"}} + {:id #uuid "644cd48f-6601-4c02-a0ee-b98f62d0360a", + :page 382, + :position {:bounding {:x1 151.1875, + :y1 606.65625, + :x2 457.2739562988281, + :y2 626.65625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 151.1875, + :y1 606.65625, + :x2 457.2739562988281, + :y2 626.65625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 382}, + :content {:text "Packaging instructions into issue slots"}, + :properties {:color "yellow"}} + {:id #uuid "644cd494-d0c1-4529-8776-629f0ae97c5c", + :page 382, + :position {:bounding {:x1 158.65072631835938, + :y1 774.671875, + :x2 442.3482666015625, + :y2 794.671875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 158.65072631835938, + :y1 774.671875, + :x2 442.3482666015625, + :y2 794.671875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 382}, + :content {:text "ealing with data and control hazards: "}, + :properties {:color "yellow"}} + {:id #uuid "644cd562-7690-4b77-9f18-39ebb9352846", + :page 382, + :position {:bounding {:x1 100.796875, + :y1 966.71875, + :x2 398.2737731933594, + :y2 996.71875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 966.71875, + :x2 398.2737731933594, + :y2 996.71875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 382}, + :content {:text "The Concept of Speculation"}, + :properties {:color "yellow"}} + {:id #uuid "644cd60e-9c4d-4851-bb99-6b4cbb757bb1", + :page 383, + :position {:bounding {:x1 266.921875, + :y1 955.515625, + :x2 491.38311767578125, + :y2 985.515625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 266.921875, + :y1 955.515625, + :x2 491.38311767578125, + :y2 985.515625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 383}, + :content {:text "Static Multiple Issue"}, + :properties {:color "yellow"}} + {:id #uuid "644cd795-5c31-4de1-841f-cb72e375cbc7", + :page 383, + :position {:bounding {:x1 784, + :y1 1036, + :x2 882.3548583984375, + :y2 1056, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 784, + :y1 1036, + :x2 882.3548583984375, + :y2 1056, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 383}, + :content {:text "issue packet"}, + :properties {:color "yellow"}} + {:id #uuid "644cd983-c322-42e8-ad23-2e827defebd4", + :page 384, + :position {:bounding {:x1 385.703125, + :y1 169.859375, + :x2 687.7310791015625, + :y2 189.859375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 385.703125, + :y1 169.859375, + :x2 687.7310791015625, + :y2 189.859375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 384}, + :content {:text "Very Long Instruction Word (VLIW)"}, + :properties {:color "yellow"}} + {:id #uuid "644cdb59-f65c-4c2d-acc2-d6f9d170a82c", + :page 386, + :position {:bounding {:x1 203, + :y1 147.453125, + :x2 293.7076721191406, + :y2 167.453125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 203, + :y1 147.453125, + :x2 293.7076721191406, + :y2 167.453125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 386}, + :content {:text "use latency"}, + :properties {:color "yellow"}} + {:id #uuid "644cddad-ba7d-49a8-98c6-135fd2f68e1c", + :page 388, + :position {:bounding {:x1 100.796875, + :y1 356.3125, + :x2 478.797119140625, + :y2 386.3125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 356.3125, + :x2 478.797119140625, + :y2 386.3125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 388}, + :content {:text "Dynamic Multiple-Issue Processors"}, + :properties {:color "yellow"}} + {:id #uuid "644ce000-671e-44ce-b00d-86ae035f3a14", + :page 388, + :position {:bounding {:x1 0, + :y1 178.53125, + :x2 741.1646118164062, + :y2 479.203125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 178.53125, + :x2 0, + :y2 202.53125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 195.125, + :x2 0, + :y2 219.125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 288.123779296875, + :y1 414.390625, + :x2 740.8720092773438, + :y2 434.390625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 436.796875, + :x2 741.1646118164062, + :y2 456.796875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 459.203125, + :x2 266.7744445800781, + :y2 479.203125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 388}, + :content {:text "the simplest superscalar processors, instructions issue in order, and the processor decides whether zero, one, or more instructions can issue in a given clock cycl"}, + :properties {:color "yellow"}} + {:id #uuid "644ce05f-7da8-4b02-b0df-b75533c76703", + :page 388, + :position {:bounding {:x1 0, + :y1 278.09375, + :x2 741.0226440429688, + :y2 591.203125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 278.09375, + :x2 0, + :y2 302.09375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 299.7768249511719, + :y1 548.8125, + :x2 741.0226440429688, + :y2 568.8125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 571.203125, + :x2 375.1717224121094, + :y2 591.203125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 388}, + :content {:text "he code, whether scheduled or not, is guaranteed by the hardware to execute correctly"}, + :properties {:color "yellow"}} + {:id #uuid "644ce149-5f2f-449d-8b6d-86d589aad536", + :page 388, + :position {:bounding {:x1 100.796875, + :y1 1071.4375, + :x2 360.6474914550781, + :y2 1096.4375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 1071.4375, + :x2 360.6474914550781, + :y2 1096.4375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 388}, + :content {:text "Dynamic Pipeline Scheduling"}, + :properties {:color "yellow"}} + {:id #uuid "644ce15b-b779-4624-bce4-fd2ae0541d0d", + :page 388, + :position {:bounding {:x1 0, + :y1 410.84375, + :x2 740.9900512695312, + :y2 792.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 410.84375, + :x2 0, + :y2 434.84375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 427.4375, + :x2 0, + :y2 451.4375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 423.2906188964844, + :y1 728.015625, + :x2 740.9900512695312, + :y2 748.015625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.828125, + :y1 750.40625, + :x2 740.8865356445312, + :y2 770.40625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 772.796875, + :x2 182.68533325195312, + :y2 792.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 388}, + :content {:text " Dynamic pipeline scheduling chooses which instructions to execute in a given clock cycle while trying to avoid hazards and stalls."}, + :properties {:color "yellow"}} + {:id #uuid "644ce1dc-44b6-40f1-ad39-c34e660c9b32", + :page 388, + :position {:bounding {:x1 0, + :y1 659.75, + :x2 740.7516479492188, + :y2 1165.1875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 659.75, + :x2 0, + :y2 683.75, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 551.123291015625, + :y1 1122.796875, + :x2 740.7516479492188, + :y2 1142.796875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 1145.1875, + :x2 235.17799377441406, + :y2 1165.1875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 388}, + :content {:text "pipeline is divided into three major units"}, + :properties {:color "yellow"}} + {:id #uuid "644ce2ec-c9bd-44a6-a51f-aaa9cf8a996b", + :page 392, + :position {:bounding {:x1 100.796875, + :y1 641.3125, + :x2 557.764892578125, + :y2 671.3125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 641.3125, + :x2 557.764892578125, + :y2 671.3125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 392}, + :content {:text "Energy Effi ciency and Advanced Pipelining"}, + :properties {:color "yellow"}} + {:id #uuid "644ce31a-b366-4d64-b5a3-1831372d21dc", + :page 392, + :position {:bounding {:x1 0, + :y1 444.03125, + :x2 740.9482421875, + :y2 853.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 444.03125, + :x2 0, + :y2 468.03125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 123.1875, + :y1 811.40625, + :x2 740.9482421875, + :y2 831.40625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 833.796875, + :x2 506.8180847167969, + :y2 853.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 392}, + :content {:text "The belief is that while the simpler processors are not as fast as their sophisticated brethren, they deliver better performance per joule,"}, + :properties {:color "yellow"}} + {:id #uuid "644ce676-1db2-4399-9079-22b6f3fd4edf", + :page 387, + :position {:bounding {:x1 711.5625, + :y1 595.921875, + :x2 859.9411010742188, + :y2 615.921875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 711.5625, + :y1 595.921875, + :x2 859.9411010742188, + :y2 615.921875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 387}, + :content {:text "register renaming"}, + :properties {:color "yellow"}} + {:id #uuid "644ce786-f08e-4cae-914b-00a472d9a40c", + :page 387, + :position {:bounding {:x1 0, + :y1 560.1875, + :x2 906.9197998046875, + :y2 817.53125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 560.1875, + :x2 0, + :y2 584.1875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 523.7973022460938, + :y1 775.125, + :x2 906.9197998046875, + :y2 795.125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 300.53125, + :y1 797.53125, + :x2 861.3727416992188, + :y2 817.53125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 387}, + :content {:text " an ordering forced purely by the reuse of a name, rather than a real data dependence that is also called a true dependence."}, + :properties {:color "yellow"}} + {:id #uuid "644ce915-4863-48fd-85f2-66e679623a7f", + :page 390, + :position {:bounding {:x1 292.765625, + :y1 550.671875, + :x2 484.02313232421875, + :y2 570.671875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 292.765625, + :y1 550.671875, + :x2 484.02313232421875, + :y2 570.671875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 390}, + :content {:text "out-of-order execution"}, + :properties {:color "yellow"}} + {:id #uuid "644ce918-496d-430b-b631-212a7cf9b925", + :page 390, + :position {:bounding {:x1 151.28125, + :y1 685.078125, + :x2 288.2050476074219, + :y2 705.078125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 151.28125, + :y1 685.078125, + :x2 288.2050476074219, + :y2 705.078125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 390}, + :content {:text "in-order commit"}, + :properties {:color "yellow"}} + {:id #uuid "644ce9f1-d463-48b9-9ed7-98f218281b02", + :page 392, + :position {:bounding {:x1 281.7327880859375, + :y1 195.984375, + :x2 587.93798828125, + :y2 215.984375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 281.7327880859375, + :y1 195.984375, + :x2 587.93798828125, + :y2 215.984375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 392}, + :content {:text "sustaining that issue rate is very difficult"}, + :properties {:color "yellow"}} + {:id #uuid "644cea96-46cb-48b6-bd1c-e3f43205e6cb", + :page 393, + :position {:bounding {:x1 0, + :y1 261.5, + :x2 885.9683837890625, + :y2 1098.96875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 261.5, + :x2 0, + :y2 285.5, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 380.796875, + :y1 1030.359375, + :x2 885.9683837890625, + :y2 1065.359375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 380.796875, + :y1 1063.96875, + :x2 595.0975341796875, + :y2 1098.96875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 393}, + :content {:text "Real Stuff: The ARM Cortex-A8 and Intel Core i7 Pipelines"}, + :properties {:color "yellow"}} + {:id #uuid "644cec43-c523-4d68-b48d-c209e2223e18", + :page 396, + :position {:bounding {:x1 277.42724609375, + :y1 590.984375, + :x2 365.765869140625, + :y2 610.984375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 277.42724609375, + :y1 590.984375, + :x2 365.765869140625, + :y2 610.984375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 396}, + :content {:text "intermingled"}, + :properties {:color "green"}} + {:id #uuid "644ced6c-a427-48bd-9ec2-31e925e0376f", + :page 396, + :position {:bounding {:x1 100.796875, + :y1 635.78125, + :x2 242.24644470214844, + :y2 655.78125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 635.78125, + :x2 242.24644470214844, + :y2 655.78125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 396}, + :content {:text "microarchitecture"}, + :properties {:color "yellow"}} + {:id #uuid "644cee04-6588-4d06-becc-375612443e67", + :page 396, + :position {:bounding {:x1 0, + :y1 112.15625, + :x2 741.0690307617188, + :y2 745.390625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 112.15625, + :x2 0, + :y2 136.15625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 128.75, + :x2 0, + :y2 152.75, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 684.8281860351562, + :y1 680.578125, + :x2 740.839599609375, + :y2 700.578125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 702.984375, + :x2 741.0690307617188, + :y2 722.984375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 725.390625, + :x2 705.0948486328125, + :y2 745.390625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 396}, + :content {:text "egister renaming explicitly renames the architectural registers in a processor (16 in the case of the 64-bit version of the x86 architecture) to a larger set of physical registers"}, + :properties {:color "yellow"}} + {:id #uuid "644cef9a-7da3-441e-b1db-51045ca2d1d4", + :page 396, + :position {:bounding {:x1 0, + :y1 211.71875, + :x2 741.2365112304688, + :y2 879.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 211.71875, + :x2 0, + :y2 235.71875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 228.3125, + :x2 0, + :y2 252.3125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 566.44140625, + :y1 814.984375, + :x2 741.0755004882812, + :y2 834.984375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 837.390625, + :x2 741.2365112304688, + :y2 857.390625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 859.796875, + :x2 702.9525146484375, + :y2 879.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 396}, + :content {:text "register renaming offers another approach to recovery in the event of incorrect speculation: simply undo the mappings that have occurred since the first incorrectly speculated instruction."}, + :properties {:color "yellow"}} + {:id #uuid "644cf0f0-aa33-425f-8a79-6b0d4a21d9ae", + :page 394, + :position {:bounding {:x1 0, + :y1 145.34375, + :x2 741.0554809570312, + :y2 859.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 145.34375, + :x2 0, + :y2 169.34375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 161.9375, + :x2 0, + :y2 185.9375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 484.8671569824219, + :y1 795, + :x2 740.91796875, + :y2 815, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 817.40625, + :x2 741.0554809570312, + :y2 837.40625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.765625, + :y1 839.796875, + :x2 267.10772705078125, + :y2 859.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 394}, + :content {:text "a two-level branch predictor using both a 512-entry branch target buffer, a 4096-entry global history buffer, and an8-entry return stack"}, + :properties {:color "yellow"}} + {:id #uuid "644cf33e-7f2f-444a-bf58-1107e02a4c84", + :page 400, + :position {:bounding {:x1 0, + :y1 311.28125, + :x2 608.4768676757812, + :y2 790.546875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 311.28125, + :x2 0, + :y2 335.28125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 214.640625, + :y1 721.9375, + :x2 608.4768676757812, + :y2 756.9375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 214.640625, + :y1 726.9375, + :x2 608.4768676757812, + :y2 753.078125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 181.3711700439453, + :y1 729.890625, + :x2 181.37518310546875, + :y2 774.890625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 214.640625, + :y1 755.546875, + :x2 606.5133056640625, + :y2 790.546875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 400}, + :content {:text "Going Faster: Instruction-Level Parallelism and Matrix Multiply"}, + :properties {:color "yellow"}} + {:id #uuid "644cf620-c517-42e0-958b-d2c58bbbcd09", + :page 434, + :position {:bounding {:x1 214.671875, + :y1 183.796875, + :x2 477.58172607421875, + :y2 218.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 214.671875, + :y1 183.796875, + :x2 477.58172607421875, + :y2 218.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 434}, + :content {:text "Fallacies and Pitfalls"}, + :properties {:color "yellow"}} + {:id #uuid "644cf7e2-0f30-4889-9edc-11ce3892141b", + :page 451, + :position {:bounding {:x1 0, + :y1 261.5, + :x2 837.935546875, + :y2 869.34375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 261.5, + :x2 0, + :y2 285.5, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 278.09375, + :x2 0, + :y2 302.09375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 434.28125, + :y1 690.90625, + :x2 763.1229248046875, + :y2 749.90625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 434.28125, + :y1 750.625, + :x2 837.935546875, + :y2 809.625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 434.28125, + :y1 758.625, + :x2 837.935546875, + :y2 803.421875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 434.28125, + :y1 810.34375, + :x2 638.3452758789062, + :y2 869.34375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 451}, + :content {:text "Large and Fast: Exploiting Memory Hierarchy"}, + :properties {:color "yellow"}} + {:id #uuid "644dd4f0-dd17-4ca2-9360-413444e36db3", + :page 453, + :position {:bounding {:x1 353.59375, + :y1 170.453125, + :x2 496.2897033691406, + :y2 202.453125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 353.59375, + :y1 170.453125, + :x2 496.2897033691406, + :y2 202.453125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 453}, + :content {:text "Introduction"}, + :properties {:color "yellow"}} + {:id #uuid "644dd503-3bcd-4ea2-a786-4083fa6b3162", + :page 453, + :position {:bounding {:x1 299.6767272949219, + :y1 707.546875, + :x2 449.609375, + :y2 726.546875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 299.6767272949219, + :y1 707.546875, + :x2 449.609375, + :y2 726.546875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 453}, + :content {:text " principle of locality "}, + :properties {:color "yellow"}} + {:id #uuid "644dd50b-6aaa-43a1-8d27-9d28861bdcaf", + :page 453, + :position {:bounding {:x1 0, + :y1 493.8125, + :x2 842.2708129882812, + :y2 861.6875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 493.8125, + :x2 0, + :y2 517.8125, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 289.453125, + :y1 821.890625, + :x2 842.2708129882812, + :y2 840.890625, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 289.453125, + :y1 842.6875, + :x2 452.4861145019531, + :y2 861.6875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 453}, + :content {:text "Temporal locality (locality in time): if an item is referenced, it will tend to be referenced again soon. "}, + :properties {:color "yellow"}} + {:id #uuid "644dd512-c64d-4d7d-802b-c3defdbc2712", + :page 453, + :position {:bounding {:x1 0, + :y1 543.59375, + :x2 842.517822265625, + :y2 934.484375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 543.59375, + :x2 0, + :y2 567.59375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 289.453125, + :y1 897.1875, + :x2 842.517822265625, + :y2 913.65625, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 289.453125, + :y1 915.484375, + :x2 698.4974365234375, + :y2 934.484375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 453}, + :content {:text "Spatial locality (locality in space): if an item is referenced, items whose addresses are close by will tend to be referenced soon"}, + :properties {:color "yellow"}} + {:id #uuid "644dd51d-6572-412f-befc-e033934ac377", + :page 454, + :position {:bounding {:x1 235.09375, + :y1 756.96875, + :x2 376.8136901855469, + :y2 775.96875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 235.09375, + :y1 756.96875, + :x2 376.8136901855469, + :y2 775.96875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 454}, + :content {:text "memory hierarchy"}, + :properties {:color "yellow"}} + {:id #uuid "644dd57e-591e-46e3-b782-07db59abfde9", + :page 454, + :position {:bounding {:x1 0, + :y1 261.5, + :x2 688.328125, + :y2 942.375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 261.5, + :x2 0, + :y2 285.5, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 366.3660888671875, + :y1 902.5625, + :x2 688.328125, + :y2 921.5625, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 93.609375, + :y1 923.375, + :x2 659.7514038085938, + :y2 942.375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 454}, + :content {:text "a level closer to the processor is generally a subset of any level further away, and all the data is stored at the lowest level"}, + :properties {:color "yellow"}} + {:id #uuid "644dd5b6-a024-4b08-93ee-0b8a9f0bf8ec", + :page 455, + :position {:bounding {:x1 0, + :y1 45.78125, + :x2 842.27587890625, + :y2 575.328125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 45.78125, + :x2 0, + :y2 69.78125, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 284.5386962890625, + :y1 535.515625, + :x2 842.27587890625, + :y2 554.515625, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 556.328125, + :x2 598.8756713867188, + :y2 575.328125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 455}, + :content {:text "the minimum unit of information that can be either present or not present in the two-level hierarchy is called a block or a line"}, + :properties {:color "yellow"}} + {:id #uuid "644dd61b-eaa7-4f0d-beab-103b48546ceb", + :page 455, + :position {:bounding {:x1 311.67889404296875, + :y1 597.921875, + :x2 835.1909790039062, + :y2 616.921875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 311.67889404296875, + :y1 597.921875, + :x2 835.1909790039062, + :y2 616.921875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 455}, + :content {:text " data requested by the processor appears in some block in the upper level"}, + :properties {:color "yellow"}} + {:id #uuid "644dd84f-f268-4600-a025-ab1372e99e01", + :page 455, + :position {:bounding {:x1 0, + :y1 261.5, + :x2 842.36181640625, + :y2 866.515625, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 261.5, + :x2 0, + :y2 285.5, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 0, + :y1 278.09375, + :x2 0, + :y2 302.09375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 527.078125, + :y1 805.921875, + :x2 842.36181640625, + :y2 824.921875, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 826.71875, + :x2 842.333740234375, + :y2 845.71875, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 847.515625, + :x2 453.10198974609375, + :y2 866.515625, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 455}, + :content {:text "Hit time is the time to access the upper level of the memory hierarchy, which includes the time needed to determine whether the access is a hit or a miss"}, + :properties {:color "yellow"}} + {:id #uuid "644dd859-a7c9-4058-b89f-6f638f885927", + :page 455, + :position {:bounding {:x1 0, + :y1 311.28125, + :x2 842.4488525390625, + :y2 928.921875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 311.28125, + :x2 0, + :y2 335.28125, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 0, + :y1 327.875, + :x2 0, + :y2 351.875, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 329.4430236816406, + :y1 868.328125, + :x2 842.4488525390625, + :y2 887.328125, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.859375, + :y1 889.125, + :x2 842.1237182617188, + :y2 908.125, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 247.875, + :y1 909.921875, + :x2 348.2171936035156, + :y2 928.921875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 455}, + :content {:text "The miss penalty is the time to replace a block in the upper level with the corresponding block from the lower level, plus the time to deliver this block to the processor "}, + :properties {:color "yellow"}} + {:id #uuid "644dd921-308b-4b4d-9440-e082bb44cfae", + :page 457, + :position {:bounding {:x1 353.59375, + :y1 614, + :x2 607.1904907226562, + :y2 646, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 353.59375, + :y1 614, + :x2 607.1904907226562, + :y2 646, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 457}, + :content {:text "Memory Technologies"}, + :properties {:color "yellow"}} + {:id #uuid "644dd962-ebaf-4014-b8ec-4e24525359bb", + :page 458, + :position {:bounding {:x1 93.59375, + :y1 135.75, + :x2 271.2381286621094, + :y2 162.75, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 93.59375, + :y1 135.75, + :x2 271.2381286621094, + :y2 162.75, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 458}, + :content {:text "SRAM Technology"}, + :properties {:color "yellow"}} + {:id #uuid "644dd9ad-2f6e-445e-b4e8-4e4b45eece09", + :page 458, + :position {:bounding {:x1 93.59375, + :y1 420.015625, + :x2 271.64337158203125, + :y2 447.015625, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 93.59375, + :y1 420.015625, + :x2 271.64337158203125, + :y2 447.015625, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 458}, + :content {:text "DRAM Technology"}, + :properties {:color "yellow"}} + {:id #uuid "644dd9cc-74f0-4484-8a39-a3715e2b9194", + :page 462, + :position {:bounding {:x1 199.328125, + :y1 917.546875, + :x2 447.82061767578125, + :y2 949.546875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 199.328125, + :y1 917.546875, + :x2 447.82061767578125, + :y2 949.546875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 462}, + :content {:text "The Basics of Caches"}, + :properties {:color "yellow"}} + {:id #uuid "644ddaac-b1da-455d-848f-547ea2fb90cf", + :page 458, + :position {:bounding {:x1 303.8086242675781, + :y1 474.15625, + :x2 680.7739868164062, + :y2 493.15625, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 303.8086242675781, + :y1 474.15625, + :x2 680.7739868164062, + :y2 493.15625, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 458}, + :content {:text " kept in a cell is stored as a charge in a capacitor"}, + :properties {:color "yellow"}} + {:id #uuid "644ddb68-1f5e-483b-a1a0-df3979e962d1", + :page 458, + :position {:bounding {:x1 0, + :y1 311.28125, + :x2 688.2505493164062, + :y2 597.171875, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 311.28125, + :x2 0, + :y2 335.28125, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 401.9202880859375, + :y1 557.359375, + :x2 688.2505493164062, + :y2 576.359375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 93.59375, + :y1 578.171875, + :x2 274.78826904296875, + :y2 597.171875, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 458}, + :content {:text "it cannot be kept indefinitely and must periodically be refreshed"}, + :properties {:color "yellow"}} + {:id #uuid "644ddb9a-f0f6-4161-8105-6d74ecad0ece", + :page 458, + :position {:bounding {:x1 114.390625, + :y1 619.78125, + :x2 607.2032470703125, + :y2 638.78125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 114.390625, + :y1 619.78125, + :x2 607.2032470703125, + :y2 638.78125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 458}, + :content {:text "To refresh the cell, we merely read its contents and write it back."}, + :properties {:color "yellow"}} + {:id #uuid "644ddddd-fd99-4cd6-b551-3e4cf0221948", + :page 460, + :position {:bounding {:x1 93.59375, + :y1 579.3125, + :x2 233.587890625, + :y2 606.3125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 93.59375, + :y1 579.3125, + :x2 233.587890625, + :y2 606.3125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 460}, + :content {:text "Flash Memory"}, + :properties {:color "yellow"}} + {:id #uuid "644ddde0-69a4-4dc6-8a66-3e802d201809", + :page 460, + :position {:bounding {:x1 93.59375, + :y1 842.78125, + :x2 224.43426513671875, + :y2 869.78125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 93.59375, + :y1 842.78125, + :x2 224.43426513671875, + :y2 869.78125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 460}, + :content {:text "Disk Memory"}, + :properties {:color "yellow"}} + {:id #uuid "644dded8-ffe3-4d2e-abbe-d4374b5b30af", + :page 462, + :position {:bounding {:x1 93.578125, + :y1 841.03125, + :x2 121.7721939086914, + :y2 860.03125, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 93.578125, + :y1 841.03125, + :x2 121.7721939086914, + :y2 860.03125, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 462}, + :content {:text "rugg"}, + :properties {:color "green"}} + {:id #uuid "644ddfbe-a7cf-4048-b794-baae5d8891db", + :page 458, + :position {:bounding {:x1 0, + :y1 410.84375, + :x2 688.0891723632812, + :y2 721.984375, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 0, + :y1 410.84375, + :x2 0, + :y2 434.84375, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 525.9468383789062, + :y1 682.1875, + :x2 688.0891723632812, + :y2 701.1875, + :width 935.9991333333334, + :height 1154.3991333333333} + {:x1 93.59375, + :y1 702.984375, + :x2 158.0232391357422, + :y2 721.984375, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 458}, + :content {:text " a two-level decoding structure"}, + :properties {:color "yellow"}} + {:id #uuid "644ddfe7-91ad-4c6b-9a67-075bf4eb6f33", + :page 458, + :position {:bounding {:x1 267.9812927246094, + :y1 807, + :x2 569.225830078125, + :y2 826, + :width 935.9991333333334, + :height 1154.3991333333333}, + :rects ({:x1 267.9812927246094, + :y1 807, + :x2 569.225830078125, + :y2 826, + :width 935.9991333333334, + :height 1154.3991333333333}), + :page 458}, + :content {:text "RAMs buffer rows for repeated access. "}, + :properties {:color "yellow"}} + {:id #uuid "644de60d-55a9-44f8-b1c7-4f9848b62994", + :page 458, + :position {:bounding {:x1 0, + :y1 643.15625, + :x2 741.0474853515625, + :y2 1090.78125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 643.15625, + :x2 0, + :y2 667.15625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 498.9104919433594, + :y1 1048.375, + :x2 741.0474853515625, + :y2 1068.375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.8125, + :y1 1070.78125, + :x2 505.6158447265625, + :y2 1090.78125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 458}, + :content {:text "s, DRAMs added clocks and are properly called Synchronous DRAMs or SDRAMs"}, + :properties {:color "yellow"}} + {:id #uuid "644de669-6f2d-4853-83db-3b84b1f86a1e", + :page 460, + :position {:bounding {:x1 188.66165161132812, + :y1 147.453125, + :x2 309.0065002441406, + :y2 167.453125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 188.66165161132812, + :y1 147.453125, + :x2 309.0065002441406, + :y2 167.453125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 460}, + :content {:text "multiple banks,"}, + :properties {:color "yellow"}} + {:id #uuid "644de81f-f1ed-42b6-8b51-d6e72b8162bd", + :page 477, + :position {:bounding {:x1 0, + :y1 327.875, + :x2 781.8217163085938, + :y2 779.34375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 327.875, + :x2 0, + :y2 351.875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 380.796875, + :y1 710.734375, + :x2 781.8217163085938, + :y2 745.734375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 380.796875, + :y1 744.34375, + :x2 542.0493774414062, + :y2 779.34375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 477}, + :content {:text "Measuring and Improving Cache Performance"}, + :properties {:color "yellow"}} + {:id #uuid "644dea78-9ad9-4322-a05d-1b30789b85a8", + :page 497, + :position {:bounding {:x1 380.796875, + :y1 341.140625, + :x2 765.6166381835938, + :y2 376.140625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 380.796875, + :y1 341.140625, + :x2 765.6166381835938, + :y2 376.140625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 497}, + :content {:text "Dependable Memory Hierarchy"}, + :properties {:color "yellow"}} + {:id #uuid "644deab8-5929-424b-a0bb-9944268d757e", + :page 564, + :position {:bounding {:x1 349.58758544921875, + :y1 176.828125, + :x2 643.7067260742188, + :y2 221.828125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 349.58758544921875, + :y1 176.828125, + :x2 349.59136962890625, + :y2 221.828125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 380.796875, + :y1 183.796875, + :x2 643.7067260742188, + :y2 218.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 564}, + :content {:text "Fallacies and Pitfalls"}, + :properties {:color "yellow"}} + {:id #uuid "644deb2b-3128-4949-a7d8-8d812e57d1e5", + :page 463, + :position {:bounding {:x1 266.921875, + :y1 281.875, + :x2 828.0704345703125, + :y2 301.875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 266.921875, + :y1 281.875, + :x2 828.0704345703125, + :y2 301.875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 463}, + :content {:text "requests are each one word and the blocks also consist of a single word"}, + :properties {:color "yellow"}} + {:id #uuid "644decf0-302e-44bc-8ebe-0e195d66565d", + :page 463, + :position {:bounding {:x1 0, + :y1 344.46875, + :x2 907.9876708984375, + :y2 570.671875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 344.46875, + :x2 0, + :y2 368.46875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 859.859375, + :y1 528.265625, + :x2 907.9876708984375, + :y2 548.265625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.921875, + :y1 550.671875, + :x2 333.3367614746094, + :y2 570.671875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 463}, + :content {:text "direct mapped"}, + :properties {:color "yellow"}} + {:id #uuid "644dee3d-839d-44c0-a772-b26b029987da", + :page 463, + :position {:bounding {:x1 731.4375, + :y1 909.0625, + :x2 764.3681640625, + :y2 929.0625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 731.4375, + :y1 909.0625, + :x2 764.3681640625, + :y2 929.0625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 463}, + :content {:text "tags"}, + :properties {:color "yellow"}} + {:id #uuid "644deeaa-657f-43c4-a7c7-c39e34d21b8c", + :page 463, + :position {:bounding {:x1 0, + :y1 692.9375, + :x2 907.1323852539062, + :y2 973.859375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 692.9375, + :x2 0, + :y2 716.9375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 728.8388671875, + :y1 931.46875, + :x2 907.1323852539062, + :y2 951.46875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.921875, + :y1 953.859375, + :x2 587.0823974609375, + :y2 973.859375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 463}, + :content {:text " whether a word in the cache corresponds to the requested word."}, + :properties {:color "yellow"}} + {:id #uuid "644def1f-26c4-4e81-b269-d1c341ec1ecc", + :page 465, + :position {:bounding {:x1 333.765625, + :y1 192.265625, + :x2 818.2476196289062, + :y2 212.265625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 333.765625, + :y1 192.265625, + :x2 818.2476196289062, + :y2 212.265625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 465}, + :content {:text "valid bit to indicate whether an entry contains a valid address. I"}, + :properties {:color "yellow"}} + {:id #uuid "644df14a-7c1b-4f37-8c27-7bacb9d683d9", + :page 467, + :position {:bounding {:x1 489.10015869140625, + :y1 393.875, + :x2 766.8451538085938, + :y2 413.875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 489.10015869140625, + :y1 393.875, + :x2 766.8451538085938, + :y2 413.875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 467}, + :content {:text " referenced address is divided into"}, + :properties {:color "yellow"}} + {:id #uuid "644df720-1c8b-4503-b63c-25eedb390c05", + :page 470, + :position {:bounding {:x1 100.796875, + :y1 454.921875, + :x2 551.3345336914062, + :y2 474.921875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 454.921875, + :x2 551.3345336914062, + :y2 474.921875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 470}, + :content {:text "Larger blocks exploit spatial locality to lower miss rate"}, + :properties {:color "yellow"}} + {:id #uuid "644df84e-9877-44a2-8caf-09b4145b6616", + :page 471, + :position {:bounding {:x1 266.921875, + :y1 841.65625, + :x2 516.0225830078125, + :y2 871.65625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 266.921875, + :y1 841.65625, + :x2 516.0225830078125, + :y2 871.65625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 471}, + :content {:text "Handling Cache Misses"}, + :properties {:color "yellow"}} + {:id #uuid "644dfa55-2147-43e0-92c4-b6eff3c77fd4", + :page 472, + :position {:bounding {:x1 100.796875, + :y1 765.125, + :x2 271.49884033203125, + :y2 795.125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 765.125, + :x2 271.49884033203125, + :y2 795.125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 472}, + :content {:text "Handling Writes"}, + :properties {:color "yellow"}} + {:id #uuid "644dfb90-ed84-4674-9b19-933cc0d6452f", + :page 472, + :position {:bounding {:x1 526.015625, + :y1 912.796875, + :x2 641.71240234375, + :y2 932.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 526.015625, + :y1 912.796875, + :x2 641.71240234375, + :y2 932.796875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 472}, + :content {:text "write-through"}, + :properties {:color "yellow"}} + {:id #uuid "644dfbc5-1c5c-438b-a90d-ff3d1de00f5d", + :page 472, + :position {:bounding {:x1 519.83056640625, + :y1 935.203125, + :x2 603.7498779296875, + :y2 955.203125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 519.83056640625, + :y1 935.203125, + :x2 603.7498779296875, + :y2 955.203125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 472}, + :content {:text "rite miss. "}, + :properties {:color "yellow"}} + {:id #uuid "644dfc5f-ed37-45c4-930e-f6457dac22d8", + :page 473, + :position {:bounding {:x1 778.28125, + :y1 483.46875, + :x2 865.2328491210938, + :y2 503.46875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 778.28125, + :y1 483.46875, + :x2 865.2328491210938, + :y2 503.46875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 473}, + :content {:text "write-back"}, + :properties {:color "yellow"}} + {:id #uuid "644dfcad-d2f6-4e50-8b65-f539c7a54f7a", + :page 473, + :position {:bounding {:x1 608.953125, + :y1 192.265625, + :x2 705.637939453125, + :y2 212.265625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 608.953125, + :y1 192.265625, + :x2 705.637939453125, + :y2 212.265625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 473}, + :content {:text "write buffer"}, + :properties {:color "yellow"}} + {:id #uuid "644dfe25-7d59-43b0-bf19-3a3a1c46ff0b", + :page 473, + :position {:bounding {:x1 665.5625, + :y1 863.90625, + :x2 778.5169677734375, + :y2 885.90625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 665.5625, + :y1 863.90625, + :x2 778.5169677734375, + :y2 885.90625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 473}, + :content {:text "no write allocate"}, + :properties {:color "yellow"}} + {:id #uuid "644dfedb-3afe-4afb-9b56-6ac3c2067783", + :page 473, + :position {:bounding {:x1 0, + :y1 609.96875, + :x2 907.1980285644531, + :y2 1009.09375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 609.96875, + :x2 0, + :y2 633.96875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 352.8171691894531, + :y1 966.5625, + :x2 907.1980285644531, + :y2 988.5625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.9375, + :y1 987.09375, + :x2 596.3480224609375, + :y2 1009.09375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 473}, + :content {:text "implementing stores efficiently in a cache that uses a write-back strategy is more complex than in a write-through cache"}, + :properties {:color "yellow"}} + {:id #uuid "644e0503-5ee5-4da8-bf62-04b2fa91e5f9", + :page 557, + :position {:bounding {:x1 0, + :y1 12.59375, + :x2 719.8433837890625, + :y2 238.921875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 12.59375, + :x2 0, + :y2 36.59375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 214.671875, + :y1 170.3125, + :x2 719.8433837890625, + :y2 205.3125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 214.671875, + :y1 203.921875, + :x2 565.1284790039062, + :y2 238.921875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 557}, + :content {:text "Real Stuff: The ARM Cortex-A8 and Intel Core i7 Memory Hierarchies"}, + :properties {:color "yellow"}} + {:id #uuid "644e053c-0254-41ad-ba8c-25527b64a217", + :page 561, + :position {:bounding {:x1 0, + :y1 145.34375, + :x2 732.6088256835938, + :y2 954.640625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 145.34375, + :x2 0, + :y2 169.34375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 222.484375, + :y1 886.03125, + :x2 732.6088256835938, + :y2 921.03125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 222.484375, + :y1 919.640625, + :x2 323.8851623535156, + :y2 954.640625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 561}, + :content {:text "Going Faster: Cache Blocking and Matrix Multiply"}, + :properties {:color "yellow"}} + {:id #uuid "644e0550-6991-4b86-9765-612e71bed268", + :page 503, + :position {:bounding {:x1 380.796875, + :y1 184.921875, + :x2 594.44091796875, + :y2 219.921875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 380.796875, + :y1 184.921875, + :x2 594.44091796875, + :y2 219.921875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 503}, + :content {:text "Virtual Machines"}, + :properties {:color "yellow"}} + {:id #uuid "644e0592-d4f8-4c4c-ab53-67473f40e1a9", + :page 478, + :position {:bounding {:x1 123.1875, + :y1 147.453125, + :x2 205.58966064453125, + :y2 167.453125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 123.1875, + :y1 147.453125, + :x2 205.58966064453125, + :y2 167.453125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 478}, + :content {:text "CPU time c"}, + :properties {:color "yellow"}} + {:id #uuid "644e0631-3612-4778-86c2-e6f062b426ab", + :page 478, + :position {:bounding {:x1 482.8622131347656, + :y1 898.5625, + :x2 561.0653686523438, + :y2 918.5625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 482.8622131347656, + :y1 898.5625, + :x2 561.0653686523438, + :y2 918.5625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 478}, + :content {:text "proximity "}, + :properties {:color "green"}} + {:id #uuid "644e0696-a447-4ddd-9bd3-dca459b91853", + :page 478, + :position {:bounding {:x1 134.92254638671875, + :y1 306.140625, + :x2 348.28961181640625, + :y2 326.140625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 134.92254638671875, + :y1 306.140625, + :x2 348.28961181640625, + :y2 326.140625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 478}, + :content {:text "memory-stall clock cycles"}, + :properties {:color "yellow"}} + {:id #uuid "644e084a-1d64-423e-9083-ebc373cbb373", + :page 478, + :position {:bounding {:x1 0, + :y1 278.09375, + :x2 741.1640625, + :y2 767.484375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 278.09375, + :x2 0, + :y2 302.09375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 294.6875, + :x2 0, + :y2 318.6875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 311.28125, + :x2 0, + :y2 335.28125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 327.875, + :x2 0, + :y2 351.875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 335.8281555175781, + :y1 657.875, + :x2 741.085205078125, + :y2 677.875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 680.265625, + :x2 741.0316772460938, + :y2 700.265625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 702.671875, + :x2 741.1640625, + :y2 722.671875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 725.078125, + :x2 741.0303344726562, + :y2 745.078125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 747.484375, + :x2 153.41270446777344, + :y2 767.484375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 478}, + :content {:text "For a write-through scheme, we have two sources of stalls: write misses, which usually require that we fetch the block before continuing the write (see the Elaboration on page 394 for more details on dealing with writes), and write buffer stalls, which occur when the write buffer is full when a write occurs."}, + :properties {:color "yellow"}} + {:id #uuid "644e09e3-eb95-42e2-a1f9-f0cf60fecaa2", + :page 479, + :position {:bounding {:x1 300.53125, + :y1 671.46875, + :x2 583.33447265625, + :y2 696.46875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 300.53125, + :y1 671.46875, + :x2 583.33447265625, + :y2 696.46875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 479}, + :content {:text "Calculating Cache Performance"}, + :properties {:color "yellow"}} + {:id #uuid "644e0b77-e7b1-4e9c-ab3f-ce39337117e3", + :page 481, + :position {:bounding {:x1 581.234375, + :y1 326.671875, + :x2 886.5971069335938, + :y2 346.671875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 581.234375, + :y1 326.671875, + :x2 886.5971069335938, + :y2 346.671875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 481}, + :content {:text "average memory access time (AMAT) "}, + :properties {:color "yellow"}} + {:id #uuid "644e0c19-d858-42e5-bfdb-223ff5ebba0d", + :page 481, + :position {:bounding {:x1 0, + :y1 394.25, + :x2 828.27099609375, + :y2 1005.265625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 394.25, + :x2 0, + :y2 418.25, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 561.064697265625, + :y1 949.125, + :x2 828.27099609375, + :y2 979.125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.921875, + :y1 975.265625, + :x2 368.169921875, + :y2 1005.265625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 481}, + :content {:text "More Flexible Placement of Blocks"}, + :properties {:color "yellow"}} + {:id #uuid "644e4d64-9421-4a8c-81da-fadceab42bb3", + :page 482, + :position {:bounding {:x1 0, + :y1 12.59375, + :x2 741.0325317382812, + :y2 189.859375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 12.59375, + :x2 0, + :y2 36.59375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 450.13397216796875, + :y1 147.453125, + :x2 741.0325317382812, + :y2 167.453125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 169.859375, + :x2 518.7457885742188, + :y2 189.859375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 482}, + :content {:text " block can be placed in any location in the cache. Such a scheme is called fully associative"}, + :properties {:color "yellow"}} + {:id #uuid "644e4ddb-92f5-4356-9d47-5b85740a265f", + :page 482, + :position {:bounding {:x1 0, + :y1 78.96875, + :x2 740.9896240234375, + :y2 279.46875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 78.96875, + :x2 0, + :y2 102.96875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 548.1449584960938, + :y1 237.0625, + :x2 740.9896240234375, + :y2 257.0625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.78125, + :y1 259.46875, + :x2 486.60113525390625, + :y2 279.46875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 482}, + :content {:text " is done in parallel with a comparator associated with each cache entry. "}, + :properties {:color "yellow"}} + {:id #uuid "644e4e73-39fe-4103-bada-1a4e86531b6a", + :page 482, + :position {:bounding {:x1 0, + :y1 161.9375, + :x2 741.0661010742188, + :y2 391.453125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 161.9375, + :x2 0, + :y2 185.9375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 173.25, + :y1 349.078125, + :x2 741.0661010742188, + :y2 369.078125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 371.453125, + :x2 422.7994689941406, + :y2 391.453125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 482}, + :content {:text "set associative. In a set-associative cache, there are a fixed number of locations where each block can be placed."}, + :properties {:color "yellow"}} + {:id #uuid "644e5139-a913-4f1f-bbdd-2d577612cdea", + :page 482, + :position {:bounding {:x1 0, + :y1 195.125, + :x2 741.1727294921875, + :y2 481.0625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 195.125, + :x2 0, + :y2 219.125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 211.71875, + :x2 0, + :y2 235.71875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 228.3125, + :x2 0, + :y2 252.3125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 500.36907958984375, + :y1 393.859375, + :x2 741.0692749023438, + :y2 413.859375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 416.265625, + :x2 741.0618896484375, + :y2 436.265625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 438.671875, + :x2 741.1727294921875, + :y2 458.671875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.8125, + :y1 461.0625, + :x2 397.96142578125, + :y2 481.0625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 482}, + :content {:text " An n-way set-associative cache consists of a number of sets, each of which consists of n blocks. Each block in the memory maps to a unique set in the cache given by the index field, and a block can be placed in any element of that set."}, + :properties {:color "yellow"}} + {:id #uuid "644e52a9-4e90-4437-8996-7853fc809075", + :page 483, + :position {:bounding {:x1 0, + :y1 45.78125, + :x2 907.2402954101562, + :y2 279.46875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 45.78125, + :x2 0, + :y2 69.78125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.921875, + :y1 237.0625, + :x2 907.2402954101562, + :y2 257.0625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.921875, + :y1 259.46875, + :x2 476.5473937988281, + :y2 279.46875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 483}, + :content {:text "Since the block may be placed in any element of the set, all the tags of all the elements of the set must be searched. "}, + :properties {:color "yellow"}} + {:id #uuid "644e5618-0945-4d89-a683-8cd52d59afcd", + :page 485, + :position {:bounding {:x1 0, + :y1 676.34375, + :x2 907.2940063476562, + :y2 1093.359375, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 676.34375, + :x2 0, + :y2 700.34375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 0, + :y1 692.9375, + :x2 0, + :y2 716.9375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 740.952392578125, + :y1 1028.546875, + :x2 907.2940063476562, + :y2 1048.546875, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.921875, + :y1 1050.953125, + :x2 907.2346801757812, + :y2 1070.953125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 266.921875, + :y1 1073.359375, + :x2 679.9581298828125, + :y2 1093.359375, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 485}, + :content {:text ". Going from one-way to two-way associativity decreases the miss rate by about 15%, but there is little further improvement in going to higher associativity."}, + :properties {:color "yellow"}} + {:id #uuid "644e56c6-038e-47e7-a076-0f1841c1aa14", + :page 488, + :position {:bounding {:x1 100.796875, + :y1 144.640625, + :x2 461.8929748535156, + :y2 174.640625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 144.640625, + :x2 461.8929748535156, + :y2 174.640625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 488}, + :content {:text "Choosing Which Block to Replace"}, + :properties {:color "yellow"}} + {:id #uuid "644e56e1-7ffd-40fe-beed-5235db719d5a", + :page 486, + :position {:bounding {:x1 211.421875, + :y1 438.890625, + :x2 458.118408203125, + :y2 458.890625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 211.421875, + :y1 438.890625, + :x2 458.118408203125, + :y2 458.890625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 486}, + :content {:text "The three portions of an address"}, + :properties {:color "yellow"}} + {:id #uuid "644e5979-bafa-4d26-90ba-9c98218d5f04", + :page 488, + :position {:bounding {:x1 278.2115478515625, + :y1 493.921875, + :x2 717.9171142578125, + :y2 513.921875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 278.2115478515625, + :y1 493.921875, + :x2 717.9171142578125, + :y2 513.921875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 488}, + :content {:text "As associativity increases, implementing LRU gets harder;"}, + :properties {:color "yellow"}} + {:id #uuid "644e598a-08a7-49f3-966b-e994a472e499", + :page 489, + :position {:bounding {:x1 266.921875, + :y1 144.640625, + :x2 819.427734375, + :y2 174.640625, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 266.921875, + :y1 144.640625, + :x2 819.427734375, + :y2 174.640625, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 489}, + :content {:text "Reducing the Miss Penalty Using Multilevel Caches"}, + :properties {:color "yellow"}} + {:id #uuid "644e59e3-12be-418f-bd07-bb228ec2a8ac", + :page 489, + :position {:bounding {:x1 632.5867919921875, + :y1 359.53125, + :x2 692.3053588867188, + :y2 379.53125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 632.5867919921875, + :y1 359.53125, + :x2 692.3053588867188, + :y2 379.53125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 489}, + :content {:text "incurred"}, + :properties {:color "green"}} + {:id #uuid "644e5adc-7d6c-4136-8fa7-7849417949da", + :page 492, + :position {:bounding {:x1 100.796875, + :y1 429.125, + :x2 480.2625427246094, + :y2 459.125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 100.796875, + :y1 429.125, + :x2 480.2625427246094, + :y2 459.125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 492}, + :content {:text "Software Optimization via Blocking"}, + :properties {:color "yellow"}} + {:id #uuid "644e5aff-0474-4748-afcb-ae57e4dd7292", + :page 490, + :position {:bounding {:x1 0, + :y1 195.125, + :x2 741.0721435546875, + :y2 651, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 195.125, + :x2 0, + :y2 219.125, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 123.203125, + :y1 608.59375, + :x2 741.0721435546875, + :y2 628.59375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 100.796875, + :y1 631, + :x2 164.02743530273438, + :y2 651, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 490}, + :content {:text "The design considerations for a primary and secondary cache are significantly differen"}, + :properties {:color "yellow"}} + {:id #uuid "644e5faf-a110-4d73-bb7f-74376764029b", + :page 495, + :position {:bounding {:x1 744.015625, + :y1 782.53125, + :x2 868.2014770507812, + :y2 804.53125, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 744.015625, + :y1 782.53125, + :x2 868.2014770507812, + :y2 804.53125, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 495}, + :content {:text "global miss rate"}, + :properties {:color "yellow"}} + {:id #uuid "644e610b-15ef-47cd-8701-7bf7be87f16c", + :page 533, + :position {:bounding {:x1 0, + :y1 161.9375, + :x2 813.3172607421875, + :y2 604.875, + :width 1007.9990666666666, + :height 1243.1990666666666}, + :rects ({:x1 0, + :y1 161.9375, + :x2 0, + :y2 185.9375, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 380.796875, + :y1 536.265625, + :x2 813.3172607421875, + :y2 571.265625, + :width 1007.9990666666666, + :height 1243.1990666666666} + {:x1 380.796875, + :y1 569.875, + :x2 499.8416442871094, + :y2 604.875, + :width 1007.9990666666666, + :height 1243.1990666666666}), + :page 533}, + :content {:text "A Common Framework for Memory Hierarchy"}, + :properties {:color "yellow"}}], + :extra {:page 497}} diff --git a/journals/2023_04_28.md b/journals/2023_04_28.md new file mode 100644 index 0000000..5536dcc --- /dev/null +++ b/journals/2023_04_28.md @@ -0,0 +1,6 @@ +- 编译器试点班要开工了捏 + - 先抄一个前端出来,选了一个 Java + Antlr 的代码,用 C++抄一遍,显然不会重复 + - Antlr 的 C++ 体验不是很好,整个环境整了一个下午 +- 模式识别的作业还是没写,实在没人给我抄就周三晚上再说 + - 居然还有一个大作业,真的傻逼啊 +- 随手交了一份HKU的申请 \ No newline at end of file diff --git a/journals/2023_04_29.md b/journals/2023_04_29.md new file mode 100644 index 0000000..31f2b61 --- /dev/null +++ b/journals/2023_04_29.md @@ -0,0 +1,3 @@ +- 终于把计组第四章看完了,不过感觉没学啥新的东西,就简单复习了一下五级流水线 +- 试点班的编译器把语法文件重写了一遍(至少不能完全一样),看上去基本上是可以用的。然后写了命令行参数解析,明天应该可以正式开始抄前端的东西了 +- 计划明天把计组看1/4的第五章 \ No newline at end of file diff --git a/journals/2023_04_30.md b/journals/2023_04_30.md new file mode 100644 index 0000000..6a6ff8e --- /dev/null +++ b/journals/2023_04_30.md @@ -0,0 +1,6 @@ +- 把毛概的小组作业整完了(大概),花了我三个多小时,最讨厌剪视频了 + - 现在看下来,电脑性能确实还是有点不够的,剪视频甚至有点卡 +- 计组第五章看了快一半,明天应该能看完第五章 +- 明天开始把论文看起来 +- 抄写编译器前端 +- 论语报告完善了一下,估计是不会想再看第二遍了,这东西纯纯的尬写,我也不知道老师怎么看得下去的 \ No newline at end of file diff --git a/logseq/bak/logseq/custom/2023-04-30T03_42_43.088Z.Desktop.css b/logseq/bak/logseq/custom/2023-04-30T03_42_43.088Z.Desktop.css new file mode 100644 index 0000000..849f4f6 --- /dev/null +++ b/logseq/bak/logseq/custom/2023-04-30T03_42_43.088Z.Desktop.css @@ -0,0 +1,726 @@ +/* Table of Contents +{{{ ==> +1. Global + 1.1. Color Palette & Variables + 1.2. Layout Corrections + 1.3. Typography + 1.4. Links & Buttons +2. Page Components + 2.1. Content Blocks + 2.2. Tasks + 2.3. Code + 2.4. PDF Viewer +3. Bullet threading +4. Plugin specific + 4.1. Tabs + 4.2. Table of Contents +<== }}} */ + +/* { == 1. Global ==> */ +:root { + font-size: 1.0375rem; +} + +/* {{ 1.1.Color Palette & Variables */ +/* Styles that apply to both dark & light mode */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"], +.white-theme { + --ls-font-family: "Noto Sans CJK SC", sans-serif; + --ls-main-content-max-width: 860px; + --ls-page-text-size: 1em; + --ls-page-title-size: 2rem; + --ls-link-ref-text-color: var(--ls-link-text-color); + --ls-link-ref-text-hover-color: var(--ls-link-text-hover-color); + --ls-head-text-color: var(--ls-link-text-color); + --ls-title-text-color: var(--ls-primary-text-color); + --ls-tag-text-color: var(--ls-link-text-color); + --ls-tag-text-hover-color: var(--ls-link-text-hover-color); + --ls-search-background-color: var(--ls-secondary-background-color); + --ls-border-color: var(--ls-quaternary-background-color); + --ls-secondary-border-color: var(--ls-secondary-text-color); + --ls-page-properties-background-color: var(--ls-secondary-background-color); + --ls-block-properties-background-color: var(--ls-secondary-background-color); + --ls-block-ref-link-text-color: var(--ls-link-text-color); + --ls-a-chosen-bg: var(--ls-secondary-background-color); + --ls-page-blockquote-color: var(--ls-primary-text-color); + --ls-page-blockquote-bg-color: var(--ls-secondary-background-color); + --ls-page-blockquote-border-color: var(--ls-border-color); + --ls-icon-color: var(--ls-link-text-color); + --ls-search-icon-color: var(--ls-link-text-color); + --color-level-1: var(--ls-secondary-background-color); + --color-level-2: var(--ls-tertiary-background-color); + --color-level-3: var(--ls-quaternary-background-color); + --ls-scrollbar-background-color: var(--ls-primary-background-color); + --ls-page-inline-code-color: var(--ls-primary-text-color); + --ls-block-bullet-color: var(--ls-quaternary-background-color); + --ls-block-bullet-active-color: var(--ls-link-text-color); + --ls-block-bullet-threading-width: 1px; + --ls-bullet-closed-color: var(--ls-secondary-text-color); +} +/* Dark theme & Light themes left sidebar */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"] .left-sidebar-inner, +html[data-theme="light"] .ls-left-sidebar-open .cp__header > .l { + --ls-accent-rgb: 178, 219, 219; + --ls-primary-background-color: #1f2428; + --ls-secondary-background-color: #24292e; + --ls-tertiary-background-color: #282e34; + --ls-quaternary-background-color: #292e33; + --ls-selection-background-color: rgba(246, 246, 246, 0.1); + --ls-table-tr-even-background-color: rgba(246, 246, 246, 0.065); + --ls-active-primary-color: #8ec2c2; + --ls-active-secondary-color: #eeffff; + --ls-guideline-color: rgba(246, 246, 246, 0.2); + --primary-text-opacity: 0.98; + --ls-primary-text-color: rgba(195, 200, 205, var(--primary-text-opacity)); + --ls-secondary-text-color: rgba(195, 200, 205, 0.66); + --ls-link-text-color: rgba(var(--ls-accent-rgb), var(--primary-text-opacity)); + --ls-link-text-hover-color: rgba(244, 244, 244, var(--primary-text-opacity)); + --ls-menu-hover-color: var(--ls-secondary-background-color); + --ls-slide-background-color: var(--ls-primary-background-color); + --ls-block-highlight-color: rgba(246, 246, 246, 0.1); + --ls-page-inline-code-bg-color: rgba(246, 246, 246, 0.2); + --ls-scrollbar-foreground-color: rgba(246, 246, 246, 0.15); + --ls-scrollbar-thumb-hover-color: rgba(246, 246, 246, 0.3); + --ls-right-sidebar-code-bg-color: var(--ls-page-inline-code-bg-color); + --ls-block-bullet-border-color: rgba(246, 246, 246, 0.15); +} +/* Light theme */ +html[data-theme="light"], +.white-theme { + --ls-accent-rgb: 30, 125, 124; + --ls-primary-background-color: #f0f0f1; + --ls-secondary-background-color: #e8e9ea; + --ls-tertiary-background-color: rgba(225, 225, 225, 0.9); + --ls-quaternary-background-color: #e0e1e1; + --ls-selection-background-color: rgba(0, 0, 0, 0.1); + --ls-active-primary-color: #8ec2c2; + --ls-secondary-text-color: rgba(33, 33, 33, 0.8); + --ls-link-text-color: rgba(var(--ls-accent-rgb), 0.9); + --ls-link-text-hover-color: rgba(var(--ls-accent-rgb), 1); + --ls-page-inline-code-bg-color: rgba(0, 0, 0, 0.1); + --ls-page-blockquote-border-color: rgba(var(--ls-accent-rgb), 0.25); + --ls-scrollbar-foreground-color: rgba(0, 0, 0, 0.2); + --ls-scrollbar-thumb-hover-color: rgba(0, 0, 0, 0.3); + --ls-block-bullet-active-color: #86b6b6; + --ls-block-bullet-border-color: rgba(128, 128, 128, 0.1); +} +/* }} */ + +/* {{ 1.2. Layout corrections */ +/* Helps to not overlap content with tabs plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +/* Add some white space to the right. +(This is because the actual start of the content on the left side is offset if we include the bullets and spacing.) */ +.cp__sidebar-main-content { + margin-right: 24px; +} +/* }} */ + +/* {{ 1.3. Typography */ +/* Headings */ +.editor-inner .uniline-block:is(.h1, .h2, .h3, .h4, .h5, .h6), +.editor-inner :is(.h1, .h2, .h3, .h4, .h5, .h6), +.ls-block :is(h1, h2, h3, h4, h5, h6) { + position: relative; + margin: 0; +} +.editor-inner .uniline-block:is(.h1), +.editor-inner :is(.h1), +.ls-block :is(h1) { + top: 0.15em; + margin: -0.15em 0 0.15em; +} +.editor-inner .uniline-block:is(.h2), +.editor-inner :is(.h2), +.ls-block :is(h2) { + top: -0.1em; + /* positive margin leaves a gap between bullet and indentation lines */ + /* margin: 0.25em 0 0; */ +} +.editor-inner .uniline-block:is(.h3, .h4, .h5, .h6), +.editor-inner :is(.h3, .h4, .h5, .h6), +.ls-block :is(h3, h4) { + top: -0.25em; + margin: 0.25em 0 -0.25em; +} +.editor-inner .uniline-block:is(.h3), +.editor-inner :is(.h3), +.ls-block :is(h3) { + font-size: 1.2em; +} +.editor-inner .uniline-block:is(.h4), +.editor-inner :is(.h4), +.ls-block :is(h4) { + font-size: 1.1em; +} +.editor-inner .uniline-block:is(.h5), +.editor-inner :is(.h5), +.ls-block :is(h5) { + font-size: 1.05em; +} +.editor-inner .uniline-block:is(.h6), +.editor-inner :is(.h6), +.ls-block :is(h6) { + font-size: 1em; +} +.cp__themes-installed > .it > section > strong { + font-size: 0.875em; +} +/* }} */ + +/* {{ 1.4. Links & Buttons */ +html[data-theme="light"] .cp__header a, +html[data-theme="light"] .cp__header button, +html[data-theme="light"] .extensions__pdf-toolbar > .inner > .r a, +html[data-theme="light"] a svg { + color: #6d7272; +} +.cp__header .add-graph-btn { + border: none; +} +.cp__header .add-graph-btn span { + margin-top: 0 !important; +} +html[data-theme="light"] .cp__sidebar-left-layout a { + color: var(--ls-secondary-text-color); +} +html[data-theme="light"] h1 a { + color: var(--ls-title-text-color); +} +html[data-theme="light"] a:hover { + background-color: var(--ls-quaternary-background-color); + color: var(--ls-primary-text-color); +} +/* External Links */ +a.external-link { + border-bottom: 1px dashed; +} +a.external-link::after { + position: relative; + bottom: -2px; + left: -1px; + display: inline-block; + margin: 0 1px 0 5px; + width: 14px; + height: 14px; + background-color: var(--ls-link-text-color); + content: ""; + transition: 0.3s; + + mask-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + -webkit-mask-box-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + mask-position: center; + -webkit-mask-box-position: center; + mask-repeat: no-repeat; + -webkit-mask-box-repeat: no-repeat; + mask-size: 14px 14px; + -webkit-mask-box-size: 14px 14px; + object-fit: cover; +} +a.external-link:hover::after { + background-color: var(--ls-link-text-hover-color); +} +/* custom colors in buttons, hints etc */ +.bg-indigo-600 { + color: var(--ls-primary-background-color); + transition: 0.3s; +} +.dark-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.8); +} +.dark-theme .hover\:bg-indigo-700:hover, +.hover\:bg-indigo-500:hover { + background-color: rgb(var(--ls-accent-rgb)); + opacity: 1; +} +.dark-theme button.bg-white { + border-color: var(--ls-block-bullet-border-color); + background-color: var(--ls-secondary-background-color); + color: var(--ls-secondary-text-color); +} +.dark-theme button.bg-white:hover { + background-color: var(--ls-tertiary-background-color); + color: var(--ls-primary-text-color); +} +.white-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +.white-theme .hover\:bg-indigo-700:hover { + background-color: rgba(var(--ls-accent-rgb), 0.8); + opacity: 1; +} +/* pre */ +.hljs { + background: transparent; +} +/* hints */ +.dark-theme .Tooltip__label { + width: 11ch; + border: 1px solid var(--ls-primary-text-color); + background: var(--ls-secondary-background-color); +} +.dark-theme .Tooltip__label::after { + border-bottom-color: var(--ls-primary-text-color); +} +/* block references link count mark */ +a.open-block-ref-link { + background-color: var(--ls-link-text-color); + color: var(--ls-primary-background-color); +} +/* brackets in links */ +.page-reference .bracket { + color: var(--ls-link-text-color); + opacity: 0.5; +} +/* Tags */ +a.tag[data-ref] { + padding: 0.2rem 0.3rem; + border-radius: 0.5rem 0rem; + background: var(--ls-link-text-color); + color: var(--ls-primary-background-color); + white-space: nowrap; + letter-spacing: 0.05em; + font-weight: bold; + font-size: 0.75rem; + line-height: 0.75rem; + transition: 0.3s; +} +html[data-theme="light"] a.tag[data-ref] { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +a.tag[data-ref]:hover { + border-radius: 0rem 0.5rem; + opacity: 1; +} +html[data-theme="light"] a.tag[data-ref]:hover { + color: var(--ls-primary-background-color); +} +/* Highlights */ +/*mark { + padding: 2px 4px; + border-radius: 3px; + background: rgba(246, 246, 246, 0.8); + color: var(--ls-primary-background-color); + font-size: 14px; +}*/ +mark { + background: transparent; + padding: 0; + color: inherit; + font-size: inherit; + text-decoration-style: solid; + text-decoration: underline; + text-decoration-color: var(--ls-primary-background-color); + text-decoration-thickness: 4px; + text-underline-offset: -1px; + text-decoration-skip-ink: none; +} + + +/* fix color page-reference when mark text */ +mark .page-ref, +mark .page-reference .bracket { + color: var(--ls-primary-background-color); + font-weight: bold; +} +/* Search results */ +html[data-theme="light"] .search-results-wrap a .rounded.border { + border-color: var(--ls-tertiary-background-color); + background-color: var(--ls-primary-background-color); +} +/* <== }}} */ + +/* { == 2. Page Components ==> */ +/* {{ 2.1. Content Blocks */ +.block-body ul > li { + margin: 0.5em 0; +} +.block-body ul > li:first-child { + margin-top: 0; +} +.block-body ul > li:last-child { + margin-bottom: 0; +} +.ls-block { + padding: 0.3em 0; +} +.ls-block[level="1"] { + padding-top: 0.6em; +} +.block-children { + padding: 0.16em 0; +} +#lazy-blocks > div .ls-block[haschild] > div > .block-content-wrapper::before { + top: 0.9rem; +} +/* }} */ + +/* {{ 2.2. Tasks */ +/* Checkboxes */ +.form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.9em; + height: 0.9em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +/* Status switcher */ +.marker-switch { + position: relative; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.15em 0; + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.8em; + line-height: 1; + opacity: 0.66; + cursor: pointer; +} +.form-checkbox:hover { + background-color: var(--ls-secondary-background-color); + border-color: var(--ls-link-text-color); + opacity: 0.9; + transform: none; +} +.form-checkbox:checked { + border-color: var(--ls-secondary-text-color); + background-color: var(--ls-secondary-background-color); +} +html[data-theme="light"] .form-checkbox:checked { + background-color: var(--ls-active-primary-color); +} +/* Status switcher */ +/* Status switcher - bordered variant */ +/* .form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.95em; + height: 0.95em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +.marker-switch { + position: relative; + top: -0.1em; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.33em 0.033em; + border: 0.1em solid var(--ls-border-color); + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.7em; + line-height: 1; + opacity: 1; + opacity: 0.75; + cursor: pointer; +} */ +.dark-theme .marker-switch:hover { + border-color: var(--ls-link-text-color); + color: var(--ls-link-text-color); +} +.canceled, +.done { + opacity: 0.5; +} +.done { + text-decoration: none; +} +/* }} */ + +/* {{ 2.3. Code */ +/* Inline code */ +:not(pre) > code { + padding: 2px 5px !important; +} +.extensions__code .code-editor { + margin-top: 0; +} +/* Code Calc result position fix */ +.extensions__code-calc { + top: 11px; + padding: 0 0.75em; +} +.extensions__code-lang { + background: var(--ls-secondary-background-color); +} +/* CodeMirror */ +.CodeMirror { + border-radius: 0.25rem; + background: var(--ls-secondary-background-color); + font-family: "Consolas", "Maple Mono SC NF",monospace; + line-height: 1.2; +} +.CodeMirror-hscrollbar { + cursor: default; +} +.cm-s-solarized.cm-s-dark, +.cm-s-solarized.cm-s-white, +.cm-s-solarized.cm-s-light { + border: 7px solid var(--ls-secondary-background-color); + background-color: var(--ls-primary-background-color); + color: var(--ls-primary-text-color); + text-shadow: none; +} +.CodeMirror-gutters { + background-color: #f7f7f7; +} +.cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.5); +} +html[data-theme="light"] .cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.1); +} +.cm-s-solarized.cm-s-light .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.033); +} +.CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark .CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.cm-s-solarized.cm-s-light div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-focused .CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-lines { + padding-right: 1em; +} +/* }} */ + +/* {{ 2.4. PDF Viewer */ +#pdf-layout-container[data-theme="dark"], +#pdf-layout-container[data-theme="light"] { + background-color: var(--ls-quaternary-background-color); +} +#pdf-layout-container[data-theme="dark"] .textLayer { + background-color: #282e34; +} +#pdf-layout-container[data-theme="light"] .textLayer { + background-color: var(--ls-primary-background-color); + opacity: 0.125; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + right: 0; + width: 100%; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner { + margin-right: 1em; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner .buttons, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner .buttons { + border-radius: 0.25rem; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, var(--ls-secondary-background-color) 100%); +} +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, rgb(31, 36, 40, 0.3) 100%); +} +/* <== }}} */ + +/* { == 3. Bullet Threading ==> */ +:not(:dsl-query) .block-control { + min-width: 0; + width: 1.55em; +} +.block-children { + border-color: var(--ls-quaternary-background-color); + border-left-width: var(--ls-block-bullet-threading-width); + border-radius: 0; +} +.block-children-left-border:hover { + background-color: var(--ls-block-bullet-border-color); +} +.block-content-wrapper { + position: relative; +} +.bullet-container { + position: relative; + width: 14px !important; + height: 14px !important; + transform: translate(1px, -1px); + /* align-items: end; */ +} +/* Block bullet path in nested block only */ +.ls-block .bullet { + background-color: var(--ls-block-bullet-active-color); + box-shadow: 0 0 0 1px var(--ls-block-bullet-active-color); +} +.ls-block div.items-center { + position: relative; +} +.ls-block > .items-baseline { + align-items: center; +} +.ls-block:not(:focus-within) .bullet { + background-color: var(--ls-block-bullet-color); + box-shadow: none; + transform: scale(1); +} +.ls-block:not(:focus-within) > .items-baseline { + align-items: center; +} +.ls-block .ls-block > div > div.items-center::before { + position: absolute; + top: calc(-100% + var(--ls-block-bullet-threading-width) * 0.5 - 0.1em); + right: 6px; + bottom: 50%; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-bottom: var(--ls-block-bullet-threading-width) solid transparent; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + border-bottom-left-radius: 6px; + content: ""; + pointer-events: none; +} +.ls-block .ls-block:focus-within > div > div.items-center::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children > .ls-block::before { + position: absolute; + top: -1.19em; + bottom: 0; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block .block-children:focus-within > .ls-block:not(:focus-within)::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children:focus-within > .ls-block:focus-within ~ .ls-block::before { + border-color: transparent; +} +.ls-block[haschild] > div > .block-content-wrapper::before { + position: absolute; + top: 0.9em; + bottom: 0; + left: -1em; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block[haschild]:focus-within > div > .block-content-wrapper .block-content::before { + border-color: var(--ls-block-bullet-active-color); +} +/* disable first fracking level for embedded content */ +.embed > div > div > div > div > div > div::before, +.embed-block > div > div > div > div > div > div > div::before, +.custom-query .blocks-container > div > div > .ls-block > div > .items-center::before { + border-color: transparent !important; +} +/* algin embeded pages to content width */ +.block-content .flex-1 { + overflow: hidden; +} +/* disable for doc mode */ +.doc-mode div.items-center::before, +.doc-mode div.items-center::after, +.doc-mode .ls-block::before, +.doc-mode .ls-block::after { + display: none; +} +/* <== }}} */ + +/* { == 4. Plugin specific ==> */ +/* {{ 4.1. Tabs Plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +html[data-theme="dark"] #logseq-tabs_lsp_main { + filter: sepia(0) saturate(0.8) opacity(0.85) hue-rotate(360deg) grayscale(0.05) brightness(0.85) invert(0.04); + /* border-bottom: 1px solid var(--ls-quaternary-background-color); */ +} +/* }} */ + +/* {{ 4.2. Table of Contents Plugin */ +[id*="logseq-tocgen--toc-slot"] { + padding-left: 0.5em; +} +.kef-tocgen-page span { + position: relative; + top: -0.1em; +} +.kef-tocgen-block-collapse { + border-color: var(--ls-quaternary-background-color) !important; +} +.kef-tocgen-page::before, +.kef-tocgen-block::before { + position: relative; + top: 0.7em; + left: 0.5em; + z-index: 1; + display: inline-block; + width: 0.375em; + height: 0.4em; + border-radius: 50%; + background-color: var(--ls-block-bullet-color); + content: " "; + pointer-events: none; +} +[data-ref="logseq-tocgen"] .kef-tocgen-block-children { + margin-left: 1.2em; +} +button.kef-tocgen-arrow { + position: relative; + margin: 0; + margin-left: -0.75em; + padding: 0; + padding-left: 1.2em; +} +button.kef-tocgen-arrow svg { + position: relative; + top: 0.05em; + left: -0.53em; + width: 0.8em; + height: 0.8em; + border-radius: 50%; + background-color: var(--ls-block-bullet-border-color); + color: transparent; +} +.kef-tocgen-page button.kef-tocgen-arrow svg { + top: -0.095em; + left: -0.54em; +} +button.kef-tocgen-arrow svg[style*="transform"] { + left: -1.2em; + margin-right: 0.3em; + width: 0.5em; + height: 0.5em; + background-color: transparent; + filter: none; +} +button.kef-tocgen-arrow:hover svg[style*="transform"] { + color: var(--ls-link-text-color); +} +/* <== }}} */ \ No newline at end of file diff --git a/logseq/bak/logseq/custom/2023-04-30T03_48_07.662Z.Desktop.css b/logseq/bak/logseq/custom/2023-04-30T03_48_07.662Z.Desktop.css new file mode 100644 index 0000000..36df05d --- /dev/null +++ b/logseq/bak/logseq/custom/2023-04-30T03_48_07.662Z.Desktop.css @@ -0,0 +1,727 @@ +/* Table of Contents +{{{ ==> +1. Global + 1.1. Color Palette & Variables + 1.2. Layout Corrections + 1.3. Typography + 1.4. Links & Buttons +2. Page Components + 2.1. Content Blocks + 2.2. Tasks + 2.3. Code + 2.4. PDF Viewer +3. Bullet threading +4. Plugin specific + 4.1. Tabs + 4.2. Table of Contents +<== }}} */ + +/* { == 1. Global ==> */ +:root { + font-size: 1.0375rem; +} + +/* {{ 1.1.Color Palette & Variables */ +/* Styles that apply to both dark & light mode */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"], +.white-theme { + --ls-font-family: "Noto Sans CJK SC", sans-serif; + --ls-main-content-max-width: 860px; + --ls-page-text-size: 1em; + --ls-page-title-size: 2rem; + --ls-link-ref-text-color: var(--ls-link-text-color); + --ls-link-ref-text-hover-color: var(--ls-link-text-hover-color); + --ls-head-text-color: var(--ls-link-text-color); + --ls-title-text-color: var(--ls-primary-text-color); + --ls-tag-text-color: var(--ls-link-text-color); + --ls-tag-text-hover-color: var(--ls-link-text-hover-color); + --ls-search-background-color: var(--ls-secondary-background-color); + --ls-border-color: var(--ls-quaternary-background-color); + --ls-secondary-border-color: var(--ls-secondary-text-color); + --ls-page-properties-background-color: var(--ls-secondary-background-color); + --ls-block-properties-background-color: var(--ls-secondary-background-color); + --ls-block-ref-link-text-color: var(--ls-link-text-color); + --ls-a-chosen-bg: var(--ls-secondary-background-color); + --ls-page-blockquote-color: var(--ls-primary-text-color); + --ls-page-blockquote-bg-color: var(--ls-secondary-background-color); + --ls-page-blockquote-border-color: var(--ls-border-color); + --ls-icon-color: var(--ls-link-text-color); + --ls-search-icon-color: var(--ls-link-text-color); + --color-level-1: var(--ls-secondary-background-color); + --color-level-2: var(--ls-tertiary-background-color); + --color-level-3: var(--ls-quaternary-background-color); + --ls-scrollbar-background-color: var(--ls-primary-background-color); + --ls-page-inline-code-color: var(--ls-primary-text-color); + --ls-block-bullet-color: var(--ls-quaternary-background-color); + --ls-block-bullet-active-color: var(--ls-link-text-color); + --ls-block-bullet-threading-width: 1px; + --ls-bullet-closed-color: var(--ls-secondary-text-color); +} +/* Dark theme & Light themes left sidebar */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"] .left-sidebar-inner, +html[data-theme="light"] .ls-left-sidebar-open .cp__header > .l { + --ls-accent-rgb: 178, 219, 219; + --ls-primary-background-color: #1f2428; + --ls-secondary-background-color: #24292e; + --ls-tertiary-background-color: #282e34; + --ls-quaternary-background-color: #292e33; + --ls-selection-background-color: rgba(246, 246, 246, 0.1); + --ls-table-tr-even-background-color: rgba(246, 246, 246, 0.065); + --ls-active-primary-color: #8ec2c2; + --ls-active-secondary-color: #eeffff; + --ls-guideline-color: rgba(246, 246, 246, 0.2); + --primary-text-opacity: 0.98; + --ls-primary-text-color: rgba(195, 200, 205, var(--primary-text-opacity)); + --ls-secondary-text-color: rgba(195, 200, 205, 0.66); + --ls-link-text-color: rgba(var(--ls-accent-rgb), var(--primary-text-opacity)); + --ls-link-text-hover-color: rgba(244, 244, 244, var(--primary-text-opacity)); + --ls-menu-hover-color: var(--ls-secondary-background-color); + --ls-slide-background-color: var(--ls-primary-background-color); + --ls-block-highlight-color: rgba(246, 246, 246, 0.1); + --ls-page-inline-code-bg-color: rgba(246, 246, 246, 0.2); + --ls-scrollbar-foreground-color: rgba(246, 246, 246, 0.15); + --ls-scrollbar-thumb-hover-color: rgba(246, 246, 246, 0.3); + --ls-right-sidebar-code-bg-color: var(--ls-page-inline-code-bg-color); + --ls-block-bullet-border-color: rgba(246, 246, 246, 0.15); +} +/* Light theme */ +html[data-theme="light"], +.white-theme { + --ls-accent-rgb: 30, 125, 124; + --ls-primary-background-color: #f0f0f1; + --ls-secondary-background-color: #e8e9ea; + --ls-tertiary-background-color: rgba(225, 225, 225, 0.9); + --ls-quaternary-background-color: #e0e1e1; + --ls-selection-background-color: rgba(0, 0, 0, 0.1); + --ls-active-primary-color: #8ec2c2; + --ls-secondary-text-color: rgba(33, 33, 33, 0.8); + --ls-link-text-color: rgba(var(--ls-accent-rgb), 0.9); + --ls-link-text-hover-color: rgba(var(--ls-accent-rgb), 1); + --ls-page-inline-code-bg-color: rgba(0, 0, 0, 0.1); + --ls-page-blockquote-border-color: rgba(var(--ls-accent-rgb), 0.25); + --ls-scrollbar-foreground-color: rgba(0, 0, 0, 0.2); + --ls-scrollbar-thumb-hover-color: rgba(0, 0, 0, 0.3); + --ls-block-bullet-active-color: #86b6b6; + --ls-block-bullet-border-color: rgba(128, 128, 128, 0.1); +} +/* }} */ + +/* {{ 1.2. Layout corrections */ +/* Helps to not overlap content with tabs plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +/* Add some white space to the right. +(This is because the actual start of the content on the left side is offset if we include the bullets and spacing.) */ +.cp__sidebar-main-content { + margin-right: 24px; +} +/* }} */ + +/* {{ 1.3. Typography */ +/* Headings */ +.editor-inner .uniline-block:is(.h1, .h2, .h3, .h4, .h5, .h6), +.editor-inner :is(.h1, .h2, .h3, .h4, .h5, .h6), +.ls-block :is(h1, h2, h3, h4, h5, h6) { + position: relative; + margin: 0; +} +.editor-inner .uniline-block:is(.h1), +.editor-inner :is(.h1), +.ls-block :is(h1) { + top: 0.15em; + margin: -0.15em 0 0.15em; +} +.editor-inner .uniline-block:is(.h2), +.editor-inner :is(.h2), +.ls-block :is(h2) { + top: -0.1em; + /* positive margin leaves a gap between bullet and indentation lines */ + /* margin: 0.25em 0 0; */ +} +.editor-inner .uniline-block:is(.h3, .h4, .h5, .h6), +.editor-inner :is(.h3, .h4, .h5, .h6), +.ls-block :is(h3, h4) { + top: -0.25em; + margin: 0.25em 0 -0.25em; +} +.editor-inner .uniline-block:is(.h3), +.editor-inner :is(.h3), +.ls-block :is(h3) { + font-size: 1.2em; +} +.editor-inner .uniline-block:is(.h4), +.editor-inner :is(.h4), +.ls-block :is(h4) { + font-size: 1.1em; +} +.editor-inner .uniline-block:is(.h5), +.editor-inner :is(.h5), +.ls-block :is(h5) { + font-size: 1.05em; +} +.editor-inner .uniline-block:is(.h6), +.editor-inner :is(.h6), +.ls-block :is(h6) { + font-size: 1em; +} +.cp__themes-installed > .it > section > strong { + font-size: 0.875em; +} +/* }} */ + +/* {{ 1.4. Links & Buttons */ +html[data-theme="light"] .cp__header a, +html[data-theme="light"] .cp__header button, +html[data-theme="light"] .extensions__pdf-toolbar > .inner > .r a, +html[data-theme="light"] a svg { + color: #6d7272; +} +.cp__header .add-graph-btn { + border: none; +} +.cp__header .add-graph-btn span { + margin-top: 0 !important; +} +html[data-theme="light"] .cp__sidebar-left-layout a { + color: var(--ls-secondary-text-color); +} +html[data-theme="light"] h1 a { + color: var(--ls-title-text-color); +} +html[data-theme="light"] a:hover { + background-color: var(--ls-quaternary-background-color); + color: var(--ls-primary-text-color); +} +/* External Links */ +a.external-link { + border-bottom: 1px dashed; +} +a.external-link::after { + position: relative; + bottom: -2px; + left: -1px; + display: inline-block; + margin: 0 1px 0 5px; + width: 14px; + height: 14px; + background-color: var(--ls-link-text-color); + content: ""; + transition: 0.3s; + + mask-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + -webkit-mask-box-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + mask-position: center; + -webkit-mask-box-position: center; + mask-repeat: no-repeat; + -webkit-mask-box-repeat: no-repeat; + mask-size: 14px 14px; + -webkit-mask-box-size: 14px 14px; + object-fit: cover; +} +a.external-link:hover::after { + background-color: var(--ls-link-text-hover-color); +} +/* custom colors in buttons, hints etc */ +.bg-indigo-600 { + color: var(--ls-primary-background-color); + transition: 0.3s; +} +.dark-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.8); +} +.dark-theme .hover\:bg-indigo-700:hover, +.hover\:bg-indigo-500:hover { + background-color: rgb(var(--ls-accent-rgb)); + opacity: 1; +} +.dark-theme button.bg-white { + border-color: var(--ls-block-bullet-border-color); + background-color: var(--ls-secondary-background-color); + color: var(--ls-secondary-text-color); +} +.dark-theme button.bg-white:hover { + background-color: var(--ls-tertiary-background-color); + color: var(--ls-primary-text-color); +} +.white-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +.white-theme .hover\:bg-indigo-700:hover { + background-color: rgba(var(--ls-accent-rgb), 0.8); + opacity: 1; +} +/* pre */ +.hljs { + background: transparent; +} +/* hints */ +.dark-theme .Tooltip__label { + width: 11ch; + border: 1px solid var(--ls-primary-text-color); + background: var(--ls-secondary-background-color); +} +.dark-theme .Tooltip__label::after { + border-bottom-color: var(--ls-primary-text-color); +} +/* block references link count mark */ +a.open-block-ref-link { + background-color: var(--ls-link-text-color); + color: var(--ls-primary-background-color); +} +/* brackets in links */ +.page-reference .bracket { + color: var(--ls-link-text-color); + opacity: 0.5; +} +/* Tags */ +a.tag[data-ref] { + padding: 0.2rem 0.3rem; + border-radius: 0.5rem 0rem; + background: var(--ls-link-text-color); + color: var(--ls-primary-background-color); + white-space: nowrap; + letter-spacing: 0.05em; + font-weight: bold; + font-size: 0.75rem; + line-height: 0.75rem; + transition: 0.3s; +} +html[data-theme="light"] a.tag[data-ref] { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +a.tag[data-ref]:hover { + border-radius: 0rem 0.5rem; + opacity: 1; +} +html[data-theme="light"] a.tag[data-ref]:hover { + color: var(--ls-primary-background-color); +} +/* Highlights */ +/*mark { + padding: 2px 4px; + border-radius: 3px; + background: rgba(246, 246, 246, 0.8); + color: var(--ls-primary-background-color); + font-size: 14px; +}*/ +mark { + background: transparent; + padding: 0; + color: inherit; + font-size: inherit; + text-decoration-style: solid; + text-decoration: underline; + text-decoration-color: rgba(0, 0, 0, 0.5); + text-decoration-thickness: 4px; + text-underline-offset: -1px; + text-decoration-skip-ink: none; +} +html[data-theme="dark"] mark { + text-decoration-color: rgba(233, 233, 233, 0.5); +} +/* fix color page-reference when mark text */ +mark .page-ref, +mark .page-reference .bracket { + color: var(--ls-primary-background-color); + font-weight: bold; +} +/* Search results */ +html[data-theme="light"] .search-results-wrap a .rounded.border { + border-color: var(--ls-tertiary-background-color); + background-color: var(--ls-primary-background-color); +} +/* <== }}} */ + +/* { == 2. Page Components ==> */ +/* {{ 2.1. Content Blocks */ +.block-body ul > li { + margin: 0.5em 0; +} +.block-body ul > li:first-child { + margin-top: 0; +} +.block-body ul > li:last-child { + margin-bottom: 0; +} +.ls-block { + padding: 0.3em 0; +} +.ls-block[level="1"] { + padding-top: 0.6em; +} +.block-children { + padding: 0.16em 0; +} +#lazy-blocks > div .ls-block[haschild] > div > .block-content-wrapper::before { + top: 0.9rem; +} +/* }} */ + +/* {{ 2.2. Tasks */ +/* Checkboxes */ +.form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.9em; + height: 0.9em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +/* Status switcher */ +.marker-switch { + position: relative; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.15em 0; + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.8em; + line-height: 1; + opacity: 0.66; + cursor: pointer; +} +.form-checkbox:hover { + background-color: var(--ls-secondary-background-color); + border-color: var(--ls-link-text-color); + opacity: 0.9; + transform: none; +} +.form-checkbox:checked { + border-color: var(--ls-secondary-text-color); + background-color: var(--ls-secondary-background-color); +} +html[data-theme="light"] .form-checkbox:checked { + background-color: var(--ls-active-primary-color); +} +/* Status switcher */ +/* Status switcher - bordered variant */ +/* .form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.95em; + height: 0.95em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +.marker-switch { + position: relative; + top: -0.1em; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.33em 0.033em; + border: 0.1em solid var(--ls-border-color); + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.7em; + line-height: 1; + opacity: 1; + opacity: 0.75; + cursor: pointer; +} */ +.dark-theme .marker-switch:hover { + border-color: var(--ls-link-text-color); + color: var(--ls-link-text-color); +} +.canceled, +.done { + opacity: 0.5; +} +.done { + text-decoration: none; +} +/* }} */ + +/* {{ 2.3. Code */ +/* Inline code */ +:not(pre) > code { + padding: 2px 5px !important; +} +.extensions__code .code-editor { + margin-top: 0; +} +/* Code Calc result position fix */ +.extensions__code-calc { + top: 11px; + padding: 0 0.75em; +} +.extensions__code-lang { + background: var(--ls-secondary-background-color); +} +/* CodeMirror */ +.CodeMirror { + border-radius: 0.25rem; + background: var(--ls-secondary-background-color); + font-family: "Consolas", "Maple Mono SC NF",monospace; + line-height: 1.2; +} +.CodeMirror-hscrollbar { + cursor: default; +} +.cm-s-solarized.cm-s-dark, +.cm-s-solarized.cm-s-white, +.cm-s-solarized.cm-s-light { + border: 7px solid var(--ls-secondary-background-color); + background-color: var(--ls-primary-background-color); + color: var(--ls-primary-text-color); + text-shadow: none; +} +.CodeMirror-gutters { + background-color: #f7f7f7; +} +.cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.5); +} +html[data-theme="light"] .cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.1); +} +.cm-s-solarized.cm-s-light .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.033); +} +.CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark .CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.cm-s-solarized.cm-s-light div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-focused .CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-lines { + padding-right: 1em; +} +/* }} */ + +/* {{ 2.4. PDF Viewer */ +#pdf-layout-container[data-theme="dark"], +#pdf-layout-container[data-theme="light"] { + background-color: var(--ls-quaternary-background-color); +} +#pdf-layout-container[data-theme="dark"] .textLayer { + background-color: #282e34; +} +#pdf-layout-container[data-theme="light"] .textLayer { + background-color: var(--ls-primary-background-color); + opacity: 0.125; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + right: 0; + width: 100%; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner { + margin-right: 1em; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner .buttons, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner .buttons { + border-radius: 0.25rem; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, var(--ls-secondary-background-color) 100%); +} +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, rgb(31, 36, 40, 0.3) 100%); +} +/* <== }}} */ + +/* { == 3. Bullet Threading ==> */ +:not(:dsl-query) .block-control { + min-width: 0; + width: 1.55em; +} +.block-children { + border-color: var(--ls-quaternary-background-color); + border-left-width: var(--ls-block-bullet-threading-width); + border-radius: 0; +} +.block-children-left-border:hover { + background-color: var(--ls-block-bullet-border-color); +} +.block-content-wrapper { + position: relative; +} +.bullet-container { + position: relative; + width: 14px !important; + height: 14px !important; + transform: translate(1px, -1px); + /* align-items: end; */ +} +/* Block bullet path in nested block only */ +.ls-block .bullet { + background-color: var(--ls-block-bullet-active-color); + box-shadow: 0 0 0 1px var(--ls-block-bullet-active-color); +} +.ls-block div.items-center { + position: relative; +} +.ls-block > .items-baseline { + align-items: center; +} +.ls-block:not(:focus-within) .bullet { + background-color: var(--ls-block-bullet-color); + box-shadow: none; + transform: scale(1); +} +.ls-block:not(:focus-within) > .items-baseline { + align-items: center; +} +.ls-block .ls-block > div > div.items-center::before { + position: absolute; + top: calc(-100% + var(--ls-block-bullet-threading-width) * 0.5 - 0.1em); + right: 6px; + bottom: 50%; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-bottom: var(--ls-block-bullet-threading-width) solid transparent; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + border-bottom-left-radius: 6px; + content: ""; + pointer-events: none; +} +.ls-block .ls-block:focus-within > div > div.items-center::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children > .ls-block::before { + position: absolute; + top: -1.19em; + bottom: 0; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block .block-children:focus-within > .ls-block:not(:focus-within)::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children:focus-within > .ls-block:focus-within ~ .ls-block::before { + border-color: transparent; +} +.ls-block[haschild] > div > .block-content-wrapper::before { + position: absolute; + top: 0.9em; + bottom: 0; + left: -1em; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block[haschild]:focus-within > div > .block-content-wrapper .block-content::before { + border-color: var(--ls-block-bullet-active-color); +} +/* disable first fracking level for embedded content */ +.embed > div > div > div > div > div > div::before, +.embed-block > div > div > div > div > div > div > div::before, +.custom-query .blocks-container > div > div > .ls-block > div > .items-center::before { + border-color: transparent !important; +} +/* algin embeded pages to content width */ +.block-content .flex-1 { + overflow: hidden; +} +/* disable for doc mode */ +.doc-mode div.items-center::before, +.doc-mode div.items-center::after, +.doc-mode .ls-block::before, +.doc-mode .ls-block::after { + display: none; +} +/* <== }}} */ + +/* { == 4. Plugin specific ==> */ +/* {{ 4.1. Tabs Plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +html[data-theme="dark"] #logseq-tabs_lsp_main { + filter: sepia(0) saturate(0.8) opacity(0.85) hue-rotate(360deg) grayscale(0.05) brightness(0.85) invert(0.04); + /* border-bottom: 1px solid var(--ls-quaternary-background-color); */ +} +/* }} */ + +/* {{ 4.2. Table of Contents Plugin */ +[id*="logseq-tocgen--toc-slot"] { + padding-left: 0.5em; +} +.kef-tocgen-page span { + position: relative; + top: -0.1em; +} +.kef-tocgen-block-collapse { + border-color: var(--ls-quaternary-background-color) !important; +} +.kef-tocgen-page::before, +.kef-tocgen-block::before { + position: relative; + top: 0.7em; + left: 0.5em; + z-index: 1; + display: inline-block; + width: 0.375em; + height: 0.4em; + border-radius: 50%; + background-color: var(--ls-block-bullet-color); + content: " "; + pointer-events: none; +} +[data-ref="logseq-tocgen"] .kef-tocgen-block-children { + margin-left: 1.2em; +} +button.kef-tocgen-arrow { + position: relative; + margin: 0; + margin-left: -0.75em; + padding: 0; + padding-left: 1.2em; +} +button.kef-tocgen-arrow svg { + position: relative; + top: 0.05em; + left: -0.53em; + width: 0.8em; + height: 0.8em; + border-radius: 50%; + background-color: var(--ls-block-bullet-border-color); + color: transparent; +} +.kef-tocgen-page button.kef-tocgen-arrow svg { + top: -0.095em; + left: -0.54em; +} +button.kef-tocgen-arrow svg[style*="transform"] { + left: -1.2em; + margin-right: 0.3em; + width: 0.5em; + height: 0.5em; + background-color: transparent; + filter: none; +} +button.kef-tocgen-arrow:hover svg[style*="transform"] { + color: var(--ls-link-text-color); +} +/* <== }}} */ \ No newline at end of file diff --git a/logseq/bak/logseq/custom/2023-04-30T03_49_06.397Z.Desktop.css b/logseq/bak/logseq/custom/2023-04-30T03_49_06.397Z.Desktop.css new file mode 100644 index 0000000..9463025 --- /dev/null +++ b/logseq/bak/logseq/custom/2023-04-30T03_49_06.397Z.Desktop.css @@ -0,0 +1,727 @@ +/* Table of Contents +{{{ ==> +1. Global + 1.1. Color Palette & Variables + 1.2. Layout Corrections + 1.3. Typography + 1.4. Links & Buttons +2. Page Components + 2.1. Content Blocks + 2.2. Tasks + 2.3. Code + 2.4. PDF Viewer +3. Bullet threading +4. Plugin specific + 4.1. Tabs + 4.2. Table of Contents +<== }}} */ + +/* { == 1. Global ==> */ +:root { + font-size: 1.0375rem; +} + +/* {{ 1.1.Color Palette & Variables */ +/* Styles that apply to both dark & light mode */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"], +.white-theme { + --ls-font-family: "Noto Sans CJK SC", sans-serif; + --ls-main-content-max-width: 860px; + --ls-page-text-size: 1em; + --ls-page-title-size: 2rem; + --ls-link-ref-text-color: var(--ls-link-text-color); + --ls-link-ref-text-hover-color: var(--ls-link-text-hover-color); + --ls-head-text-color: var(--ls-link-text-color); + --ls-title-text-color: var(--ls-primary-text-color); + --ls-tag-text-color: var(--ls-link-text-color); + --ls-tag-text-hover-color: var(--ls-link-text-hover-color); + --ls-search-background-color: var(--ls-secondary-background-color); + --ls-border-color: var(--ls-quaternary-background-color); + --ls-secondary-border-color: var(--ls-secondary-text-color); + --ls-page-properties-background-color: var(--ls-secondary-background-color); + --ls-block-properties-background-color: var(--ls-secondary-background-color); + --ls-block-ref-link-text-color: var(--ls-link-text-color); + --ls-a-chosen-bg: var(--ls-secondary-background-color); + --ls-page-blockquote-color: var(--ls-primary-text-color); + --ls-page-blockquote-bg-color: var(--ls-secondary-background-color); + --ls-page-blockquote-border-color: var(--ls-border-color); + --ls-icon-color: var(--ls-link-text-color); + --ls-search-icon-color: var(--ls-link-text-color); + --color-level-1: var(--ls-secondary-background-color); + --color-level-2: var(--ls-tertiary-background-color); + --color-level-3: var(--ls-quaternary-background-color); + --ls-scrollbar-background-color: var(--ls-primary-background-color); + --ls-page-inline-code-color: var(--ls-primary-text-color); + --ls-block-bullet-color: var(--ls-quaternary-background-color); + --ls-block-bullet-active-color: var(--ls-link-text-color); + --ls-block-bullet-threading-width: 1px; + --ls-bullet-closed-color: var(--ls-secondary-text-color); +} +/* Dark theme & Light themes left sidebar */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"] .left-sidebar-inner, +html[data-theme="light"] .ls-left-sidebar-open .cp__header > .l { + --ls-accent-rgb: 178, 219, 219; + --ls-primary-background-color: #1f2428; + --ls-secondary-background-color: #24292e; + --ls-tertiary-background-color: #282e34; + --ls-quaternary-background-color: #292e33; + --ls-selection-background-color: rgba(246, 246, 246, 0.1); + --ls-table-tr-even-background-color: rgba(246, 246, 246, 0.065); + --ls-active-primary-color: #8ec2c2; + --ls-active-secondary-color: #eeffff; + --ls-guideline-color: rgba(246, 246, 246, 0.2); + --primary-text-opacity: 0.98; + --ls-primary-text-color: rgba(195, 200, 205, var(--primary-text-opacity)); + --ls-secondary-text-color: rgba(195, 200, 205, 0.66); + --ls-link-text-color: rgba(var(--ls-accent-rgb), var(--primary-text-opacity)); + --ls-link-text-hover-color: rgba(244, 244, 244, var(--primary-text-opacity)); + --ls-menu-hover-color: var(--ls-secondary-background-color); + --ls-slide-background-color: var(--ls-primary-background-color); + --ls-block-highlight-color: rgba(246, 246, 246, 0.1); + --ls-page-inline-code-bg-color: rgba(246, 246, 246, 0.2); + --ls-scrollbar-foreground-color: rgba(246, 246, 246, 0.15); + --ls-scrollbar-thumb-hover-color: rgba(246, 246, 246, 0.3); + --ls-right-sidebar-code-bg-color: var(--ls-page-inline-code-bg-color); + --ls-block-bullet-border-color: rgba(246, 246, 246, 0.15); +} +/* Light theme */ +html[data-theme="light"], +.white-theme { + --ls-accent-rgb: 30, 125, 124; + --ls-primary-background-color: #f0f0f1; + --ls-secondary-background-color: #e8e9ea; + --ls-tertiary-background-color: rgba(225, 225, 225, 0.9); + --ls-quaternary-background-color: #e0e1e1; + --ls-selection-background-color: rgba(0, 0, 0, 0.1); + --ls-active-primary-color: #8ec2c2; + --ls-secondary-text-color: rgba(33, 33, 33, 0.8); + --ls-link-text-color: rgba(var(--ls-accent-rgb), 0.9); + --ls-link-text-hover-color: rgba(var(--ls-accent-rgb), 1); + --ls-page-inline-code-bg-color: rgba(0, 0, 0, 0.1); + --ls-page-blockquote-border-color: rgba(var(--ls-accent-rgb), 0.25); + --ls-scrollbar-foreground-color: rgba(0, 0, 0, 0.2); + --ls-scrollbar-thumb-hover-color: rgba(0, 0, 0, 0.3); + --ls-block-bullet-active-color: #86b6b6; + --ls-block-bullet-border-color: rgba(128, 128, 128, 0.1); +} +/* }} */ + +/* {{ 1.2. Layout corrections */ +/* Helps to not overlap content with tabs plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +/* Add some white space to the right. +(This is because the actual start of the content on the left side is offset if we include the bullets and spacing.) */ +.cp__sidebar-main-content { + margin-right: 24px; +} +/* }} */ + +/* {{ 1.3. Typography */ +/* Headings */ +.editor-inner .uniline-block:is(.h1, .h2, .h3, .h4, .h5, .h6), +.editor-inner :is(.h1, .h2, .h3, .h4, .h5, .h6), +.ls-block :is(h1, h2, h3, h4, h5, h6) { + position: relative; + margin: 0; +} +.editor-inner .uniline-block:is(.h1), +.editor-inner :is(.h1), +.ls-block :is(h1) { + top: 0.15em; + margin: -0.15em 0 0.15em; +} +.editor-inner .uniline-block:is(.h2), +.editor-inner :is(.h2), +.ls-block :is(h2) { + top: -0.1em; + /* positive margin leaves a gap between bullet and indentation lines */ + /* margin: 0.25em 0 0; */ +} +.editor-inner .uniline-block:is(.h3, .h4, .h5, .h6), +.editor-inner :is(.h3, .h4, .h5, .h6), +.ls-block :is(h3, h4) { + top: -0.25em; + margin: 0.25em 0 -0.25em; +} +.editor-inner .uniline-block:is(.h3), +.editor-inner :is(.h3), +.ls-block :is(h3) { + font-size: 1.2em; +} +.editor-inner .uniline-block:is(.h4), +.editor-inner :is(.h4), +.ls-block :is(h4) { + font-size: 1.1em; +} +.editor-inner .uniline-block:is(.h5), +.editor-inner :is(.h5), +.ls-block :is(h5) { + font-size: 1.05em; +} +.editor-inner .uniline-block:is(.h6), +.editor-inner :is(.h6), +.ls-block :is(h6) { + font-size: 1em; +} +.cp__themes-installed > .it > section > strong { + font-size: 0.875em; +} +/* }} */ + +/* {{ 1.4. Links & Buttons */ +html[data-theme="light"] .cp__header a, +html[data-theme="light"] .cp__header button, +html[data-theme="light"] .extensions__pdf-toolbar > .inner > .r a, +html[data-theme="light"] a svg { + color: #6d7272; +} +.cp__header .add-graph-btn { + border: none; +} +.cp__header .add-graph-btn span { + margin-top: 0 !important; +} +html[data-theme="light"] .cp__sidebar-left-layout a { + color: var(--ls-secondary-text-color); +} +html[data-theme="light"] h1 a { + color: var(--ls-title-text-color); +} +html[data-theme="light"] a:hover { + background-color: var(--ls-quaternary-background-color); + color: var(--ls-primary-text-color); +} +/* External Links */ +a.external-link { + border-bottom: 1px dashed; +} +a.external-link::after { + position: relative; + bottom: -2px; + left: -1px; + display: inline-block; + margin: 0 1px 0 5px; + width: 14px; + height: 14px; + background-color: var(--ls-link-text-color); + content: ""; + transition: 0.3s; + + mask-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + -webkit-mask-box-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + mask-position: center; + -webkit-mask-box-position: center; + mask-repeat: no-repeat; + -webkit-mask-box-repeat: no-repeat; + mask-size: 14px 14px; + -webkit-mask-box-size: 14px 14px; + object-fit: cover; +} +a.external-link:hover::after { + background-color: var(--ls-link-text-hover-color); +} +/* custom colors in buttons, hints etc */ +.bg-indigo-600 { + color: var(--ls-primary-background-color); + transition: 0.3s; +} +.dark-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.8); +} +.dark-theme .hover\:bg-indigo-700:hover, +.hover\:bg-indigo-500:hover { + background-color: rgb(var(--ls-accent-rgb)); + opacity: 1; +} +.dark-theme button.bg-white { + border-color: var(--ls-block-bullet-border-color); + background-color: var(--ls-secondary-background-color); + color: var(--ls-secondary-text-color); +} +.dark-theme button.bg-white:hover { + background-color: var(--ls-tertiary-background-color); + color: var(--ls-primary-text-color); +} +.white-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +.white-theme .hover\:bg-indigo-700:hover { + background-color: rgba(var(--ls-accent-rgb), 0.8); + opacity: 1; +} +/* pre */ +.hljs { + background: transparent; +} +/* hints */ +.dark-theme .Tooltip__label { + width: 11ch; + border: 1px solid var(--ls-primary-text-color); + background: var(--ls-secondary-background-color); +} +.dark-theme .Tooltip__label::after { + border-bottom-color: var(--ls-primary-text-color); +} +/* block references link count mark */ +a.open-block-ref-link { + background-color: var(--ls-link-text-color); + color: var(--ls-primary-background-color); +} +/* brackets in links */ +.page-reference .bracket { + color: var(--ls-link-text-color); + opacity: 0.5; +} +/* Tags */ +a.tag[data-ref] { + padding: 0.2rem 0.3rem; + border-radius: 0.5rem 0rem; + background: var(--ls-link-text-color); + color: var(--ls-primary-background-color); + white-space: nowrap; + letter-spacing: 0.05em; + font-weight: bold; + font-size: 0.75rem; + line-height: 0.75rem; + transition: 0.3s; +} +html[data-theme="light"] a.tag[data-ref] { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +a.tag[data-ref]:hover { + border-radius: 0rem 0.5rem; + opacity: 1; +} +html[data-theme="light"] a.tag[data-ref]:hover { + color: var(--ls-primary-background-color); +} +/* Highlights */ +/*mark { + padding: 2px 4px; + border-radius: 3px; + background: rgba(246, 246, 246, 0.8); + color: var(--ls-primary-background-color); + font-size: 14px; +}*/ +mark { + background: transparent; + padding: 0; + color: inherit; + font-size: inherit; + text-decoration-style: solid; + text-decoration: underline; + text-decoration-color: var(--ls-active-primary-color); + text-decoration-thickness: 4px; + text-underline-offset: -1px; + text-decoration-skip-ink: none; +} +html[data-theme="dark"] mark { + text-decoration-color: var(--ls-active-primary-color); +} +/* fix color page-reference when mark text */ +mark .page-ref, +mark .page-reference .bracket { + color: var(--ls-primary-background-color); + font-weight: bold; +} +/* Search results */ +html[data-theme="light"] .search-results-wrap a .rounded.border { + border-color: var(--ls-tertiary-background-color); + background-color: var(--ls-primary-background-color); +} +/* <== }}} */ + +/* { == 2. Page Components ==> */ +/* {{ 2.1. Content Blocks */ +.block-body ul > li { + margin: 0.5em 0; +} +.block-body ul > li:first-child { + margin-top: 0; +} +.block-body ul > li:last-child { + margin-bottom: 0; +} +.ls-block { + padding: 0.3em 0; +} +.ls-block[level="1"] { + padding-top: 0.6em; +} +.block-children { + padding: 0.16em 0; +} +#lazy-blocks > div .ls-block[haschild] > div > .block-content-wrapper::before { + top: 0.9rem; +} +/* }} */ + +/* {{ 2.2. Tasks */ +/* Checkboxes */ +.form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.9em; + height: 0.9em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +/* Status switcher */ +.marker-switch { + position: relative; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.15em 0; + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.8em; + line-height: 1; + opacity: 0.66; + cursor: pointer; +} +.form-checkbox:hover { + background-color: var(--ls-secondary-background-color); + border-color: var(--ls-link-text-color); + opacity: 0.9; + transform: none; +} +.form-checkbox:checked { + border-color: var(--ls-secondary-text-color); + background-color: var(--ls-secondary-background-color); +} +html[data-theme="light"] .form-checkbox:checked { + background-color: var(--ls-active-primary-color); +} +/* Status switcher */ +/* Status switcher - bordered variant */ +/* .form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.95em; + height: 0.95em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +.marker-switch { + position: relative; + top: -0.1em; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.33em 0.033em; + border: 0.1em solid var(--ls-border-color); + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.7em; + line-height: 1; + opacity: 1; + opacity: 0.75; + cursor: pointer; +} */ +.dark-theme .marker-switch:hover { + border-color: var(--ls-link-text-color); + color: var(--ls-link-text-color); +} +.canceled, +.done { + opacity: 0.5; +} +.done { + text-decoration: none; +} +/* }} */ + +/* {{ 2.3. Code */ +/* Inline code */ +:not(pre) > code { + padding: 2px 5px !important; +} +.extensions__code .code-editor { + margin-top: 0; +} +/* Code Calc result position fix */ +.extensions__code-calc { + top: 11px; + padding: 0 0.75em; +} +.extensions__code-lang { + background: var(--ls-secondary-background-color); +} +/* CodeMirror */ +.CodeMirror { + border-radius: 0.25rem; + background: var(--ls-secondary-background-color); + font-family: "Consolas", "Maple Mono SC NF",monospace; + line-height: 1.2; +} +.CodeMirror-hscrollbar { + cursor: default; +} +.cm-s-solarized.cm-s-dark, +.cm-s-solarized.cm-s-white, +.cm-s-solarized.cm-s-light { + border: 7px solid var(--ls-secondary-background-color); + background-color: var(--ls-primary-background-color); + color: var(--ls-primary-text-color); + text-shadow: none; +} +.CodeMirror-gutters { + background-color: #f7f7f7; +} +.cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.5); +} +html[data-theme="light"] .cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.1); +} +.cm-s-solarized.cm-s-light .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.033); +} +.CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark .CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.cm-s-solarized.cm-s-light div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-focused .CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-lines { + padding-right: 1em; +} +/* }} */ + +/* {{ 2.4. PDF Viewer */ +#pdf-layout-container[data-theme="dark"], +#pdf-layout-container[data-theme="light"] { + background-color: var(--ls-quaternary-background-color); +} +#pdf-layout-container[data-theme="dark"] .textLayer { + background-color: #282e34; +} +#pdf-layout-container[data-theme="light"] .textLayer { + background-color: var(--ls-primary-background-color); + opacity: 0.125; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + right: 0; + width: 100%; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner { + margin-right: 1em; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner .buttons, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner .buttons { + border-radius: 0.25rem; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, var(--ls-secondary-background-color) 100%); +} +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, rgb(31, 36, 40, 0.3) 100%); +} +/* <== }}} */ + +/* { == 3. Bullet Threading ==> */ +:not(:dsl-query) .block-control { + min-width: 0; + width: 1.55em; +} +.block-children { + border-color: var(--ls-quaternary-background-color); + border-left-width: var(--ls-block-bullet-threading-width); + border-radius: 0; +} +.block-children-left-border:hover { + background-color: var(--ls-block-bullet-border-color); +} +.block-content-wrapper { + position: relative; +} +.bullet-container { + position: relative; + width: 14px !important; + height: 14px !important; + transform: translate(1px, -1px); + /* align-items: end; */ +} +/* Block bullet path in nested block only */ +.ls-block .bullet { + background-color: var(--ls-block-bullet-active-color); + box-shadow: 0 0 0 1px var(--ls-block-bullet-active-color); +} +.ls-block div.items-center { + position: relative; +} +.ls-block > .items-baseline { + align-items: center; +} +.ls-block:not(:focus-within) .bullet { + background-color: var(--ls-block-bullet-color); + box-shadow: none; + transform: scale(1); +} +.ls-block:not(:focus-within) > .items-baseline { + align-items: center; +} +.ls-block .ls-block > div > div.items-center::before { + position: absolute; + top: calc(-100% + var(--ls-block-bullet-threading-width) * 0.5 - 0.1em); + right: 6px; + bottom: 50%; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-bottom: var(--ls-block-bullet-threading-width) solid transparent; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + border-bottom-left-radius: 6px; + content: ""; + pointer-events: none; +} +.ls-block .ls-block:focus-within > div > div.items-center::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children > .ls-block::before { + position: absolute; + top: -1.19em; + bottom: 0; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block .block-children:focus-within > .ls-block:not(:focus-within)::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children:focus-within > .ls-block:focus-within ~ .ls-block::before { + border-color: transparent; +} +.ls-block[haschild] > div > .block-content-wrapper::before { + position: absolute; + top: 0.9em; + bottom: 0; + left: -1em; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block[haschild]:focus-within > div > .block-content-wrapper .block-content::before { + border-color: var(--ls-block-bullet-active-color); +} +/* disable first fracking level for embedded content */ +.embed > div > div > div > div > div > div::before, +.embed-block > div > div > div > div > div > div > div::before, +.custom-query .blocks-container > div > div > .ls-block > div > .items-center::before { + border-color: transparent !important; +} +/* algin embeded pages to content width */ +.block-content .flex-1 { + overflow: hidden; +} +/* disable for doc mode */ +.doc-mode div.items-center::before, +.doc-mode div.items-center::after, +.doc-mode .ls-block::before, +.doc-mode .ls-block::after { + display: none; +} +/* <== }}} */ + +/* { == 4. Plugin specific ==> */ +/* {{ 4.1. Tabs Plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +html[data-theme="dark"] #logseq-tabs_lsp_main { + filter: sepia(0) saturate(0.8) opacity(0.85) hue-rotate(360deg) grayscale(0.05) brightness(0.85) invert(0.04); + /* border-bottom: 1px solid var(--ls-quaternary-background-color); */ +} +/* }} */ + +/* {{ 4.2. Table of Contents Plugin */ +[id*="logseq-tocgen--toc-slot"] { + padding-left: 0.5em; +} +.kef-tocgen-page span { + position: relative; + top: -0.1em; +} +.kef-tocgen-block-collapse { + border-color: var(--ls-quaternary-background-color) !important; +} +.kef-tocgen-page::before, +.kef-tocgen-block::before { + position: relative; + top: 0.7em; + left: 0.5em; + z-index: 1; + display: inline-block; + width: 0.375em; + height: 0.4em; + border-radius: 50%; + background-color: var(--ls-block-bullet-color); + content: " "; + pointer-events: none; +} +[data-ref="logseq-tocgen"] .kef-tocgen-block-children { + margin-left: 1.2em; +} +button.kef-tocgen-arrow { + position: relative; + margin: 0; + margin-left: -0.75em; + padding: 0; + padding-left: 1.2em; +} +button.kef-tocgen-arrow svg { + position: relative; + top: 0.05em; + left: -0.53em; + width: 0.8em; + height: 0.8em; + border-radius: 50%; + background-color: var(--ls-block-bullet-border-color); + color: transparent; +} +.kef-tocgen-page button.kef-tocgen-arrow svg { + top: -0.095em; + left: -0.54em; +} +button.kef-tocgen-arrow svg[style*="transform"] { + left: -1.2em; + margin-right: 0.3em; + width: 0.5em; + height: 0.5em; + background-color: transparent; + filter: none; +} +button.kef-tocgen-arrow:hover svg[style*="transform"] { + color: var(--ls-link-text-color); +} +/* <== }}} */ \ No newline at end of file diff --git a/logseq/bak/logseq/custom/2023-04-30T03_49_19.592Z.Desktop.css b/logseq/bak/logseq/custom/2023-04-30T03_49_19.592Z.Desktop.css new file mode 100644 index 0000000..cd953ab --- /dev/null +++ b/logseq/bak/logseq/custom/2023-04-30T03_49_19.592Z.Desktop.css @@ -0,0 +1,727 @@ +/* Table of Contents +{{{ ==> +1. Global + 1.1. Color Palette & Variables + 1.2. Layout Corrections + 1.3. Typography + 1.4. Links & Buttons +2. Page Components + 2.1. Content Blocks + 2.2. Tasks + 2.3. Code + 2.4. PDF Viewer +3. Bullet threading +4. Plugin specific + 4.1. Tabs + 4.2. Table of Contents +<== }}} */ + +/* { == 1. Global ==> */ +:root { + font-size: 1.0375rem; +} + +/* {{ 1.1.Color Palette & Variables */ +/* Styles that apply to both dark & light mode */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"], +.white-theme { + --ls-font-family: "Noto Sans CJK SC", sans-serif; + --ls-main-content-max-width: 860px; + --ls-page-text-size: 1em; + --ls-page-title-size: 2rem; + --ls-link-ref-text-color: var(--ls-link-text-color); + --ls-link-ref-text-hover-color: var(--ls-link-text-hover-color); + --ls-head-text-color: var(--ls-link-text-color); + --ls-title-text-color: var(--ls-primary-text-color); + --ls-tag-text-color: var(--ls-link-text-color); + --ls-tag-text-hover-color: var(--ls-link-text-hover-color); + --ls-search-background-color: var(--ls-secondary-background-color); + --ls-border-color: var(--ls-quaternary-background-color); + --ls-secondary-border-color: var(--ls-secondary-text-color); + --ls-page-properties-background-color: var(--ls-secondary-background-color); + --ls-block-properties-background-color: var(--ls-secondary-background-color); + --ls-block-ref-link-text-color: var(--ls-link-text-color); + --ls-a-chosen-bg: var(--ls-secondary-background-color); + --ls-page-blockquote-color: var(--ls-primary-text-color); + --ls-page-blockquote-bg-color: var(--ls-secondary-background-color); + --ls-page-blockquote-border-color: var(--ls-border-color); + --ls-icon-color: var(--ls-link-text-color); + --ls-search-icon-color: var(--ls-link-text-color); + --color-level-1: var(--ls-secondary-background-color); + --color-level-2: var(--ls-tertiary-background-color); + --color-level-3: var(--ls-quaternary-background-color); + --ls-scrollbar-background-color: var(--ls-primary-background-color); + --ls-page-inline-code-color: var(--ls-primary-text-color); + --ls-block-bullet-color: var(--ls-quaternary-background-color); + --ls-block-bullet-active-color: var(--ls-link-text-color); + --ls-block-bullet-threading-width: 1px; + --ls-bullet-closed-color: var(--ls-secondary-text-color); +} +/* Dark theme & Light themes left sidebar */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"] .left-sidebar-inner, +html[data-theme="light"] .ls-left-sidebar-open .cp__header > .l { + --ls-accent-rgb: 178, 219, 219; + --ls-primary-background-color: #1f2428; + --ls-secondary-background-color: #24292e; + --ls-tertiary-background-color: #282e34; + --ls-quaternary-background-color: #292e33; + --ls-selection-background-color: rgba(246, 246, 246, 0.1); + --ls-table-tr-even-background-color: rgba(246, 246, 246, 0.065); + --ls-active-primary-color: #8ec2c2; + --ls-active-secondary-color: #eeffff; + --ls-guideline-color: rgba(246, 246, 246, 0.2); + --primary-text-opacity: 0.98; + --ls-primary-text-color: rgba(195, 200, 205, var(--primary-text-opacity)); + --ls-secondary-text-color: rgba(195, 200, 205, 0.66); + --ls-link-text-color: rgba(var(--ls-accent-rgb), var(--primary-text-opacity)); + --ls-link-text-hover-color: rgba(244, 244, 244, var(--primary-text-opacity)); + --ls-menu-hover-color: var(--ls-secondary-background-color); + --ls-slide-background-color: var(--ls-primary-background-color); + --ls-block-highlight-color: rgba(246, 246, 246, 0.1); + --ls-page-inline-code-bg-color: rgba(246, 246, 246, 0.2); + --ls-scrollbar-foreground-color: rgba(246, 246, 246, 0.15); + --ls-scrollbar-thumb-hover-color: rgba(246, 246, 246, 0.3); + --ls-right-sidebar-code-bg-color: var(--ls-page-inline-code-bg-color); + --ls-block-bullet-border-color: rgba(246, 246, 246, 0.15); +} +/* Light theme */ +html[data-theme="light"], +.white-theme { + --ls-accent-rgb: 30, 125, 124; + --ls-primary-background-color: #f0f0f1; + --ls-secondary-background-color: #e8e9ea; + --ls-tertiary-background-color: rgba(225, 225, 225, 0.9); + --ls-quaternary-background-color: #e0e1e1; + --ls-selection-background-color: rgba(0, 0, 0, 0.1); + --ls-active-primary-color: #8ec2c2; + --ls-secondary-text-color: rgba(33, 33, 33, 0.8); + --ls-link-text-color: rgba(var(--ls-accent-rgb), 0.9); + --ls-link-text-hover-color: rgba(var(--ls-accent-rgb), 1); + --ls-page-inline-code-bg-color: rgba(0, 0, 0, 0.1); + --ls-page-blockquote-border-color: rgba(var(--ls-accent-rgb), 0.25); + --ls-scrollbar-foreground-color: rgba(0, 0, 0, 0.2); + --ls-scrollbar-thumb-hover-color: rgba(0, 0, 0, 0.3); + --ls-block-bullet-active-color: #86b6b6; + --ls-block-bullet-border-color: rgba(128, 128, 128, 0.1); +} +/* }} */ + +/* {{ 1.2. Layout corrections */ +/* Helps to not overlap content with tabs plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +/* Add some white space to the right. +(This is because the actual start of the content on the left side is offset if we include the bullets and spacing.) */ +.cp__sidebar-main-content { + margin-right: 24px; +} +/* }} */ + +/* {{ 1.3. Typography */ +/* Headings */ +.editor-inner .uniline-block:is(.h1, .h2, .h3, .h4, .h5, .h6), +.editor-inner :is(.h1, .h2, .h3, .h4, .h5, .h6), +.ls-block :is(h1, h2, h3, h4, h5, h6) { + position: relative; + margin: 0; +} +.editor-inner .uniline-block:is(.h1), +.editor-inner :is(.h1), +.ls-block :is(h1) { + top: 0.15em; + margin: -0.15em 0 0.15em; +} +.editor-inner .uniline-block:is(.h2), +.editor-inner :is(.h2), +.ls-block :is(h2) { + top: -0.1em; + /* positive margin leaves a gap between bullet and indentation lines */ + /* margin: 0.25em 0 0; */ +} +.editor-inner .uniline-block:is(.h3, .h4, .h5, .h6), +.editor-inner :is(.h3, .h4, .h5, .h6), +.ls-block :is(h3, h4) { + top: -0.25em; + margin: 0.25em 0 -0.25em; +} +.editor-inner .uniline-block:is(.h3), +.editor-inner :is(.h3), +.ls-block :is(h3) { + font-size: 1.2em; +} +.editor-inner .uniline-block:is(.h4), +.editor-inner :is(.h4), +.ls-block :is(h4) { + font-size: 1.1em; +} +.editor-inner .uniline-block:is(.h5), +.editor-inner :is(.h5), +.ls-block :is(h5) { + font-size: 1.05em; +} +.editor-inner .uniline-block:is(.h6), +.editor-inner :is(.h6), +.ls-block :is(h6) { + font-size: 1em; +} +.cp__themes-installed > .it > section > strong { + font-size: 0.875em; +} +/* }} */ + +/* {{ 1.4. Links & Buttons */ +html[data-theme="light"] .cp__header a, +html[data-theme="light"] .cp__header button, +html[data-theme="light"] .extensions__pdf-toolbar > .inner > .r a, +html[data-theme="light"] a svg { + color: #6d7272; +} +.cp__header .add-graph-btn { + border: none; +} +.cp__header .add-graph-btn span { + margin-top: 0 !important; +} +html[data-theme="light"] .cp__sidebar-left-layout a { + color: var(--ls-secondary-text-color); +} +html[data-theme="light"] h1 a { + color: var(--ls-title-text-color); +} +html[data-theme="light"] a:hover { + background-color: var(--ls-quaternary-background-color); + color: var(--ls-primary-text-color); +} +/* External Links */ +a.external-link { + border-bottom: 1px dashed; +} +a.external-link::after { + position: relative; + bottom: -2px; + left: -1px; + display: inline-block; + margin: 0 1px 0 5px; + width: 14px; + height: 14px; + background-color: var(--ls-link-text-color); + content: ""; + transition: 0.3s; + + mask-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + -webkit-mask-box-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + mask-position: center; + -webkit-mask-box-position: center; + mask-repeat: no-repeat; + -webkit-mask-box-repeat: no-repeat; + mask-size: 14px 14px; + -webkit-mask-box-size: 14px 14px; + object-fit: cover; +} +a.external-link:hover::after { + background-color: var(--ls-link-text-hover-color); +} +/* custom colors in buttons, hints etc */ +.bg-indigo-600 { + color: var(--ls-primary-background-color); + transition: 0.3s; +} +.dark-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.8); +} +.dark-theme .hover\:bg-indigo-700:hover, +.hover\:bg-indigo-500:hover { + background-color: rgb(var(--ls-accent-rgb)); + opacity: 1; +} +.dark-theme button.bg-white { + border-color: var(--ls-block-bullet-border-color); + background-color: var(--ls-secondary-background-color); + color: var(--ls-secondary-text-color); +} +.dark-theme button.bg-white:hover { + background-color: var(--ls-tertiary-background-color); + color: var(--ls-primary-text-color); +} +.white-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +.white-theme .hover\:bg-indigo-700:hover { + background-color: rgba(var(--ls-accent-rgb), 0.8); + opacity: 1; +} +/* pre */ +.hljs { + background: transparent; +} +/* hints */ +.dark-theme .Tooltip__label { + width: 11ch; + border: 1px solid var(--ls-primary-text-color); + background: var(--ls-secondary-background-color); +} +.dark-theme .Tooltip__label::after { + border-bottom-color: var(--ls-primary-text-color); +} +/* block references link count mark */ +a.open-block-ref-link { + background-color: var(--ls-link-text-color); + color: var(--ls-primary-background-color); +} +/* brackets in links */ +.page-reference .bracket { + color: var(--ls-link-text-color); + opacity: 0.5; +} +/* Tags */ +a.tag[data-ref] { + padding: 0.2rem 0.3rem; + border-radius: 0.5rem 0rem; + background: var(--ls-link-text-color); + color: var(--ls-primary-background-color); + white-space: nowrap; + letter-spacing: 0.05em; + font-weight: bold; + font-size: 0.75rem; + line-height: 0.75rem; + transition: 0.3s; +} +html[data-theme="light"] a.tag[data-ref] { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +a.tag[data-ref]:hover { + border-radius: 0rem 0.5rem; + opacity: 1; +} +html[data-theme="light"] a.tag[data-ref]:hover { + color: var(--ls-primary-background-color); +} +/* Highlights */ +/*mark { + padding: 2px 4px; + border-radius: 3px; + background: rgba(246, 246, 246, 0.8); + color: var(--ls-primary-background-color); + font-size: 14px; +}*/ +mark { + background: transparent; + padding: 0; + color: inherit; + font-size: inherit; + text-decoration-style: solid; + text-decoration: underline; + text-decoration-color: rgba(255,255,102,0.5); + text-decoration-thickness: 4px; + text-underline-offset: -1px; + text-decoration-skip-ink: none; +} +html[data-theme="dark"] mark { + text-decoration-color: rgba(255,255,102,0.5); +} +/* fix color page-reference when mark text */ +mark .page-ref, +mark .page-reference .bracket { + color: var(--ls-primary-background-color); + font-weight: bold; +} +/* Search results */ +html[data-theme="light"] .search-results-wrap a .rounded.border { + border-color: var(--ls-tertiary-background-color); + background-color: var(--ls-primary-background-color); +} +/* <== }}} */ + +/* { == 2. Page Components ==> */ +/* {{ 2.1. Content Blocks */ +.block-body ul > li { + margin: 0.5em 0; +} +.block-body ul > li:first-child { + margin-top: 0; +} +.block-body ul > li:last-child { + margin-bottom: 0; +} +.ls-block { + padding: 0.3em 0; +} +.ls-block[level="1"] { + padding-top: 0.6em; +} +.block-children { + padding: 0.16em 0; +} +#lazy-blocks > div .ls-block[haschild] > div > .block-content-wrapper::before { + top: 0.9rem; +} +/* }} */ + +/* {{ 2.2. Tasks */ +/* Checkboxes */ +.form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.9em; + height: 0.9em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +/* Status switcher */ +.marker-switch { + position: relative; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.15em 0; + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.8em; + line-height: 1; + opacity: 0.66; + cursor: pointer; +} +.form-checkbox:hover { + background-color: var(--ls-secondary-background-color); + border-color: var(--ls-link-text-color); + opacity: 0.9; + transform: none; +} +.form-checkbox:checked { + border-color: var(--ls-secondary-text-color); + background-color: var(--ls-secondary-background-color); +} +html[data-theme="light"] .form-checkbox:checked { + background-color: var(--ls-active-primary-color); +} +/* Status switcher */ +/* Status switcher - bordered variant */ +/* .form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.95em; + height: 0.95em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +.marker-switch { + position: relative; + top: -0.1em; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.33em 0.033em; + border: 0.1em solid var(--ls-border-color); + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.7em; + line-height: 1; + opacity: 1; + opacity: 0.75; + cursor: pointer; +} */ +.dark-theme .marker-switch:hover { + border-color: var(--ls-link-text-color); + color: var(--ls-link-text-color); +} +.canceled, +.done { + opacity: 0.5; +} +.done { + text-decoration: none; +} +/* }} */ + +/* {{ 2.3. Code */ +/* Inline code */ +:not(pre) > code { + padding: 2px 5px !important; +} +.extensions__code .code-editor { + margin-top: 0; +} +/* Code Calc result position fix */ +.extensions__code-calc { + top: 11px; + padding: 0 0.75em; +} +.extensions__code-lang { + background: var(--ls-secondary-background-color); +} +/* CodeMirror */ +.CodeMirror { + border-radius: 0.25rem; + background: var(--ls-secondary-background-color); + font-family: "Consolas", "Maple Mono SC NF",monospace; + line-height: 1.2; +} +.CodeMirror-hscrollbar { + cursor: default; +} +.cm-s-solarized.cm-s-dark, +.cm-s-solarized.cm-s-white, +.cm-s-solarized.cm-s-light { + border: 7px solid var(--ls-secondary-background-color); + background-color: var(--ls-primary-background-color); + color: var(--ls-primary-text-color); + text-shadow: none; +} +.CodeMirror-gutters { + background-color: #f7f7f7; +} +.cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.5); +} +html[data-theme="light"] .cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.1); +} +.cm-s-solarized.cm-s-light .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.033); +} +.CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark .CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.cm-s-solarized.cm-s-light div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-focused .CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-lines { + padding-right: 1em; +} +/* }} */ + +/* {{ 2.4. PDF Viewer */ +#pdf-layout-container[data-theme="dark"], +#pdf-layout-container[data-theme="light"] { + background-color: var(--ls-quaternary-background-color); +} +#pdf-layout-container[data-theme="dark"] .textLayer { + background-color: #282e34; +} +#pdf-layout-container[data-theme="light"] .textLayer { + background-color: var(--ls-primary-background-color); + opacity: 0.125; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + right: 0; + width: 100%; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner { + margin-right: 1em; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner .buttons, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner .buttons { + border-radius: 0.25rem; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, var(--ls-secondary-background-color) 100%); +} +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, rgb(31, 36, 40, 0.3) 100%); +} +/* <== }}} */ + +/* { == 3. Bullet Threading ==> */ +:not(:dsl-query) .block-control { + min-width: 0; + width: 1.55em; +} +.block-children { + border-color: var(--ls-quaternary-background-color); + border-left-width: var(--ls-block-bullet-threading-width); + border-radius: 0; +} +.block-children-left-border:hover { + background-color: var(--ls-block-bullet-border-color); +} +.block-content-wrapper { + position: relative; +} +.bullet-container { + position: relative; + width: 14px !important; + height: 14px !important; + transform: translate(1px, -1px); + /* align-items: end; */ +} +/* Block bullet path in nested block only */ +.ls-block .bullet { + background-color: var(--ls-block-bullet-active-color); + box-shadow: 0 0 0 1px var(--ls-block-bullet-active-color); +} +.ls-block div.items-center { + position: relative; +} +.ls-block > .items-baseline { + align-items: center; +} +.ls-block:not(:focus-within) .bullet { + background-color: var(--ls-block-bullet-color); + box-shadow: none; + transform: scale(1); +} +.ls-block:not(:focus-within) > .items-baseline { + align-items: center; +} +.ls-block .ls-block > div > div.items-center::before { + position: absolute; + top: calc(-100% + var(--ls-block-bullet-threading-width) * 0.5 - 0.1em); + right: 6px; + bottom: 50%; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-bottom: var(--ls-block-bullet-threading-width) solid transparent; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + border-bottom-left-radius: 6px; + content: ""; + pointer-events: none; +} +.ls-block .ls-block:focus-within > div > div.items-center::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children > .ls-block::before { + position: absolute; + top: -1.19em; + bottom: 0; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block .block-children:focus-within > .ls-block:not(:focus-within)::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children:focus-within > .ls-block:focus-within ~ .ls-block::before { + border-color: transparent; +} +.ls-block[haschild] > div > .block-content-wrapper::before { + position: absolute; + top: 0.9em; + bottom: 0; + left: -1em; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block[haschild]:focus-within > div > .block-content-wrapper .block-content::before { + border-color: var(--ls-block-bullet-active-color); +} +/* disable first fracking level for embedded content */ +.embed > div > div > div > div > div > div::before, +.embed-block > div > div > div > div > div > div > div::before, +.custom-query .blocks-container > div > div > .ls-block > div > .items-center::before { + border-color: transparent !important; +} +/* algin embeded pages to content width */ +.block-content .flex-1 { + overflow: hidden; +} +/* disable for doc mode */ +.doc-mode div.items-center::before, +.doc-mode div.items-center::after, +.doc-mode .ls-block::before, +.doc-mode .ls-block::after { + display: none; +} +/* <== }}} */ + +/* { == 4. Plugin specific ==> */ +/* {{ 4.1. Tabs Plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +html[data-theme="dark"] #logseq-tabs_lsp_main { + filter: sepia(0) saturate(0.8) opacity(0.85) hue-rotate(360deg) grayscale(0.05) brightness(0.85) invert(0.04); + /* border-bottom: 1px solid var(--ls-quaternary-background-color); */ +} +/* }} */ + +/* {{ 4.2. Table of Contents Plugin */ +[id*="logseq-tocgen--toc-slot"] { + padding-left: 0.5em; +} +.kef-tocgen-page span { + position: relative; + top: -0.1em; +} +.kef-tocgen-block-collapse { + border-color: var(--ls-quaternary-background-color) !important; +} +.kef-tocgen-page::before, +.kef-tocgen-block::before { + position: relative; + top: 0.7em; + left: 0.5em; + z-index: 1; + display: inline-block; + width: 0.375em; + height: 0.4em; + border-radius: 50%; + background-color: var(--ls-block-bullet-color); + content: " "; + pointer-events: none; +} +[data-ref="logseq-tocgen"] .kef-tocgen-block-children { + margin-left: 1.2em; +} +button.kef-tocgen-arrow { + position: relative; + margin: 0; + margin-left: -0.75em; + padding: 0; + padding-left: 1.2em; +} +button.kef-tocgen-arrow svg { + position: relative; + top: 0.05em; + left: -0.53em; + width: 0.8em; + height: 0.8em; + border-radius: 50%; + background-color: var(--ls-block-bullet-border-color); + color: transparent; +} +.kef-tocgen-page button.kef-tocgen-arrow svg { + top: -0.095em; + left: -0.54em; +} +button.kef-tocgen-arrow svg[style*="transform"] { + left: -1.2em; + margin-right: 0.3em; + width: 0.5em; + height: 0.5em; + background-color: transparent; + filter: none; +} +button.kef-tocgen-arrow:hover svg[style*="transform"] { + color: var(--ls-link-text-color); +} +/* <== }}} */ \ No newline at end of file diff --git a/logseq/bak/logseq/custom/2023-04-30T03_49_28.379Z.Desktop.css b/logseq/bak/logseq/custom/2023-04-30T03_49_28.379Z.Desktop.css new file mode 100644 index 0000000..63b36ab --- /dev/null +++ b/logseq/bak/logseq/custom/2023-04-30T03_49_28.379Z.Desktop.css @@ -0,0 +1,727 @@ +/* Table of Contents +{{{ ==> +1. Global + 1.1. Color Palette & Variables + 1.2. Layout Corrections + 1.3. Typography + 1.4. Links & Buttons +2. Page Components + 2.1. Content Blocks + 2.2. Tasks + 2.3. Code + 2.4. PDF Viewer +3. Bullet threading +4. Plugin specific + 4.1. Tabs + 4.2. Table of Contents +<== }}} */ + +/* { == 1. Global ==> */ +:root { + font-size: 1.0375rem; +} + +/* {{ 1.1.Color Palette & Variables */ +/* Styles that apply to both dark & light mode */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"], +.white-theme { + --ls-font-family: "Noto Sans CJK SC", sans-serif; + --ls-main-content-max-width: 860px; + --ls-page-text-size: 1em; + --ls-page-title-size: 2rem; + --ls-link-ref-text-color: var(--ls-link-text-color); + --ls-link-ref-text-hover-color: var(--ls-link-text-hover-color); + --ls-head-text-color: var(--ls-link-text-color); + --ls-title-text-color: var(--ls-primary-text-color); + --ls-tag-text-color: var(--ls-link-text-color); + --ls-tag-text-hover-color: var(--ls-link-text-hover-color); + --ls-search-background-color: var(--ls-secondary-background-color); + --ls-border-color: var(--ls-quaternary-background-color); + --ls-secondary-border-color: var(--ls-secondary-text-color); + --ls-page-properties-background-color: var(--ls-secondary-background-color); + --ls-block-properties-background-color: var(--ls-secondary-background-color); + --ls-block-ref-link-text-color: var(--ls-link-text-color); + --ls-a-chosen-bg: var(--ls-secondary-background-color); + --ls-page-blockquote-color: var(--ls-primary-text-color); + --ls-page-blockquote-bg-color: var(--ls-secondary-background-color); + --ls-page-blockquote-border-color: var(--ls-border-color); + --ls-icon-color: var(--ls-link-text-color); + --ls-search-icon-color: var(--ls-link-text-color); + --color-level-1: var(--ls-secondary-background-color); + --color-level-2: var(--ls-tertiary-background-color); + --color-level-3: var(--ls-quaternary-background-color); + --ls-scrollbar-background-color: var(--ls-primary-background-color); + --ls-page-inline-code-color: var(--ls-primary-text-color); + --ls-block-bullet-color: var(--ls-quaternary-background-color); + --ls-block-bullet-active-color: var(--ls-link-text-color); + --ls-block-bullet-threading-width: 1px; + --ls-bullet-closed-color: var(--ls-secondary-text-color); +} +/* Dark theme & Light themes left sidebar */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"] .left-sidebar-inner, +html[data-theme="light"] .ls-left-sidebar-open .cp__header > .l { + --ls-accent-rgb: 178, 219, 219; + --ls-primary-background-color: #1f2428; + --ls-secondary-background-color: #24292e; + --ls-tertiary-background-color: #282e34; + --ls-quaternary-background-color: #292e33; + --ls-selection-background-color: rgba(246, 246, 246, 0.1); + --ls-table-tr-even-background-color: rgba(246, 246, 246, 0.065); + --ls-active-primary-color: #8ec2c2; + --ls-active-secondary-color: #eeffff; + --ls-guideline-color: rgba(246, 246, 246, 0.2); + --primary-text-opacity: 0.98; + --ls-primary-text-color: rgba(195, 200, 205, var(--primary-text-opacity)); + --ls-secondary-text-color: rgba(195, 200, 205, 0.66); + --ls-link-text-color: rgba(var(--ls-accent-rgb), var(--primary-text-opacity)); + --ls-link-text-hover-color: rgba(244, 244, 244, var(--primary-text-opacity)); + --ls-menu-hover-color: var(--ls-secondary-background-color); + --ls-slide-background-color: var(--ls-primary-background-color); + --ls-block-highlight-color: rgba(246, 246, 246, 0.1); + --ls-page-inline-code-bg-color: rgba(246, 246, 246, 0.2); + --ls-scrollbar-foreground-color: rgba(246, 246, 246, 0.15); + --ls-scrollbar-thumb-hover-color: rgba(246, 246, 246, 0.3); + --ls-right-sidebar-code-bg-color: var(--ls-page-inline-code-bg-color); + --ls-block-bullet-border-color: rgba(246, 246, 246, 0.15); +} +/* Light theme */ +html[data-theme="light"], +.white-theme { + --ls-accent-rgb: 30, 125, 124; + --ls-primary-background-color: #f0f0f1; + --ls-secondary-background-color: #e8e9ea; + --ls-tertiary-background-color: rgba(225, 225, 225, 0.9); + --ls-quaternary-background-color: #e0e1e1; + --ls-selection-background-color: rgba(0, 0, 0, 0.1); + --ls-active-primary-color: #8ec2c2; + --ls-secondary-text-color: rgba(33, 33, 33, 0.8); + --ls-link-text-color: rgba(var(--ls-accent-rgb), 0.9); + --ls-link-text-hover-color: rgba(var(--ls-accent-rgb), 1); + --ls-page-inline-code-bg-color: rgba(0, 0, 0, 0.1); + --ls-page-blockquote-border-color: rgba(var(--ls-accent-rgb), 0.25); + --ls-scrollbar-foreground-color: rgba(0, 0, 0, 0.2); + --ls-scrollbar-thumb-hover-color: rgba(0, 0, 0, 0.3); + --ls-block-bullet-active-color: #86b6b6; + --ls-block-bullet-border-color: rgba(128, 128, 128, 0.1); +} +/* }} */ + +/* {{ 1.2. Layout corrections */ +/* Helps to not overlap content with tabs plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +/* Add some white space to the right. +(This is because the actual start of the content on the left side is offset if we include the bullets and spacing.) */ +.cp__sidebar-main-content { + margin-right: 24px; +} +/* }} */ + +/* {{ 1.3. Typography */ +/* Headings */ +.editor-inner .uniline-block:is(.h1, .h2, .h3, .h4, .h5, .h6), +.editor-inner :is(.h1, .h2, .h3, .h4, .h5, .h6), +.ls-block :is(h1, h2, h3, h4, h5, h6) { + position: relative; + margin: 0; +} +.editor-inner .uniline-block:is(.h1), +.editor-inner :is(.h1), +.ls-block :is(h1) { + top: 0.15em; + margin: -0.15em 0 0.15em; +} +.editor-inner .uniline-block:is(.h2), +.editor-inner :is(.h2), +.ls-block :is(h2) { + top: -0.1em; + /* positive margin leaves a gap between bullet and indentation lines */ + /* margin: 0.25em 0 0; */ +} +.editor-inner .uniline-block:is(.h3, .h4, .h5, .h6), +.editor-inner :is(.h3, .h4, .h5, .h6), +.ls-block :is(h3, h4) { + top: -0.25em; + margin: 0.25em 0 -0.25em; +} +.editor-inner .uniline-block:is(.h3), +.editor-inner :is(.h3), +.ls-block :is(h3) { + font-size: 1.2em; +} +.editor-inner .uniline-block:is(.h4), +.editor-inner :is(.h4), +.ls-block :is(h4) { + font-size: 1.1em; +} +.editor-inner .uniline-block:is(.h5), +.editor-inner :is(.h5), +.ls-block :is(h5) { + font-size: 1.05em; +} +.editor-inner .uniline-block:is(.h6), +.editor-inner :is(.h6), +.ls-block :is(h6) { + font-size: 1em; +} +.cp__themes-installed > .it > section > strong { + font-size: 0.875em; +} +/* }} */ + +/* {{ 1.4. Links & Buttons */ +html[data-theme="light"] .cp__header a, +html[data-theme="light"] .cp__header button, +html[data-theme="light"] .extensions__pdf-toolbar > .inner > .r a, +html[data-theme="light"] a svg { + color: #6d7272; +} +.cp__header .add-graph-btn { + border: none; +} +.cp__header .add-graph-btn span { + margin-top: 0 !important; +} +html[data-theme="light"] .cp__sidebar-left-layout a { + color: var(--ls-secondary-text-color); +} +html[data-theme="light"] h1 a { + color: var(--ls-title-text-color); +} +html[data-theme="light"] a:hover { + background-color: var(--ls-quaternary-background-color); + color: var(--ls-primary-text-color); +} +/* External Links */ +a.external-link { + border-bottom: 1px dashed; +} +a.external-link::after { + position: relative; + bottom: -2px; + left: -1px; + display: inline-block; + margin: 0 1px 0 5px; + width: 14px; + height: 14px; + background-color: var(--ls-link-text-color); + content: ""; + transition: 0.3s; + + mask-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + -webkit-mask-box-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + mask-position: center; + -webkit-mask-box-position: center; + mask-repeat: no-repeat; + -webkit-mask-box-repeat: no-repeat; + mask-size: 14px 14px; + -webkit-mask-box-size: 14px 14px; + object-fit: cover; +} +a.external-link:hover::after { + background-color: var(--ls-link-text-hover-color); +} +/* custom colors in buttons, hints etc */ +.bg-indigo-600 { + color: var(--ls-primary-background-color); + transition: 0.3s; +} +.dark-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.8); +} +.dark-theme .hover\:bg-indigo-700:hover, +.hover\:bg-indigo-500:hover { + background-color: rgb(var(--ls-accent-rgb)); + opacity: 1; +} +.dark-theme button.bg-white { + border-color: var(--ls-block-bullet-border-color); + background-color: var(--ls-secondary-background-color); + color: var(--ls-secondary-text-color); +} +.dark-theme button.bg-white:hover { + background-color: var(--ls-tertiary-background-color); + color: var(--ls-primary-text-color); +} +.white-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +.white-theme .hover\:bg-indigo-700:hover { + background-color: rgba(var(--ls-accent-rgb), 0.8); + opacity: 1; +} +/* pre */ +.hljs { + background: transparent; +} +/* hints */ +.dark-theme .Tooltip__label { + width: 11ch; + border: 1px solid var(--ls-primary-text-color); + background: var(--ls-secondary-background-color); +} +.dark-theme .Tooltip__label::after { + border-bottom-color: var(--ls-primary-text-color); +} +/* block references link count mark */ +a.open-block-ref-link { + background-color: var(--ls-link-text-color); + color: var(--ls-primary-background-color); +} +/* brackets in links */ +.page-reference .bracket { + color: var(--ls-link-text-color); + opacity: 0.5; +} +/* Tags */ +a.tag[data-ref] { + padding: 0.2rem 0.3rem; + border-radius: 0.5rem 0rem; + background: var(--ls-link-text-color); + color: var(--ls-primary-background-color); + white-space: nowrap; + letter-spacing: 0.05em; + font-weight: bold; + font-size: 0.75rem; + line-height: 0.75rem; + transition: 0.3s; +} +html[data-theme="light"] a.tag[data-ref] { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +a.tag[data-ref]:hover { + border-radius: 0rem 0.5rem; + opacity: 1; +} +html[data-theme="light"] a.tag[data-ref]:hover { + color: var(--ls-primary-background-color); +} +/* Highlights */ +/*mark { + padding: 2px 4px; + border-radius: 3px; + background: rgba(246, 246, 246, 0.8); + color: var(--ls-primary-background-color); + font-size: 14px; +}*/ +mark { + background: transparent; + padding: 0; + color: inherit; + font-size: inherit; + text-decoration-style: solid; + text-decoration: underline; + text-decoration-color: rgba(255,255,102,0.3); + text-decoration-thickness: 4px; + text-underline-offset: -1px; + text-decoration-skip-ink: none; +} +html[data-theme="dark"] mark { + text-decoration-color: rgba(255,255,102,0.3); +} +/* fix color page-reference when mark text */ +mark .page-ref, +mark .page-reference .bracket { + color: var(--ls-primary-background-color); + font-weight: bold; +} +/* Search results */ +html[data-theme="light"] .search-results-wrap a .rounded.border { + border-color: var(--ls-tertiary-background-color); + background-color: var(--ls-primary-background-color); +} +/* <== }}} */ + +/* { == 2. Page Components ==> */ +/* {{ 2.1. Content Blocks */ +.block-body ul > li { + margin: 0.5em 0; +} +.block-body ul > li:first-child { + margin-top: 0; +} +.block-body ul > li:last-child { + margin-bottom: 0; +} +.ls-block { + padding: 0.3em 0; +} +.ls-block[level="1"] { + padding-top: 0.6em; +} +.block-children { + padding: 0.16em 0; +} +#lazy-blocks > div .ls-block[haschild] > div > .block-content-wrapper::before { + top: 0.9rem; +} +/* }} */ + +/* {{ 2.2. Tasks */ +/* Checkboxes */ +.form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.9em; + height: 0.9em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +/* Status switcher */ +.marker-switch { + position: relative; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.15em 0; + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.8em; + line-height: 1; + opacity: 0.66; + cursor: pointer; +} +.form-checkbox:hover { + background-color: var(--ls-secondary-background-color); + border-color: var(--ls-link-text-color); + opacity: 0.9; + transform: none; +} +.form-checkbox:checked { + border-color: var(--ls-secondary-text-color); + background-color: var(--ls-secondary-background-color); +} +html[data-theme="light"] .form-checkbox:checked { + background-color: var(--ls-active-primary-color); +} +/* Status switcher */ +/* Status switcher - bordered variant */ +/* .form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.95em; + height: 0.95em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +.marker-switch { + position: relative; + top: -0.1em; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.33em 0.033em; + border: 0.1em solid var(--ls-border-color); + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.7em; + line-height: 1; + opacity: 1; + opacity: 0.75; + cursor: pointer; +} */ +.dark-theme .marker-switch:hover { + border-color: var(--ls-link-text-color); + color: var(--ls-link-text-color); +} +.canceled, +.done { + opacity: 0.5; +} +.done { + text-decoration: none; +} +/* }} */ + +/* {{ 2.3. Code */ +/* Inline code */ +:not(pre) > code { + padding: 2px 5px !important; +} +.extensions__code .code-editor { + margin-top: 0; +} +/* Code Calc result position fix */ +.extensions__code-calc { + top: 11px; + padding: 0 0.75em; +} +.extensions__code-lang { + background: var(--ls-secondary-background-color); +} +/* CodeMirror */ +.CodeMirror { + border-radius: 0.25rem; + background: var(--ls-secondary-background-color); + font-family: "Consolas", "Maple Mono SC NF",monospace; + line-height: 1.2; +} +.CodeMirror-hscrollbar { + cursor: default; +} +.cm-s-solarized.cm-s-dark, +.cm-s-solarized.cm-s-white, +.cm-s-solarized.cm-s-light { + border: 7px solid var(--ls-secondary-background-color); + background-color: var(--ls-primary-background-color); + color: var(--ls-primary-text-color); + text-shadow: none; +} +.CodeMirror-gutters { + background-color: #f7f7f7; +} +.cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.5); +} +html[data-theme="light"] .cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.1); +} +.cm-s-solarized.cm-s-light .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.033); +} +.CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark .CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.cm-s-solarized.cm-s-light div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-focused .CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-lines { + padding-right: 1em; +} +/* }} */ + +/* {{ 2.4. PDF Viewer */ +#pdf-layout-container[data-theme="dark"], +#pdf-layout-container[data-theme="light"] { + background-color: var(--ls-quaternary-background-color); +} +#pdf-layout-container[data-theme="dark"] .textLayer { + background-color: #282e34; +} +#pdf-layout-container[data-theme="light"] .textLayer { + background-color: var(--ls-primary-background-color); + opacity: 0.125; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + right: 0; + width: 100%; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner { + margin-right: 1em; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner .buttons, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner .buttons { + border-radius: 0.25rem; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, var(--ls-secondary-background-color) 100%); +} +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, rgb(31, 36, 40, 0.3) 100%); +} +/* <== }}} */ + +/* { == 3. Bullet Threading ==> */ +:not(:dsl-query) .block-control { + min-width: 0; + width: 1.55em; +} +.block-children { + border-color: var(--ls-quaternary-background-color); + border-left-width: var(--ls-block-bullet-threading-width); + border-radius: 0; +} +.block-children-left-border:hover { + background-color: var(--ls-block-bullet-border-color); +} +.block-content-wrapper { + position: relative; +} +.bullet-container { + position: relative; + width: 14px !important; + height: 14px !important; + transform: translate(1px, -1px); + /* align-items: end; */ +} +/* Block bullet path in nested block only */ +.ls-block .bullet { + background-color: var(--ls-block-bullet-active-color); + box-shadow: 0 0 0 1px var(--ls-block-bullet-active-color); +} +.ls-block div.items-center { + position: relative; +} +.ls-block > .items-baseline { + align-items: center; +} +.ls-block:not(:focus-within) .bullet { + background-color: var(--ls-block-bullet-color); + box-shadow: none; + transform: scale(1); +} +.ls-block:not(:focus-within) > .items-baseline { + align-items: center; +} +.ls-block .ls-block > div > div.items-center::before { + position: absolute; + top: calc(-100% + var(--ls-block-bullet-threading-width) * 0.5 - 0.1em); + right: 6px; + bottom: 50%; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-bottom: var(--ls-block-bullet-threading-width) solid transparent; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + border-bottom-left-radius: 6px; + content: ""; + pointer-events: none; +} +.ls-block .ls-block:focus-within > div > div.items-center::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children > .ls-block::before { + position: absolute; + top: -1.19em; + bottom: 0; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block .block-children:focus-within > .ls-block:not(:focus-within)::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children:focus-within > .ls-block:focus-within ~ .ls-block::before { + border-color: transparent; +} +.ls-block[haschild] > div > .block-content-wrapper::before { + position: absolute; + top: 0.9em; + bottom: 0; + left: -1em; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block[haschild]:focus-within > div > .block-content-wrapper .block-content::before { + border-color: var(--ls-block-bullet-active-color); +} +/* disable first fracking level for embedded content */ +.embed > div > div > div > div > div > div::before, +.embed-block > div > div > div > div > div > div > div::before, +.custom-query .blocks-container > div > div > .ls-block > div > .items-center::before { + border-color: transparent !important; +} +/* algin embeded pages to content width */ +.block-content .flex-1 { + overflow: hidden; +} +/* disable for doc mode */ +.doc-mode div.items-center::before, +.doc-mode div.items-center::after, +.doc-mode .ls-block::before, +.doc-mode .ls-block::after { + display: none; +} +/* <== }}} */ + +/* { == 4. Plugin specific ==> */ +/* {{ 4.1. Tabs Plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +html[data-theme="dark"] #logseq-tabs_lsp_main { + filter: sepia(0) saturate(0.8) opacity(0.85) hue-rotate(360deg) grayscale(0.05) brightness(0.85) invert(0.04); + /* border-bottom: 1px solid var(--ls-quaternary-background-color); */ +} +/* }} */ + +/* {{ 4.2. Table of Contents Plugin */ +[id*="logseq-tocgen--toc-slot"] { + padding-left: 0.5em; +} +.kef-tocgen-page span { + position: relative; + top: -0.1em; +} +.kef-tocgen-block-collapse { + border-color: var(--ls-quaternary-background-color) !important; +} +.kef-tocgen-page::before, +.kef-tocgen-block::before { + position: relative; + top: 0.7em; + left: 0.5em; + z-index: 1; + display: inline-block; + width: 0.375em; + height: 0.4em; + border-radius: 50%; + background-color: var(--ls-block-bullet-color); + content: " "; + pointer-events: none; +} +[data-ref="logseq-tocgen"] .kef-tocgen-block-children { + margin-left: 1.2em; +} +button.kef-tocgen-arrow { + position: relative; + margin: 0; + margin-left: -0.75em; + padding: 0; + padding-left: 1.2em; +} +button.kef-tocgen-arrow svg { + position: relative; + top: 0.05em; + left: -0.53em; + width: 0.8em; + height: 0.8em; + border-radius: 50%; + background-color: var(--ls-block-bullet-border-color); + color: transparent; +} +.kef-tocgen-page button.kef-tocgen-arrow svg { + top: -0.095em; + left: -0.54em; +} +button.kef-tocgen-arrow svg[style*="transform"] { + left: -1.2em; + margin-right: 0.3em; + width: 0.5em; + height: 0.5em; + background-color: transparent; + filter: none; +} +button.kef-tocgen-arrow:hover svg[style*="transform"] { + color: var(--ls-link-text-color); +} +/* <== }}} */ \ No newline at end of file diff --git a/logseq/bak/logseq/custom/2023-04-30T03_51_56.008Z.Desktop.css b/logseq/bak/logseq/custom/2023-04-30T03_51_56.008Z.Desktop.css new file mode 100644 index 0000000..50be2b8 --- /dev/null +++ b/logseq/bak/logseq/custom/2023-04-30T03_51_56.008Z.Desktop.css @@ -0,0 +1,727 @@ +/* Table of Contents +{{{ ==> +1. Global + 1.1. Color Palette & Variables + 1.2. Layout Corrections + 1.3. Typography + 1.4. Links & Buttons +2. Page Components + 2.1. Content Blocks + 2.2. Tasks + 2.3. Code + 2.4. PDF Viewer +3. Bullet threading +4. Plugin specific + 4.1. Tabs + 4.2. Table of Contents +<== }}} */ + +/* { == 1. Global ==> */ +:root { + font-size: 1.0375rem; +} + +/* {{ 1.1.Color Palette & Variables */ +/* Styles that apply to both dark & light mode */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"], +.white-theme { + --ls-font-family: "Noto Sans CJK SC", sans-serif; + --ls-main-content-max-width: 860px; + --ls-page-text-size: 1em; + --ls-page-title-size: 2rem; + --ls-link-ref-text-color: var(--ls-link-text-color); + --ls-link-ref-text-hover-color: var(--ls-link-text-hover-color); + --ls-head-text-color: var(--ls-link-text-color); + --ls-title-text-color: var(--ls-primary-text-color); + --ls-tag-text-color: var(--ls-link-text-color); + --ls-tag-text-hover-color: var(--ls-link-text-hover-color); + --ls-search-background-color: var(--ls-secondary-background-color); + --ls-border-color: var(--ls-quaternary-background-color); + --ls-secondary-border-color: var(--ls-secondary-text-color); + --ls-page-properties-background-color: var(--ls-secondary-background-color); + --ls-block-properties-background-color: var(--ls-secondary-background-color); + --ls-block-ref-link-text-color: var(--ls-link-text-color); + --ls-a-chosen-bg: var(--ls-secondary-background-color); + --ls-page-blockquote-color: var(--ls-primary-text-color); + --ls-page-blockquote-bg-color: var(--ls-secondary-background-color); + --ls-page-blockquote-border-color: var(--ls-border-color); + --ls-icon-color: var(--ls-link-text-color); + --ls-search-icon-color: var(--ls-link-text-color); + --color-level-1: var(--ls-secondary-background-color); + --color-level-2: var(--ls-tertiary-background-color); + --color-level-3: var(--ls-quaternary-background-color); + --ls-scrollbar-background-color: var(--ls-primary-background-color); + --ls-page-inline-code-color: var(--ls-primary-text-color); + --ls-block-bullet-color: var(--ls-quaternary-background-color); + --ls-block-bullet-active-color: var(--ls-link-text-color); + --ls-block-bullet-threading-width: 1px; + --ls-bullet-closed-color: var(--ls-secondary-text-color); +} +/* Dark theme & Light themes left sidebar */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"] .left-sidebar-inner, +html[data-theme="light"] .ls-left-sidebar-open .cp__header > .l { + --ls-accent-rgb: 178, 219, 219; + --ls-primary-background-color: #1f2428; + --ls-secondary-background-color: #24292e; + --ls-tertiary-background-color: #282e34; + --ls-quaternary-background-color: #292e33; + --ls-selection-background-color: rgba(246, 246, 246, 0.1); + --ls-table-tr-even-background-color: rgba(246, 246, 246, 0.065); + --ls-active-primary-color: #8ec2c2; + --ls-active-secondary-color: #eeffff; + --ls-guideline-color: rgba(246, 246, 246, 0.2); + --primary-text-opacity: 0.98; + --ls-primary-text-color: rgba(195, 200, 205, var(--primary-text-opacity)); + --ls-secondary-text-color: rgba(195, 200, 205, 0.66); + --ls-link-text-color: rgba(var(--ls-accent-rgb), var(--primary-text-opacity)); + --ls-link-text-hover-color: rgba(244, 244, 244, var(--primary-text-opacity)); + --ls-menu-hover-color: var(--ls-secondary-background-color); + --ls-slide-background-color: var(--ls-primary-background-color); + --ls-block-highlight-color: rgba(246, 246, 246, 0.1); + --ls-page-inline-code-bg-color: rgba(246, 246, 246, 0.2); + --ls-scrollbar-foreground-color: rgba(246, 246, 246, 0.15); + --ls-scrollbar-thumb-hover-color: rgba(246, 246, 246, 0.3); + --ls-right-sidebar-code-bg-color: var(--ls-page-inline-code-bg-color); + --ls-block-bullet-border-color: rgba(246, 246, 246, 0.15); +} +/* Light theme */ +html[data-theme="light"], +.white-theme { + --ls-accent-rgb: 30, 125, 124; + --ls-primary-background-color: #f0f0f1; + --ls-secondary-background-color: #e8e9ea; + --ls-tertiary-background-color: rgba(225, 225, 225, 0.9); + --ls-quaternary-background-color: #e0e1e1; + --ls-selection-background-color: rgba(0, 0, 0, 0.1); + --ls-active-primary-color: #8ec2c2; + --ls-secondary-text-color: rgba(33, 33, 33, 0.8); + --ls-link-text-color: rgba(var(--ls-accent-rgb), 0.9); + --ls-link-text-hover-color: rgba(var(--ls-accent-rgb), 1); + --ls-page-inline-code-bg-color: rgba(0, 0, 0, 0.1); + --ls-page-blockquote-border-color: rgba(var(--ls-accent-rgb), 0.25); + --ls-scrollbar-foreground-color: rgba(0, 0, 0, 0.2); + --ls-scrollbar-thumb-hover-color: rgba(0, 0, 0, 0.3); + --ls-block-bullet-active-color: #86b6b6; + --ls-block-bullet-border-color: rgba(128, 128, 128, 0.1); +} +/* }} */ + +/* {{ 1.2. Layout corrections */ +/* Helps to not overlap content with tabs plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +/* Add some white space to the right. +(This is because the actual start of the content on the left side is offset if we include the bullets and spacing.) */ +.cp__sidebar-main-content { + margin-right: 24px; +} +/* }} */ + +/* {{ 1.3. Typography */ +/* Headings */ +.editor-inner .uniline-block:is(.h1, .h2, .h3, .h4, .h5, .h6), +.editor-inner :is(.h1, .h2, .h3, .h4, .h5, .h6), +.ls-block :is(h1, h2, h3, h4, h5, h6) { + position: relative; + margin: 0; +} +.editor-inner .uniline-block:is(.h1), +.editor-inner :is(.h1), +.ls-block :is(h1) { + top: 0.15em; + margin: -0.15em 0 0.15em; +} +.editor-inner .uniline-block:is(.h2), +.editor-inner :is(.h2), +.ls-block :is(h2) { + top: -0.1em; + /* positive margin leaves a gap between bullet and indentation lines */ + /* margin: 0.25em 0 0; */ +} +.editor-inner .uniline-block:is(.h3, .h4, .h5, .h6), +.editor-inner :is(.h3, .h4, .h5, .h6), +.ls-block :is(h3, h4) { + top: -0.25em; + margin: 0.25em 0 -0.25em; +} +.editor-inner .uniline-block:is(.h3), +.editor-inner :is(.h3), +.ls-block :is(h3) { + font-size: 1.2em; +} +.editor-inner .uniline-block:is(.h4), +.editor-inner :is(.h4), +.ls-block :is(h4) { + font-size: 1.1em; +} +.editor-inner .uniline-block:is(.h5), +.editor-inner :is(.h5), +.ls-block :is(h5) { + font-size: 1.05em; +} +.editor-inner .uniline-block:is(.h6), +.editor-inner :is(.h6), +.ls-block :is(h6) { + font-size: 1em; +} +.cp__themes-installed > .it > section > strong { + font-size: 0.875em; +} +/* }} */ + +/* {{ 1.4. Links & Buttons */ +html[data-theme="light"] .cp__header a, +html[data-theme="light"] .cp__header button, +html[data-theme="light"] .extensions__pdf-toolbar > .inner > .r a, +html[data-theme="light"] a svg { + color: #6d7272; +} +.cp__header .add-graph-btn { + border: none; +} +.cp__header .add-graph-btn span { + margin-top: 0 !important; +} +html[data-theme="light"] .cp__sidebar-left-layout a { + color: var(--ls-secondary-text-color); +} +html[data-theme="light"] h1 a { + color: var(--ls-title-text-color); +} +html[data-theme="light"] a:hover { + background-color: var(--ls-quaternary-background-color); + color: var(--ls-primary-text-color); +} +/* External Links */ +a.external-link { + border-bottom: 1px dashed; +} +a.external-link::after { + position: relative; + bottom: -2px; + left: -1px; + display: inline-block; + margin: 0 1px 0 5px; + width: 14px; + height: 14px; + background-color: var(--ls-link-text-color); + content: ""; + transition: 0.3s; + + mask-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + -webkit-mask-box-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + mask-position: center; + -webkit-mask-box-position: center; + mask-repeat: no-repeat; + -webkit-mask-box-repeat: no-repeat; + mask-size: 14px 14px; + -webkit-mask-box-size: 14px 14px; + object-fit: cover; +} +a.external-link:hover::after { + background-color: var(--ls-link-text-hover-color); +} +/* custom colors in buttons, hints etc */ +.bg-indigo-600 { + color: var(--ls-primary-background-color); + transition: 0.3s; +} +.dark-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.8); +} +.dark-theme .hover\:bg-indigo-700:hover, +.hover\:bg-indigo-500:hover { + background-color: rgb(var(--ls-accent-rgb)); + opacity: 1; +} +.dark-theme button.bg-white { + border-color: var(--ls-block-bullet-border-color); + background-color: var(--ls-secondary-background-color); + color: var(--ls-secondary-text-color); +} +.dark-theme button.bg-white:hover { + background-color: var(--ls-tertiary-background-color); + color: var(--ls-primary-text-color); +} +.white-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +.white-theme .hover\:bg-indigo-700:hover { + background-color: rgba(var(--ls-accent-rgb), 0.8); + opacity: 1; +} +/* pre */ +.hljs { + background: transparent; +} +/* hints */ +.dark-theme .Tooltip__label { + width: 11ch; + border: 1px solid var(--ls-primary-text-color); + background: var(--ls-secondary-background-color); +} +.dark-theme .Tooltip__label::after { + border-bottom-color: var(--ls-primary-text-color); +} +/* block references link count mark */ +a.open-block-ref-link { + background-color: var(--ls-link-text-color); + color: var(--ls-primary-background-color); +} +/* brackets in links */ +.page-reference .bracket { + color: var(--ls-link-text-color); + opacity: 0.5; +} +/* Tags */ +a.tag[data-ref] { + padding: 0.2rem 0.3rem; + border-radius: 0.5rem 0rem; + background: var(--ls-link-text-color); + color: var(--ls-primary-background-color); + white-space: nowrap; + letter-spacing: 0.05em; + font-weight: bold; + font-size: 0.75rem; + line-height: 0.75rem; + transition: 0.3s; +} +html[data-theme="light"] a.tag[data-ref] { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +a.tag[data-ref]:hover { + border-radius: 0rem 0.5rem; + opacity: 1; +} +html[data-theme="light"] a.tag[data-ref]:hover { + color: var(--ls-primary-background-color); +} +/* Highlights */ +/*mark { + padding: 2px 4px; + border-radius: 3px; + background: rgba(246, 246, 246, 0.8); + color: var(--ls-primary-background-color); + font-size: 14px; +}*/ +mark { + background: transparent; + padding: 0; + color: inherit; + font-size: inherit; + text-decoration-style: solid; + text-decoration: underline; + text-decoration-color: rgba(255,255,102,0.7); + text-decoration-thickness: 4px; + text-underline-offset: -1px; + text-decoration-skip-ink: none; +} +html[data-theme="dark"] mark { + text-decoration-color: rgba(255,255,102,0.7); +} +/* fix color page-reference when mark text */ +mark .page-ref, +mark .page-reference .bracket { + color: var(--ls-primary-background-color); + font-weight: bold; +} +/* Search results */ +html[data-theme="light"] .search-results-wrap a .rounded.border { + border-color: var(--ls-tertiary-background-color); + background-color: var(--ls-primary-background-color); +} +/* <== }}} */ + +/* { == 2. Page Components ==> */ +/* {{ 2.1. Content Blocks */ +.block-body ul > li { + margin: 0.5em 0; +} +.block-body ul > li:first-child { + margin-top: 0; +} +.block-body ul > li:last-child { + margin-bottom: 0; +} +.ls-block { + padding: 0.3em 0; +} +.ls-block[level="1"] { + padding-top: 0.6em; +} +.block-children { + padding: 0.16em 0; +} +#lazy-blocks > div .ls-block[haschild] > div > .block-content-wrapper::before { + top: 0.9rem; +} +/* }} */ + +/* {{ 2.2. Tasks */ +/* Checkboxes */ +.form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.9em; + height: 0.9em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +/* Status switcher */ +.marker-switch { + position: relative; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.15em 0; + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.8em; + line-height: 1; + opacity: 0.66; + cursor: pointer; +} +.form-checkbox:hover { + background-color: var(--ls-secondary-background-color); + border-color: var(--ls-link-text-color); + opacity: 0.9; + transform: none; +} +.form-checkbox:checked { + border-color: var(--ls-secondary-text-color); + background-color: var(--ls-secondary-background-color); +} +html[data-theme="light"] .form-checkbox:checked { + background-color: var(--ls-active-primary-color); +} +/* Status switcher */ +/* Status switcher - bordered variant */ +/* .form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.95em; + height: 0.95em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +.marker-switch { + position: relative; + top: -0.1em; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.33em 0.033em; + border: 0.1em solid var(--ls-border-color); + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.7em; + line-height: 1; + opacity: 1; + opacity: 0.75; + cursor: pointer; +} */ +.dark-theme .marker-switch:hover { + border-color: var(--ls-link-text-color); + color: var(--ls-link-text-color); +} +.canceled, +.done { + opacity: 0.5; +} +.done { + text-decoration: none; +} +/* }} */ + +/* {{ 2.3. Code */ +/* Inline code */ +:not(pre) > code { + padding: 2px 5px !important; +} +.extensions__code .code-editor { + margin-top: 0; +} +/* Code Calc result position fix */ +.extensions__code-calc { + top: 11px; + padding: 0 0.75em; +} +.extensions__code-lang { + background: var(--ls-secondary-background-color); +} +/* CodeMirror */ +.CodeMirror { + border-radius: 0.25rem; + background: var(--ls-secondary-background-color); + font-family: "Consolas", "Maple Mono SC NF",monospace; + line-height: 1.2; +} +.CodeMirror-hscrollbar { + cursor: default; +} +.cm-s-solarized.cm-s-dark, +.cm-s-solarized.cm-s-white, +.cm-s-solarized.cm-s-light { + border: 7px solid var(--ls-secondary-background-color); + background-color: var(--ls-primary-background-color); + color: var(--ls-primary-text-color); + text-shadow: none; +} +.CodeMirror-gutters { + background-color: #f7f7f7; +} +.cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.5); +} +html[data-theme="light"] .cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.1); +} +.cm-s-solarized.cm-s-light .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.033); +} +.CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark .CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.cm-s-solarized.cm-s-light div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-focused .CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-lines { + padding-right: 1em; +} +/* }} */ + +/* {{ 2.4. PDF Viewer */ +#pdf-layout-container[data-theme="dark"], +#pdf-layout-container[data-theme="light"] { + background-color: var(--ls-quaternary-background-color); +} +#pdf-layout-container[data-theme="dark"] .textLayer { + background-color: #282e34; +} +#pdf-layout-container[data-theme="light"] .textLayer { + background-color: var(--ls-primary-background-color); + opacity: 0.125; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + right: 0; + width: 100%; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner { + margin-right: 1em; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner .buttons, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner .buttons { + border-radius: 0.25rem; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, var(--ls-secondary-background-color) 100%); +} +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, rgb(31, 36, 40, 0.3) 100%); +} +/* <== }}} */ + +/* { == 3. Bullet Threading ==> */ +:not(:dsl-query) .block-control { + min-width: 0; + width: 1.55em; +} +.block-children { + border-color: var(--ls-quaternary-background-color); + border-left-width: var(--ls-block-bullet-threading-width); + border-radius: 0; +} +.block-children-left-border:hover { + background-color: var(--ls-block-bullet-border-color); +} +.block-content-wrapper { + position: relative; +} +.bullet-container { + position: relative; + width: 14px !important; + height: 14px !important; + transform: translate(1px, -1px); + /* align-items: end; */ +} +/* Block bullet path in nested block only */ +.ls-block .bullet { + background-color: var(--ls-block-bullet-active-color); + box-shadow: 0 0 0 1px var(--ls-block-bullet-active-color); +} +.ls-block div.items-center { + position: relative; +} +.ls-block > .items-baseline { + align-items: center; +} +.ls-block:not(:focus-within) .bullet { + background-color: var(--ls-block-bullet-color); + box-shadow: none; + transform: scale(1); +} +.ls-block:not(:focus-within) > .items-baseline { + align-items: center; +} +.ls-block .ls-block > div > div.items-center::before { + position: absolute; + top: calc(-100% + var(--ls-block-bullet-threading-width) * 0.5 - 0.1em); + right: 6px; + bottom: 50%; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-bottom: var(--ls-block-bullet-threading-width) solid transparent; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + border-bottom-left-radius: 6px; + content: ""; + pointer-events: none; +} +.ls-block .ls-block:focus-within > div > div.items-center::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children > .ls-block::before { + position: absolute; + top: -1.19em; + bottom: 0; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block .block-children:focus-within > .ls-block:not(:focus-within)::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children:focus-within > .ls-block:focus-within ~ .ls-block::before { + border-color: transparent; +} +.ls-block[haschild] > div > .block-content-wrapper::before { + position: absolute; + top: 0.9em; + bottom: 0; + left: -1em; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block[haschild]:focus-within > div > .block-content-wrapper .block-content::before { + border-color: var(--ls-block-bullet-active-color); +} +/* disable first fracking level for embedded content */ +.embed > div > div > div > div > div > div::before, +.embed-block > div > div > div > div > div > div > div::before, +.custom-query .blocks-container > div > div > .ls-block > div > .items-center::before { + border-color: transparent !important; +} +/* algin embeded pages to content width */ +.block-content .flex-1 { + overflow: hidden; +} +/* disable for doc mode */ +.doc-mode div.items-center::before, +.doc-mode div.items-center::after, +.doc-mode .ls-block::before, +.doc-mode .ls-block::after { + display: none; +} +/* <== }}} */ + +/* { == 4. Plugin specific ==> */ +/* {{ 4.1. Tabs Plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +html[data-theme="dark"] #logseq-tabs_lsp_main { + filter: sepia(0) saturate(0.8) opacity(0.85) hue-rotate(360deg) grayscale(0.05) brightness(0.85) invert(0.04); + /* border-bottom: 1px solid var(--ls-quaternary-background-color); */ +} +/* }} */ + +/* {{ 4.2. Table of Contents Plugin */ +[id*="logseq-tocgen--toc-slot"] { + padding-left: 0.5em; +} +.kef-tocgen-page span { + position: relative; + top: -0.1em; +} +.kef-tocgen-block-collapse { + border-color: var(--ls-quaternary-background-color) !important; +} +.kef-tocgen-page::before, +.kef-tocgen-block::before { + position: relative; + top: 0.7em; + left: 0.5em; + z-index: 1; + display: inline-block; + width: 0.375em; + height: 0.4em; + border-radius: 50%; + background-color: var(--ls-block-bullet-color); + content: " "; + pointer-events: none; +} +[data-ref="logseq-tocgen"] .kef-tocgen-block-children { + margin-left: 1.2em; +} +button.kef-tocgen-arrow { + position: relative; + margin: 0; + margin-left: -0.75em; + padding: 0; + padding-left: 1.2em; +} +button.kef-tocgen-arrow svg { + position: relative; + top: 0.05em; + left: -0.53em; + width: 0.8em; + height: 0.8em; + border-radius: 50%; + background-color: var(--ls-block-bullet-border-color); + color: transparent; +} +.kef-tocgen-page button.kef-tocgen-arrow svg { + top: -0.095em; + left: -0.54em; +} +button.kef-tocgen-arrow svg[style*="transform"] { + left: -1.2em; + margin-right: 0.3em; + width: 0.5em; + height: 0.5em; + background-color: transparent; + filter: none; +} +button.kef-tocgen-arrow:hover svg[style*="transform"] { + color: var(--ls-link-text-color); +} +/* <== }}} */ \ No newline at end of file diff --git a/logseq/custom.css b/logseq/custom.css index 875356f..2a7e5d8 100644 --- a/logseq/custom.css +++ b/logseq/custom.css @@ -1,7 +1,727 @@ +/* Table of Contents +{{{ ==> +1. Global + 1.1. Color Palette & Variables + 1.2. Layout Corrections + 1.3. Typography + 1.4. Links & Buttons +2. Page Components + 2.1. Content Blocks + 2.2. Tasks + 2.3. Code + 2.4. PDF Viewer +3. Bullet threading +4. Plugin specific + 4.1. Tabs + 4.2. Table of Contents +<== }}} */ + +/* { == 1. Global ==> */ :root { - --ls-font-family: Noto Sans CJK SC, Helvetica Neue, sans-serif; + font-size: 1.0375rem; } -* { - font-variant-ligatures: none !important; +/* {{ 1.1.Color Palette & Variables */ +/* Styles that apply to both dark & light mode */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"], +.white-theme { + --ls-font-family: "Noto Sans CJK SC", sans-serif; + --ls-main-content-max-width: 860px; + --ls-page-text-size: 1em; + --ls-page-title-size: 2rem; + --ls-link-ref-text-color: var(--ls-link-text-color); + --ls-link-ref-text-hover-color: var(--ls-link-text-hover-color); + --ls-head-text-color: var(--ls-link-text-color); + --ls-title-text-color: var(--ls-primary-text-color); + --ls-tag-text-color: var(--ls-link-text-color); + --ls-tag-text-hover-color: var(--ls-link-text-hover-color); + --ls-search-background-color: var(--ls-secondary-background-color); + --ls-border-color: var(--ls-quaternary-background-color); + --ls-secondary-border-color: var(--ls-secondary-text-color); + --ls-page-properties-background-color: var(--ls-secondary-background-color); + --ls-block-properties-background-color: var(--ls-secondary-background-color); + --ls-block-ref-link-text-color: var(--ls-link-text-color); + --ls-a-chosen-bg: var(--ls-secondary-background-color); + --ls-page-blockquote-color: var(--ls-primary-text-color); + --ls-page-blockquote-bg-color: var(--ls-secondary-background-color); + --ls-page-blockquote-border-color: var(--ls-border-color); + --ls-icon-color: var(--ls-link-text-color); + --ls-search-icon-color: var(--ls-link-text-color); + --color-level-1: var(--ls-secondary-background-color); + --color-level-2: var(--ls-tertiary-background-color); + --color-level-3: var(--ls-quaternary-background-color); + --ls-scrollbar-background-color: var(--ls-primary-background-color); + --ls-page-inline-code-color: var(--ls-primary-text-color); + --ls-block-bullet-color: var(--ls-quaternary-background-color); + --ls-block-bullet-active-color: var(--ls-link-text-color); + --ls-block-bullet-threading-width: 1px; + --ls-bullet-closed-color: var(--ls-secondary-text-color); } +/* Dark theme & Light themes left sidebar */ +html[data-theme="dark"], +.dark-theme, +html[data-theme="light"] .left-sidebar-inner, +html[data-theme="light"] .ls-left-sidebar-open .cp__header > .l { + --ls-accent-rgb: 178, 219, 219; + --ls-primary-background-color: #1f2428; + --ls-secondary-background-color: #24292e; + --ls-tertiary-background-color: #282e34; + --ls-quaternary-background-color: #292e33; + --ls-selection-background-color: rgba(246, 246, 246, 0.1); + --ls-table-tr-even-background-color: rgba(246, 246, 246, 0.065); + --ls-active-primary-color: #8ec2c2; + --ls-active-secondary-color: #eeffff; + --ls-guideline-color: rgba(246, 246, 246, 0.2); + --primary-text-opacity: 0.98; + --ls-primary-text-color: rgba(195, 200, 205, var(--primary-text-opacity)); + --ls-secondary-text-color: rgba(195, 200, 205, 0.66); + --ls-link-text-color: rgba(var(--ls-accent-rgb), var(--primary-text-opacity)); + --ls-link-text-hover-color: rgba(244, 244, 244, var(--primary-text-opacity)); + --ls-menu-hover-color: var(--ls-secondary-background-color); + --ls-slide-background-color: var(--ls-primary-background-color); + --ls-block-highlight-color: rgba(246, 246, 246, 0.1); + --ls-page-inline-code-bg-color: rgba(246, 246, 246, 0.2); + --ls-scrollbar-foreground-color: rgba(246, 246, 246, 0.15); + --ls-scrollbar-thumb-hover-color: rgba(246, 246, 246, 0.3); + --ls-right-sidebar-code-bg-color: var(--ls-page-inline-code-bg-color); + --ls-block-bullet-border-color: rgba(246, 246, 246, 0.15); +} +/* Light theme */ +html[data-theme="light"], +.white-theme { + --ls-accent-rgb: 30, 125, 124; + --ls-primary-background-color: #f0f0f1; + --ls-secondary-background-color: #e8e9ea; + --ls-tertiary-background-color: rgba(225, 225, 225, 0.9); + --ls-quaternary-background-color: #e0e1e1; + --ls-selection-background-color: rgba(0, 0, 0, 0.1); + --ls-active-primary-color: #8ec2c2; + --ls-secondary-text-color: rgba(33, 33, 33, 0.8); + --ls-link-text-color: rgba(var(--ls-accent-rgb), 0.9); + --ls-link-text-hover-color: rgba(var(--ls-accent-rgb), 1); + --ls-page-inline-code-bg-color: rgba(0, 0, 0, 0.1); + --ls-page-blockquote-border-color: rgba(var(--ls-accent-rgb), 0.25); + --ls-scrollbar-foreground-color: rgba(0, 0, 0, 0.2); + --ls-scrollbar-thumb-hover-color: rgba(0, 0, 0, 0.3); + --ls-block-bullet-active-color: #86b6b6; + --ls-block-bullet-border-color: rgba(128, 128, 128, 0.1); +} +/* }} */ + +/* {{ 1.2. Layout corrections */ +/* Helps to not overlap content with tabs plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +/* Add some white space to the right. +(This is because the actual start of the content on the left side is offset if we include the bullets and spacing.) */ +.cp__sidebar-main-content { + margin-right: 24px; +} +/* }} */ + +/* {{ 1.3. Typography */ +/* Headings */ +.editor-inner .uniline-block:is(.h1, .h2, .h3, .h4, .h5, .h6), +.editor-inner :is(.h1, .h2, .h3, .h4, .h5, .h6), +.ls-block :is(h1, h2, h3, h4, h5, h6) { + position: relative; + margin: 0; +} +.editor-inner .uniline-block:is(.h1), +.editor-inner :is(.h1), +.ls-block :is(h1) { + top: 0.15em; + margin: -0.15em 0 0.15em; +} +.editor-inner .uniline-block:is(.h2), +.editor-inner :is(.h2), +.ls-block :is(h2) { + top: -0.1em; + /* positive margin leaves a gap between bullet and indentation lines */ + /* margin: 0.25em 0 0; */ +} +.editor-inner .uniline-block:is(.h3, .h4, .h5, .h6), +.editor-inner :is(.h3, .h4, .h5, .h6), +.ls-block :is(h3, h4) { + top: -0.25em; + margin: 0.25em 0 -0.25em; +} +.editor-inner .uniline-block:is(.h3), +.editor-inner :is(.h3), +.ls-block :is(h3) { + font-size: 1.2em; +} +.editor-inner .uniline-block:is(.h4), +.editor-inner :is(.h4), +.ls-block :is(h4) { + font-size: 1.1em; +} +.editor-inner .uniline-block:is(.h5), +.editor-inner :is(.h5), +.ls-block :is(h5) { + font-size: 1.05em; +} +.editor-inner .uniline-block:is(.h6), +.editor-inner :is(.h6), +.ls-block :is(h6) { + font-size: 1em; +} +.cp__themes-installed > .it > section > strong { + font-size: 0.875em; +} +/* }} */ + +/* {{ 1.4. Links & Buttons */ +html[data-theme="light"] .cp__header a, +html[data-theme="light"] .cp__header button, +html[data-theme="light"] .extensions__pdf-toolbar > .inner > .r a, +html[data-theme="light"] a svg { + color: #6d7272; +} +.cp__header .add-graph-btn { + border: none; +} +.cp__header .add-graph-btn span { + margin-top: 0 !important; +} +html[data-theme="light"] .cp__sidebar-left-layout a { + color: var(--ls-secondary-text-color); +} +html[data-theme="light"] h1 a { + color: var(--ls-title-text-color); +} +html[data-theme="light"] a:hover { + background-color: var(--ls-quaternary-background-color); + color: var(--ls-primary-text-color); +} +/* External Links */ +a.external-link { + border-bottom: 1px dashed; +} +a.external-link::after { + position: relative; + bottom: -2px; + left: -1px; + display: inline-block; + margin: 0 1px 0 5px; + width: 14px; + height: 14px; + background-color: var(--ls-link-text-color); + content: ""; + transition: 0.3s; + + mask-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + -webkit-mask-box-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGDSURBVHgBtZaNcYMwDIUfGzgbqBuUDcwkaTdoJ4AN0gmaTNJu0GyQdILSCUjRIa6yMT+x4d29O7CNPmMLmQzryYhZ39hIDChbX1vflPn+2JqwoigA8t20fsEKogCslrZ6C6iG/UhAo/qLwBhCpCzc2T+OjNu1PquxB0TqpIK8e33k3Rdw3zJKnyqIVe2VtF1UW4b/PW0QuawaaDyYH5iBVyQCSQA2ALvJPRRQT8QgUdUEjPWs+r6QqHIGlsPdv/1UMIuuNJ3Fh4UwI8+WcAvAZQxEcJNCm2ZgOYZVpodRCPaAYblqxP0MK4wv42sA9oGJzPRLEQez8oDBfILwhHl1eAuOcL/RgZ48mF+uqhnY3dI1b781zHgBl8AKuSZEiOCe1KF2P/V1UiQBa6+Ps7OBu4w2FQi4308RmJDWCePH02K9qSCcQLuRcTncZbaIFKH7HPRe8ptmYp4A/0bUCO93lDhgg2U/RqPlag3o4toYK0JXmvoM1fW0QuIhmmEezvoVJ+sPourrpWEel2gAAAAASUVORK5CYII="); + mask-position: center; + -webkit-mask-box-position: center; + mask-repeat: no-repeat; + -webkit-mask-box-repeat: no-repeat; + mask-size: 14px 14px; + -webkit-mask-box-size: 14px 14px; + object-fit: cover; +} +a.external-link:hover::after { + background-color: var(--ls-link-text-hover-color); +} +/* custom colors in buttons, hints etc */ +.bg-indigo-600 { + color: var(--ls-primary-background-color); + transition: 0.3s; +} +.dark-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.8); +} +.dark-theme .hover\:bg-indigo-700:hover, +.hover\:bg-indigo-500:hover { + background-color: rgb(var(--ls-accent-rgb)); + opacity: 1; +} +.dark-theme button.bg-white { + border-color: var(--ls-block-bullet-border-color); + background-color: var(--ls-secondary-background-color); + color: var(--ls-secondary-text-color); +} +.dark-theme button.bg-white:hover { + background-color: var(--ls-tertiary-background-color); + color: var(--ls-primary-text-color); +} +.white-theme .bg-indigo-600 { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +.white-theme .hover\:bg-indigo-700:hover { + background-color: rgba(var(--ls-accent-rgb), 0.8); + opacity: 1; +} +/* pre */ +.hljs { + background: transparent; +} +/* hints */ +.dark-theme .Tooltip__label { + width: 11ch; + border: 1px solid var(--ls-primary-text-color); + background: var(--ls-secondary-background-color); +} +.dark-theme .Tooltip__label::after { + border-bottom-color: var(--ls-primary-text-color); +} +/* block references link count mark */ +a.open-block-ref-link { + background-color: var(--ls-link-text-color); + color: var(--ls-primary-background-color); +} +/* brackets in links */ +.page-reference .bracket { + color: var(--ls-link-text-color); + opacity: 0.5; +} +/* Tags */ +a.tag[data-ref] { + padding: 0.2rem 0.3rem; + border-radius: 0.5rem 0rem; + background: var(--ls-link-text-color); + color: var(--ls-primary-background-color); + white-space: nowrap; + letter-spacing: 0.05em; + font-weight: bold; + font-size: 0.75rem; + line-height: 0.75rem; + transition: 0.3s; +} +html[data-theme="light"] a.tag[data-ref] { + background-color: rgba(var(--ls-accent-rgb), 0.66); +} +a.tag[data-ref]:hover { + border-radius: 0rem 0.5rem; + opacity: 1; +} +html[data-theme="light"] a.tag[data-ref]:hover { + color: var(--ls-primary-background-color); +} +/* Highlights */ +/*mark { + padding: 2px 4px; + border-radius: 3px; + background: rgba(246, 246, 246, 0.8); + color: var(--ls-primary-background-color); + font-size: 14px; +}*/ +mark { + background: transparent; + padding: 0; + color: inherit; + font-size: inherit; + text-decoration-style: solid; + text-decoration: underline; + text-decoration-color: rgba(255,198,0,0.7); + text-decoration-thickness: 4px; + text-underline-offset: -1px; + text-decoration-skip-ink: none; +} +html[data-theme="dark"] mark { + text-decoration-color: rgba(255,198,0,0.7); +} +/* fix color page-reference when mark text */ +mark .page-ref, +mark .page-reference .bracket { + color: var(--ls-primary-background-color); + font-weight: bold; +} +/* Search results */ +html[data-theme="light"] .search-results-wrap a .rounded.border { + border-color: var(--ls-tertiary-background-color); + background-color: var(--ls-primary-background-color); +} +/* <== }}} */ + +/* { == 2. Page Components ==> */ +/* {{ 2.1. Content Blocks */ +.block-body ul > li { + margin: 0.5em 0; +} +.block-body ul > li:first-child { + margin-top: 0; +} +.block-body ul > li:last-child { + margin-bottom: 0; +} +.ls-block { + padding: 0.3em 0; +} +.ls-block[level="1"] { + padding-top: 0.6em; +} +.block-children { + padding: 0.16em 0; +} +#lazy-blocks > div .ls-block[haschild] > div > .block-content-wrapper::before { + top: 0.9rem; +} +/* }} */ + +/* {{ 2.2. Tasks */ +/* Checkboxes */ +.form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.9em; + height: 0.9em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +/* Status switcher */ +.marker-switch { + position: relative; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.15em 0; + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.8em; + line-height: 1; + opacity: 0.66; + cursor: pointer; +} +.form-checkbox:hover { + background-color: var(--ls-secondary-background-color); + border-color: var(--ls-link-text-color); + opacity: 0.9; + transform: none; +} +.form-checkbox:checked { + border-color: var(--ls-secondary-text-color); + background-color: var(--ls-secondary-background-color); +} +html[data-theme="light"] .form-checkbox:checked { + background-color: var(--ls-active-primary-color); +} +/* Status switcher */ +/* Status switcher - bordered variant */ +/* .form-checkbox { + margin-top: 0 !important; + margin-right: 0.5em !important; + width: 0.95em; + height: 0.95em; + border: 0.1em solid var(--ls-secondary-text-color); + background-color: var(--ls-primary-background-color); + opacity: 0.75; +} +.marker-switch { + position: relative; + top: -0.1em; + display: inline-block; + margin: 0 0.6em 0 0; + padding: 0.175em 0.33em 0.033em; + border: 0.1em solid var(--ls-border-color); + border-radius: 0; + color: var(--ls-secondary-text-color); + text-align: center; + font-weight: 500; + font-size: 0.7em; + line-height: 1; + opacity: 1; + opacity: 0.75; + cursor: pointer; +} */ +.dark-theme .marker-switch:hover { + border-color: var(--ls-link-text-color); + color: var(--ls-link-text-color); +} +.canceled, +.done { + opacity: 0.5; +} +.done { + text-decoration: none; +} +/* }} */ + +/* {{ 2.3. Code */ +/* Inline code */ +:not(pre) > code { + padding: 2px 5px !important; +} +.extensions__code .code-editor { + margin-top: 0; +} +/* Code Calc result position fix */ +.extensions__code-calc { + top: 11px; + padding: 0 0.75em; +} +.extensions__code-lang { + background: var(--ls-secondary-background-color); +} +/* CodeMirror */ +.CodeMirror { + border-radius: 0.25rem; + background: var(--ls-secondary-background-color); + font-family: "Consolas", "Maple Mono SC NF",monospace; + line-height: 1.2; +} +.CodeMirror-hscrollbar { + cursor: default; +} +.cm-s-solarized.cm-s-dark, +.cm-s-solarized.cm-s-white, +.cm-s-solarized.cm-s-light { + border: 7px solid var(--ls-secondary-background-color); + background-color: var(--ls-primary-background-color); + color: var(--ls-primary-text-color); + text-shadow: none; +} +.CodeMirror-gutters { + background-color: #f7f7f7; +} +.cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.5); +} +html[data-theme="light"] .cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.1); +} +.cm-s-solarized.cm-s-light .CodeMirror-gutters { + background-color: rgba(40, 42, 51, 0.033); +} +.CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark .CodeMirror-linenumber { + color: var(--ls-primary-text-color); + text-shadow: none; + opacity: 0.5; +} +.cm-s-solarized.cm-s-dark div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.cm-s-solarized.cm-s-light div.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-focused .CodeMirror-selected { + background: var(--ls-selection-background-color); +} +.CodeMirror-lines { + padding-right: 1em; +} +/* }} */ + +/* {{ 2.4. PDF Viewer */ +#pdf-layout-container[data-theme="dark"], +#pdf-layout-container[data-theme="light"] { + background-color: var(--ls-quaternary-background-color); +} +#pdf-layout-container[data-theme="dark"] .textLayer { + background-color: #282e34; +} +#pdf-layout-container[data-theme="light"] .textLayer { + background-color: var(--ls-primary-background-color); + opacity: 0.125; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + right: 0; + width: 100%; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner { + margin-right: 1em; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar .inner .buttons, +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar .inner .buttons { + border-radius: 0.25rem; +} +#pdf-layout-container[data-theme="dark"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, var(--ls-secondary-background-color) 100%); +} +#pdf-layout-container[data-theme="light"] .extensions__pdf-toolbar { + background: linear-gradient(0deg, rgba(246, 246, 246, 0) 10%, rgb(31, 36, 40, 0.3) 100%); +} +/* <== }}} */ + +/* { == 3. Bullet Threading ==> */ +:not(:dsl-query) .block-control { + min-width: 0; + width: 1.55em; +} +.block-children { + border-color: var(--ls-quaternary-background-color); + border-left-width: var(--ls-block-bullet-threading-width); + border-radius: 0; +} +.block-children-left-border:hover { + background-color: var(--ls-block-bullet-border-color); +} +.block-content-wrapper { + position: relative; +} +.bullet-container { + position: relative; + width: 14px !important; + height: 14px !important; + transform: translate(1px, -1px); + /* align-items: end; */ +} +/* Block bullet path in nested block only */ +.ls-block .bullet { + background-color: var(--ls-block-bullet-active-color); + box-shadow: 0 0 0 1px var(--ls-block-bullet-active-color); +} +.ls-block div.items-center { + position: relative; +} +.ls-block > .items-baseline { + align-items: center; +} +.ls-block:not(:focus-within) .bullet { + background-color: var(--ls-block-bullet-color); + box-shadow: none; + transform: scale(1); +} +.ls-block:not(:focus-within) > .items-baseline { + align-items: center; +} +.ls-block .ls-block > div > div.items-center::before { + position: absolute; + top: calc(-100% + var(--ls-block-bullet-threading-width) * 0.5 - 0.1em); + right: 6px; + bottom: 50%; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-bottom: var(--ls-block-bullet-threading-width) solid transparent; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + border-bottom-left-radius: 6px; + content: ""; + pointer-events: none; +} +.ls-block .ls-block:focus-within > div > div.items-center::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children > .ls-block::before { + position: absolute; + top: -1.19em; + bottom: 0; + left: calc(-0.5 * var(--ls-block-bullet-threading-width)); + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block .block-children:focus-within > .ls-block:not(:focus-within)::before { + border-color: var(--ls-block-bullet-active-color); +} +.ls-block .block-children:focus-within > .ls-block:focus-within ~ .ls-block::before { + border-color: transparent; +} +.ls-block[haschild] > div > .block-content-wrapper::before { + position: absolute; + top: 0.9em; + bottom: 0; + left: -1em; + border-left: var(--ls-block-bullet-threading-width) solid transparent; + content: ""; + pointer-events: none; +} +.ls-block[haschild]:focus-within > div > .block-content-wrapper .block-content::before { + border-color: var(--ls-block-bullet-active-color); +} +/* disable first fracking level for embedded content */ +.embed > div > div > div > div > div > div::before, +.embed-block > div > div > div > div > div > div > div::before, +.custom-query .blocks-container > div > div > .ls-block > div > .items-center::before { + border-color: transparent !important; +} +/* algin embeded pages to content width */ +.block-content .flex-1 { + overflow: hidden; +} +/* disable for doc mode */ +.doc-mode div.items-center::before, +.doc-mode div.items-center::after, +.doc-mode .ls-block::before, +.doc-mode .ls-block::after { + display: none; +} +/* <== }}} */ + +/* { == 4. Plugin specific ==> */ +/* {{ 4.1. Tabs Plugin */ +#main-content-container { + margin-top: 1.9em; + padding-top: 1.9em !important; +} +html[data-theme="dark"] #logseq-tabs_lsp_main { + filter: sepia(0) saturate(0.8) opacity(0.85) hue-rotate(360deg) grayscale(0.05) brightness(0.85) invert(0.04); + /* border-bottom: 1px solid var(--ls-quaternary-background-color); */ +} +/* }} */ + +/* {{ 4.2. Table of Contents Plugin */ +[id*="logseq-tocgen--toc-slot"] { + padding-left: 0.5em; +} +.kef-tocgen-page span { + position: relative; + top: -0.1em; +} +.kef-tocgen-block-collapse { + border-color: var(--ls-quaternary-background-color) !important; +} +.kef-tocgen-page::before, +.kef-tocgen-block::before { + position: relative; + top: 0.7em; + left: 0.5em; + z-index: 1; + display: inline-block; + width: 0.375em; + height: 0.4em; + border-radius: 50%; + background-color: var(--ls-block-bullet-color); + content: " "; + pointer-events: none; +} +[data-ref="logseq-tocgen"] .kef-tocgen-block-children { + margin-left: 1.2em; +} +button.kef-tocgen-arrow { + position: relative; + margin: 0; + margin-left: -0.75em; + padding: 0; + padding-left: 1.2em; +} +button.kef-tocgen-arrow svg { + position: relative; + top: 0.05em; + left: -0.53em; + width: 0.8em; + height: 0.8em; + border-radius: 50%; + background-color: var(--ls-block-bullet-border-color); + color: transparent; +} +.kef-tocgen-page button.kef-tocgen-arrow svg { + top: -0.095em; + left: -0.54em; +} +button.kef-tocgen-arrow svg[style*="transform"] { + left: -1.2em; + margin-right: 0.3em; + width: 0.5em; + height: 0.5em; + background-color: transparent; + filter: none; +} +button.kef-tocgen-arrow:hover svg[style*="transform"] { + color: var(--ls-link-text-color); +} +/* <== }}} */ \ No newline at end of file diff --git a/logseq/export.css b/logseq/export.css new file mode 100644 index 0000000..c06762e --- /dev/null +++ b/logseq/export.css @@ -0,0 +1,4 @@ +:root { + --ls-font-family: Noto Sans CJK SC, Helvetica Neue, sans-serif; + --ct-code-font-family: Fira Code, Monaco, Menlo, Consolas, 'COURIER NEW', "Sarasa Mono SC NF", monospace; +} diff --git a/pages/hls__Computer_Organization_and_Design_1681729306797_0.md b/pages/hls__Computer_Organization_and_Design_1681729306797_0.md index cc1fe32..0f853ca 100644 --- a/pages/hls__Computer_Organization_and_Design_1681729306797_0.md +++ b/pages/hls__Computer_Organization_and_Design_1681729306797_0.md @@ -1064,12 +1064,30 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. for (int i = 0; i < n; i+=4) for (int j = 0; j < n; j++) { __m256d c0 = _mm256_load_pd(C+i+j*n); /* c0 = C[i][j] */ - for(int k = 0; k < n; k++) - c0 = _mm256_add_pd(c0, _mm256_mul_pd(_mm256_load_pd(A+i+k*n), _mm256_broadcast_sd(B+k+j*n))); + for(int k = 0; k < n; k++){ + __m256d b = _mm256_broadcast_sd(B+k+j*n) + c0 = _mm256_add_pd(c0, _mm256_mul_pd(_mm256_load_pd(A+i+k*n), b)); + } /* c0 += A[i][k]*B[k][j] */ _mm256_store_pd(C+i+j*n, c0); /* C[i][j] = c0 */ } } + + void dgemm_AVX_UNROLL(int n, double* A, double* B, double* C) { + for ( int i = 0; i < n; i+=UNROLL*4 ) + for ( int j = 0; j < n; j++ ) { + __m256d c[UNROLL]; + for ( int x = 0; x < UNROLL; x++ ) + c[x] = _mm256_load_pd(C+i+x*4+j*n); + for( int k = 0; k < n; k++ ) { + __m256d b = _mm256_broadcast_sd(B+k+j*n); + for (int x = 0; x < UNROLL; x++) + c[x] = _mm256_add_pd(c[x],_mm256_mul_pd(_mm256_load_pd(A+n*k+x*4+i), b)); + } + for ( int x = 0; x < UNROLL; x++ ) + _mm256_store_pd(C+i+x*4+j*n, c[x]); + } + } ``` - Fallacies and Pitfalls ls-type:: annotation @@ -1366,6 +1384,7 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. hl-page:: 327 hl-color:: yellow id:: 644a8a16-8e43-4d26-a968-8af915459447 + collapsed:: true - The pipeline must be stalled because one step must wait for another to complete. More specifically, the dependence of one instruction on an earlier one that is still in the pipeline. hl-page:: 327 ls-type:: annotation @@ -1423,7 +1442,339 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. hl-page:: 335 hl-color:: yellow id:: 644a8636-5eb3-45d2-ab01-a0acd29747b0 + collapsed:: true - Five stages: IF, ID, EX, MEM, WB + - **Pipeline Registers**: Instruction Memory can be used only in one of these stages. To retain the value of an individual instruction for its other 4 stages, the value must be saved in a register. Therefore, there are 4 registers between the 5 stages. + hl-page:: 337 + ls-type:: annotation + id:: 644bcbf6-66f0-4f82-b542-bf07ceb22716 + hl-color:: yellow + - PC can be regarded as the register before IF stage, and the RF can be regarded as the register after WB + - Any information needed in a later stage must be ==passed to that stage via a pipeline register== + hl-page:: 339 + ls-type:: annotation + id:: 644bcd54-fb9c-4d04-a133-9397d29534b8 + hl-color:: yellow + - Each logical component (ALU, RF, etc.) can be used only within a single pipeline stage. Otherwise, structural hazard. This naturally divides the pipeline into 5 stages. + hl-page:: 343 + ls-type:: annotation + id:: 644bd29e-d65e-4a73-89cc-124f907838ef + hl-color:: yellow + - Graphically Representing Pipelines + ls-type:: annotation + hl-page:: 345 + hl-color:: yellow + id:: 644bd357-ff90-42bc-9342-dc73102adee0 + - Well, nothing special, as long as you can read the figures. + - Pipelined Control + ls-type:: annotation + hl-page:: 349 + hl-color:: yellow + id:: 644bd45a-f008-440b-b367-2dad2a7267fc + - Constrained only in this section, the control signal is basically identical to the Single-Cycle version, since the data-path is unchanged. + - Control signals are generated in ID stage and passed through the pipeline via intermediate registers. +- Data Hazards: Forwarding versus Stalling + ls-type:: annotation + hl-page:: 352 + hl-color:: yellow + id:: 644bd711-ebfb-429c-a340-6c17191eda7d + collapsed:: true + - ID-WB Hazard: Read and write to the same register in the same cycle. + - Solution is to add a bypass inside the RF, and the hazard is eliminated. + - Dependency with distance of ==3 or more cycles== do not lead to a hazard. + - Forwarding to EX (ALU/Branch depends on previous result) + - Condition + 1. `EX/MEM.RegisterRd = ID/EX.RegisterRs/Rt` + 2. `MEM/WB.RegisterRd = ID/EX.RegisterRs/Rt` and `!(EX/MM hazard)` + - Here is a special case, when there are 2 sources of forwarding available, we choose the latest one (`EX/MM.Result`) rather than the outdated one. The code example is illustrated as follow + ```ASM + add $1, $1, $2 + add $1, $1, $2 + add $1, $1, $2 + ``` + - Additionally check `RegWrite` and `~RegisterRd`. We don't want to forward an empty instruction nor a non-write one. + - Three sources of input into ALU: + 1. ID/EX pipe-reg, normally read from RF + 2. EX/MM pipe-reg, forwarded from the prior ALU result + 3. MM/WB pipe-reg, forwarded from DM or earlier ALU result + - Forwarding to MM + - Store after Load + - `MM/WB.RegisterRd = EX/MM.RegisterRs`, since there is only one register operand in store + - Data Hazards and Stalls + ls-type:: annotation + hl-page:: 362 + hl-color:: yellow + id:: 644be99c-0fd5-44e6-9e17-769890c257a0 + - ALU (immediately) after load cannot be resolved by forwarding. When ALU uses the data, it is not read from DM. + In other words, the data we want only appears in `MM/WB`, while in the forwardable case, the desired data is available both in `MM/WB` and `EX/MM`. + - Hazard detection: `ID/EX.MemRead` and `ID/EX.RegisterRs/Rt = IF/ID.RegisterRd` + - nops: To stall the pipeline, insert an empty instruction before the to-be-stalled instruction. + hl-page:: 363 + ls-type:: annotation + id:: 644be9a8-d6e8-45d7-a345-bb57935e4ad6 + hl-color:: yellow + - `load` and previous instructions flow through, we do nothing to `EXMM` and `MMWB` and RF. + - Neutralize the `arith` by multiplexor, we write 0 to `IDEX` (indeed, only control-write signals need to be cleared) + - Pause fetching instruction for 1 cycle, we disable write to `IFID` and PC. +- Control Hazards + ls-type:: annotation + hl-page:: 365 + hl-color:: yellow + id:: 644bd891-f33c-43a9-87ba-b071ec181876 + collapsed:: true + - Assume Branch Not Taken + ls-type:: annotation + hl-page:: 367 + hl-color:: yellow + id:: 644bd898-be2d-4c8e-bec3-50823b9a7b28 + - Assume branch target is set to PC in MM stage (as the branch instruction reaches `MM/WB`). Let go only `MMWB`. Write 0 to `EXMM`(if we ignore delay-slot) `IDEX` and `IFID`. Since there is no control signal in `IFID`, a special signal `flush` is added. + - Moving branch resolution to ID stage + hl-page:: 367 + ls-type:: annotation + id:: 644bef12-3410-4f93-a0a7-cdc121cba36d + hl-color:: yellow + - As branch resolution is brought forward, the penalty decreases to 1 instruction. Only flush `IFID` which forms a bubble in the pipeline. + - Add a separate Add-Subtract Unit and a Compare Unit in ID stage, since they do not need much resources + - Difficulties: + - New forwarding logic in ID stage + - More stalls: when depending on ALU, 1 cycle; when depending on `load`, even 2 cycles. + - Dynamic Branch Prediction + ls-type:: annotation + hl-page:: 370 + hl-color:: yellow + id:: 644bee58-04af-4372-9825-73ca79d86ba3 + - Branch history table (BHT): A small memory, indexed by lower bits of the branch instruction's address, with a bit indicating if the branch is taken or not last time. + hl-page:: 370 + ls-type:: annotation + id:: 644bf9bb-3d27-429c-a8f2-904365f0820e + hl-color:: yellow + - For a loop branch, the exit branch is inevitably mispredicted. When the loop is entered again, 1-bit predictor will also miss the first loop branch, since the last exit branch sets its state to *not taken*. Therefore, 1-bit scheme is not ideal enough. + - 2-bit prediction schemes + - a prediction must wrong twice before changed + - For each branch , BHT keeps a FSM with 4 states, Strong-take, Weak-take, Weak-not-take and Strong-not-take. + - branch target buffer + hl-page:: 373 + ls-type:: annotation + id:: 644bfe25-cb9d-4a2c-baf2-6fdcee9c09f4 + hl-color:: yellow + - Use a branch-instruction-address-indexed memory to store history branch target, and save the cycle of calculating *branch target address* + - correlating predictors + ls-type:: annotation + hl-page:: 373 + hl-color:: yellow + id:: 644bfee0-90fc-478c-826d-24ab4df5a0ea + - Combine local behavior of a particular branch (as described above) with global information observed from the behavior of some recent number of executed branches. +- Exceptions + ls-type:: annotation + hl-page:: 374 + hl-color:: yellow + id:: 644bfe19-3e1d-4c8b-9308-afa36426b843 + collapsed:: true + - Exception Program Counter (EPC): save the address of the offending instruction + hl-page:: 375 + ls-type:: annotation + id:: 644c8287-e87a-4b27-aa58-a48b8bbbedf9 + hl-color:: yellow + - Reason for exception + - Cause register: holds a field which indicates the cause, and a single entry point is enough + hl-page:: 376 + ls-type:: annotation + id:: 644c821f-5e4e-496e-900c-579241acdf55 + hl-color:: yellow + - Vectored interrupts: different cause, different handler address + hl-page:: 376 + ls-type:: annotation + id:: 644c8153-402f-49e9-a33e-ddfb342f09ca + hl-color:: yellow + - Exceptions in a Pipelined Implementation + ls-type:: annotation + hl-page:: 376 + hl-color:: yellow + id:: 644c81bd-46b7-455c-82a5-300e283528bd + - In addition to `IF.Flush` which clears the `IF/ID` register, `ID.Flush` and `EX.Flush` are added (as well as mux) to flush instructions after the offending instruction (including itself, because in most cases, the instruction is required to re-execute). + - On exception detected, the pipeline flush these instructions, set next-PC to interrupt entry, save offending instruction's address + 4 to EPC as well as the Cause. All these things are done through combinational logic within the same cycle. + - Multiple exceptions can occur simultaneously in a cycle. The solution is to prioritize the exceptions. + hl-page:: 380 + ls-type:: annotation + id:: 644cc90a-7230-4fef-92ba-4e4e8679589c + hl-color:: yellow + - And there are some bits in the Cause Register to indicate pending interrupts, so that the hardware can interrupt again after earlier ones get serviced. +- Parallelism via Instructions + ls-type:: annotation + hl-page:: 381 + hl-color:: yellow + id:: 644cce08-6ba0-4c7f-8181-8453c74b4161 + collapsed:: true + - Pipeline and Multiple-Issue + - Two primary responsibilities + hl-page:: 382 + ls-type:: annotation + id:: 644cd47e-72cb-474f-9e9a-3d3078497428 + hl-color:: yellow + collapsed:: true + - Packaging instructions into issue slots: choose the set of instructions to be issued this cycle + hl-page:: 382 + ls-type:: annotation + id:: 644cd48f-6601-4c02-a0ee-b98f62d0360a + hl-color:: yellow + - Dealing with data and control hazards: some kinds of hazards could be alleviated + hl-page:: 382 + ls-type:: annotation + id:: 644cd494-d0c1-4529-8776-629f0ae97c5c + hl-color:: yellow + - The Concept of Speculation + ls-type:: annotation + hl-page:: 382 + hl-color:: yellow + id:: 644cd562-7690-4b77-9f18-39ebb9352846 + collapsed:: true + - Recovery mechanisms: speculation may be incorrect + - Exception: what if the instruction executed by speculation raises an exception + - Static Multiple Issue + ls-type:: annotation + hl-page:: 383 + hl-color:: yellow + id:: 644cd60e-9c4d-4851-bb99-6b4cbb757bb1 + collapsed:: true + - issue packet: The set of instructions issued together in 1 cycle + hl-page:: 383 + ls-type:: annotation + id:: 644cd795-5c31-4de1-841f-cb72e375cbc7 + hl-color:: yellow + - Very Long Instruction Word (VLIW): a single instruction allowing several operations in certain pre-defined fields + hl-page:: 384 + ls-type:: annotation + id:: 644cd983-c322-42e8-ad23-2e827defebd4 + hl-color:: yellow + - Issue packet in *static multiple issue* can be seen as VLIW + - The compiler undertakes the work to eliminate hazards and optimize for branches. + - Extra resources are added to avoid structural hazards. + - Hazards are increased as the parallelism increases. + - use latency: Number of clock cycles between a `load` instruction and an instruction that can use the result of the load without stalling the pipeline. + hl-page:: 386 + ls-type:: annotation + id:: 644cdb59-f65c-4c2d-acc2-d6f9d170a82c + hl-color:: yellow + - In the 2-issue case, more instructions are prevented from using the result of `load` without stalling, instead of only the next instruction, in the 1-issue case. + - An issue packet cannot be inter-dependent, since forwarding cannot take effect in such case. + - **register renaming** and **anti-dependence** + hl-page:: 387 + ls-type:: annotation + id:: 644ce676-1db2-4399-9079-22b6f3fd4edf + hl-color:: yellow + - an ordering forced purely by the ==reuse of a name==, rather than a ==real data dependence== + hl-page:: 387 + ls-type:: annotation + id:: 644ce786-f08e-4cae-914b-00a472d9a40c + hl-color:: yellow + - Such dependence could be eliminated by simply add more registers + - Dynamic Multiple-Issue Processors + ls-type:: annotation + hl-page:: 388 + hl-color:: yellow + id:: 644cddad-ba7d-49a8-98c6-135fd2f68e1c + collapsed:: true + - The simplest superscalar processor ==issue instructions in order== and ==hardware decides== whether 0, 1, or more instructions can issue in a given clock cycle. + hl-page:: 388 + ls-type:: annotation + id:: 644ce000-671e-44ce-b00d-86ae035f3a14 + hl-color:: yellow + - Compared with VLIW processors, superscalar processors guarantee correctness and fairly good performance for different compiler scheduling of code. In some VLIW designs, recompilation was required when moving across different processor models. + hl-page:: 388 + ls-type:: annotation + id:: 644ce05f-7da8-4b02-b0df-b75533c76703 + hl-color:: yellow + - Dynamic Pipeline Scheduling + ls-type:: annotation + hl-page:: 388 + hl-color:: yellow + id:: 644ce149-5f2f-449d-8b6d-86d589aad536 + - Dynamic pipeline scheduling ==chooses which instructions to execute== in a given clock cycle while trying to avoid hazards and stalls. This means that, instructions ==may not issue in order==. + hl-page:: 388 + ls-type:: annotation + id:: 644ce15b-b779-4624-bce4-fd2ae0541d0d + hl-color:: yellow + - Pipeline divided into 3 major units + hl-page:: 388 + ls-type:: annotation + id:: 644ce1dc-44b6-40f1-ad39-c34e660c9b32 + hl-color:: yellow + - Instruction fetch and issue unit: Deliver each instruction to a corresponding functional unit for execution + - Functional units: Each functional unit has *reservation stations*, holding its operands/operation. Once the *reservation stations* get ready, result is calculated. Finally, the result is send to commit unit, as well as other *reservation stations* depending on this result. + - Commit unit: *Reorder buffer*, holds the result until safe to deliver it to its destination. + - The combination of *reorder buffer* and *reservation stations* provides a form of *register renaming*. + - On issuing, all required data are buffered into *reservation stations*, from either RF or *reorder buffer*. After they are copied, these values can be freely overwritten. + - If an operand is not in RF or *reorder buffer*, then it would be directly bypassed from some *Functional unit*. + - Neither case requires re-use of a register in RF + - out-of-order execution + ls-type:: annotation + hl-page:: 390 + hl-color:: yellow + id:: 644ce915-4863-48fd-85f2-66e679623a7f + - in-order commit + ls-type:: annotation + hl-page:: 390 + hl-color:: yellow + id:: 644ce918-496d-430b-b631-212a7cf9b925 + - Difficulty in sustaining full issue rate + ls-type:: annotation + hl-page:: 392 + hl-color:: yellow + id:: 644ce9f1-d463-48b9-9ed7-98f218281b02 + - In many applications, most dependencies cannot be alleviated (true data dependency). + - Memory hierarchy leads to stalls in memory reference instructions + - Energy Efficiency and Advanced Pipelining + hl-page:: 392 + ls-type:: annotation + id:: 644ce2ec-c9bd-44a6-a51f-aaa9cf8a996b + hl-color:: yellow + - While the simpler processors are not as fast as their sophisticated brethren, they deliver better performance per joule + hl-page:: 392 + ls-type:: annotation + id:: 644ce31a-b366-4d64-b5a3-1831372d21dc + hl-color:: yellow +- Real Stuff: The ARM Cortex-A8 and Intel Core i7 Pipelines + ls-type:: annotation + hl-page:: 393 + hl-color:: yellow + id:: 644cea96-46cb-48b6-bd1c-e3f43205e6cb + collapsed:: true + - ARM Cortex-A8 (ARMv7-A, 2005) + - Dynamic multiple issue, but without pipeline scheduling + - 3-stage fetch, 5-stage decode and 6-stage execution + - 2-level branch predictor: a 512-entry branch target buffer, a 4096-entry global history buffer, and an 8-entry return stack + hl-page:: 394 + ls-type:: annotation + id:: 644cf0f0-aa33-425f-8a79-6b0d4a21d9ae + hl-color:: yellow + - Intel Core i7 920 (1st Gen, 2008) + - microarchitecture: The internal organization of the processor + hl-page:: 396 + ls-type:: annotation + id:: 644ced6c-a427-48bd-9ec2-31e925e0376f + hl-color:: yellow + - Renames the *architectural registers* (specified in ISA) to a larger set of physical registers, by maintaining a map in between. + hl-page:: 396 + ls-type:: annotation + id:: 644cee04-6588-4d06-becc-375612443e67 + hl-color:: yellow + - *Register renaming* offers ==another approach to recovery from incorrect speculation==: simply undo the mappings that have occurred since the first incorrectly speculated instruction. + hl-page:: 396 + ls-type:: annotation + id:: 644cef9a-7da3-441e-b1db-51045ca2d1d4 + hl-color:: yellow +- Going Faster: Instruction-Level Parallelism and Matrix Multiply + ls-type:: annotation + hl-page:: 400 + hl-color:: yellow + id:: 644cf33e-7f2f-444a-bf58-1107e02a4c84 + - In addition to SIMD-AVX in Chapter3, combine loop-unrolling technique to utilize ILP + - See ((6444bdac-2bc0-490a-ac86-88c702b83c65)) +- Fallacies and Pitfalls + ls-type:: annotation + hl-page:: 434 + hl-color:: yellow + id:: 644cf620-c517-42e0-958b-d2c58bbbcd09 - Word List 4 collapsed:: true - anatomy 解剖学 @@ -1445,4 +1796,419 @@ file-path:: ../../../../assets/Computer_Organization_and_Design_1681729306797_0. hl-page:: 334 ls-type:: annotation id:: 644a95de-ca6f-4036-b50a-629008ebd1ad - hl-color:: green \ No newline at end of file + hl-color:: green + - percolate 渗漏; + hl-page:: 367 + ls-type:: annotation + id:: 644bed0a-1ca6-4433-bc2a-78c9e2a15a33 + hl-color:: green + - tournament 锦标赛 + ls-type:: annotation + hl-page:: 373 + hl-color:: green + id:: 644bfdc9-5a90-451e-a203-745016f515fc + - clobber 狠击;惩罚; + hl-page:: 377 + ls-type:: annotation + id:: 644c835e-e733-4552-9104-450e7190c367 + hl-color:: green + - intermingled + ls-type:: annotation + hl-page:: 396 + hl-color:: green + id:: 644cec43-c523-4d68-b48d-c209e2223e18 +- # Large and Fast: Exploiting Memory Hierarchy + ls-type:: annotation + hl-page:: 451 + hl-color:: yellow + id:: 644cf7e2-0f30-4889-9edc-11ce3892141b +- ## Introduction + hl-page:: 453 + ls-type:: annotation + id:: 644dd4f0-dd17-4ca2-9360-413444e36db3 + hl-color:: yellow + collapsed:: true + - principle of locality + ls-type:: annotation + hl-page:: 453 + hl-color:: yellow + id:: 644dd503-3bcd-4ea2-a786-4083fa6b3162 + - Temporal locality (locality in time): if an item is referenced, it will tend to be referenced again soon. + ls-type:: annotation + hl-page:: 453 + hl-color:: yellow + id:: 644dd50b-6aaa-43a1-8d27-9d28861bdcaf + - Spatial locality (locality in space): if an item is referenced, items whose addresses are close by will tend to be referenced soon + ls-type:: annotation + hl-page:: 453 + hl-color:: yellow + id:: 644dd512-c64d-4d7d-802b-c3defdbc2712 + - memory hierarchy + ls-type:: annotation + hl-page:: 454 + hl-color:: yellow + id:: 644dd51d-6572-412f-befc-e033934ac377 + - a level closer to the processor is generally a subset of any level further away, and all the data is stored at the lowest level + ls-type:: annotation + hl-page:: 454 + hl-color:: yellow + id:: 644dd57e-591e-46e3-b782-07db59abfde9 + - **Block (or Line)**: the minimum data unit, either present or not, in the two-level hierarchy + hl-page:: 455 + ls-type:: annotation + id:: 644dd5b6-a024-4b08-93ee-0b8a9f0bf8ec + hl-color:: yellow + - **His and Miss**: data requested by processor found/un-found in some block in the upper level. And there is *hit rate* and *miss rate* (`=1-hit_rate`) + hl-page:: 455 + ls-type:: annotation + id:: 644dd61b-eaa7-4f0d-beab-103b48546ceb + hl-color:: yellow + - **Hit time**: the time to access the upper level memory, including the time needed to determine whether it is a hit or miss + hl-page:: 455 + ls-type:: annotation + id:: 644dd84f-f268-4600-a025-ab1372e99e01 + hl-color:: yellow + - **Miss penalty**: the time to replace a block in the upper level with the corresponding block from the lower level, plus the time to deliver the block to processor + hl-page:: 455 + ls-type:: annotation + id:: 644dd859-a7c9-4058-b89f-6f638f885927 + hl-color:: yellow +- ## Memory Technologies + ls-type:: annotation + hl-page:: 457 + hl-color:: yellow + id:: 644dd921-308b-4b4d-9440-e082bb44cfae + collapsed:: true + - SRAM Technology + ls-type:: annotation + hl-page:: 458 + hl-color:: yellow + id:: 644dd962-ebaf-4014-b8ec-4e24525359bb + - Single port R/W memory array; Fixed access time to any datum; Access time close to cycle time; 6-8 transistors per bit; Minimal power consumption + - DRAM Technology + ls-type:: annotation + hl-page:: 458 + hl-color:: yellow + id:: 644dd9ad-2f6e-445e-b4e8-4e4b45eece09 + - Value kept in a cell is stored as a charge in a ==capacitor== + hl-page:: 458 + ls-type:: annotation + id:: 644ddaac-b1da-455d-848f-547ea2fb90cf + hl-color:: yellow + - A single transistor to access (R/W) this stored charge. Thus denser and cheaper + - The charge cannot be kept indefinitely and must periodically be refreshed, thus Dynamic RAM. + hl-page:: 458 + ls-type:: annotation + id:: 644ddb68-1f5e-483b-a1a0-df3979e962d1 + hl-color:: yellow + - To refresh the cell, read its contents and write it back. + ls-type:: annotation + hl-page:: 458 + hl-color:: yellow + id:: 644ddb9a-f0f6-4161-8105-6d74ecad0ece + - Organization of DRAM + - Two-level decoding structure: bits organized in rows, refresh ==an entire row== with a read cycle followed immediately by a write cycle. + hl-page:: 458 + ls-type:: annotation + id:: 644ddfbe-a7cf-4048-b794-baae5d8891db + hl-color:: yellow + - DRAMs buffer rows (with SRAM) for repeated access. + hl-page:: 458 + ls-type:: annotation + id:: 644ddfe7-91ad-4c6b-9a67-075bf4eb6f33 + hl-color:: yellow + - Multiple banks. Bank consists of a series of rows, each with its own row buffer, permitting R/W simultaneously with ==address interleaving==. + hl-page:: 460 + ls-type:: annotation + id:: 644de669-6f2d-4853-83db-3b84b1f86a1e + hl-color:: yellow + - DRAMs added clocks and are properly called Synchronous DRAMs. The clock makes memory and processor synchronize easily. Burst transfer. + hl-page:: 458 + ls-type:: annotation + id:: 644de60d-55a9-44f8-b1c7-4f9848b62994 + hl-color:: yellow + - Flash Memory: Refer to ((643ba369-83df-42f9-9ee9-b45d4652e8fb)) + hl-page:: 460 + ls-type:: annotation + id:: 644ddddd-fd99-4cd6-b551-3e4cf0221948 + hl-color:: yellow + - Disk Memory: Refer to ((6437a4da-bca4-4f13-b018-30f3400d169f)) + hl-page:: 460 + ls-type:: annotation + id:: 644ddde0-69a4-4dc6-8a66-3e802d201809 + hl-color:: yellow +- ## The Basics of Caches + hl-page:: 462 + ls-type:: annotation + id:: 644dd9cc-74f0-4484-8a39-a3715e2b9194 + hl-color:: yellow + collapsed:: true + - Example Scenario: requests are each one word and the blocks also consist of a single word + hl-page:: 463 + ls-type:: annotation + id:: 644deb2b-3128-4949-a7d8-8d812e57d1e5 + hl-color:: yellow + - direct-mapped cache + hl-page:: 463 + ls-type:: annotation + id:: 644decf0-302e-44bc-8ebe-0e195d66565d + hl-color:: yellow + - Each memory location is mapped to exactly one fixed location in cache. + - Mapping function `(Block address) mod (Number of cache blocks)`, and number of cache blocks is usually power of 2 + - More specifically, the block index should be $\frac{\text{Byte Address}}{\text{Bytes per Block}} \mod N$ + - **tag** + hl-page:: 463 + ls-type:: annotation + id:: 644dee3d-839d-44c0-a772-b26b029987da + hl-color:: yellow + - Since many blocks may be mapped into the same cache block, tag field is added to the cache block, in order to ==identify whether a word in the cache corresponds to the requested word==. + hl-page:: 463 + ls-type:: annotation + id:: 644deeaa-657f-43c4-a7c7-c39e34d21b8c + hl-color:: yellow + - For example, for the direct-mapped cache above, use the upper bits of the RAM block address as tag. + - **valid bit**: whether an entry contains a valid address + hl-page:: 465 + ls-type:: annotation + id:: 644def1f-26c4-4e81-b269-d1c341ec1ecc + hl-color:: yellow + - The referenced address is divided into: Tag field (compare with cache entry) and Cache index (select the block) + hl-page:: 467 + ls-type:: annotation + id:: 644df14a-7c1b-4f37-8c27-7bacb9d683d9 + hl-color:: yellow + - Total cache size calculation + - Settings: 32-bit address, direct mapping, $2^n$ blocks in cache, $2^{m+2}$ bytes block + - Tag field size is $32 - (n + m + 2)$ + - n bits for index, and m bits for the word, 2 bits for the byte offset + - ==Larger blocks exploit spatial locality to lower miss rate== + hl-page:: 470 + ls-type:: annotation + id:: 644df720-1c8b-4503-b63c-25eedb390c05 + hl-color:: yellow + - Too large blocks (given a fixed total cache size), sacrificing the number of blocks, may increase miss rate. In addition, the miss penalty will go up and a large portion of the cache block will stay un-used before the block is swapped out. + - Usually, cache block is larger with higher memory bandwidth, since the miss penalty won't be much higher than smaller ones. + - Handling Cache Misses + ls-type:: annotation + hl-page:: 471 + hl-color:: yellow + id:: 644df84e-9877-44a2-8caf-09b4145b6616 + - Settings: In-order pipeline, instruction cache miss (data cache almost the same) + - 1. ==Send the original PC== value (PC – 4) to the memory. + 2. Instruct memory to perform a read and ==wait==. + 3. ==Write the cache entry== (write data field, put upper bits of the address into tag field, and set valid bit) + 4. Restart the instruction execution at the first step, which will ==re-fetch== the instruction + - Handling Writes + ls-type:: annotation + hl-page:: 472 + hl-color:: yellow + id:: 644dfa55-2147-43e0-92c4-b6eff3c77fd4 + - write-through + ls-type:: annotation + hl-page:: 472 + hl-color:: yellow + id:: 644dfb90-ed84-4674-9b19-933cc0d6452f + collapsed:: true + - Write the data both to cache and to memory + - On write miss, first fetch the block from memory, then write the word to cache and memory. This is called **write allocate** policy. + hl-page:: 472 + ls-type:: annotation + id:: 644dfbc5-1c5c-438b-a90d-ff3d1de00f5d + hl-color:: yellow + - **no write allocate**: only write to memory, without fetching the to-be-written block + hl-page:: 473 + ls-type:: annotation + id:: 644dfe25-7d59-43b0-bf19-3a3a1c46ff0b + hl-color:: yellow + - write buffer: The processor write to cache and the buffer, instead of to memory, and then goes on. Meanwhile, the write buffer writes the buffered data to memory. + hl-page:: 473 + ls-type:: annotation + id:: 644dfcad-d2f6-4e50-8b65-f539c7a54f7a + hl-color:: yellow + This scheme would still ==fail when the processor generates writes faster== than the memory could accept. + - write-back + ls-type:: annotation + hl-page:: 473 + hl-color:: yellow + id:: 644dfc5f-ed37-45c4-930e-f6457dac22d8 + collapsed:: true + - Write only to cache. Write to memory not until the block is replaced + - Implementing write-back strategy is more complex than write-through. + hl-page:: 473 + ls-type:: annotation + id:: 644dfedb-3afe-4afb-9b56-6ac3c2067783 + hl-color:: yellow + - Write to write-through cache can be done in 1 cycle (with write buffer). + We can write to cache block and read the tag in the same cycle, if tag doesn't match, we can safely abandon the block and issue a read to memory, since the memory always has a copy for that block + - Write to write-back cache needs 2 cycles. + We must read the tag in the 1st cycle, and in the 2nd cycle, if the tag doesn't match, issue a write miss instead; otherwise, write. + We cannot write directly in the first cycle, because if it doesn't match, the original block may be destroyed (i.e. a dirty block) without a backup in memory. + - Nonetheless, another buffer can be added to alleviate the problem for write-back cache + - +- ## Measuring and Improving Cache Performance + hl-page:: 477 + ls-type:: annotation + id:: 644de81f-f1ed-42b6-8b51-d6e72b8162bd + hl-color:: yellow + collapsed:: true + - Performance metrics + collapsed:: true + - CPU time (again), can be divided into 2 parts + hl-page:: 478 + ls-type:: annotation + id:: 644e0592-d4f8-4c4c-ab53-67473f40e1a9 + hl-color:: yellow + - $\text{CPU time} = (\text{CPU-execution clock cycles} + \text{Memory-stall clock cycles}) \times \text{Clock cycle time}$ + - Memory-stall clock cycles + hl-page:: 478 + ls-type:: annotation + id:: 644e0696-a447-4ddd-9bd3-dca459b91853 + hl-color:: yellow + - Primarily caused by cache misses, thus ignore other factors. And we have read misses and wirte misses + - $\text{Memory-stall clock cycles} = \text{Read-stall cycles} + \text{Write-stall cycles}$ + - Write (write-through) has two sources of stalls: write misses and write buffer stalls. Fortunately, in well designed modern processors, write buffer capacity is usually enough thus such stall can be neglected. + hl-page:: 478 + ls-type:: annotation + id:: 644e084a-1d64-423e-9083-ebc373cbb373 + hl-color:: yellow + - $\text{Memory-stall cycles} = \frac{\text{Memory accesses}}{\text{Program}} \times \text{Miss rate} \times \text{Miss pennalty}$ + - The example problem: Calculating Cache Performance + hl-page:: 479 + ls-type:: annotation + id:: 644e09e3-eb95-42e2-a1f9-f0cf60fecaa2 + hl-color:: yellow + - $\text{CPI}_{\text{stall}} = \text{CPI}_{\text{perfect}} + (\text{ICache miss rate} + \text{DCache miss rate} \times \text{Mem-ref ratio}) \times \text{Miss penalty}$ + - Average memory access time (AMAT). Hit time should also be taken into count. + hl-page:: 481 + ls-type:: annotation + id:: 644e0b77-e7b1-4e9c-ab3f-ce39337117e3 + hl-color:: yellow + - $\text{AMAT} = \text{Time for a hit} + (\text{Miss rate} \times \text{Miss penalty})$ + - More Flexible Placement of Blocks + ls-type:: annotation + hl-page:: 481 + hl-color:: yellow + id:: 644e0c19-d858-42e5-bfdb-223ff5ebba0d + - **Direct mapped**: block can be placed in a fixed location, decided by its address in memory. + - **Fully Associative**: block can be placed in ==any location== in the cache (can be associated with any entry in cache) + hl-page:: 482 + ls-type:: annotation + id:: 644e4d64-9421-4a8c-81da-fadceab42bb3 + hl-color:: yellow + - To find a block, search is done ==in parallel with a comparator== associated with each cache entry, which is costly in hardware. Such scheme is suitable for small caches. + hl-page:: 482 + ls-type:: annotation + id:: 644e4ddb-92f5-4356-9d47-5b85740a265f + hl-color:: yellow + - **Set Associative**: each block can be placed a fixed number of locations + hl-page:: 482 + ls-type:: annotation + id:: 644e4e73-39fe-4103-bada-1a4e86531b6a + hl-color:: yellow + - An *n-way set-associative* cache has a number of sets of n blocks. Each memory block maps to a unique cache set given by the index field, and can be placed in any block of that set. + hl-page:: 482 + ls-type:: annotation + id:: 644e5139-a913-4f1f-bbdd-2d577612cdea + hl-color:: yellow + - $\text{Set Index} = \text{Block\_number} \mod \text{Number\_of\_Sets}$ + - Similar to fully-associative case, we search ==all the tags of a set==. + hl-page:: 483 + ls-type:: annotation + id:: 644e52a9-4e90-4437-8996-7853fc809075 + hl-color:: yellow + - Direct mapping can be seen as **1-way set associative**, with the set size of 1. + Fully associative can be seen as **N-way set associative**, wit set size equal to total block number. + - Going from 1-way to 2-way associativity decreases the miss rate by about 15%, but there is little further improvement in going to higher associativity. + hl-page:: 485 + ls-type:: annotation + id:: 644e5618-0945-4d89-a683-8cd52d59afcd + hl-color:: yellow + - The three portions of an address: `Tag | Index | Block offset`. + hl-page:: 486 + ls-type:: annotation + id:: 644e56e1-7ffd-40fe-beed-5235db719d5a + hl-color:: yellow + - For full-associative cache, the `Index` field is 0-bit wide + - The higher associative, the more bits in `Tag` field, and thus the higher extra hardware cost + - Generally, we use LRU scheme to choose which block to replace + hl-page:: 488 + ls-type:: annotation + id:: 644e56c6-038e-47e7-a076-0f1841c1aa14 + hl-color:: yellow + - As associativity increases, implementing LRU gets harder; + ls-type:: annotation + hl-page:: 488 + hl-color:: yellow + id:: 644e5979-bafa-4d26-90ba-9c98218d5f04 + - In a 2-way set-associative cache, LRU can e implemented by keeping a single bit in each set, which indicates which element is referenced. + - Reducing the Miss Penalty Using Multilevel Caches + ls-type:: annotation + hl-page:: 489 + hl-color:: yellow + id:: 644e598a-08a7-49f3-966b-e994a472e499 + - The design considerations for a primary and secondary cache are different. + hl-page:: 490 + ls-type:: annotation + id:: 644e5aff-0474-4748-afcb-ae57e4dd7292 + hl-color:: yellow + - Primary cache focuses on hit time (since penalty is not that terrible, with secondary cache), while secondary cache focuses on miss rate. + - Primary caches are often smaller and use smaller block size, while secondary caches are larger and use larger block size with higher associativity. + - **global miss rate**: the fraction of references that missed in all cache levels + hl-page:: 495 + ls-type:: annotation + id:: 644e5faf-a110-4d73-bb7f-74376764029b + hl-color:: yellow + - **local miss rate**: miss rate for each level per se. + - Each level's miss rate is higher than global miss rate, but when they get multiplied together, the frequency of RAM access is reduced greatly + - Software Optimization via Blocking + ls-type:: annotation + hl-page:: 492 + hl-color:: yellow + id:: 644e5adc-7d6c-4136-8fa7-7849417949da +- ## Virtual Machines + ls-type:: annotation + hl-page:: 503 + hl-color:: yellow + id:: 644e0550-6991-4b86-9765-612e71bed268 +- ## A Common Framework for Memory Hierarchy + ls-type:: annotation + hl-page:: 533 + hl-color:: yellow + id:: 644e610b-15ef-47cd-8701-7bf7be87f16c +- ## Real Stuff: The ARM Cortex-A8 and Intel Core i7 Memory Hierarchies + ls-type:: annotation + hl-page:: 557 + hl-color:: yellow + id:: 644e0503-5ee5-4da8-bf62-04b2fa91e5f9 +- Going Faster: Cache Blocking and Matrix Multiply + ls-type:: annotation + hl-page:: 561 + hl-color:: yellow + id:: 644e053c-0254-41ad-ba8c-25527b64a217 +- ## Fallacies and Pitfalls + ls-type:: annotation + hl-page:: 564 + hl-color:: yellow + id:: 644deab8-5929-424b-a0bb-9944268d757e +- Word List 5 + collapsed:: true + - rug + ls-type:: annotation + hl-page:: 462 + hl-color:: green + id:: 644dded8-ffe3-4d2e-abbe-d4374b5b30af + - proximity + ls-type:: annotation + hl-page:: 478 + hl-color:: green + id:: 644e0631-3612-4778-86c2-e6f062b426ab + - incur + ls-type:: annotation + hl-page:: 489 + hl-color:: green + id:: 644e59e3-12be-418f-bd07-bb228ec2a8ac +- ## Dependable Memory Hierarchy + ls-type:: annotation + hl-page:: 497 + hl-color:: yellow + id:: 644dea78-9ad9-4322-a05d-1b30789b85a8 \ No newline at end of file diff --git a/pages/hls__ostep_1681115599584_0.md b/pages/hls__ostep_1681115599584_0.md index ef6051f..95f4eed 100644 --- a/pages/hls__ostep_1681115599584_0.md +++ b/pages/hls__ostep_1681115599584_0.md @@ -1299,6 +1299,7 @@ file-path:: ../assets/ostep_1681115599584_0.pdf id:: 643a8c8e-b3ae-4de8-9280-75201b02d6db hl-color:: yellow - Disk Organization + id:: 643e8edc-c382-48ae-80d2-d661571bc5dd - **blocks**: divide the disk into blocks (i.e. commonly used 4KB) hl-page:: 527 ls-type:: annotation