掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 2697|回复: 6

[经验交流] [2] 通过 article-style.css 调整跳转词典 JumpToDicts

[复制链接]
  • TA的每日心情
    慵懒
    2023-10-14 18:34
  • 签到天数: 210 天

    [LV.7]常住居民III

    发表于 2017-9-21 05:05:21 | 显示全部楼层 |阅读模式
    本帖最后由 deeke 于 2017-10-10 23:38 编辑 $ m: ^$ h7 E8 F% a( g1 ^. _
    4 z- H" b. W: N
    170928:更换图例。
    ' s) b- ?5 l) T# M& Q! K# g------------------------------------------/ {1 C% D& m% |5 Z) b

    4 w& q7 J8 v* H# J( L: _------------------------------------------  @* O4 R' q/ d0 F* k! _
    感谢 ryuya 制作、分享的跳转词典,和 GD 自带的构词法各有用处。
    ! b. Z/ [5 c2 J% X, G$ cJumpToDicts 3.0 (英語構詞法詞典)9 B( `& t  ^% R) s( \
    JumpToDicts (phrase version add-ons)8 B. \! ~, n; h
    我的软件环境是:Win8.1 + GoldenDict_Qt5_x64_portable- e" B2 _* _+ I& ^8 W$ K- g& l
      V' H7 p: U  ]! J, T" ^
    词典没有外置 css 文件,所以通过 article-style.css 来曲线修改。直接修改 mdx 文件更方便快捷,但是我们就要在平坦的道路上曲折前进。
    / o$ O# Y, n: T# _4 c2 d2 z根据来源不同,外框有四种颜色,此信息体现在小箭头( u279C )上,并保持一致。
    8 Z+ o1 \, B/ N( v
    ; {  x; P0 }% f, ]' v, Q1. 在 GD 里找出词典编号。
    ( }, P% R9 `( A2 \鼠标右键“审查元素”,或直接按 F12 。每台电脑的词典编号并不相同。9 }% O2 ^  ]& L# I2 o1 R3 @, T
    1. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 对应 JumpToDicts 3.03 s3 ?: Y* m' t+ d) ~( J
    2. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 对应 JumpToDicts (phrase version add-ons)
    复制代码
    1 Q* E3 r- p3 j6 |( m

    - G6 ~# L- I% l, P' O$ K% n2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ” 。0 L. o( n# L  G' _8 h
    1. /* JumpToDicts | Start */0 m7 }6 m  e% I; }9 @1 d* H
    2. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div,
      * w  c5 f/ j5 b# c$ u2 d
    3. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div {# G- T- q5 A2 {) @
    4.   font-family: Lato, sans-serif !important;
      ' C# W: u& m+ f$ }
    5.   font-size: .625rem !important;* {; S( p% ?) L/ K  C
    6.   font-weight: normal !important;
      . j: P7 }6 X0 Y3 }6 n- H6 e
    7.   font-style: italic;( g& x4 ^% M% y
    8.   width: auto !important;
      8 L7 }; S5 c  C! t# ?# b
    9.   padding: 0 !important;
      ' s8 _. ?' O4 C) Q3 @
    10.   color: gray !important;
      3 n2 ?+ A8 Z: h; X$ K
    11.   border: none !important;% E# p2 ~/ K- p5 F. K- e& U
    12.   border-radius: 0 !important;
      " ~9 }6 F9 a! V3 G
    13.   background-color: transparent !important;
      . t" B4 _/ ^: k# ]  M
    14.   box-shadow: none !important;) l) l2 o1 Z! n0 v9 P! t, U$ ^
    15.   vertical-align: baseline !important;
      : j2 q2 |! O. B/ d  V) N# w* @3 J8 J
    16. }
      6 d: T6 f* K& J3 b4 R0 J
    17. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div::before,: }2 n# n4 g* v
    18. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div::before {
      $ x2 I7 A2 T' p7 I) r: l2 ?
    19.   font-family: "Segoe UI Symbol";
      1 I3 T2 R3 ~/ Q* {
    20.   font-size: .5rem;
      $ {  c8 B" A% }" H9 s
    21.   font-style: normal;
      ' S0 ~& G* g4 W; ^" s1 ?1 Y* ?
    22.   line-height: 0;" V* }5 t- f& o, D6 M
    23.   position: relative;
      2 ^/ U. J0 y- @7 Q" P7 Y
    24.   bottom: .0425rem;
      2 K7 b6 W7 |6 i0 l/ g* H
    25.   margin-right: .23rem;
      + ~6 j: b( H; _
    26.   content: "\279C";
      % J) C( E8 b. p/ B5 U6 r% b
    27.   vertical-align: baseline;1 z8 x* v: j$ |& x/ t( m- V
    28.   color: green;
      7 M! r# P: w0 x3 m( D) [& _
    29. }
      1 c! `5 W* v" z; ~
    30. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.MW::before { color: orange; }
      2 G+ T) \0 z  S' F
    31. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.O8::before { color: deeppink; }
      0 h; K* I0 H) s) M- [) y
    32. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.spell::before { color: #444444; }
      $ V( {5 X# V2 O9 t; x3 P- Z
    33. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div.phrase::before { color: #1E8BB7; }3 p2 \' w) U- e, f
    34. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>br,
      # T! h" U- _" t) ?
    35. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>br { display: none; }
      * |( P) u+ n7 n) f- I" `; f1 `
    36. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>hr,2 V# _( |, c4 w2 X) X
    37. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>hr { margin: .1rem !important; }/ N' z& T. g! U; s: m# x: `
    38. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a,
      + C/ C& |; y7 O+ d
    39. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a {! V9 Y% |+ F6 X3 w  c$ }4 Q
    40.   font-size: .875rem !important;
      3 c6 T7 U. L% s+ O: g/ z
    41.   font-weight: bold !important;6 F& i/ @4 z% B# ~3 U& a! |
    42.   font-style: normal !important;" H: d4 i2 _' g+ D
    43.   margin: auto .23rem !important;3 i( q+ b+ S. A% w6 A8 }
    44.   text-decoration: none !important;' }& D$ t" e+ s
    45.   color: black !important;) Y7 z$ F& O$ K: ]5 D% m
    46.   border-bottom: .08rem solid transparent !important;9 Z$ K# O9 H1 E" o) a: o4 }; X
    47.   outline: none !important;
      + e- {7 a/ z3 E5 Y- G6 o) P3 ^
    48. }$ k! ?% H/ ?6 _. X; s
    49. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:link,( ]! w7 R8 O5 M2 f) V7 X
    50. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:link,
      - L0 H$ M2 E# |
    51. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:visited,3 ]4 F7 `5 y$ g! h# J# j1 {
    52. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:visited { color: black !important; }
      # f5 R$ f- E0 m4 v0 @1 F" r
    53. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:hover,2 \) O% F8 Y; h
    54. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:hover,
      2 R; Y# W" _0 n8 N" q$ Q+ Z
    55. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:active,
      " }8 C' g7 W# E
    56. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:active {0 I0 P4 ]' V5 |- X1 G! ?& @
    57.   color: black !important;+ H1 Y) Q* G8 x* O$ r- Z/ R( G# \2 x
    58.   border-bottom-color: black !important;7 S- v  k3 P5 a& ^3 u% A3 A
    59.   background-color: yellow !important;( ~5 f. F( ~5 e' b, G2 {
    60. }
      ( d' [5 `) \* |. Z7 y: p4 q  S
    61. /* JumpToDicts | End */
    复制代码

    ) q$ F8 L6 K7 ^. Y: \& k! `0 O------------------------------------------' r6 V( S! s. u% m7 A- v( D6 c
    修改 dsl 词典的展开按钮# q6 Y2 f+ j; N: F

    ; L, F  F& n7 L; D1. 在网上找两个图片表示展开、折叠,改名为 expand.png  、 collapse.png  。
    6 f9 |+ T; ]& J! w% ?, }" H放入文件夹:“ c:\...\GoldenDict\portable\icons\ ”备用。+ D; l) k9 P8 J1 J

    7 U+ M% i! s* D- m2 P2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ”。
    6 S  q" @2 `7 T/ j9 S0 ?调整各种 前后左右、高矮胖瘦。
    % a( ~  F) E6 X2 B3 }+ m
    1. .dsl_headwords img[src$="expand_opt.png"] { content: url("file:///icons/expand.png"); }3 k8 F% D+ B4 a( G4 m
    2. .dsl_headwords img[src$="collapse_opt.png"] { content: url("file:///icons/collapse.png"); }* p; _( a% G+ _* R0 k& N0 ~, A
    3. .dsl_headwords img[src$="expand_opt.png"],
      ; v& ?0 S1 x" H. J* B" H: A
    4. .dsl_headwords img[src$="collapse_opt.png"] {2 \  s9 p+ v5 T0 U4 g: ]; z
    5.   line-height: 0 !important;
      1 x; y7 ]) O0 Z- B3 }1 U" ~. v% K) J
    6.   position: relative;
      / j  _) t4 U/ W
    7.   bottom: .125rem;5 A+ z& y# f' x, j( q
    8.   left: .475rem;
      ; v7 b1 D! M" e. S! D  ^
    9.   width: .75rem;; e' I2 H% z9 X6 z: |
    10.   height: .75rem;# d' R& O5 F5 n" j8 F
    11. }
    复制代码

      g2 M8 ~2 G8 B5 s2 f9 l# w------------------------------------------
    : U( [8 M- X& F: M0 r& \
    9 b+ S8 Q4 e) i7 [" {: X* J搞定收工,试试看外链的图床效果如何。别忘了帮我评分呦~~~

    评分

    3

    查看全部评分

    本帖被以下淘专辑推荐:

    • · 工具|主题: 61, 订阅: 28
  • TA的每日心情

    2019-9-20 08:37
  • 签到天数: 214 天

    [LV.7]常住居民III

    发表于 2017-9-21 08:27:21 | 显示全部楼层
    GoldenDict_Qt5_x64_portable 这种词典是不是只能放在portable目录??

    点评

    不是,比如我词典文件放在 c:\Dicts\ ,把这个文件夹的快捷方式 Dicts.lnk 放在 ...\GoldenDict\content\ 中就可以了。注意不是 mdx 的快捷方式,是文件夹的。  发表于 2017-9-21 10:20
  • TA的每日心情

    2019-9-20 08:37
  • 签到天数: 214 天

    [LV.7]常住居民III

    发表于 2017-9-21 10:29:45 | 显示全部楼层
    @deeke 好方法!!!!!
  • TA的每日心情
    慵懒
    2023-10-14 18:34
  • 签到天数: 210 天

    [LV.7]常住居民III

     楼主| 发表于 2017-9-21 10:37:42 | 显示全部楼层
    HMPT 发表于 2017-9-21 10:291 L+ P- }6 \) t7 U
    @deeke 好方法!!!!!

    & P# G, u4 ]" L  D  J/ W0 q5 s我比较晚才开始用 GD ,都是从置顶的经验贴学来的。

    该用户从未签到

    发表于 2019-1-9 16:27:04 | 显示全部楼层
    谢谢,才知道把词典目录的快捷方式放在content那里也可以。
  • TA的每日心情
    开心
    2019-5-28 07:39
  • 签到天数: 339 天

    [LV.8]以坛为家I

    发表于 2019-4-12 16:25:44 | 显示全部楼层
    请问,直接修改mdx文件,怎么实现?6 _: @; ?0 ^7 J+ p( g
    两个词典放在一个文件夹下。手机深蓝词典。
    * S5 V7 ^, z2 C! @8 h* p/ d谢谢!
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

    小黑屋|手机版|Archiver|PDAWIKI |网站地图

    GMT+8, 2024-5-3 09:52 , Processed in 0.050482 second(s), 11 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2023, Tencent Cloud.

    快速回复 返回顶部 返回列表