掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 3443|回复: 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 编辑 ( q9 D6 Z- ]* S/ @& ~

    7 F% Q7 x, T8 `9 C! g170928:更换图例。
    ! Y8 }) Y5 K# m- ]+ c9 o" O3 b------------------------------------------# U0 [; {. |6 I
    5 [. N+ v- f" g# Y+ C
    ------------------------------------------
    ) P7 H, l+ _9 X$ Y! Y3 x5 o感谢 ryuya 制作、分享的跳转词典,和 GD 自带的构词法各有用处。
    ) q" C) `; G' a$ g" RJumpToDicts 3.0 (英語構詞法詞典)4 G. H9 \/ |4 m- w
    JumpToDicts (phrase version add-ons)  a; S- @" I3 X2 x
    我的软件环境是:Win8.1 + GoldenDict_Qt5_x64_portable
    7 t- P2 o0 J! w
    2 {2 B8 x9 j. Q8 {/ h" r+ [词典没有外置 css 文件,所以通过 article-style.css 来曲线修改。直接修改 mdx 文件更方便快捷,但是我们就要在平坦的道路上曲折前进。6 ?8 R" T! r# o
    根据来源不同,外框有四种颜色,此信息体现在小箭头( u279C )上,并保持一致。7 O( p& ~/ R; v. M0 W% J4 Y0 P

    ( f2 I% k) r) e4 e2 B1. 在 GD 里找出词典编号。
    + Q; p! Y4 x, J$ h6 T5 B鼠标右键“审查元素”,或直接按 F12 。每台电脑的词典编号并不相同。
    3 R) _1 x: K) f5 [1 c
    1. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 对应 JumpToDicts 3.05 H: s, t8 h: ^9 i; `
    2. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 对应 JumpToDicts (phrase version add-ons)
    复制代码

    * B: v, g! S. ~# k
    8 z9 a( K, g% n. q' _5 ^* P9 ~1 A2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ” 。
    ' n$ D% u- r3 F; a% X
    1. /* JumpToDicts | Start */
      7 t" I% k* t. \
    2. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div,2 r7 Z8 V$ M* B
    3. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div {
      * [$ n# ~7 ^4 n1 t# K2 w/ b
    4.   font-family: Lato, sans-serif !important;
      5 I6 O5 H# B" x3 j8 H
    5.   font-size: .625rem !important;$ T1 V3 l: ~4 W/ J) j+ Y* \
    6.   font-weight: normal !important;
      & C0 K* N( H& U: I
    7.   font-style: italic;* u5 ^  `, `4 L) c0 ]& `
    8.   width: auto !important;$ P: v$ R. M$ m7 c8 n' q+ h
    9.   padding: 0 !important;* F. w2 O4 X# G2 @
    10.   color: gray !important;: N4 @% r) q* B; O9 O  i
    11.   border: none !important;
      " a1 _' Z9 j% Z4 X4 K. U8 |; u
    12.   border-radius: 0 !important;! z; L" M5 ^8 }. ?9 G- _- m
    13.   background-color: transparent !important;
      $ N6 b; |3 P; b& O8 @" {' M
    14.   box-shadow: none !important;8 H5 P8 J! X1 h; E' |
    15.   vertical-align: baseline !important;
      . @7 \. R' ~" i2 x! n
    16. }/ x( ~' H4 {4 a- ]2 D
    17. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div::before,4 r& G5 W. n) o$ ?+ z7 ?
    18. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div::before {$ j  C5 d. o, ?+ K6 p" ?7 u* ^
    19.   font-family: "Segoe UI Symbol";7 @4 s; Z+ E) s2 i
    20.   font-size: .5rem;
      ! w7 k  z6 r) B5 O# [8 g
    21.   font-style: normal;
      . ~+ T: E5 ~; c* R0 a4 F
    22.   line-height: 0;9 @' [, b4 t2 c: r5 y
    23.   position: relative;
      - j6 E4 q+ ^+ r) w7 {0 H/ Q7 B! f' F
    24.   bottom: .0425rem;) K! d* O% O. F
    25.   margin-right: .23rem;7 K7 n  E' `: R. F
    26.   content: "\279C";5 @) j# J1 ^( T8 X& u
    27.   vertical-align: baseline;! K9 U4 U% `4 D* [4 w) P) _
    28.   color: green;. q( C3 D/ t9 g- {- e; x, f' Q+ ?5 U" J
    29. }' U  a% S  l, f7 C
    30. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.MW::before { color: orange; }. q, p7 i8 Q  a8 G2 i- n, n7 L
    31. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.O8::before { color: deeppink; }, ?! p" ^1 v% w: m$ [# q( r; [1 b
    32. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.spell::before { color: #444444; }' E+ K2 g6 @% X2 n4 A: O" I1 i% J. |
    33. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div.phrase::before { color: #1E8BB7; }5 r3 G( |& L% x0 }  n2 o
    34. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>br,
      1 @  m1 H) z6 J/ @0 r3 |# q9 b1 y
    35. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>br { display: none; }9 i2 u  Z! w5 G" u
    36. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>hr,
      2 t; o, W( F7 L% f$ h# B
    37. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>hr { margin: .1rem !important; }
      7 k- ?% X) j- d/ R' }# q
    38. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a,$ |$ K& Q* Z3 G$ U2 b
    39. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a {
      $ S6 t' w/ |( q; u0 X4 n
    40.   font-size: .875rem !important;! \4 \" P8 @0 Z6 K
    41.   font-weight: bold !important;
      9 x( J- B/ u! {. ~5 v) o5 J5 P4 e
    42.   font-style: normal !important;
      - Z. f7 `* H3 u" z' A
    43.   margin: auto .23rem !important;
      4 a& t2 U$ W- ]$ u/ m. M4 m- \
    44.   text-decoration: none !important;: Z7 H7 [) O. _/ j) G; M
    45.   color: black !important;
      ' F- n5 f9 ?" q) o/ G# ^
    46.   border-bottom: .08rem solid transparent !important;
      3 b) g9 ^: b9 a3 T+ E
    47.   outline: none !important;
      ( U4 O1 }+ o$ v+ V
    48. }1 U! w; o! V/ o! t  ^+ s7 f' i* Z- `
    49. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:link,$ T! `- Y+ `$ H
    50. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:link,
      : k3 F  g1 J3 ?% Q4 \7 K; M. L
    51. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:visited,
      3 g: u8 m. V( [+ [3 y3 Y
    52. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:visited { color: black !important; }
      / U0 I  [6 l1 F
    53. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:hover,
      - v* ~% H, ?. f8 h4 @: `. a
    54. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:hover,
      7 K0 x# A4 U. i) `* o0 k4 ]
    55. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:active,
      % J3 I7 K3 o3 K- g- y2 V
    56. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:active {
      0 Q$ E9 o& G8 L' g3 X
    57.   color: black !important;
      6 O0 F( `; U8 |( U8 O
    58.   border-bottom-color: black !important;
      1 I9 I1 P) s' v8 B: d/ ]2 \2 {
    59.   background-color: yellow !important;* t$ B5 Y: g5 [# f, l' F
    60. }
      ! |% W) @5 S6 z4 N1 e1 T( B& c" H# P
    61. /* JumpToDicts | End */
    复制代码

    ' ?' {) p5 k  s4 I4 P2 x8 q" o------------------------------------------. Q/ t2 ^- {, y" r; M1 H$ A: x1 O
    修改 dsl 词典的展开按钮
    0 P6 H" X5 d' k4 }2 ]8 z: x' ]2 R3 c& x) T6 ?! R; i6 z- A% X
    1. 在网上找两个图片表示展开、折叠,改名为 expand.png  、 collapse.png  。
    ; e! x$ S( E6 E8 o放入文件夹:“ c:\...\GoldenDict\portable\icons\ ”备用。
    1 C: l2 J% D7 w  k: S6 q# Q8 }7 d
    9 A6 R4 [- s  {2 M( l( H$ g2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ”。
    4 t$ m6 w: B4 w0 c' A* a; p调整各种 前后左右、高矮胖瘦。
    / P2 ^0 d3 a$ z; V5 `0 `! _" O
    1. .dsl_headwords img[src$="expand_opt.png"] { content: url("file:///icons/expand.png"); }7 {8 d" G4 r* y
    2. .dsl_headwords img[src$="collapse_opt.png"] { content: url("file:///icons/collapse.png"); }
      / Q  J! Z8 k2 {' @" ~" a- Z9 ]# ~
    3. .dsl_headwords img[src$="expand_opt.png"],# u1 \7 b! L1 n# Z1 b" K) p
    4. .dsl_headwords img[src$="collapse_opt.png"] {
      0 j) D% S6 s% s6 Q7 K
    5.   line-height: 0 !important;
      $ `" }# u. m7 ^0 Z9 Y' _, K
    6.   position: relative;  f* h" W% J' c6 B2 M1 {% c: [
    7.   bottom: .125rem;& W6 R# f  D& A: M% _- V6 u- B% r
    8.   left: .475rem;9 Z5 t* A0 B) [3 \) a# H2 \
    9.   width: .75rem;
      * \0 J8 F5 ^2 R" |! j% ]( O
    10.   height: .75rem;& m# s) X1 G- W2 Q% C; x# K: T. F
    11. }
    复制代码

    ) p$ [6 @4 y) F' g' [0 C------------------------------------------/ D6 c& Z  s1 e& E" U; ]. O

    7 Z5 J# R& ]# |搞定收工,试试看外链的图床效果如何。别忘了帮我评分呦~~~

    评分

    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/ E" i0 W* D0 y0 I, k
    @deeke 好方法!!!!!
    / ~* S0 ~4 d/ _) M# R$ b( l
    我比较晚才开始用 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文件,怎么实现?7 @2 x5 T& _) r
    两个词典放在一个文件夹下。手机深蓝词典。: v& f7 @* E# g8 o/ F
    谢谢!
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

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

    GMT+8, 2025-4-26 03:39 , Processed in 0.020778 second(s), 24 queries .

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

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