掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 4538|回复: 6

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

[复制链接]
  • TA的每日心情
    慵懒
    2025-1-28 16:22
  • 签到天数: 216 天

    [LV.7]常住居民III

    发表于 2017-9-21 05:05:21 | 显示全部楼层 |阅读模式
    本帖最后由 deeke 于 2017-10-10 23:38 编辑 # k( \/ O+ C5 c9 }
    6 T) l6 V" ^6 A2 b+ v8 _6 \" ^
    170928:更换图例。1 {4 y: F* {+ i( g$ E/ e
    ------------------------------------------
    ' o% F8 l2 L3 L, J) `
    " r+ d2 m7 j$ `/ R------------------------------------------" y7 |- Y) D/ C9 L0 q
    感谢 ryuya 制作、分享的跳转词典,和 GD 自带的构词法各有用处。
    $ t# d. b; j1 A: |JumpToDicts 3.0 (英語構詞法詞典)+ C+ S6 p1 B! D% f, |: x9 E  E2 K
    JumpToDicts (phrase version add-ons)
      W) N- E2 {: v! N% I7 o8 }我的软件环境是:Win8.1 + GoldenDict_Qt5_x64_portable 。
    1 B9 k- f4 Y; s4 u
    : t0 j' R1 x; F& H: F4 [: v" O词典没有外置 css 文件,所以通过 article-style.css 来曲线修改。直接修改 mdx 文件更方便快捷,但是我们就要在平坦的道路上曲折前进。
    8 C% L& I. I" V5 A3 {7 v根据来源不同,外框有四种颜色,此信息体现在小箭头( u279C )上,并保持一致。
    9 p( I8 v2 V& V5 H  V/ Q6 R. I+ G
    1. 在 GD 里找出词典编号。
    3 }* G7 ?5 ?0 L3 o: ~# ~鼠标右键“审查元素”,或直接按 F12 。每台电脑的词典编号并不相同。
    ) [# _: f, B$ ?8 x$ g
    1. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 对应 JumpToDicts 3.0, v& i: Y' b5 d9 M, A
    2. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 对应 JumpToDicts (phrase version add-ons)
    复制代码
    + }5 M6 n* d) M' C) A& C2 z0 t
    ; a9 }7 g9 ^3 \: X
    2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ” 。
    5 p. I# S/ I4 d' j# I4 L+ R
    1. /* JumpToDicts | Start */9 }+ C2 P3 `( `2 r
    2. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div,% K$ \# n9 E" i7 l9 w  P* Q: Z
    3. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div {. Z( y0 ~. T8 G3 E! Y
    4.   font-family: Lato, sans-serif !important;2 A5 m$ D; \- B: v9 W
    5.   font-size: .625rem !important;( r/ M3 j- w% j) B1 K6 b! R7 X
    6.   font-weight: normal !important;
      0 p( O$ \1 h& R& V
    7.   font-style: italic;
      9 w! m( A" E2 }& t
    8.   width: auto !important;
      / o2 q3 f+ P) I
    9.   padding: 0 !important;/ K; e5 a8 i3 x  s/ [' f
    10.   color: gray !important;
      1 D/ }+ w) h; D+ L( |% J- Q
    11.   border: none !important;
      2 s9 X/ _5 r3 @% g; V& n0 y  M+ r
    12.   border-radius: 0 !important;. M" H3 Q$ g& z4 v$ N% W
    13.   background-color: transparent !important;
      * L: c* w0 ?5 A  Y& t# {( ~
    14.   box-shadow: none !important;, S3 B* s4 l& p  g& M+ N
    15.   vertical-align: baseline !important;
      2 o9 D9 L$ _4 H- N8 ]3 H
    16. }  K% L+ m0 b; e2 ^& i' q3 N( x
    17. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div::before,
      2 n9 r9 l% }' f" I7 P+ k+ f
    18. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div::before {8 N7 n* r* _5 U7 E2 Y$ h. m' ~% q
    19.   font-family: "Segoe UI Symbol";- ]" j$ o- r- a8 O
    20.   font-size: .5rem;# g- R  i  }- a  v2 U+ [
    21.   font-style: normal;
      2 Y/ H1 Q* e: z0 K
    22.   line-height: 0;
      1 J; q) F$ z% r6 J
    23.   position: relative;) f- y% x# B6 B5 Z6 _( a$ Z# a
    24.   bottom: .0425rem;
      ) @  o% G3 N9 l' l' S# r
    25.   margin-right: .23rem;
      . B0 w5 O0 @) ^% R/ m, s
    26.   content: "\279C";
      3 l; z6 ]0 C+ h) p" o9 i
    27.   vertical-align: baseline;% z5 H. P) r5 S, ]5 o
    28.   color: green;6 w) q2 G6 {$ q! h+ R
    29. }
      : f8 N5 D9 w' k( ?, l: ^
    30. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.MW::before { color: orange; }1 o( J8 [& B) b9 [3 ]2 l( }
    31. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.O8::before { color: deeppink; }
      6 U( D/ L8 U9 x" t
    32. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.spell::before { color: #444444; }# y# w' O8 M0 D0 l5 W
    33. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div.phrase::before { color: #1E8BB7; }
      , e5 X9 i9 [! l9 c( q
    34. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>br,. z) e5 M) f# [3 D4 {
    35. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>br { display: none; }9 K! m4 r% A5 @) |9 q
    36. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>hr,
      * _" D) x& a! J1 \9 i# O. E/ T, f
    37. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>hr { margin: .1rem !important; }
      * j4 i9 x# x; g) @5 X
    38. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a,
      ) N' q' w7 Z. ]5 J+ @9 k
    39. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a {5 I/ a0 ]2 R: _* R/ [! L
    40.   font-size: .875rem !important;
      9 N. W9 d% X' R. V. j
    41.   font-weight: bold !important;- p+ T% l( c1 a2 c& d
    42.   font-style: normal !important;5 Z9 V1 p' _* ?  f: U  C
    43.   margin: auto .23rem !important;
      8 n6 ]5 \% Y: i$ q0 t. b
    44.   text-decoration: none !important;/ F3 ?: g0 z- i* l2 m
    45.   color: black !important;+ |: `( X  E" K, o2 D6 [0 u3 N
    46.   border-bottom: .08rem solid transparent !important;
      $ E8 Y+ l7 H" C& U; d4 U  ]
    47.   outline: none !important;
      ' ]3 G3 O- a" M! V0 k
    48. }4 _  M( j+ ]+ n6 ~+ l
    49. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:link,# k- d/ }' o8 G0 X
    50. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:link,
      ; j1 I& \$ N. H! h) U* _
    51. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:visited,
      2 g4 z, F8 ]& p: _* v
    52. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:visited { color: black !important; }' f5 N' B- J5 |$ a* b! B
    53. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:hover,) m9 v: }8 ]& w3 D# _3 e
    54. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:hover,
      ' [6 d0 F: h& |* N
    55. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:active,
      # E; o- Y) w( v" y+ N3 x& z- s9 w- v
    56. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:active {" c* e* F$ x" P- x1 R  L% {
    57.   color: black !important;
      / S, \3 c' F* ?; M( Y! C
    58.   border-bottom-color: black !important;/ R, R" R% ^  k% D- [0 f3 |' ^
    59.   background-color: yellow !important;
      - H# j+ e" d7 y6 f7 p1 D& p3 |
    60. }" N! N: P* D" p3 v" [" W6 J9 l
    61. /* JumpToDicts | End */
    复制代码

    4 |- Q+ w7 q+ ~& k2 \------------------------------------------: e* C0 Q6 C/ V6 P
    修改 dsl 词典的展开按钮  |* z& t3 ]8 w) }" _9 T. Q0 S) i
    9 h5 R  ?! d& a9 a
    1. 在网上找两个图片表示展开、折叠,改名为 expand.png  、 collapse.png  。
    1 C0 A) l& e# A. U8 Y8 t: A+ R/ n放入文件夹:“ c:\...\GoldenDict\portable\icons\ ”备用。% L) z/ t5 z; M5 b( `9 C

    - c0 I/ W0 j/ S  A2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ”。
    $ r8 c' |( n7 e4 d4 w调整各种 前后左右、高矮胖瘦。
    4 l0 U6 i' o. N6 H2 W
    1. .dsl_headwords img[src$="expand_opt.png"] { content: url("file:///icons/expand.png"); }
      1 g% q. h5 j: a9 Y' {
    2. .dsl_headwords img[src$="collapse_opt.png"] { content: url("file:///icons/collapse.png"); }
      4 s2 m8 ]* A: v( Y. r
    3. .dsl_headwords img[src$="expand_opt.png"],
      " G9 k" G. m8 b$ g
    4. .dsl_headwords img[src$="collapse_opt.png"] {
      / {9 l# ]' e) R4 R# y' L& Q! [
    5.   line-height: 0 !important;9 U& k6 m. y+ _( U; s& Z6 ~
    6.   position: relative;
      2 I% T0 @' V: q8 F
    7.   bottom: .125rem;; E/ D$ w) T& j
    8.   left: .475rem;
      ( V  m$ L" u9 E# z, S
    9.   width: .75rem;7 \" u2 H. h- p5 [1 W  t& N2 ~
    10.   height: .75rem;2 O3 N& w3 d: Q
    11. }
    复制代码

    0 }5 ^  P- r; G% [9 U- @, g------------------------------------------5 k/ h3 m* Q% E1 Y

    : r8 Y. L# P, u1 p& P! f3 e! _搞定收工,试试看外链的图床效果如何。别忘了帮我评分呦~~~

    评分

    3

    查看全部评分

    本帖被以下淘专辑推荐:

    • · 工具|主题: 61, 订阅: 27
  • 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的每日心情
    慵懒
    2025-1-28 16:22
  • 签到天数: 216 天

    [LV.7]常住居民III

     楼主| 发表于 2017-9-21 10:37:42 | 显示全部楼层
    HMPT 发表于 2017-9-21 10:29
    * C3 u, ]3 o' t" y% c8 I2 k@deeke 好方法!!!!!

    ( K8 l+ y( u% w- I8 U" y我比较晚才开始用 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 f" b8 _, U* d& e0 t
    两个词典放在一个文件夹下。手机深蓝词典。
    1 @& o) H/ N3 r" C谢谢!
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

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

    GMT+8, 2026-11-17 04:43 , Processed in 0.026593 second(s), 24 queries .

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

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