掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 2678|回复: 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 编辑
    3 _( V: S3 h+ H9 Y# C
    ) G" B; h0 |/ N$ w' q6 @$ a. {170928:更换图例。
    # U5 {3 j  ]$ P! |# T+ {: y5 Q------------------------------------------; E& R& Z+ s: B

    ! l, f) v* i7 `9 o; C------------------------------------------
    : C' d& l( w5 P$ \感谢 ryuya 制作、分享的跳转词典,和 GD 自带的构词法各有用处。
    $ |( h% o: w8 s( DJumpToDicts 3.0 (英語構詞法詞典)( b7 Z' E4 s: W  b2 O* `1 N
    JumpToDicts (phrase version add-ons)( T: A- {. J( D/ K
    我的软件环境是:Win8.1 + GoldenDict_Qt5_x64_portable. B- |; Z3 }/ l
    ; m' Y9 X4 G3 D" c8 Y4 Y
    词典没有外置 css 文件,所以通过 article-style.css 来曲线修改。直接修改 mdx 文件更方便快捷,但是我们就要在平坦的道路上曲折前进。
    . I% t2 u+ V& P/ ^- D根据来源不同,外框有四种颜色,此信息体现在小箭头( u279C )上,并保持一致。
    " z& }+ J# |( f
    & _; g2 Z" j9 ^: T4 t1. 在 GD 里找出词典编号。" }+ ]6 D9 e4 K1 I; `! [
    鼠标右键“审查元素”,或直接按 F12 。每台电脑的词典编号并不相同。
    9 D; F0 f7 @; @
    1. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 对应 JumpToDicts 3.08 K6 l* |; `! s/ U) _: m3 g9 H
    2. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 对应 JumpToDicts (phrase version add-ons)
    复制代码
    : B% t1 a1 u7 v

    ) n. z+ S5 G4 J, ?" ?3 U2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ” 。
    / I) d. B+ n* v* ^* B
    1. /* JumpToDicts | Start */: R% h" W2 h2 P
    2. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div,
      % c9 g1 A" L3 b# H( J& Y5 x
    3. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div {
      ( `/ q: L3 }9 K1 H
    4.   font-family: Lato, sans-serif !important;( j! b+ @8 D' o0 Q
    5.   font-size: .625rem !important;# D% d# l4 T& p3 Z+ q
    6.   font-weight: normal !important;
      ! ]6 P7 o1 e8 n) T; `1 u- g
    7.   font-style: italic;
      ; e. L; i) v5 e3 x0 w! b. G% D" i
    8.   width: auto !important;. X; u: e" a8 E
    9.   padding: 0 !important;) ?0 e) f" i1 |2 D4 l
    10.   color: gray !important;' W6 {; f) [; M' y
    11.   border: none !important;9 ]2 v: P; o7 |5 D
    12.   border-radius: 0 !important;
      . q9 D# X: }/ W" a: b: ~+ D
    13.   background-color: transparent !important;: _8 S/ c. b0 H: O: D
    14.   box-shadow: none !important;7 B6 c1 T4 x9 Z  Y) j
    15.   vertical-align: baseline !important;- L9 G, h3 I% }2 n
    16. }, }1 B: H# }- \$ a1 p7 F
    17. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div::before,9 [$ l0 E' z1 O5 n8 M
    18. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div::before {( a" J8 X( k  ]
    19.   font-family: "Segoe UI Symbol";4 I+ J* V# @! S' ]7 q9 t; @
    20.   font-size: .5rem;+ T# g" B- L  K5 c5 L
    21.   font-style: normal;
      8 g* T, z( p( y$ J
    22.   line-height: 0;
      " C9 v. P! W1 X' u' g6 `* H7 c
    23.   position: relative;
      " d" c7 o- ~5 i( C- c5 g
    24.   bottom: .0425rem;$ t/ F( n, f; V& z$ u
    25.   margin-right: .23rem;0 s  w* ?4 L3 T
    26.   content: "\279C";9 @2 R" d: p( D. `' w% z
    27.   vertical-align: baseline;
      6 W) y- U% M& i1 A
    28.   color: green;, Q7 f  a0 H/ [& I+ r
    29. }
      ( I3 f' I! p- M  v
    30. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.MW::before { color: orange; }0 w% o; P7 ~. T+ ]0 ~
    31. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.O8::before { color: deeppink; }5 q$ M9 h% y9 t# w( g
    32. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.spell::before { color: #444444; }1 y$ X/ c, d5 W! S/ Y
    33. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div.phrase::before { color: #1E8BB7; }
      ) _5 s3 ?7 Z6 e" w/ L$ L
    34. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>br,0 c6 B; \6 n: Y$ }, O
    35. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>br { display: none; }
      " l/ W( I5 |5 U
    36. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>hr,1 n. v- a2 O7 S1 `
    37. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>hr { margin: .1rem !important; }1 P3 `' |; Z# n1 h7 ^
    38. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a,& ?- P+ y1 I5 Q# s- h# p7 S8 U
    39. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a {. s- S5 b, a4 u0 F- Y: g+ u+ f3 i. P
    40.   font-size: .875rem !important;+ M! G4 ]7 k1 S8 Q$ b3 t! S
    41.   font-weight: bold !important;
      + P; i' T1 z, G' m- f
    42.   font-style: normal !important;
      ! m! Z6 S& m( S4 M4 w
    43.   margin: auto .23rem !important;
      . @) D! K4 I% ^* y9 f6 k- P
    44.   text-decoration: none !important;
      " U# U: j6 P# O  c& W7 \% V+ B$ H
    45.   color: black !important;
      . ]; R+ w8 A0 Y/ u) r3 w- l3 N
    46.   border-bottom: .08rem solid transparent !important;
      , H& f8 z3 o8 c% e9 @9 c& r
    47.   outline: none !important;- a, r" s& z0 |" }' N
    48. }
      ) p' V' W5 _! c% U# w
    49. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:link,
      ( h% D% u" |* k2 I6 n
    50. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:link,8 F- C- J0 C# H8 L4 V# I5 ]
    51. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:visited,
      ( v  X: x5 C$ i3 O8 }$ ^
    52. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:visited { color: black !important; }
      ! g1 A) b) N1 |2 x& o
    53. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:hover,
      - a8 j# K" b9 ^; U7 J
    54. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:hover,
      9 G! C# r! h* Y! ^
    55. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:active,; J7 G$ x# Y9 Z$ w2 ^- Q5 i( s
    56. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:active {4 K; m( }& W7 }0 A' I
    57.   color: black !important;. ^& B& e! l* c  ]2 `9 |
    58.   border-bottom-color: black !important;
      2 x! o2 N  h# |9 w
    59.   background-color: yellow !important;
      6 s' R- C  V. w. |' y. y8 P. o
    60. }( c3 V6 G/ f; @  ]0 q. G& n
    61. /* JumpToDicts | End */
    复制代码
    4 y4 U% p- L: e. u7 c/ T
    ------------------------------------------( E* U2 e! S! M
    修改 dsl 词典的展开按钮
    ( V% q% U" {6 v& O$ m1 l
    5 X: |& ?) }2 Z7 H! O1. 在网上找两个图片表示展开、折叠,改名为 expand.png  、 collapse.png  。# c  \& ?! I1 @* m
    放入文件夹:“ c:\...\GoldenDict\portable\icons\ ”备用。
    / S: n$ r  _* M. A: v1 n' {- d: @! G0 k: z* \8 D( I2 G
    2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ”。
    8 V8 `& ]/ Y) M调整各种 前后左右、高矮胖瘦。. p6 I- J* e! r4 M' x4 m+ w: ~
    1. .dsl_headwords img[src$="expand_opt.png"] { content: url("file:///icons/expand.png"); }
      , A: U8 t4 t2 \" ^) [6 C+ |
    2. .dsl_headwords img[src$="collapse_opt.png"] { content: url("file:///icons/collapse.png"); }
      2 w% @& B' `+ \: V: W: \
    3. .dsl_headwords img[src$="expand_opt.png"],7 q  n. {9 l9 S& C, Y
    4. .dsl_headwords img[src$="collapse_opt.png"] {  Y+ G6 \9 {$ v3 f
    5.   line-height: 0 !important;
      # L8 b! A( r9 S5 u) n
    6.   position: relative;
      3 @8 J: ^4 a- W5 y7 a: }( A$ c+ C
    7.   bottom: .125rem;
      , x/ S7 g$ S% X' [+ \& d9 b; `
    8.   left: .475rem;
      7 h: a* Q7 G5 N: }: n' H
    9.   width: .75rem;
      ) H# Z  W# c$ z( j& o$ F
    10.   height: .75rem;
      # x; I1 r& P% N8 I" b" F
    11. }
    复制代码
    8 W3 R, x6 a' a
    ------------------------------------------5 A4 O5 R5 ^) y
    " J5 [' f2 n& q+ B5 P* s& q
    搞定收工,试试看外链的图床效果如何。别忘了帮我评分呦~~~

    评分

    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:290 T3 t$ d) s) t: Z8 a( K4 s
    @deeke 好方法!!!!!
    6 x) P1 ?- b9 d3 _6 c
    我比较晚才开始用 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文件,怎么实现?9 ?9 w. d: ~! s1 J. Y1 N
    两个词典放在一个文件夹下。手机深蓝词典。
      ]$ c2 U1 |( e3 p0 V2 ~谢谢!
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

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

    GMT+8, 2024-4-20 15:50 , Processed in 0.061342 second(s), 10 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2023, Tencent Cloud.

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