掌上百科 - PDAWIKI

 找回密码
 免费注册

QQ登录

只需一步,快速开始

查看: 2676|回复: 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 编辑 2 W% K) y9 J7 c7 H) s9 A, c

    2 ~9 j/ B1 X- g) H8 t# c& u6 a170928:更换图例。- ]2 U0 `: ^/ D
    ------------------------------------------
    * s9 i3 R4 y' |4 j
    - J- o: `2 q. A9 F1 s# J3 i------------------------------------------
    ) j- l* A/ l7 `% \$ h, D感谢 ryuya 制作、分享的跳转词典,和 GD 自带的构词法各有用处。
    # g! r, f3 s/ I9 [JumpToDicts 3.0 (英語構詞法詞典)
    % W6 D4 Y' Q0 I! Z( L: y5 TJumpToDicts (phrase version add-ons)
    6 K4 g- Q9 I6 X8 f1 A6 B$ ]" w我的软件环境是:Win8.1 + GoldenDict_Qt5_x64_portable8 {. G* W, C" A4 ^

    5 R3 ~$ V/ d  y3 J' V0 v词典没有外置 css 文件,所以通过 article-style.css 来曲线修改。直接修改 mdx 文件更方便快捷,但是我们就要在平坦的道路上曲折前进。
    + b' s) `8 s2 y/ H根据来源不同,外框有四种颜色,此信息体现在小箭头( u279C )上,并保持一致。
    4 Q; O( f7 [6 X; x  D4 N& A9 e- o7 y# A9 y# A+ n
    1. 在 GD 里找出词典编号。
    " B& m: S, t1 Z. Y2 x. g$ a; `: N9 _鼠标右键“审查元素”,或直接按 F12 。每台电脑的词典编号并不相同。5 R4 P- W6 g4 c' H
    1. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 对应 JumpToDicts 3.00 a$ H- |2 l. u( W3 j, d/ U, W$ C
    2. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 对应 JumpToDicts (phrase version add-ons)
    复制代码
      y8 c4 W( I( C; P
    ' z. s# l6 @6 n' Q2 ~  c9 |
    2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ” 。: U' H  P/ h9 D
    1. /* JumpToDicts | Start */7 u# V9 ?0 N" X6 r2 V2 p7 L; q) h; `
    2. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div,
      2 r9 ~9 i; N: Y6 Y1 @# C
    3. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div {& V0 u; U6 @0 ]# M6 Z
    4.   font-family: Lato, sans-serif !important;
      3 N' U4 E$ t8 Q4 S
    5.   font-size: .625rem !important;$ v0 B0 q# V, {4 t( Q
    6.   font-weight: normal !important;3 ~' B6 A) k/ d1 O3 X5 H
    7.   font-style: italic;
      4 n9 `; c+ z) u3 b" O
    8.   width: auto !important;
      0 g8 @8 q2 {7 R/ k. p
    9.   padding: 0 !important;
      7 j( i6 y' o4 E* m/ k
    10.   color: gray !important;
      ; T  _1 f, `1 V4 L
    11.   border: none !important;3 G) i7 a/ }6 z0 x( N! |- `9 ~8 |3 S
    12.   border-radius: 0 !important;- T2 b' M+ f' H+ g
    13.   background-color: transparent !important;0 A8 J7 m) o3 z: l
    14.   box-shadow: none !important;% J0 o: w0 u3 h' k4 ~! k
    15.   vertical-align: baseline !important;
      % w; A7 [6 T- V8 P! T# F
    16. }
      $ I( m# p6 W* d& D/ |0 G! |! T& ^( U
    17. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div::before,
      6 a1 _  y+ Z- @8 G- H% t: {- U
    18. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div::before {1 ?# a+ @5 A- v& u, u: Z% n
    19.   font-family: "Segoe UI Symbol";
      7 f9 F. P2 Q9 J3 t0 o& [
    20.   font-size: .5rem;
      + B/ r6 _6 \! q3 u/ I# k( s
    21.   font-style: normal;* @& k. v$ w1 C$ Y( B- v; ~$ h& Z' v
    22.   line-height: 0;* \: i- ?3 V2 c1 T2 M' }; d" R4 U4 A9 N
    23.   position: relative;
      1 A+ `- h! k6 H, y/ u) `. ]+ J
    24.   bottom: .0425rem;# \) r/ K* m% i; Q5 k0 ^
    25.   margin-right: .23rem;
      ! v* d7 Q* \: r' O0 L# K
    26.   content: "\279C";
      ) \  T5 v' O/ h: T* N( N
    27.   vertical-align: baseline;
      % x# E8 D/ o) B: g4 v- w5 k1 l
    28.   color: green;$ l/ T# f' |; g! h5 e2 S  f
    29. }
      + Y/ _6 s3 g- X$ ^- x! c
    30. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.MW::before { color: orange; }
      / D$ d) T9 E& L! E& e
    31. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.O8::before { color: deeppink; }6 g' z7 X8 j  f
    32. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>div.spell::before { color: #444444; }+ s' m( w- r1 P+ l
    33. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>div.phrase::before { color: #1E8BB7; }
      # c7 x& ~6 }$ \/ L% E
    34. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>br,
      7 k! {% A$ E$ y
    35. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>br { display: none; }8 `* C6 B" l4 C# ~, F6 s8 H
    36. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 .mdict>hr,3 Q4 P5 ~8 Q6 ], V/ \- |
    37. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 .mdict>hr { margin: .1rem !important; }, I$ F0 l' R9 b' b8 N
    38. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a,/ \& \/ E/ W$ ?& y* t3 w
    39. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a {$ J8 ]- S2 M2 P. j  d
    40.   font-size: .875rem !important;
      - J* b6 `/ ]# B4 C
    41.   font-weight: bold !important;; u" }' }$ T1 A. [
    42.   font-style: normal !important;% {4 u- e% K! _8 `
    43.   margin: auto .23rem !important;
      * s0 ^5 t% H; h. I
    44.   text-decoration: none !important;8 \$ c* V# Y8 b) Q9 n  V
    45.   color: black !important;: H+ ^. i' u. ?) P3 d+ e
    46.   border-bottom: .08rem solid transparent !important;6 h( b! q4 X1 e* B
    47.   outline: none !important;* z! p$ \; o0 ~4 G, A# s
    48. }
      " O4 l3 i" Y2 \5 ^7 I
    49. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:link,
      / H+ ~& A2 S& X2 x  ^" K
    50. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:link,% ?) O. L% c* d0 O
    51. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:visited,
      . y6 b0 e) l4 b# u% E! z7 w: W
    52. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:visited { color: black !important; }
      : d3 [7 [2 u4 y+ I( g+ ]' S& L
    53. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:hover,+ p, X7 q. g1 H  Z
    54. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:hover,2 S$ R, c$ C, f  x" E
    55. #gdarticlefrom-af6352032a97251d70ce9ba74e88edb8 a:active,
      0 w2 [- U, _. @8 R  `! P! d. _
    56. #gdarticlefrom-3a6c930edbc61ab69e6c93450b279539 a:active {
      ; w2 j8 F7 Y3 V6 k4 F, @
    57.   color: black !important;1 }! d6 e, ~$ N( t  C' y6 L
    58.   border-bottom-color: black !important;
      6 M: _  u5 l0 h, @9 j
    59.   background-color: yellow !important;2 q/ e5 {2 g2 W: c. F7 L
    60. }: O, d* o( ]0 T# ~# y
    61. /* JumpToDicts | End */
    复制代码
    : C5 ]' E% ~( u+ N) E3 V& Q
    ------------------------------------------9 \. Z; Q) n- |6 L  `
    修改 dsl 词典的展开按钮
    ; T) M4 q  w: `5 G1 y- v% D6 ~$ D/ e$ u8 n9 Y+ x4 Z2 Y  ^, r
    1. 在网上找两个图片表示展开、折叠,改名为 expand.png  、 collapse.png  。
    1 C) ?  u* ~5 z放入文件夹:“ c:\...\GoldenDict\portable\icons\ ”备用。
    ) O1 I( r) T% K$ G3 j2 h" n. f7 I& d! y0 E9 p, @9 c$ Q
    2. 修改 GD 的配置文件:“ c:\...\GoldenDict\portable\article-style.css ”。
    - F! G7 S3 z. S) M6 V调整各种 前后左右、高矮胖瘦。7 g- P3 q8 O0 i# r& [
    1. .dsl_headwords img[src$="expand_opt.png"] { content: url("file:///icons/expand.png"); }
      6 x  R/ n/ p* g* H* V9 x, V- r' B
    2. .dsl_headwords img[src$="collapse_opt.png"] { content: url("file:///icons/collapse.png"); }
      ( w* S; E+ q, `
    3. .dsl_headwords img[src$="expand_opt.png"],3 @* T# G, W) E# n0 x
    4. .dsl_headwords img[src$="collapse_opt.png"] {, \6 ]2 ~& G* o; z' I2 x6 S
    5.   line-height: 0 !important;5 w( a$ l  l& ^) }7 f/ T
    6.   position: relative;
      # @" j! \$ U/ E5 `& j) p
    7.   bottom: .125rem;
      & l0 n. J3 q1 h& q- f
    8.   left: .475rem;, @9 c) s5 T) x, _' @3 {; K
    9.   width: .75rem;
      0 E3 ~# S: l8 ~. D) N) R, B5 {2 \
    10.   height: .75rem;
      ! m7 r" J; v' V1 i! J
    11. }
    复制代码
    ( _/ H2 R$ Z' f3 Z% Q
    ------------------------------------------2 ~+ L3 j. M' [3 W
    * d1 n* T8 r1 h. Y
    搞定收工,试试看外链的图床效果如何。别忘了帮我评分呦~~~

    评分

    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:29
    . F. I& s0 t  w4 [6 o9 ~@deeke 好方法!!!!!
    " p4 ]0 g% i0 {& X- v; \" f4 f! E
    我比较晚才开始用 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文件,怎么实现?3 \# U0 a! e$ V  w+ C/ b0 b5 }
    两个词典放在一个文件夹下。手机深蓝词典。
    . }9 r0 F+ ?9 P9 L$ g! R谢谢!
    您需要登录后才可以回帖 登录 | 免费注册

    本版积分规则

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

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

    Powered by Discuz! X3.4

    Copyright © 2001-2023, Tencent Cloud.

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